Home

BlockBook RES-API

v1.0.0
Base URL
https://ont.nownodes.io

Authentication

api-keyAuthapiKey

API Key: api-key in header

MAINNET / Blockchain_RPCs

getbalancev2

POST
https://ont.nownodes.io/

Method to obtain ONT and ONG balances for a specific address.

Body

application/json
jsonrpcstring2.0required

JSON-RPC protocol version. Must be exactly "2.0".

methodstringgetbalancev2required

Name of the RPC method to invoke. For this API, the method getbalancev2 is documented.

paramsArray<string>

Parameters for the method. For getbalancev2, this is an array containing a single string – the wallet address.

idintegerrequired

Request identifier. The response will echo this value, allowing the client to correlate requests and responses.

Response

200OK

Successful response

Authorization

api-keyAuthapiKey in header

getbestblockhash

getbestblockhash

POST
https://ont.nownodes.io/

Returns the hash of the best block in the most-work fully-validated chain. The best block is the tip of the blockchain, representing the most recent block that has been validated and added to the chain.

Body

application/json
jsonrpcstringrequired
idstringrequired
methodstringgetbestblockhashrequired
paramsArray<any>required

Response

200OK

Valid response

401Unauthorized

Unauthorized

500Internal Server Error

Internal Server Error

Authorization

api-keyAuthapiKey in header

getblock

getblock

POST
https://ont.nownodes.io/

Returns information about the block with the given block hash. Optional verbosity levels determine the level of detail in the response:

  • 0: Returns a string that is serialized, hex-encoded data for the block.
  • 1: Returns a JSON object with basic block details and txids.
  • 2: Returns a JSON object with detailed transaction info.

Body

application/json
jsonrpcstringrequired
idstringrequired
methodstringgetblockrequired
paramsArray<string | integer>required

Parameters:

  1. blockhash (string) – The hash of the block
  2. verbosity (integer, optional) – Level of detail: 0, 1, or 2
Show child attributes
One of
string
integer

Response

200OK

Block information retrieved successfully

401Unauthorized

Unauthorized

500Internal Server Error

Internal Server Error

Authorization

api-keyAuthapiKey in header

getblockchaininfo

getblockchaininfo

POST
https://ont.nownodes.io/

Returns an object containing various state info regarding blockchain processing.

Body

application/json
jsonrpcstringrequired
idstringrequired
methodstringgetblockchaininforequired
paramsArray<any>required

Response

200OK

Blockchain state information retrieved successfully

401Unauthorized

Unauthorized

500Internal Server Error

Internal Server Error

Authorization

api-keyAuthapiKey in header

getblockcount

getblockcount

POST
https://ont.nownodes.io/

Returns the number of blocks in the longest blockchain. This number increases as new blocks are added.

Body

application/json
jsonrpcstringrequired
idstringrequired
methodstringgetblockcountrequired
paramsarrayrequired

This method takes no parameters.

Response

200OK

Current block height retrieved successfully

401Unauthorized

Unauthorized

500Internal Server Error

Internal Server Error

Authorization

api-keyAuthapiKey in header

getblockhash

getblockhash

POST
https://ont.nownodes.io/

Returns the block hash of the block at the given height in the blockchain. You must provide a block height (0-based index).

Body

application/json
jsonrpcstringrequired
idstringrequired
methodstringgetblockhashrequired
paramsArray<integer>required

Parameters:

  1. height (integer) — The height (index) of the block.

Response

200OK

Block hash successfully retrieved

401Unauthorized

Unauthorized

500Internal Server Error

Internal Server Error

Authorization

api-keyAuthapiKey in header

getblockheader

getblockheader

POST
https://ont.nownodes.io/

Returns information about the block header given a block hash. You can specify whether to return a JSON object or raw hex-encoded string using the verbose flag.

Body

application/json
jsonrpcstringrequired
idstringrequired
methodstringgetblockheaderrequired
paramsArray<string | boolean>required

Parameters:

  1. blockhash (string) — The hash of the block.
  2. verbose (boolean, optional) — If true, returns a JSON object; if false, returns a hex string. Default is true.
Show child attributes
One of
string
boolean

Response

200OK

Block header information retrieved successfully

401Unauthorized

Unauthorized

500Internal Server Error

Internal Server Error

Authorization

api-keyAuthapiKey in header

getblockstats

getblockstats

POST
https://ont.nownodes.io/

Returns a variety of statistics about the block identified by its height or block hash.

Body

application/json
jsonrpcstring1.02.0required

JSON-RPC protocol version.

methodstringgetblockstatsrequired

Name of the RPC method.

