查询交易详情#
根据交易哈希获取 TradeZone 单笔交易的详情。
请求路径#
GET
https://web3.okx200.com/api/v5/xlayer/tz/transaction/transaction-fills请求参数#
| 参数名 | 类型 | 是否必须 | 描述 |
|---|---|---|---|
| chainShortName | String | 是 | 公链缩写符号,例如 TRADE_ZONE |
| txid | String | 是 | 交易哈希 |
响应参数#
| 参数名 | 类型 | 描述 |
|---|---|---|
| hash | String | 交易哈希 |
| blockHeight | String | 区块高度 |
| blockHash | String | 区块哈希 |
| blockTime | String | 区块时间(毫秒) |
| status | String | 交易状态:0x1 成功 / 0x0 失败 |
| from | String | 业务执行用户地址 |
| nonce | String | 交易 nonce |
| actionType | String | Action 类型 |
| actionData | String | Action 完整 JSON 字符串 |
| errorMessage | String | 交易失败时的错误信息 |
| index | String | 执行顺序 |
| value | String | 交易金额(按代币精度处理) |
| valueRaw | String | 交易金额(最小单位整数) |
| tokenTransferCount | String | 该交易产生的代币转账数 |
| eventCount | String | 该交易产生的事件数 |
请求示例#
shell
curl --location --request GET 'https://web3.okx200.com/api/v5/xlayer/tz/transaction/transaction-fills?chainShortName=TRADE_ZONE&txid=0x1fb6e49ecd777ced8a8a4d0e343b7bf3052479302cefdcd32f400431e2780efa' \
--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": [
{
"hash": "0x1fb6e49ecd777ced8a8a4d0e343b7bf3052479302cefdcd32f400431e2780efa",
"blockHeight": "21265002",
"blockHash": "0xc88a39814bb554c69912348c7f327ff8f2fe3f5d48d61e14a03937e2bc9e3b3a",
"blockTime": "1779161501917",
"status": "0x1",
"from": "0x9dce198689d85d685731437866a7b06ff911d908",
"nonce": "1779161496872",
"actionType": "initPredictionMarket",
"actionData": "{\"type\":\"initPredictionMarket\",\"adapter\":\"0x726a2ae535223494eafd8189199645c5f369ffe0\",\"originalMarketId\":\"0xbea1323587e4c4bf89aa077056005e7af51dc62ee83bbfdfb4fe6003fde3fb09\",\"collateralToken\":\"0xf593d6073a1028ac457d02b202251f0e71fffc75\",\"tokenDecimal\":\"2\",\"wrapCollateralToken\":\"0xdb2bb6c3ee668da5b10fe02e30bcdea61c686942\",\"outcomeTokenFlag\":\"3\",\"makerFeeRate\":\"0\",\"takerFeeRate\":\"0\"}",
"errorMessage": "",
"index": "0",
"value": "",
"valueRaw": "",
"tokenTransferCount": "0",
"eventCount": "5"
}
]
}
