Get Token Transaction List By Address#
Get a list of token trading transactions associated with the address.
Request Path#
GET
https://web3.okx200.com/api/v5/xlayer/address/token-transaction-listRequest Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
| chainShortName | String | Yes | The abbreviated name of the blockchain network, e.g. XLAYER |
| address | String | Yes | Address |
| protocolType | String | Yes | Token protocol Type token_20 token_721 token_1155 token_10The default is token_20 |
| tokenContractAddress | String | No | Token contract address |
| startBlockHeight | String | No | The starting block height |
| endBlockHeight | String | No | The end block height |
| isFromOrTo | String | No | from, filter transactions where the from address is the query address. to, filter transactions where the to address is the query address |
| page | String | No | Page |
| limit | String | No | The number of results returned per request. The maximum is 50. The default is 20. |
Response Parameters#
| Parameter | Type | Description |
|---|---|---|
| page | String | Current page number |
| limit | String | The amount of data |
| totalPage | String | Total number of pages |
| transactionList | Array | Transaction list |
| > txId | String | Transaction hash |
| > blockHash | String | Block hash |
| > height | String | Block height |
| > transactionTime | String | The Unix timestamp of the transaction time, in milliseconds format, e.g., 1597026383085 |
| > from | String | Sender address |
| > to | String | Recipient address |
| > tokenContractAddress | String | Token contract address |
| > isFromContract | Bol | Is the From address a contract address |
| > isToContract | Bol | Is the To address a contract address |
| > amount | String | Transaction amount |
| > symbol | String | Token symbol |
| > tokenId | String | NFT token ID |
Request Example#
shell
curl --location --request GET 'https://web3.okx200.com/api/v5/xlayer/address/token-transaction-list?chainShortName=xlayer&address=0x1e4a5963abfd975d8c9021ce480b42188849d41d&protocolType=token_20&limit=1' \
--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'
Response Example#
json
{
"code": "0",
"msg": "",
"data": [
{
"limit": "1",
"page": "1",
"totalPage": "22",
"transactionList": [
{
"txId": "0x7fe5534171a274293b6c4fa84dd4364fe108d0df3991f65258ce1a5921a4e2ab",
"blockHash": "0x339f1013e5ec02b33c99ce77c96758f4ca09db1a779e544f12384413f3f2959d",
"height": "23681833",
"transactionTime": "1752298217000",
"from": "0x6fe6dc264e1c8bfa06909ee847a744b37bb346df",
"to": "0x1e4a5963abfd975d8c9021ce480b42188849d41d",
"tokenContractAddress": "0x1e4a5963abfd975d8c9021ce480b42188849d41d",
"tokenId": "",
"amount": "20.58",
"symbol": "USDT",
"isFromContract": true,
"isToContract": true
}
]
}
]
}
