theta.GetBlockByHeight

This API returns the finalized block given the height. If none of the blocks at the given height are finalized (either directly or indirectly), the API simply returns an empty result.

Parameters

Object NameRequiredTypeDetail
heightStringthe block height (need to pass in as a string instead of an integer)
include_eth_tx_hashesBooleanwhether to include the ETH tx hash of the smart contract transactions in the response
"params":[
    {
        "height":"19337607", 
        "include_eth_tx_hashes":false
    }
]

Result

Similar to the returns of the GetBlock API. Please see # Result

Example

Request

curl <your-endpoint> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"theta.GetBlockByHeight","params":[{"height":"19337607","include_eth_tx_hashes":false}],"id":1}'

Return

Similar to the returns of the GetBlock API. Please see # Example

Language
Click Try It! to start a request and see the response here!