Retrieve transaction history for the specified address, sorted in descending order by time.
GET https://www.okx.com/api/waas/wallet/post-transaction/transactions-by-address
Parameter | Type | Required | Description |
---|---|---|---|
chainIndex | String | Yes | Unique chain identifier |
address | String | Yes | Address |
tokenAddresses | Array | No | List of token addresses. If not provided, query all tokens (including mainnet coins) |
begin | String | No | Start time, query transactions after this time. Unix timestamp in milliseconds |
end | String | No | End time, query transactions before this time. If neither begin nor end is provided, query transactions before the current time. Unix timestamp in milliseconds |
limit | String | No | Number of transactions to retrieve per query, default is 50, maximum is 100 |
cursor | String | No | Cursor position, defaults to the first transaction |
Parameter | Type | Description |
---|---|---|
cursor | String | Cursor position |
transactions | Array | List of transactions |
>chainIndex | String | Unique chain identifier |
>orderId | String | Unique transaction identifier |
>txHash | String | Transaction hash |
>fromAddr | String | Source address |
>toAddr | String | Destination address |
txType | String | Transaction type (transfer):1 : Receive tokens 2 : Send tokens 3 : Contract interaction 4 : Authorization 50 : BRC20_MINT 51 : BRC20_INSCRIBE 52 : BRC20_TRADE 53 : BRC20_SEND 54 : BRC20_RECEIVE 60 : BRC20_DEPLOY |
>txTime | String | Transaction time in UNIX timestamp in milliseconds |
>txStatus | String | Transaction status:1 : Pending 2 : Successful 3 : Failed |
>assetSummary | Array | Transaction summary |
>>tokenAddress | String | Token contract address. Returns empty for mainnet coins. |
>>direction | String | Token amount change:1 : Decrease 2 : Increase |
>>tokenAmount | String | Transaction token amount |
>>tokenAmountNum | String | Transaction token integer = transaction token amount * (10 ^ precision) |
>>precision | String | Precision |
>>tokenSymbol | String | Token symbol |
>>tokenName | String | Token name |
>>tokenLogoUrl | String | Token logo image URL (oss) |
curl --location --request GET 'https://www.okx.com/api/v5/waas/wallet/post-transaction/transactions-by-address?chainIndex=1&address=0x5ffe4eabaf030jg7a1a75d309ead7ad31a0ef980&tokenAddresses=xxx&cursor=1&limit=20&begin=168000021888"&end=168000031888 \
--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",
"data": [
{
"chainIndex": 3,
"orderId": "string",
"txHash": "0xcbf411766d65f3cf92839ababa73c4afec69a83442e8b67a68b5104b50a04ejb",
"fromAddr": "0x5ffe4eabaf030jg7a1a75d309ead7ad31a0ef980",
"toAddr": "0x5ffe4eabaf03ff67a1a75d309ead7ad31a0ef817",
"txType": "2",
"txTime": "0",
"txStatus": "1",
"assetSummary": [{
"tokenAmount": "5.5",
"tokenAmountNum": "5",
"direction":"1",
"precision": "8",
"tokenSymbol": "ETH",
"tokenName": "Ethereum",
"tokenLogoUrl": "http://",
"tokenAddress": ""
}]
}
],
"msg": "success"
}