Get Normal Transactions By Address And Block#
This allows for querying ordinary transactions of up to 20 addresses at once. It is necessary to limit the starting block height and the ending block height, the difference between which cannot exceed 10,000 blocks.
Request Path#
GET
https://web3.okx.com/api/v5/xlayer/address/normal-transaction-list-multiRequest Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
| chainShortName | String | Yes | Chain abbreviation |
| address | String | Yes | Addresses, up to 20 addresses separated by , |
| startBlockHeight | String | Yes | Starting block number for the search |
| endBlockHeight | String | Yes | Ending block number for the search |
| 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 number |
| limit | String | No | Number of records per page, default min 20, max 100 |
Response Parameters#
| Parameter | Type | Description |
|---|---|---|
| page | String | Page number |
| limit | String | Number of records per page, default min 20, max 100 |
| totalPage | String | Total number of pages |
| transactionList | Array | List of transactions |
| > txId | String | Transaction hash |
| > methodId | String | Short hash identifying the smart contract function |
| > nonce | String | The number of transactions initiated by the sender's address |
| > blockHash | String | Block hash |
| > height | String | Block height of the transaction |
| > transactionTime | String | The Unix timestamp of the transaction time, in milliseconds format, e.g., 1597026383085 |
| > from | String | Transaction sender's address, multiple addresses separated by , |
| > to | String | Transaction receiver's address, multiple addresses separated by , |
| > isFromContract | Bool | Whether the from address is a contract address |
| > isToContract | Bool | Whether the to address is a contract address |
| > amount | String | Token amount |
| > symbol | String | Symbol of the transaction token |
| > txFee | String | Transaction fee (in OKB) |
| > gasLimit | String | Maximum gas amount |
| > gasUsed | String | Actual amount of gas used (in Wei) |
| > gasPrice | String | Gas price (in Wei) |
| > 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-multi?chainShortName=xlayer&address=0x69c236e021f5775b0d0328ded5eac708e3b869df,0xa1d2c4533d867ce4623681f68df84d9cad73cb6b&endBlockHeight=30666228&startBlockHeight=30666225' \
--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": [
{
"page": "1",
"limit": "20",
"totalPage": "1",
"transactionList": [
{
"txId": "0x05203bf6a5537085f04f9aea12df9cb0dd84e838e2b9a176507dd268d240c546",
"methodId": "0xb80c2f09",
"blockHash": "0x0544b739806c5c28e953e6cba7be1df160407a083a9e295dc2900e6c338f43dc",
"height": "30666228",
"transactionTime": "1755241379000",
"from": "0xb574f51e9f1ff7df6b0965a49a5656b30d2d9dab",
"to": "0x69c236e021f5775b0d0328ded5eac708e3b869df",
"isFromContract": false,
"isToContract": true,
"amount": "0",
"symbol": "OKB",
"txFee": "0.0002503569034629",
"gasLimit": "920976",
"gasUsed": "230490",
"gasPrice": "1086194210",
"nonce": "1",
"transactionType": "0"
}
]
}
]
}
