post https://api.infstones.com/theta/mainnet/
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 Name | Required | Type | Detail |
---|---|---|---|
height | ✅ | String | the block height (need to pass in as a string instead of an integer) |
include_eth_tx_hashes | ❌ | Boolean | whether 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