查询跨链交易详情#
根据交易哈希获取单笔跨链交易的详情。
请求路径#
GET
https://web3.okx200.com/api/v5/xlayer/tz/cross/transaction-fills请求参数#
| 参数名 | 类型 | 是否必须 | 描述 |
|---|---|---|---|
| chainShortName | String | 是 | 公链缩写符号,例如 TRADE_ZONE |
| txid | String | 是 | 跨链交易哈希(TradeZone 侧) |
响应参数#
| 参数名 | 类型 | 描述 |
|---|---|---|
| id | String | 跨链交易哈希 |
| txType | String | 交易方向:XLayerToTZ / TZToXLayer |
| crossType | String | 操作类型:Deposit / Withdraw / BatchWithdraw |
| status | String | 交易状态:0x1 成功 / 0x0 失败 |
| xlayerTxHash | String | XLayer 交易哈希 |
| xlayerBlockHeight | String | XLayer 区块高度 |
| xlayerBlockTime | String | XLayer 区块时间(毫秒) |
| tzTxHash | String | TZ 交易哈希 |
| tzBlockHeight | String | TZ 区块高度 |
| tzBlockTime | String | TZ 区块时间(毫秒) |
| from | String | 链层签名者地址 |
| to | String | 交易目标地址 |
| sourceAddress | String | 实际发送用户地址 |
| targetAddress | String | 实际接收用户地址 |
| value | String | 跨链金额(按代币精度处理) |
| valueRaw | String | 跨链金额(最小单位整数) |
| tokenContractAddress | String | 代币合约地址 |
| tokenType | String | 代币类型:ERC20 / ERC1155 |
| tokenId | String | 代币 ID,仅 ERC-1155 返回 |
| tokenName | String | 代币名称 |
| tzEventIndex | String | TZ 侧的事件索引(区块内全局唯一,等价 EVM logIndex) |
| tzBlockHash | String | TZ 区块哈希 |
| batchDetail | String | 批量提现详情 JSON 字符串(非批量时为空) |
| updateTime | String | 本条记录最近一次更新时间(毫秒) |
| blockHeight | String | 推送侧的区块高度 |
请求示例#
shell
curl --location --request GET 'https://web3.okx200.com/api/v5/xlayer/tz/cross/transaction-fills?chainShortName=TRADE_ZONE&txid=0x6029262cf3b3f9a9c0ca1f2600f94b9c77a7b5d76cf625ac00d65992245afa69' \
--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'
响应示例#
json
{
"code": "0",
"msg": "",
"data": [
{
"id": "0x83494ba71664be7566ceff70fad8d80addbd5e86286055a6261bc3260322f23d",
"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",
"tzEventIndex": "0",
"tzBlockHash": "0x1c41b3fe0cccbc947342d5b76e0b0fdab589a3d6a5ea46f33f593267a0802054",
"batchDetail": "",
"updateTime": "1779114025417",
"blockHeight": "20790237"
}
]
}
