Get Normal Transaction List By Address#
Get a list of common transactions associated with an address and return only the last year or one year back from the time of the last transaction.
Request Path#
GET
https://web3.okx.com/api/v5/xlayer/address/normal-transaction-listRequest Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
| chainShortName | String | Yes | The abbreviated name of the blockchain network, e.g, XLAYER |
| address | String | Yes | 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 |
| > isFromContract | Bol | Is the From address a contract address |
| > isToContract | Bol | Is the To address a contract address |
| > amount | String | Transaction amount |
| > state | String | trading state success fail pending |
| > methodId | String | Method ID |
| > symbol | String | Symbol of the token |
| > nonce | String | The number of transactions initiated by the sender's address |
| > gasUsed | String | Actual amount of gas used |
| > gasLimit | String | Gas limit |
| > gasPrice | String | Gas price |
| > txFee | String | Transaction fees |
| > state | String | Transaction status success fail pending |
| > transactionType | String | Transaction type 0:original transaction 1:EIP2930 2:EIP1559 |
Request Example#
shell
curl --location --request GET 'https://web3.okx.com/api/v5/xlayer/address/normal-transaction-list?chainShortName=xlayer&limit=1&address=0x69c236e021f5775b0d0328ded5eac708e3b869df' \
--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": "10000",
"transactionList": [
{
"txId": "0xac13f71830c237aaae8debab0a37ed03c5baf3525c76d5fd2dcb3a20ca201ae2",
"methodId": "0x9871efa4",
"nonce": "7",
"gasPrice": "1017500300",
"gasLimit": "456747",
"gasUsed": "129549",
"blockHash": "0x0bfa9e97961084aa399288c81ac03e46bfc9d055ae38598ffb8e060af0c420f6",
"height": "30664630",
"transactionTime": "1755240660000",
"from": "0x7b63a9eaaa7f1e651f3dceea1c9935fab217624a",
"to": "0x69c236e021f5775b0d0328ded5eac708e3b869df",
"isFromContract": false,
"isToContract": true,
"amount": "0.05",
"symbol": "OKB",
"txFee": "0.0001318161463647",
"state": "success",
"transactionType": "0"
}
]
}
]
}