paramsArray<integer>

Parameters for the method. For getblockstats, this is an array containing a single value – either the block height (integer) or block hash (string).

idstringrequired

Request identifier. The response will echo this value. Can be any string or number.

Response

200OK

Successful block statistics retrieval.

401Unauthorized

Unauthorized

500Internal Server Error

Internal Server Error

Authorization

api-keyAuthapiKey in header

getchaintips

getchaintips

POST
https://ont.nownodes.io/

Returns information about all known tips in the block tree, including the main chain as well as orphaned forks.

Body

application/json
jsonrpcstringrequired
idstringrequired
methodstringgetchaintipsrequired
paramsarrayrequired

This method takes no parameters.

Response

200OK

Chain tips retrieved successfully

401Unauthorized

Unauthorized

500Internal Server Error

Internal Server Error

Authorization

api-keyAuthapiKey in header

getchaintxstats

getchaintxstats

POST
https://ont.nownodes.io/

Compute statistics about the total number and rate of transactions in the blockchain. You can optionally specify the number of blocks and a block hash to start from.

Body

application/json
jsonrpcstringrequired
idstringrequired
methodstringgetchaintxstatsrequired
paramsArray<integer | string>required

Parameters:

  1. nblocks (integer, optional) — Number of blocks to average over. Default: 1 month worth (~4320).
  2. blockhash (string, optional) — Hash of the block to stop at; defaults to the chain tip.
Show child attributes
One of
integer
string

Response

200OK

Chain transaction statistics retrieved successfully

401Unauthorized

Unauthorized

500Internal Server Error

Internal Server Error

Authorization

api-keyAuthapiKey in header

getdifficulty

getdifficulty

POST
https://ont.nownodes.io/

Returns the current difficulty as a multiple of the minimum difficulty (lowest possible difficulty on the network). This is a relative measure of how difficult it is to find a new block.

Body

application/json
jsonrpcstringrequired
idstringrequired
methodstringgetdifficultyrequired
paramsarrayrequired

This method takes no parameters.

Response

200OK

Difficulty value returned successfully

401Unauthorized

Unauthorized

500Internal Server Error

Internal Server Error

Authorization

api-keyAuthapiKey in header

getmempoolancestors

getmempoolancestors

POST
https://ont.nownodes.io/

Returns all in-mempool ancestor transactions for a given transaction ID. An ancestor is a transaction whose outputs are used as inputs in another transaction. You can get a summary or detailed object output.

Body

application/json
jsonrpcstringrequired
idstringrequired
methodstringgetmempoolancestorsrequired
paramsArray<string | boolean>required

Parameters:

  1. txid (string, required) — Transaction ID to query.
  2. verbose (boolean, optional) — Whether to return a JSON object or just an array of txids. Default is false.
Show child attributes
One of
string
boolean

Response

200OK

Ancestor transaction(s) retrieved successfully

401Unauthorized

Unauthorized

500Internal Server Error

Internal Server Error

Authorization

api-keyAuthapiKey in header

getmempooldescendants

getmempooldescendants

POST
https://ont.nownodes.io/

Returns all in-mempool descendant transactions for a given transaction ID. Descendants are transactions that depend on the outputs of the specified transaction. Can return either a simple list of transaction IDs or detailed JSON objects.

Body

application/json
jsonrpcstringrequired
idstringrequired
methodstringgetmempooldescendantsrequired
paramsArray<string | boolean>required

Parameters:

  1. txid (string, required) — Transaction ID to query descendants for.
  2. verbose (boolean, optional) — Return JSON object if true, or list of txids if false. Default: false.
Show child attributes
One of
string
boolean

Response

200OK

Descendant transactions retrieved successfully

401Unauthorized

Unauthorized

500Internal Server Error

Internal Server Error

Authorization

api-keyAuthapiKey in header

getmempoolentry

getmempoolentry

POST
https://ont.nownodes.io/

Returns detailed information about a transaction currently in the mempool. Requires the transaction ID (txid) as a parameter.

Body

application/json
jsonrpcstringrequired
idstringrequired
methodstringgetmempoolentryrequired
paramsArray<string>required

Parameters:

  1. txid (string, required) — Transaction ID to query.

Response

200OK

Mempool entry details retrieved successfully

401Unauthorized

Unauthorized

500Internal Server Error

Internal Server Error

Authorization

api-keyAuthapiKey in header

getmempoolinfo

getmempoolinfo

POST
https://ont.nownodes.io/

Returns details about the current state of the mempool, including size, usage, fees, and more. No parameters required.

Body

