Skip to main content
Swaps provides a status endpoint you can use to track your transactions. The endpoint provides status updates and key transaction data for any transaction type. Key transaction data includes the USD value of the transaction, transaction fees, execution path, and other useful on-chain information. For transactions originating on alt VMs (e.g., Bitcoin, Ripple), you will need to register your transaction by submitting a POST request containing the transaction’s txHash.

Get status

API Reference: Get Status The status endpoint supports three query parameters: We recommend using the source chain ID and the transaction hash. The example below assumes this approach. The status endpoint will return a TxDetails object.

Register transaction

API Reference: Register Transaction Registering a transaction triggers indexing after it is broadcasted on the source chain. This is required for any transactions that return an alt-vm-* bridge ID in the Action Response. The Action Response also includes a requiresRegisterTx flag. This is covered in the alt VM broadcast guide. Swaps will automatically register any transaction submitted to a named VM. If you believe we have missed a transaction, calling the register transaction endpoint will trigger indexing. This endpoint does support registering multiple transactions in a single call.

Webhooks

Swaps can emit webhooks on transaction creation and completion (success or failure) events. To use webhooks, please register a webhook URL in the developer console. Webhook URLs should correspond to a certain API key — each API key represents a unique appId. Each appId can have its own webhook URL. Swaps’ webhooks are sent with a x-signature-256 header that hashes the raw request body and delivery timestamp. This signature ensures that neither the request body nor the timestamp were modified and can be trusted as sent from Swaps. The webhook body mirrors the TxDetails object returned from the /getStatus endpoint. The schema is:
To verify the webhook signature, hash the payload with your webhook secret using SHA256 and confirm that the timestamp is within an expected buffer. Please see a reference implementation below: