Skip to main content

Transaction Status

Check the status of a cross-chain transaction by its transaction hash.

If you want to learn more about how to use this endpoint, please have a look at our guide.

API

Endpoint Details

GET /v1/status

Check the status of a cross-chain transaction by its transaction hash.

Request

Headers

X-API-Keystring

The apiKey allows you to authenticate on the API (optional)

Query Parameters

txHashstringrequired

Transaction hash from the source chain

Example: 0xc87da4a8254486d169bf3eb6fa9db440fda5e14a5b1f9ecb0fdbdcfbabfe9aac

Response

Status Code: 200 OK
Content Type: application/json

Response

statusstringrequired

Transaction status (NOT_FOUND, PENDING, DONE, FAILED)

substatusstring

Detailed substatus of the transaction

sendingobject

Information about the sending transaction

txHashstringrequired

Transaction hash on source chain

txLinkstring

Block explorer link for the transaction

amountstringrequired

Amount sent (with decimals)

tokenobjectrequired

Token information

addressstringrequired

Token contract address

chainIdnumberrequired

Chain ID

symbolstringrequired

Token symbol

decimalsnumberrequired

Token decimals

namestringrequired

Token name

chainIdnumberrequired

Source chain ID

timestampnumber

Transaction timestamp

receivingobject

Information about the receiving transaction

txHashstringrequired

Transaction hash on destination chain

txLinkstring

Block explorer link for the transaction

amountstringrequired

Amount received (with decimals)

tokenobjectrequired

Token information

chainIdnumberrequired

Destination chain ID

timestampnumber

Transaction timestamp

toolstring

Bridge or DEX used for the transaction

fromChainIdnumberrequired

Source chain ID

toChainIdnumberrequired

Destination chain ID

Transaction Status Values

StatusDescription
NOT_FOUNDTransaction not found in the system
PENDINGTransaction is being processed
DONETransaction completed successfully
FAILEDTransaction failed

Example Request

curl --request GET \
--url 'https://xplore.api.v2.routerprotocol.com/v1/status?txHash=0xc87da4a8254486d169bf3eb6fa9db440fda5e14a5b1f9ecb0fdbdcfbabfe9aac' \
--header 'X-API-Key: your-api-key-here'

Example Response

Status Code: 200 OK

{
"status": "DONE",
"substatus": "COMPLETED",
"sending": {
"txHash": "0xc87da4a8254486d169bf3eb6fa9db440fda5e14a5b1f9ecb0fdbdcfbabfe9aac",
"txLink": "https://etherscan.io/tx/0xc87da4a8254486d169bf3eb6fa9db440fda5e14a5b1f9ecb0fdbdcfbabfe9aac",
"amount": "1000000000000000000",
"token": {
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"chainId": "1",
"symbol": "USDC",
"decimals": 6,
"name": "USD Coin",
"logoURI": "https://..."
},
"chainId": "1",
"timestamp": 1640000000
},
"receiving": {
"txHash": "0x456...",
"txLink": "https://polygonscan.com/tx/0x456...",
"amount": "995000000",
"token": {
"address": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
"chainId": "1"37,
"symbol": "USDC",
"decimals": 6,
"name": "USD Coin",
"logoURI": "https://..."
},
"chainId": "1"37,
"timestamp": 1640000120
},
"tool": "stargate",
"fromChainId": 1,
"toChainId": 137
}

Code Examples

JavaScript/TypeScript

async function monitorTransaction(txHash: string) {
let status = 'PENDING';

while (status === 'PENDING') {
const response = await fetch(
`https://xplore.api.v2.routerprotocol.com/v1/status?txHash=${txHash}`,
{
headers: {
'X-API-Key': 'your-api-key-here'
}
}
);

const data = await response.json();
status = data.status;

if (status === 'PENDING') {
await new Promise(resolve => setTimeout(resolve, 5000)); // Wait 5 seconds
}
}

return status;
}

Python

import requests
import time

def monitor_transaction(tx_hash):
status = 'PENDING'

while status == 'PENDING':
response = requests.get(
f'https://xplore.api.v2.routerprotocol.com/v1/status?txHash={tx_hash}',
headers={'X-API-Key': 'your-api-key-here'}
)

data = response.json()
status = data['status']

if status == 'PENDING':
time.sleep(5) # Wait 5 seconds

return status