application/json
jsonrpcstringrequired
idstringrequired
methodstringgetmempoolinforequired
paramsArray<any>required

No parameters required

Response

200OK

Mempool info retrieved successfully

401Unauthorized

Unauthorized

500Internal Server Error

Internal Server Error

Authorization

api-keyAuthapiKey in header

getrawmempool

getrawmempool

POST
https://ont.nownodes.io/

Returns all transaction IDs currently in the mempool. If verbose is true, returns a JSON object with detailed mempool entry information for each transaction.

Body

application/json
jsonrpcstringrequired
idstringrequired
methodstringgetrawmempoolrequired
paramsArray<boolean>required

Parameters:

  1. verbose (boolean, optional) — If true, return detailed JSON objects instead of txid array. Default: false.

Response

200OK

Mempool transactions retrieved successfully

401Unauthorized

Unauthorized

500Internal Server Error

Internal Server Error

Authorization

api-keyAuthapiKey in header

gettxout

gettxout

POST
https://ont.nownodes.io/

Returns details about an unspent transaction output (UTXO) specified by transaction ID and output index.

Body

application/json
jsonrpcstringrequired
idstringrequired
methodstringgettxoutrequired
paramsArray<string | integer | boolean>required

Parameters:

  1. txid (string, required) — The transaction ID.
  2. vout (integer, required) — The output index.
  3. include_mempool (boolean, optional, default: true) — Whether to include mempool transactions.
Show child attributes
One of
string
integer
boolean

Response

200OK

UTXO details retrieved successfully

401Unauthorized

Unauthorized

500Internal Server Error

Internal Server Error

Authorization

api-keyAuthapiKey in header

gettxoutproof

gettxoutproof

POST
https://ont.nownodes.io/

Returns a hex-encoded proof that one or more transactions are included in a block. The proof can be validated with verifytxoutproof.

Body

application/json
jsonrpcstringrequired
idstringrequired
methodstringgettxoutproofrequired
paramsArray<Array<string> | string>required

Parameters:

  1. txids (array[string], required) — Array of transaction IDs to prove inclusion.
  2. blockhash (string, optional) — Hash of the block to look for transactions. If omitted, searches the entire blockchain.
Show child attributes
One of
Array<string>
string

Response

200OK

Proof retrieved successfully

401Unauthorized

Unauthorized

500Internal Server Error

Internal Server Error

Authorization

api-keyAuthapiKey in header

preciousblock

preciousblock

POST
https://ont.nownodes.io/

Marks a block as "precious," causing the node to reconsider the chain from that block. This can be used to manually reorganize the chain to a particular fork.

Body

application/json
jsonrpcstringrequired
idstringrequired
methodstringpreciousblockrequired
paramsArray<string>required

Parameters:

  1. blockhash (string, required) — The hash of the block to mark as precious.

Response

200OK

Block marked as precious successfully

401Unauthorized

Unauthorized

500Internal Server Error

Internal Server Error

Authorization

api-keyAuthapiKey in header

MAINNET / RPC

getbalancev2

POST
https://ont.nownodes.io/

Method to obtain ONT and ONG balances for a specific address.

Body

application/json
jsonrpcstring2.0required

JSON-RPC protocol version. Must be exactly "2.0".

methodstringgetbalancev2required

Name of the RPC method to invoke. For this API, the method getbalancev2 is documented.

paramsArray<string>

Parameters for the method. For getbalancev2, this is an array containing a single string – the wallet address.

idintegerrequired

Request identifier. The response will echo this value, allowing the client to correlate requests and responses.

Response

200OK

Successful response

Authorization

api-keyAuthapiKey in header

getbestblockhash

Get Best Block Hash

POST
https://ont.nownodes.io/

Returns the hash of the best (most recent) block in the ONT blockchain. This method retrieves the hash of the block with the highest height in the current chain.

Body

application/json
jsonrpcstringrequired

The JSON-RPC protocol version. Must be "2.0" for JSON-RPC 2.0 specification compliance.

methodstringrequired

The RPC method name. For this operation, it must be "getbestblockhash".

paramsarrayrequired

An array of method parameters. This method takes no parameters, so an empty array is required.

idintegerrequired

A unique identifier for the request, used to correlate the response with the request. This can be any integer value chosen by the client.

Response

200OK

Successful response containing the hash of the best block.

Authorization

api-keyAuthapiKey in header

getblock

Get Block by Hash or Height

POST
https://ont.nownodes.io/

Retrieves information about a specific block from the ONT blockchain. The block can be identified by either its hash or its height (block number). The response can be returned in different verbosity levels (0, 1, or 2).

Body

application/json
jsonrpcstringrequired

