Litecoin JSON-RPC API

The Litecoin JSON-RPC API exposes the Litecoin Core node interface: methods for reading blocks, transactions, and UTXOs, inspecting the mempool, building and broadcasting raw transactions, and estimating fees. Requests POST a JSON-RPC 2.0 body to the endpoint; the method is selected by the body.

This is the node interface. It has no address index, so it cannot answer "what is the balance of this address" or "what are the unspent outputs of this address". Those queries belong on the Blockbook REST or Blockbook WebSocket add-on, which is provisioned as its own endpoint.

Base URL

bashhttps://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/

Request Format

Every request is a POST carrying a JSON-RPC 2.0 body:

bashcurl --location --request POST 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "getblockcount",
    "params": [],
    "id": "getblock.io"
}'

Available Methods

Methods that require wallet or node-administration privileges are not available on shared endpoints and are omitted below.

Blockchain information

Methods that report the state of the chain.

MethodDescription
getblockchaininfoReturns an object containing various state info regarding blockchain processing
getbestblockhashReturns the hash of the best (tip) block in the longest blockchain
getblockcountReturns the number of blocks in the longest blockchain
getdifficultyReturns the proof-of-work difficulty as a multiple of the minimum difficulty
getchaintipsReturns information about all known tips in the block tree

Block retrieval

Methods that fetch block data.

MethodDescription
getblockReturns an object with information about the block for a given hash
getblockhashReturns the hash of the block at the given height
getblockstatsComputes per-block statistics for a given window
getblocktemplateReturns data needed to construct a block to work on

Transaction methods

Methods for reading, creating, decoding, and testing transactions.

MethodDescription
getrawtransactionReturns the raw transaction data
decoderawtransactionReturns a JSON object representing the serialized transaction
decodescriptDecodes a hex-encoded script
createrawtransactionCreates a transaction spending the given inputs
createmultisigCreates a multi-signature address from a set of public keys
testmempoolacceptTests whether a raw transaction would be accepted into the mempool

Mempool methods

Methods for querying the pool of unconfirmed transactions.

MethodDescription
getmempoolinfoReturns details on the active state of the transaction memory pool
getmempoolentryReturns mempool data for a given transaction
getmempoolancestorsReturns all in-mempool ancestors of a transaction
getmempooldescendantsReturns all in-mempool descendants of a transaction

Mining methods

Methods related to mining operations and statistics.

MethodDescription
getmininginfoReturns a JSON object containing mining-related information
getnetworkhashpsReturns the estimated network hashes per second

Network methods

Methods for querying network state and peer information.

MethodDescription
getconnectioncountReturns the number of connections to other nodes
getnettotalsReturns information about network traffic
listbannedLists all manually banned IP addresses and subnets
getmemoryinfoReturns information about memory usage

UTXO methods

Methods for querying unspent transaction outputs by outpoint.

MethodDescription
gettxoutReturns details about an unspent transaction output
gettxoutsetinfoReturns statistics about the unspent transaction output set
gettxoutproofReturns a hex-encoded proof that txids were included in a block

Utility methods

General validation and information methods.

MethodDescription
validateaddressReturns information about the given Litecoin address
verifymessageVerifies a signed message
estimatesmartfeeEstimates the approximate fee per kilobyte
helpLists all commands, or gets help for a specified command

gettxout cannot list the outputs belonging to an address. For that, use api/v2/utxo on the Blockbook add-on. The Litecoin Core wallet RPCs, including listunspent, are disabled on shared nodes because those nodes carry no user wallets.

Support