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.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

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

Path Params
string
required
Defaults to 0f02ec3fa7114d418c20cee5a8096370/theta/rpc
Body Params
string
Defaults to {"jsonrpc":"2.0","method":"theta.BroadcastRawTransactionAsync","params":[{"tx_bytes":"02f8a4c78085e8d4a51000f86ff86d942e833968e5bb786ae419c4d13189fb081cc43babd3888ac7230489e800008901158e46f1e875100016b841393e2eba6241482098cf11ef4dd869209d7ebd716397f3c862ca5b762bbf403006b1fa009786102383c408cabdf7450c1c73d4dd4a20d3b48a39a88ffe0ecb0e01eae9949f1233798e905e173560071255140b4a8abd3ec6d3888ac7230489e800008901158e460913d00000"}],"id":1}
Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json