The JSON-RPC protocol version. Must be "2.0" for JSON-RPC 2.0 specification compliance.

methodstringrequired

The RPC method name. For this operation, it must be "getblock".

paramsArray<string | integer | integer>required

An array containing two parameters:

  1. Block hash or height (string or integer)
  2. Verbosity level (0, 1, or 2) - determines the detail level of the response
Show child attributes
One of

Block hash in hexadecimal format

string

Block height (block number)

integer

Verbosity level

integer012
idintegerrequired

A unique identifier for the request, used to correlate the response with the request.

Response

200OK

Successful response containing detailed block information.

Authorization

api-keyAuthapiKey in header

getblockcount

Get Block Count

POST
https://ont.nownodes.io/

Returns the total number of blocks in the ONT blockchain. This includes the genesis block, so the lowest possible value is 1. The block count is equivalent to the height of the best block plus one.

Body

application/json
jsonrpcstringrequired

The JSON-RPC protocol version. Must be "2.0" for JSON-RPC 2.0 specification compliance.

methodstringrequired

The RPC method name. For this operation, it must be "getblockcount".

paramsarrayrequired

An array of method parameters. This method takes no parameters, so an empty array is required.

idintegerrequired

A unique identifier for the request, used to correlate the response with the request.

Response

200OK

Successful response containing the total block count.

Authorization

api-keyAuthapiKey in header

getblockhash

Get Block Hash by Height

POST
https://ont.nownodes.io/

Retrieves the hash of a block at a specific height (block number). Block height starts at 0 for the genesis block and increments by 1 for each subsequent block.

Body

application/json
jsonrpcstringrequired

The JSON-RPC protocol version. Must be "2.0" for JSON-RPC 2.0 specification compliance.

methodstringrequired

The RPC method name. For this operation, it must be "getblockhash".

paramsArray<integer>required

An array containing a single parameter: the block height (index). Block height is a zero-based integer index.

idintegerrequired

A unique identifier for the request, used to correlate the response with the request.

Response

200OK

Successful response containing the block hash.

Authorization

api-keyAuthapiKey in header

getrawtransaction

Get Raw Transaction

POST
https://ont.nownodes.io/

Returns detailed information about a specific transaction by its hash. The verbose parameter determines the format of the returned data.

Body

application/json
jsonrpcstring

The JSON-RPC protocol version. Always "2.0".

methodstring

The RPC method name to be invoked.

paramsArray<string>

An array containing the transaction hash and the verbose flag. The first element is the transaction hash string, the second element is the verbosity level (0 for raw hex data, 1 for JSON object).

idinteger

The request identifier used to match the response with the request.

Response

200OK

Successful response with transaction details.

Authorization

api-keyAuthapiKey in header

sendrawtransaction

Send Raw Transaction

POST
https://ont.nownodes.io/

Broadcasts a signed raw transaction to the ONT blockchain network. The transaction must be properly formatted and signed before submission. The node will validate the transaction and relay it to other nodes in the network if valid.

Body

application/json
jsonrpcstringrequired

The JSON-RPC protocol version. Must be "2.0" for JSON-RPC 2.0 specification compliance.

methodstringrequired

The RPC method name. For this operation, it must be "sendrawtransaction".

paramsArray<string | boolean>required

An array containing one or two parameters:

  1. The signed raw transaction in hexadecimal format (required)
  2. A boolean flag to prepend the transaction (optional, default is false)
Show child attributes
One of

The signed raw transaction in hexadecimal format

string

Optional flag to prepend transaction

boolean
idintegerrequired

A unique identifier for the request, used to correlate the response with the request.

Response

200OK

Successful response indicating the transaction was accepted and broadcast.

Authorization

api-keyAuthapiKey in header

getallowance

Get Approved Token Allowance (v1)

POST
https://ont.nownodes.io/

Returns the amount of native ONT or ONG tokens that an approved spender is allowed to transfer on behalf of the token owner. This is the legacy v1 endpoint, supporting only native network tokens.

Body

application/json
jsonrpcstringrequired

The JSON-RPC protocol version. Must be "2.0" per JSON-RPC 2.0 specification.

methodstringrequired

The RPC method name. Must be "getallowance" for this operation.

paramsArray<string>required

Array with three parameters:

  1. Asset identifier ("ont" for Ontology token, "ong" for Ontology Gas token)
  2. Owner address (ONT address format)
  3. Spender address (ONT address format)
idintegerrequired

Unique client-generated request ID to correlate responses with requests.

Response

200OK

Successful response with allowance amount.

Authorization

api-keyAuthapiKey in header

getallowancev2

