Query the transaction history of all or a specific chain under the current wallet.
POST https://www.okx.com/api/v5/waas/transaction/get-transactions
Parameter | Type | Required | Description |
---|---|---|---|
walletId | String | Yes | Unique identifier of the wallet |
chainIds | Array<String> | No | List of unique identifiers of the chain |
lastRowId | String | No | Default is empty, representing the first page |
limit | String | No | How many items to query per page. Default is 20 |
startDate | String | No | Start time (YYYY-MM-DD HH:MM:SS) |
endDate | String | No | End time (YYYY-MM-DD HH:MM:SS) |
Parameter | Type | Description |
---|---|---|
chainId | String | Unique identifier of the chain |
orderId | String | Unique identifier of the transaction |
txHash | String | Transaction hash |
fromAddr | String | Source address |
toAddr | String | Destination address |
txType | String | Transaction type |
txTime | String | Transaction time (timestamp) |
txStatus | String | Transaction status: 1, 2 in queue; 3 failed, 4 successful |
rowId | String | RowId (offset function) |
assetSummary | Array<Object> | Transaction summary |
>coinId | String | Unique identifier of the coin |
>brc20Coin | Boolean | Is it BRC-20 token |
>direction | String | Transaction direction |
>coinAmount | String | Transaction coin amount |
>coinAmountNum | String | Transaction coin integer |
>precision | String | Precision |
>coinSymbol | String | Coin symbol |
>coinName | String | Coin name |
>coinLogoUrl | String | Coin logo image URL (oss) |
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
}
]
}
]
}