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"
})Check Transaction Status Request
requestId* StringDescription: The unique ID which is generated in the best route endpoint.
Example:
b3a12c6d-86b8-4c21-97e4-809151dd4036
step* NumberDescription: The current step number in a multi-step route, starting from 1.
Example:
1
txId* StringDescription: Transaction hash returned by wallet
Example:
0xfa88b705a5b4049adac7caff50c887d9600ef023ef1a937f8f8b6f44e90042b5
Check Transaction Status Response
statusDescription: Status of the transaction, while the status is
runningornull, the client should retry until it turns intosuccessorfailed.
timestampDescription: The timestamp of the executed transaction. Beware that timestamp can be null even if the status is successful or failed, e.g.
1690190660000
extraMessageDescription: A message in case of failure, that could be shown to the user.
outputAmountDescription: The human readable output amount for the transaction, e.g. 0.28.
outputTokenDescription: The output token for this step.
newTxDescription: 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
disableMultiStepTxequals totruein get best route method
diagnosisUrlDescription: 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
explorerUrlDescription: List of explorer URLs for the transactions that happened in this step.
referralsDescription: List of referral reward for the dApp and Rango.
stepsDescription: 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
Was this helpful?