Get Approved Token Allowance (v2)

POST
https://ont.nownodes.io/

Updated v2 endpoint that returns approved allowance amounts for all OEP-4 standard tokens, including native ONT/ONG and custom deployed tokens. Uses contract script hash instead of string asset identifiers to support arbitrary tokens.

Body

application/json
jsonrpcstringrequired

The JSON-RPC protocol version. Must be "2.0" per JSON-RPC 2.0 specification.

methodstringrequired

The RPC method name. Must be "getallowancev2" for this operation.

paramsArray<string>required

Array with three parameters:

  1. Token contract script hash in hexadecimal format (use native hashes for ONT: 0x01..., ONG: 0x02...)
  2. Owner address (ONT address format)
  3. Spender address (ONT address format)
idintegerrequired

Unique client-generated request ID to correlate responses with requests.

Response

200OK

Successful response with allowance amount.

Authorization

api-keyAuthapiKey in header

getbalance

Get Balance

POST
https://ont.nownodes.io/

Returns the ONT (Ontology) and ONG (Ontology Gas) balance for a specified account address. The ONG balance includes both available and unbound portions.

Body

application/json
jsonrpcstring

The JSON-RPC protocol version. Always "2.0".

methodstring

The RPC method name to be invoked.

paramsArray<string>

An array containing the Ontology account address to query.

idinteger

The request identifier used to match the response with the request.

Response

200OK

Successful response with account balance information.

Authorization

api-keyAuthapiKey in header

getblockheightbytxhash

Get Block Height by Transaction Hash

POST
https://ont.nownodes.io/

Returns the block height at which a specific transaction was included. The transaction is identified by its unique hash.

Body

application/json
jsonrpcstring

The JSON-RPC protocol version. Always "2.0".

methodstring

The RPC method name to be invoked.

paramsArray<string>

An array containing the transaction hash to query.

idinteger

The request identifier used to match the response with the request.

Response

200OK

Successful response with the block height.

Authorization

api-keyAuthapiKey in header

getblocktxsbyheight

Get Block Transactions List by Block Height

POST
https://ont.nownodes.io/

Returns a simplified list of all transaction IDs included in a block at the specified height. This endpoint does not return full transaction details or block header metadata, making it lightweight for iterating over block transaction lists.

Body

application/json
jsonrpcstringrequired

The JSON-RPC protocol version. Must be "2.0" per JSON-RPC 2.0 specification.

methodstringrequired

The RPC method name. Must be "getblocktxsbyheight" for this operation.

paramsArray<integer>required

Array with one parameter: block height (integer, zero-based) to fetch transactions for.

idintegerrequired

Unique client-generated request ID to correlate responses with requests.

Response

200OK

Successful response with list of transactions in the block.

Authorization

api-keyAuthapiKey in header

getconnectioncount

Get Connection Count

POST
https://ont.nownodes.io/

Returns the number of active peer connections currently connected to this ONT node. This includes both incoming and outgoing connections to other nodes in the network.

Body

application/json
jsonrpcstringrequired

The JSON-RPC protocol version. Must be "2.0" for JSON-RPC 2.0 specification compliance.

methodstringrequired

The RPC method name. For this operation, it must be "getconnectioncount".

paramsarrayrequired

An array of method parameters. This method takes no parameters, so an empty array is required.

idintegerrequired

A unique identifier for the request, used to correlate the response with the request.

Response

200OK

Successful response containing the number of active connections.

Authorization

api-keyAuthapiKey in header

getcontractstate

Get Contract State

POST
https://ont.nownodes.io/

Returns detailed information about a deployed smart contract, including its code, author, and other metadata. The contract is identified by its script hash.

Body

application/json
jsonrpcstring

The JSON-RPC protocol version. Always "2.0".

methodstring

The RPC method name to be invoked.

paramsArray<string>

An array containing the contract script hash in hexadecimal format.

idinteger

The request identifier used to match the response with the request.

Response

200OK

Successful response with contract state information.

Authorization

api-keyAuthapiKey in header

getgasprice

Get Gas Price

POST
https://ont.nownodes.io/

Returns the current gas price for executing smart contract operations on the Ontology blockchain. Gas price may vary based on network congestion.

Body

application/json
jsonrpcstring

The JSON-RPC protocol version. Always "2.0".

methodstring

The RPC method name to be invoked.

paramsArray<string>

An empty array of parameters for this method.

idinteger

The request identifier used to match the response with the request.

Response

200OK

Successful response with the gas price.

Authorization

api-keyAuthapiKey in header

getgrantong

Get Grant ONG

POST
https://ont.nownodes.io/

