Get Block Details#
Get the block details of the chains.
Request Path#
GET
https://web3.okx.com/api/v5/xlayer/block/block-fillsRequest Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
| chainShortName | String | Yes | The abbreviated name of the blockchain network, e.g, XLAYER |
| height | String | Yes | Block height |
Response Parameters#
| Parameter | Type | Description |
|---|---|---|
| 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 |
| hash | String | Block hash |
| height | String | Block height |
| validator | String | Validator |
| blockTime | String | The Unix timestamp for when the block was validated, in milliseconds format, e.g., 1597026383085. |
| amount | String | Amount of the transaction |
| txnCount | String | The number of normal transactions contained in the block |
| txnInternal | String | The number of internal transactions contained in the block |
| blockSize | String | Block size, measured in bytes |
| mineReward | String | Block reward, block revenue is equal to mineReward + totalFee |
| totalFee | String | The sum of all fees in the block, in the currency of the fee |
| feeSymbol | String | Fee currency |
| ommerBlock | String | The number of ommer blocks |
| merkleRootHash | String | Merkle root hash |
| gasUsed | String | Actual amount of gas used |
| gasLimit | String | Gas limit |
| gasAvgPrice | String | Gas avg price, in OKB |
| state | String | Different block states: "pending" indicates that confirmation is currently in progress, "done" indicates completion. |
| burnt | String | Destruction fee amount |
| miner | String | The miner's address Hash that packs the block |
| difficulty | String | Difficulty when packing the block |
| nonce | String | In PoW blockchains, nonce is used to describe mining difficulty |
| confirm | String | Confirmed block count |
| tips | String | The maximum gas price that the transaction initiator is willing to pay to prioritize their transaction for inclusion in a block by miners |
| baseFeePerGas | String | Basic fee per Gas, in OKB |
Request Example#
shell
curl --location --request GET 'https://web3.okx.com/api/v5/xlayer/block/block-fills?chainShortName=xlayer&height=31118669' \
--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": [
{
"chainFullName": "X Layer",
"chainShortName": "XLAYER",
"hash": "0xb697649cd67e790749dee213a430e40c109565d7cc76db631032330365ab4550",
"height": "31118669",
"validator": "0x610de9141a2c51a9a9624278aa97fbe54b27c102",
"blockTime": "1755483959000",
"txnCount": "4",
"amount": "0",
"blockSize": "1594",
"mineReward": "0.000958705000023418",
"totalFee": "0.000958705000023418",
"feeSymbol": "OKB",
"ommerBlock": "0",
"merkleRootHash": "0x3c1ef0615fa4de876c768f0cc76ccc375f1b2ccf38335853581470566407d130",
"gasUsed": "958705",
"gasLimit": "0",
"gasAvgPrice": "0.000000001",
"state": "",
"burnt": "0",
"txnInternal": "67",
"miner": "0x610de9141a2c51a9a9624278aa97fbe54b27c102",
"difficuity": "0",
"nonce": "0",
"tips": "0",
"confirm": "3537",
"baseFeePerGas": "0"
}
]
}
