Method Reference
Complete JSON-RPC method catalog with parameters, return types, and examples.
getblockcount
Chain
Parameters
(none)
Returns
Integer — current block height
Example Request
{"jsonrpc":"2.0","method":"getblockcount","params":[],"id":1}
getbestblockhash
Chain
Parameters
(none)
Returns
String — hash of the tip block
Example Request
{"jsonrpc":"2.0","method":"getbestblockhash","params":[],"id":1}
getblock
Chain
Parameters
hash: String
Returns
Block object with transactions
Example Request
{"jsonrpc":"2.0","method":"getblock","params":["<hash>"],"id":1}
getblockbynumber
Chain
Parameters
height: Integer
Returns
Block object
Example Request
{"jsonrpc":"2.0","method":"getblockbynumber","params":[0],"id":1}
gettx
Chain
Parameters
txid: String
Returns
Transaction object
Example Request
{"jsonrpc":"2.0","method":"gettx","params":["<txid>"],"id":1}