查询账户维度下所有或某条链的交易历史,按时间顺序倒序排序。
GET https://www.okx.com/api/v5/wallet/post-transaction/transactions
Parameter | Type | Required | Description |
---|---|---|---|
accountId | String | Yes | 账户唯一标识符 |
chainIndex | String | No | 链唯一标识, e.g. ETH=3 |
tokenAddress | String | No | 代币合约地址。用户筛选指定代币的交易记录 |
begin | String | No | 开始时间,查询晚于该时间的交易历史。 Unix 时间戳,用毫秒表示 |
end | String | No | 结束时间,查询早于该时间的交易历史。 若 begin 和 end 都不传,查询当前时间以前的交易历史。 Unix 时间戳,用毫秒表示 |
cursor | String | No | 游标 |
limit | String | No | 返回条数,默认返回最近的 20 条,最多 20 条 |
Parameter | Type | Description |
---|---|---|
transactionList | Array | 交易列表 |
>chainIndex | String | 链ID |
>txHash | String | 交易hash |
>iType | String | EVM 交易的层级类型 0 :外层主链币转移 1 :合约内层主链币转移 2 :token转移 |
>methodId | String | 方法 |
>nonce | String | 发起者地址发起的第几笔交易 |
>txTime | String | 交易时间;Unix 时间戳的毫秒数格式,如 1597026383085 |
>from | Array | 交易输入 |
>>address | String | 发送/输入地址,多签交易时,逗号分隔 |
>>amount | String | 输入数量 |
>to | Array | 交易输出 |
>>address | String | 接收。输出地址,多签交易时,逗号分隔 |
>>amount | String | 输出数量 |
>tokenAddress | String | 代币的合约地址 |
>amount | String | 交易数量 |
>symbol | String | 交易数量对应的币种 |
>txFee | String | 手续费 |
>txStatus | String | 交易状态、success 成功、fail 失败、pending 等待确认 |
>hitBlacklist | Boolean | false:未命中黑名单 true:命中黑名单 |
>tag | String | 黑地址标签类型,包括貔貅盘、网络钓鱼以及合约漏洞等类型 |
cursor | String | 游标 |
curl --location --request GET 'https://www.okx.com/api/v5/wallet/post-transaction/transactions?accountId=31f55853-d430-42c5-b4c6-710d39848cd1' \
--header 'Content-Type: application/json' \
--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": "success",
"data": [
{
"cursor": "1724212391",
"transactionList": [
{
"chainIndex": "0",
"txHash": "5fd7e21515b088e2c47641779d53de4ff3b982c7d71a5e85f06f32d8cd4c5bcc",
"methodId": "",
"nonce": "",
"txTime": "1724250342000",
"from": [
{
"address": "bc1pm7fxkgcrqghf2rtxdw4hupvdpqkped7azyrh2mukedrw2p0cj3hsxt8ph3"
"amount": "0.000432"
}
],
"to": [
{
"address": "bc1pm7fxkgcrqghf2rtxdw4hupvdpqkped7azyrh2mukedrw2p0cj3hsxt8ph3"
"amount": "0.00010"
},
{
"address": "bc1pm7fxkgcrqghf2rtxdw4hupvdpqkped7azyrh2mukedrw2p0cj3hsxt8ph3"
"amount": "0.00032738"
}
],
"tokenAddress": "",
"amount": "",
"symbol": "BTC",
"txFee": "0.00000462",
"txStatus": "success",
"hitBlacklist": false,
"tag": "",
"iType": ""
},
{
"chainIndex": "1",
"txHash": "0x307ced97491fdeea9acb141cb3d07939ef3291f28c06c0cacd1cc1f8c435bbe1",
"methodId": "",
"nonce": "945",
"txTime": "1724056787000",
"from": [
{
"address": "0x50c476a139aab23fdaf9bca12614cdd54a4244e4"
"amount": ""
}
],
"to": [
{
"address": "0x2491889438e5130a4cf629fbc93ae31aad742d8b"
"amount": ""
}
],
"tokenAddress": "",
"amount": "0.00001",
"symbol": "ETH",
"txFee": "1.89E-23",
"txStatus": "success",
"hitBlacklist": false,
"tag": "",
"iType": "0"
}
]
}
]
}