Check Transaction Status
Track Status of Transaction
Check Status API
After that user signed a transaction on his/her wallet, you should call this endpoint periodically to see what's the status of that transaction.
const response = await rango.status({
requestId: 'b3a12c6d-86b8-4c21-97e4-809151dd4036',
txId: '0xfa88b705a5b4049adac7caff50c887d9600ef023ef1a937f8f8b6f44e90042b5',
})const response = await axios.get('https://api.rango.exchange/basic/status', {
params: {
'requestId': 'b3a12c6d-86b8-4c21-97e4-809151dd4036',
'txId': '0xfa88b705a5b4049adac7caff50c887d9600ef023ef1a937f8f8b6f44e90042b5',
'apiKey': 'c6381a79-2817-4602-83bf-6a641a409e32'
}
});curl --request GET \
--url 'https://api.rango.exchange/basic/status?requestId=b3a12c6d-86b8-4c21-97e4-809151dd4036&txId=0xfa88b705a5b4049adac7caff50c887d9600ef023ef1a937f8f8b6f44e90042b5&apiKey=c6381a79-2817-4602-83bf-6a641a409e32'Check Transaction Status Request
requestId* StringDescription: The unique ID which is generated in the swap endpoint.
Example:
b3a12c6d-86b8-4c21-97e4-809151dd4036
txId* StringDescription: Transaction hash that wallet returned.
Example:
0xfa88b705a5b4049adac7caff50c887d9600ef023ef1a937f8f8b6f44e90042b5
Check Transaction Status Response
statusDescription: Status of the transaction, while the status is
running(ornull), the client should retry until it turns intosuccessorfailed.
errorDescription: A message in case of failure, that could be shown to the user.
outputDescription: The output asset and amount, could be different from the destination asset in case of failures or refunds. In the context of a cross-chain swap, the process combines up to three transactions ([dex]+bridge+[dex]) into a single transaction. Consequently, several scenarios could arise if a user ends up receiving a token that differs from their initial expectation. These are possible cases for
output.type:DESIRED_OUTPUTWhen your transaction status is marked as successful, it indicates that the bridge or swap process has been successfully completed, and the user has received the intendedDESIRED_OUTPUTtoken as part of the output.REVERTED_TO_INPUTIf user transaction reverted on first dex step, transaction will be reverted on the blockchain and user will receive back the input token.MIDDLE_ASSET_IN_SRCIf the dex step succeeded but the bridge step failed because of slippage or lack of liquidity or ...MIDDLE_ASSET_IN_DESTIf the [dex]+bridge step succeeded but, the last dex step failed because of slippage.
explorerUrlDescription: List of explorer URLs for the transactions of this swap. Including inbound transaction link, outbound transaction link and etc.
diagnosisUrlDescription: If a transaction becomes stuck within a bridge, requiring user intervention to initiate a refund through the bridge's user interface, we offer a diagnosis URL. This URL directs the user to a guide detailing the steps they need to take in order to successfully refund their tokens from the route underlying protocol.
bridgeDataDescription: Status of bridge. At the moment, this field is only filled when we have a bridge/swap transaction between two EVM chains. (e.g. from Polygon to Avax) It contains both data of inbound and outbound transactions/tokens.
Last updated
Was this helpful?