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-KeystringThe apiKey allows you to authenticate on the API (optional)
Query Parameters
txHashstringrequiredTransaction hash from the source chain
Response
Status Code: 200 OK
Content Type: application/json
Response
statusstringrequiredTransaction status (NOT_FOUND, PENDING, DONE, FAILED)
substatusstringDetailed substatus of the transaction
txHashstringrequiredTransaction hash on source chain
txLinkstringBlock explorer link for the transaction
amountstringrequiredAmount sent (with decimals)
addressstringrequiredToken contract address
chainIdnumberrequiredChain ID
symbolstringrequiredToken symbol
decimalsnumberrequiredToken decimals
namestringrequiredToken name
chainIdnumberrequiredSource chain ID
timestampnumberTransaction timestamp
txHashstringrequiredTransaction hash on destination chain
txLinkstringBlock explorer link for the transaction
amountstringrequiredAmount received (with decimals)
tokenobjectrequiredToken information
chainIdnumberrequiredDestination chain ID
timestampnumberTransaction timestamp
toolstringBridge or DEX used for the transaction
fromChainIdnumberrequiredSource chain ID
toChainIdnumberrequiredDestination chain ID
Transaction Status Values
| Status | Description |
|---|---|
| NOT_FOUND | Transaction not found in the system |
| PENDING | Transaction is being processed |
| DONE | Transaction completed successfully |
| FAILED | Transaction 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