Returns information about ONG that has been generated from ONT holdings and the amount that has been claimed. This helps track the ONG generation and claiming progress.

Body

application/json
jsonrpcstring

The JSON-RPC protocol version. Always "2.0".

methodstring

The RPC method name to be invoked.

paramsArray<string>

An array containing the Ontology account address to query.

idinteger

The request identifier used to match the response with the request.

Response

200OK

Successful response with ONG grant information.

Authorization

api-keyAuthapiKey in header

getmempooltxcount

Get Count of Transactions in Mempool

POST
https://ont.nownodes.io/

Returns the total number of unconfirmed transactions currently held in the node's memory pool, split between transactions that have passed validation and those pending validation.

Body

application/json
jsonrpcstringrequired

The JSON-RPC protocol version. Must be "2.0" per JSON-RPC 2.0 specification.

methodstringrequired

The RPC method name. Must be "getmempooltxcount" for this operation.

paramsarrayrequired

Array of method parameters. This method accepts no parameters, so an empty array is required.

idintegerrequired

Unique client-generated request ID to correlate responses with requests.

Response

200OK

Successful response with mempool transaction counts.

Authorization

api-keyAuthapiKey in header

getmempooltxstate

Get Transaction State in Mempool

POST
https://ont.nownodes.io/

Checks whether a specific transaction exists in the node's unconfirmed transaction pool (mempool) and returns its current processing state. Useful for tracking transaction status before confirmation.

Body

application/json
jsonrpcstringrequired

The JSON-RPC protocol version. Must be "2.0" per JSON-RPC 2.0 specification.

methodstringrequired

The RPC method name. Must be "getmempooltxstate" for this operation.

paramsArray<string>required

Array with one parameter: transaction ID (hash) in hexadecimal format to check in mempool.

idintegerrequired

Unique client-generated request ID to correlate responses with requests.

Response

200OK

Successful response with transaction state in mempool.

Authorization

api-keyAuthapiKey in header

Transaction Operations

Get Merkle Proof

POST
https://ont.nownodes.io/

Returns a Merkle proof that can be used to verify that a transaction was included in a specific block. This is useful for light clients and off-chain verification.

Body

application/json
jsonrpcstring

The JSON-RPC protocol version. Always "2.0".

methodstring

The RPC method name to be invoked.

paramsArray<string>

An array containing the transaction hash to generate the Merkle proof for.

idinteger

The request identifier used to match the response with the request.

Response

200OK

Successful response with Merkle proof information.

Authorization

api-keyAuthapiKey in header

getnetworkid

Get Network ID

POST
https://ont.nownodes.io/

Returns the network identifier of the Ontology blockchain network. Different networks (mainnet, testnet) have different network IDs.

Body

application/json
jsonrpcstring

The JSON-RPC protocol version. Always "2.0".

methodstring

The RPC method name to be invoked.

paramsArray<string>

An empty array of parameters for this method.

idinteger

The request identifier used to match the response with the request.

Response

200OK

Successful response with the network ID.

Authorization

api-keyAuthapiKey in header

getsmartcodeevent

Get Smart Contract Events by Transaction ID

POST
https://ont.nownodes.io/

Returns all smart contract events (notifications) emitted during the execution of a confirmed transaction. Events include log data, topics, and contract addresses for each event triggered by the transaction.

Body

application/json
jsonrpcstringrequired

The JSON-RPC protocol version. Must be "2.0" per JSON-RPC 2.0 specification.

methodstringrequired

The RPC method name. Must be "getsmartcodeevent" for this operation.

paramsArray<string>required

Array with one parameter: transaction ID (hash) in hexadecimal format for which to fetch events.

idintegerrequired

Unique client-generated request ID to correlate responses with requests.

Response

200OK

Successful response with smart contract event data.

Authorization

api-keyAuthapiKey in header

getstorage

Get Storage

POST
https://ont.nownodes.io/

Returns the value stored at a specific key in a smart contract's storage. This method is commonly used to read state variables from deployed smart contracts on the Ontology blockchain.

Body

application/json
jsonrpcstring

The JSON-RPC protocol version. Always "2.0".

methodstring

The RPC method name to be invoked.

paramsArray<string>

An array containing the contract script hash, the storage key (both in hexadecimal format), and optionally the block height or hash to query.

idinteger

The request identifier used to match the response with the request.

Response

200OK

Successful response with the stored value.

Authorization

api-keyAuthapiKey in header

getunboundong

Get Unbound ONG

POST
https://ont.nownodes.io/

