Check the final status of the cross-chain swap according to transaction hash.
GET https://www.okx.com/api/v5/dex/cross-chain/status
Parameter | Type | Required | Description |
---|---|---|---|
hash | String | Yes | Hash address of the source chain |
chainId | String | No | Source chain ID (e.g., 1 for Ethereum. See Chain IDs) |
Parameter | Type | Description |
---|---|---|
fromChainId | String | Source chain ID (e.g., 1: Ethereum; more details can be found in the Chain ID list) |
toChainId | String | Target chain ID (e.g., 66: Ethereum; more details can be found in the Chain ID list) |
fromTxHash | String | Source chain transaction hash |
toTxHash | String | Target chain transaction hash |
fromAmount | String | Exchange amount of the quoted token (amount includes precision, e.g., 1.00 USDT would be 1000000) |
fromTokenAddress | String | Contract address of the quoted token (e.g., 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE) |
toAmount | String | Exchange amount of the target token (amount includes precision, e.g., 1.00 USDT would be 1000000) |
toTokenAddress | String | Contract address of the target token (e.g., 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48) |
errorMsg | String | Error message |
bridgeHash | String | Cross-chain bridge transaction hash on the target chain |
refundTokenAddress | String | Contract address of the refund token |
sourceChainGasfee | String | Actual gas fee consumed on the source chain |
crossChainFee | Object | Actual fees charged by the cross-chain bridge |
symbol | String | Symbol of the cross-chain bridge token |
address | String | Address of the cross-chain bridge token |
amount | String | Amount charged by the cross-chain bridge |
crossChainInfo | Object | Information about the cross-chain bridge |
memo | String | Custom parameter carried in /build-tx |
destinationChainGasfee | String | Actual gas fee consumed on the target chain |
detailStatus | String | WAITING (Order in process), FROM_SUCCESS (Source chain order successful), FROM_FAILURE (Source chain order failed), BRIDGE_PENDING (Cross-chain bridge order pending), BRIDGE_SUCCESS (Bridge order successful), SUCCESS (Cross-chain exchange order successful), REFUND (Cross-chain failed, order refunded) |
status | String | PENDING (Cross-chain in progress), SUCCESS (Cross-chain successful), FAILURE (Cross-chain failed) |
curl --location --request GET 'https://www.okx.com/api/v5/dex/cross-chain/status?hash=0x0922d94d3bb459d05f16c64ba4b71ec1138940ed552a701837dba2536893e7fc' \
--header 'OK-ACCESS-PROJECT: 86af********d1bc' \
--header 'OK-ACCESS-KEY: 37c541a1-****-****-****-10fe7a038418' \
--header 'OK-ACCESS-SIGN: leaV********3uw=' \
--header 'OK-ACCESS-PASSPHRASE: 1****6' \
--header 'OK-ACCESS-TIMESTAMP: 2023-10-18T12:21:41.274Z'
{
"code":0,
"msg":"",
"data": [
{
"bridgeHash": "0x94ec8deac0dxxxb1c4ef09e0f29689xxxxfd9e66de822e2059bxxxx78c1ae1e8",
"fromChainId": "109",
"toChainId": "110",
"fromAmount": 10000000000000,
"toAmount": 25300000000000,
"errorMsg": "",
"toTxHash": "0x94ec8deac0d114b1c4ef09e0f29689dc53fd9e66de822e2059b9ad078c1ae1e8",
"fromTxHash": "0xa917f8c0ff8dd4b7bdf2eac4d54be40f7a7d4a06a517c6c590ea9a9bd99f40ba",
"refundTokenAddress": "",
"detailStatus": "SUCCESS",
"status": "SUCCESS"
}
]
}