Get Cross-chain Transaction List#
Get the list of cross-chain transactions between X Layer and TradeZone with optional filtering by block range, address, sender, recipient, and token contract.
Request Path#
GET
https://web3.okx.com/api/v5/xlayer/tz/cross/transaction-listRequest Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
| chainShortName | String | Yes | The abbreviated name of the blockchain network, e.g, TRADE_ZONE |
| txid | String | No | Filter by transaction hash |
| height | Integer | No | Filter by block height |
| startBlockHeight | Long | No | Start block height (inclusive) |
| endBlockHeight | Long | No | End block height (inclusive) |
| address | String | No | Filter cross-chain transactions involving this address |
| from | String | No | Filter by sender address |
| to | String | No | Filter by recipient address |
| tokenContractAddress | String | No | Filter by token contract address |
| limit | Integer | No | The number of results returned per request. The maximum is 100. The default is 20. |
| page | Integer | No | Page number, default 1 |
Response Parameters#
| Parameter | Type | Description |
|---|---|---|
| page | String | Current page number |
| limit | String | Number of results per page |
| totalPage | String | Total number of pages |
| total | String | Total number of records |
| data | Array | Cross-chain transaction list |
| > id | String | Cross-chain transaction hash |
| > txType | String | Transaction direction: XLayerToTZ / TZToXLayer |
| > crossType | String | Operation type: Deposit / Withdraw / BatchWithdraw |
| > status | String | Transaction status: 0x1 success / 0x0 failure |
| > xlayerTxHash | String | XLayer transaction hash |
| > xlayerBlockHeight | String | XLayer block height |
| > xlayerBlockTime | String | XLayer block time (ms) |
| > tzTxHash | String | TZ transaction hash |
| > tzBlockHeight | String | TZ block height |
| > tzBlockTime | String | TZ block time (ms) |
| > from | String | Link-layer signer address |
| > to | String | Transaction destination address |
| > sourceAddress | String | Actual sender address |
| > targetAddress | String | Actual recipient address |
| > value | String | Cross-chain amount (token precision applied) |
| > valueRaw | String | Cross-chain amount (raw integer, smallest unit) |
| > tokenContractAddress | String | Token contract address |
| > tokenType | String | Token type: ERC20 / ERC1155 |
| > tokenId | String | Token ID, only returned for ERC-1155 |
| > tokenName | String | Token name |
Request Example#
shell
curl --location --request GET 'https://web3.okx.com/api/v5/xlayer/tz/cross/transaction-list?chainShortName=TRADE_ZONE&limit=1' \
--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'
Response Example#
json
{
"code": "0",
"msg": "",
"data": [
{
"page": "1",
"limit": "1",
"totalPage": "334",
"total": "334",
"data": [
{
"id": "",
"txType": "XLayerToTZ",
"crossType": "Deposit",
"status": "0x1",
"xlayerTxHash": "0x83494ba71664be7566ceff70fad8d80addbd5e86286055a6261bc3260322f23d",
"xlayerBlockHeight": "60344989",
"xlayerBlockTime": "1779114025000",
"tzTxHash": "0x6029262cf3b3f9a9c0ca1f2600f94b9c77a7b5d76cf625ac00d65992245afa69",
"tzBlockHeight": "20790237",
"tzBlockTime": "1779114025417",
"from": "0x7ad674c0595de0885f7335b8dcaa91ca5d1723e5",
"to": "0xe87356f600529dc2d17ac420a1bd478f17af91f9",
"sourceAddress": "0xf593d6073a1028ac457d02b202251f0e71fffc75",
"targetAddress": "0xe87356f600529dc2d17ac420a1bd478f17af91f9",
"value": "500000000",
"valueRaw": "500000000000000",
"tokenContractAddress": "0xf593d6073a1028ac457d02b202251f0e71fffc75",
"tokenType": "ERC20",
"tokenId": "",
"tokenName": "PT"
}
]
}
]
}