Returns the amount of unbound ONG for a specified account address. ONG is generated through holding ONT and becomes available for withdrawal over time. Unbound ONG refers to the portion that has been generated but not yet withdrawn.

Body

application/json
jsonrpcstring

The JSON-RPC protocol version. Always "2.0".

methodstring

The RPC method name to be invoked.

paramsArray<string>

An array containing the Ontology account address to query.

idinteger

The request identifier used to match the response with the request.

Response

200OK

Successful response with unbound ONG balance.

Authorization

api-keyAuthapiKey in header

getversion

Get Version

POST
https://ont.nownodes.io/

Returns the version information of the Ontology node. This method does not require any parameters.

Body

application/json
jsonrpcstring

The JSON-RPC protocol version. Always "2.0".

methodstring

The RPC method name to be invoked.

paramsArray<string>

An empty array of parameters for this method.

idinteger

The request identifier used to match the response with the request.

Response

200OK

Successful response with version information.

Authorization

api-keyAuthapiKey in header

MAINNET / Mining_RPCs

getmininginfo

getmininginfo

POST
https://ont.nownodes.io/

Returns mining-related information such as current block, difficulty, network hash rate, etc. No parameters are required.

Body

application/json
jsonrpcstringrequired

JSON-RPC version (always "1.0")

idstringrequired

Request identifier

methodstringgetmininginforequired

The RPC method name

paramsarrayrequired

No parameters required

Response

200OK

Mining info retrieved successfully

401Unauthorized

Unauthorized

500Internal Server Error

Internal Server Error

Authorization

api-keyAuthapiKey in header

getnetworkhashps

getnetworkhashps

POST
https://ont.nownodes.io/

Returns the estimated network hashes per second (hash rate) based on the last nblocks blocks. This provides an estimate of the total computational power securing the network.

Body

application/json
jsonrpcstringrequired

The JSON-RPC protocol version (always "1.0")

idstringrequired

The identifier for the request

methodstringgetnetworkhashpsrequired

The name of the RPC method

paramsArray<integer>required

Optional parameters:

  1. nblocks (integer) — The number of blocks to average over. Default is 120.
  2. height (integer) — Use the block at this height instead of the current tip. Use -1 for the tip.
Show child attributes
One of
integer

Response

200OK

Hash rate retrieved successfully

401Unauthorized

Unauthorized

500Internal Server Error

Internal Server Error

Authorization

api-keyAuthapiKey in header

MAINNET / Rawtransactions_RPCs

createrawtransaction

createrawtransaction

POST
https://ont.nownodes.io/

Creates an unsigned raw transaction from a list of inputs and outputs. The transaction is returned as a serialized hex string, which can then be signed and broadcast.

Body

application/json
jsonrpcstringrequired
idstringrequired
methodstringcreaterawtransactionrequired
paramsArray<Array<object> | object | integer | boolean>required

Parameters:

  1. inputs (array) — List of transaction inputs, each including txid and vout.
  2. outputs (object) — Destination addresses and amounts.
  3. locktime (integer, optional) — Locktime value.
  4. replaceable (boolean, optional) — Whether this transaction signals BIP125 replaceability.
Show child attributes
One of
Array<object>
Show child attributes
txidstring

Transaction ID to spend

voutinteger

Output index

object
integer
boolean

Response

200OK

Unsigned raw transaction created successfully

401Unauthorized

Unauthorized

500Internal Server Error

Internal Server Error

Authorization

api-keyAuthapiKey in header

decoderawtransaction

decoderawtransaction

POST
https://ont.nownodes.io/

Decodes a raw hex-encoded Bitcoin transaction and returns a JSON object with readable fields. Useful for viewing the contents of raw transactions before broadcasting.

Body

application/json
jsonrpcstringrequired
idstringrequired
methodstringdecoderawtransactionrequired
paramsArray<string>required

Parameters:

  1. hexstring (string, required) — The raw transaction hex string.

Response

200OK

Transaction decoded successfully

401Unauthorized

Unauthorized

500Internal Server Error

Internal Server Error

Authorization

api-keyAuthapiKey in header

decodescript

decodescript

POST
https://ont.nownodes.io/

Decodes a hex-encoded script (usually scriptPubKey) and returns a JSON representation including the script type and addresses. Useful for analyzing output scripts or creating Pay-to-Script-Hash addresses.

Body

application/json
jsonrpcstringrequired

JSON-RPC version

idstringrequired

Request identifier

methodstringdecodescriptrequired

RPC method name

paramsArray<string>required

Parameters:

  1. hexstring (string, required) — The script in hex format to decode.

Response

200OK

Script decoded successfully

401Unauthorized

Unauthorized

