查询钱包下所有链或某条链的历史交易记录。
POST https://www.okx.com/api/v5/waas/transaction/get-transactions
Parameter | Type | Required | Description |
---|---|---|---|
walletId | String | Yes | 钱包唯一标识 |
chainIds | Array<String> | No | 链唯一标识列表 |
lastRowId | String | No | 默认空,表示第一页 |
limit | String | No | 每页查询多少条数据,默认值为 20 |
startDate | String | No | 开始时间 (YYYY-MM-DD HH:MM:SS) |
endDate | String | No | 结束时间 (YYYY-MM-DD HH:MM:SS) |
Parameter | Type | Description |
---|---|---|
chainId | String | 链唯一标识 |
orderId | String | 交易唯一标识 |
txHash | String | 交易哈希 |
fromAddr | String | 发送地址 |
toAddr | String | 接收地址 |
txType | String | 交易类型 1:接收代币 2:发送代币 3:合约交互 50:BRC20_MINT 51:BRC20_INSCRIBE 52:BRC20_TRADE 53:BRC20_SEND 54:BRC20_RECEIVE 60:BRC20_DEPLOY |
txTime | String | 交易时间,时间戳 |
txStatus | String | 交易状态 1、2:排队中 3:失败 4:成功 |
rowId | String | rowId (offset 作用) |
assetSummary | Array<Object> | 交易概要 |
>coinId | String | 币种唯一标识 |
>brc20Coin | Booleanolean | 是否 BRC-20代币 |
>direction | String | 交易方向 |
>coinAmount | String | 交易货币数 |
>coinAmountNum | String | 交易货币整数 |
>precision | String | 精度 |
>coinSymbol | String | 货币 symbol |
>coinName | String | 货币名称 |
>coinLogoUrl | String | 币种 logo 图片 URL |
curl --location --request POST 'https://www.okx.com/api/v5/waas/transaction/get-transactions' \
--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' \
--data-raw '{
"walletId": "13886e05-1265-4b79-8ac3-b7ab46211001",
"chainIds": ["1"],
"lastRowId": "1",
"limit": "20",
"startDate": "2023-07-11 00:00:00",
"endDate" : "2023-07-23 00:00:00"
}'
{
"code": "0",
"msg": "success",
"data": [
{
"chainId": "56",
"orderId": "489315326522433536",
"txHash": "0x8b6a3fa8f6dfe532f3d3473d6af9f61e3dbae2c4286d64dffe25b3278bc8750d",
"fromAddr": "0x40b9c3c3870783d79d103281e0e68510f75cea82",
"toAddr": "0x238193be9e80e68eace3588b45d8cf4a7eae0fa3",
"txType": "1",
"txTime": "1702306137000",
"txStatus": "4",
"rowId": "1702306136079529866",
"assetSummary": [
{
"coinId": "5000",
"brc20Coin": false,
"coinAmount": "0.00992357105962900",
"coinAmountNum": "9923571059629000",
"precision": "18",
"coinSymbol": "BNB",
"coinName": "Binance Coin",
"coinLogoUrl": "https://static.coinall.ltd/cdn/wallet/logo/BNB-20220308.png",
"direction": 1
}
]
},
{
"chainId": "1",
"orderId": "489312340328722453",
"txHash": "0xa084dc6d7d840f063854d2c484f6caa55f99f3052811611f9b9344888b865159",
"fromAddr": "0xf977814e90da44bfa03b6295a0616a897441acec",
"toAddr": "0x28c6c06298d514db089934071355e5743bf21d60",
"txType": "2",
"txTime": "1702305419000",
"txStatus": "4",
"rowId": "1702305417348249046",
"assetSummary": [
{
"coinId": "25",
"brc20Coin": false,
"coinAmount": "10412.29700000000000000",
"coinAmountNum": "10412297000000000000000",
"precision": "18",
"coinSymbol": "MKR",
"coinName": "Maker",
"coinLogoUrl": "https://static.coinall.ltd/cdn/wallet/logo/MKR-20220328.png",
"direction": 2
}
]
}
]
}