Batch Get Block Transactions#
Batch query the transaction list for certain blocks on a blockchain, and only return the latest 10,000 transaction data.
Request Path#
GET
https://web3.okx200.com/api/v5/xlayer/block/transaction-list-multiRequest Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
| chainShortName | String | Yes | The abbreviated name of the blockchain network, e.g, XLAYER |
| startBlockHeight | String | Yes | The starting block height |
| endBlockHeight | String | Yes | The end block height |
| protocolType | String | No | Protocol type transaction: normal transaction internal: internal transaction token_20 token_721 token_1155 The default is transaction |
| limit | String | No | The number of results returned per request. The maximum is 100. The default is 20. |
| page | String | No | Page |
Response Parameters#
| Parameter | Type | Description |
|---|---|---|
| page | String | Current page number |
| limit | String | The amount of data |
| totalPage | String | Total number of pages |
| chainFullName | String | The full name of the blockchain network, e.g. X Layer |
| chainShortName | String | The abbreviated name of the blockchain network, e.g. XLAYER |
| transactionList | Array | Block 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 |
| > isFromContract | Bol | Is the From address a contract address |
| > isToContract | Bol | Is the To address a contract address |
| > to | String | Recipient address |
| > amount | String | Number of transactions |
| > transactionSymbol | String | Symbol |
| > txFee | String | Transaction Fees |
| > state | String | Transaction status success fail pending |
| > tokenContractAddress | String | Token Contract Address |
| > tokenId | String | NFT token Id |
| > methodId | String | Method ID |
Request Example#
shell
curl --location --request GET 'https://web3.okx200.com/api/v5/xlayer/block/transaction-list-multi?chainShortName=xlayer&startBlockHeight=31118669&endBlockHeight=31118670&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": [
{
"page": "1",
"limit": "1",
"totalPage": "12",
"transactionList": [
{
"height": "31118670",
"txId": "0x41c1001e8fb26edd4b2ccf9856daa0e90a0c523466bb90378529536269523619",
"methodId": "0xc480dd84",
"blockHash": "0xe5472915fcd492f0c0b65103959925888d4bae32ae008ba87bca85b48fc59225",
"transactionTime": "1755483960000",
"from": "0x4323c64481650c3edcad6be9f4feaa85931005ac",
"isFromContract": false,
"isToContract": true,
"to": "0xed65f249af632aba04737b570be3680e98d5ea37",
"amount": "0",
"transactionSymbol": "OKB",
"txFee": "0.000865481865481",
"state": "success",
"tokenId": "",
"tokenContractAddress": ""
}
]
}
]
}