500Internal Server Error

Internal Server Error

Authorization

api-keyAuthapiKey in header

getrawtransaction

getrawtransaction

POST
https://ont.nownodes.io/

Retrieves a raw transaction by its txid. If verbose is false or omitted, the result is a raw hex string. If verbose is true, returns a JSON object with decoded transaction details.

Body

application/json
jsonrpcstringrequired
idstringrequired
methodstringgetrawtransactionrequired
paramsArray<string | boolean>required

Parameters:

  1. txid (string, required) — The transaction ID.
  2. verbose (boolean, optional) — If true, return JSON; if false, return hex. Default: false.
Show child attributes
One of
string
boolean

Response

200OK

Transaction retrieved successfully

401Unauthorized

Unauthorized

500Internal Server Error

Internal Server Error

Authorization

api-keyAuthapiKey in header

sendrawtransaction

sendrawtransaction

POST
https://ont.nownodes.io/

Submits a raw transaction (hex-encoded string) to the mempool and broadcasts it to the network. Returns the transaction ID (txid) if accepted.

Body

application/json
jsonrpcstringrequired
idstringrequired
methodstringsendrawtransactionrequired
paramsArray<string | number | boolean>required

Parameters:

  1. hexstring (string, required): The raw transaction in hex format.
  2. maxfeerate (number or boolean, optional): Reject transactions with fees higher than this (BTC/KB). Use false to disable check.
Show child attributes
One of
string
number
boolean

Response

200OK

Transaction accepted and broadcasted

401Unauthorized

Unauthorized

500Internal Server Error

Internal Server Error

Authorization

api-keyAuthapiKey in header

signrawtransactionwithkey

signrawtransactionwithkey

POST
https://ont.nownodes.io/

Signs inputs for a raw transaction using explicitly provided private keys, without needing access to a local wallet. Useful for offline signing or stateless transaction construction.

Body

application/json
jsonrpcstringrequired
idstringrequired
methodstringsignrawtransactionwithkeyrequired
paramsArray<string | Array<string> | Array<object>>required

Parameters:

  1. hexstring (string, required): The raw transaction hex string.
  2. privkeys (array of strings, required): Array of WIF private keys.
  3. prevtxs (array, optional): Array of previous output details for inputs to sign.
Show child attributes
One of
string
Array<string>
Array<object>
Show child attributes
txidstring

Transaction ID of the UTXO being spent.

voutinteger

Output index.

scriptPubKeystring

Script of the UTXO.

redeemScriptstring

(optional) Redeem script for P2SH inputs.

witnessScriptstring

(optional) Witness script for P2WSH inputs.

amountnumber

Amount in BTC of the UTXO.

Response

200OK

Transaction signed successfully

401Unauthorized

Unauthorized

500Internal Server Error

Internal Server Error

Authorization

api-keyAuthapiKey in header

MAINNET / Util_RPCs

signmessagewithprivkey

signmessagewithprivkey

POST
https://ont.nownodes.io/

Signs a message with the given private key (in WIF format). Returns the base64-encoded signature.

Body

application/json
jsonrpcstringrequired
idstringrequired
methodstringsignmessagewithprivkeyrequired
paramsArray<string>required

Parameters:

  1. privkey (string, required): The private key in WIF format.
  2. message (string, required): The message to sign.

Response

200OK

Message signed successfully

401Unauthorized

Unauthorized

500Internal Server Error

Internal Server Error

Authorization

api-keyAuthapiKey in header

validateaddress

validateaddress

POST
https://ont.nownodes.io/

Validate a Bitcoin address and return useful information such as whether it is valid, script, or witness, and optionally if it's linked to the wallet.

Body

application/json
jsonrpcstringrequired
idstringrequired
methodstringvalidateaddressrequired
paramsArray<string>required

Parameters:

  1. address (string, required): The Bitcoin address to validate.

Response

200OK

Address validation result

401Unauthorized

Unauthorized

500Internal Server Error

Internal Server Error

Authorization

api-keyAuthapiKey in header

verifymessage

verifymessage

POST
https://ont.nownodes.io/

Verify a message signature. Returns true if the signature is valid and corresponds to the provided address and message.

Body

application/json
jsonrpcstringrequired
idstringrequired
methodstringverifymessagerequired
paramsArray<string>required

Parameters:

  1. address (string, required): The Bitcoin address to verify.
  2. signature (string, required): The base64-encoded signature.
  3. message (string, required): The original signed message.

Response

200OK

Signature verification result

401Unauthorized

Unauthorized

500Internal Server Error

Internal Server Error

Authorization

api-keyAuthapiKey in header