Check Transaction Status

Track the status of the transaction for the current step

Check Status API

After the user signs a transaction in his wallet, you should periodically call this endpoint to check the status of the transaction.

const transaction = await rango.checkStatus({
    requestId: "b3a12c6d-86b8-4c21-97e4-809151dd4036", // bestRoute.requestId
    step: 1,
    txId: "0xfa88b705a5b4049adac7caff50c887d9600ef023ef1a937f8f8b6f44e90042b5"
})
  • This endpoint is not suitable for checking approve transaction and it is only for the main transaction. For checking approval transaction status, please check this section.

  • In on-chain transactions, you could also check transaction status by checking transaction receipt (via RPC) if you prefer. But in cross-chain swaps (e.g. bridges), you could use this method to make sure outbound transaction (transaction on destination chain) succeeds without any problem.

Check Transaction Status Request

  • requestId * String

    • Description: The unique ID which is generated in the best route endpoint.

    • Example: b3a12c6d-86b8-4c21-97e4-809151dd4036

  • step * Number

    • Description: The current step number in a multi-step route, starting from 1.

    • Example: 1

  • txId * String

    • Description: Transaction hash returned by wallet

    • Example: 0xfa88b705a5b4049adac7caff50c887d9600ef023ef1a937f8f8b6f44e90042b5

Check Transaction Status Response

  • status

    • Description: Status of the transaction, while the status is running or null, the client should retry until it turns into success or failed.

  • timestamp

    • Description: The timestamp of the executed transaction. Beware that timestamp can be null even if the status is successful or failed, e.g. 1690190660000

  • extraMessage

    • Description: A message in case of failure, that could be shown to the user.

  • outputAmount

    • Description: The human readable output amount for the transaction, e.g. 0.28.

  • outputToken

    • Description: The output token for this step.

  • newTx

    • Description: if a transaction needs more than one-step transaction to be signed by the user, the next step transaction will be returned in this field. It's only used for the Voyager bridge at the moment, and you could simply avoid swappers with this requirement by passing disableMultiStepTx equals to true in get best route method

  • diagnosisUrl

    • Description: In some special cases (e.g. Wormhole), the user should follow some steps outside Rango to get its assets back (to refund). You could show this link to the user to help him. Sample value: https://rango.exchange/diagnosis/wormhole?iframe=1

  • explorerUrl

    • Description: List of explorer URLs for the transactions that happened in this step.

  • referrals

    • Description: List of referral reward for the dApp and Rango.

  • steps

    • Description: In certain special cases (specifically for the Wormhole Bridge), the user must sign multiple transactions for a step to be successful. In these instances, you can use the steps data to display the internal steps of a single swap to the user for informational purposes.

Last updated