Get Block Transaction List#
Get the list of transactions in a block under the blockchain.
Request Path#
GET
https://web3.okx200.com/api/v5/xlayer/block/transaction-listRequest Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
| chainShortName | String | Yes | The abbreviated name of the blockchain network, e.g, XLAYER |
| height | String | Yes | Height |
| protocolType | String | No | Protocol type transaction: normal transaction internal: internal transaction token_20 token_721 token_1155 token_10 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 |
| blockList | 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?chainShortName=xlayer&height=31118669&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": "4",
"chainFullName": "X Layer",
"chainShortName": "XLAYER",
"blockList": [
{
"txid": "0xc2ff505188032d2aee7b5debeac40fdc54bed3f25dfded07093aebb74dbd7841",
"methodId": "0xa53711f9",
"blockHash": "0xb697649cd67e790749dee213a430e40c109565d7cc76db631032330365ab4550",
"height": "31118669",
"transactionTime": "1755483959000",
"from": "0x2aff4f126e0c44a565583edbf512be316e13883f",
"isFromContract": false,
"isToContract": true,
"to": "0x47fc11bbe1fef8f07d5797f3b2b43345417603bd",
"amount": "0",
"transactionSymbol": "OKB",
"txfee": "0.000274528",
"state": "success",
"tokenId": "",
"tokenContractAddress": ""
}
]
}
]
}
