Blockchain Node API
This reference guide outlines the interfaces to access blockchain nodes that are created as part of the Bloq Nodes service.
Any key deviations from the standard node interface (by blockchain) are highlighted as part of the reference guide.
TIP
Testnet nodes use the same API calls as their mainnet counterparts. Just make sure the address port matches your node's chain!
Jump to:
BTC
TIP
The Bitcoin Node API is largely interoperable with Litecoin, with a few documented distinctions. Please see the Litecoin REST API documentation and Litecoin JSON-RPC methods for more information.
REST API
TIP
A key-client pair must be created prior to using the Nodes service. Use the bcl client-keys
command if client-keys
do not currently exist.
If a key-client pair already exists, use the bcl conf
command to load your keypair.
TIP
In addition to having a client-key pair generated, a clientAccessToken and refreshToken are also required to access the Nodes service. Use the bcl client-token
command to generate the tokens.
To learn more about the REST API that this node provides please see the REST API documentation.
JSON-RPC
The Nodes service supports the standard Bitcoin JSON-RPC calls with a number that are blacklisted. RPC calls that would negatively impact the running of the service are blacklisted. Wallet specific RPC calls are also currently not allowed as all nodes are run with --disable-wallet
.
POST getblock
Response
POST getdifficulty
Response
Full BTC JSON-RPC call list
For a full list of Bitcoin JSON-RPC commands please see Bitcoin JSON-RPC methods.
Blacklisted BTC JSON-RPC Calls
The following list of JSON-RPC calls are NOT available for the Nodes Bitcoin (BTC) service:
stop
generate
generatetoaddress
Disabled BTC Wallet Specific Calls
Wallet specific RPC calls are currently disabled. For the full list of unsupported wallet RPCs, please see Wallet RPC methods.
BCH
REST API
TIP
A key-client pair must be created prior to using the Nodes service. Use the bcl client-keys
command if client-keys
do not currently exist.
If a key-client pair already exists, use the bcl conf
command to load your keypair.
TIP
In addition to having a client-key pair generated, a clientAccessToken and refreshToken are also required to access the Nodes service. Use the bcl client-token
command to generate the tokens.
To learn more about the REST API that this node provides please see the REST API documentation.
JSON-RPC
The Nodes service supports the standard Bitcoin Cash JSON-RPC calls with a number that are blacklisted. RPC calls that would negatively impact the running of the service are blacklisted. Wallet specific RPC calls are also currently not allowed as all nodes are run with --disable-wallet
.
Full BCH JSON-RPC call list
For a full list of Bitcoin JSON-RPC commands please see Bitcoin Cash JSON-RPC methods.
Blacklisted BCH JSON-RPC Calls
The following list of JSON-RPC calls are NOT available for the Nodes Bitcoin Cash (BCH) service:
stop
generate
generatetoaddress
Disabled BCH Wallet Specific Calls
Wallet specific RPC calls are currently disabled. For the full list of unsupported wallet RPCs, please see Wallet RPC methods.
ETH
JSON-RPC
The Nodes service supports the standard Ethereum JSON-RPC calls with a number that are blacklisted. RPC calls that would negatively impact the running of the service are blacklisted.
POST blockNumber
Response
Full ETH JSON-RPC call list
For a full list of Ethereum JSON-RPC commands see Ethereum JSON-RPC methods.
Blacklisted ETH JSON-RPC Calls
The following list of JSON-RPC calls are NOT available for the Nodes Ethereum (ETH) service:
eth_accounts
shh_newIdentity
Avalanche
Bloq Avalanche nodes support the JSON RPC described in the Avalanche API reference.
Management API
A special API is provided on port 8080 for all nodes with calls to help manage the nodes.
GET /status
Request the status of a node.
Responses
200
Successful operation
Example responses
200 Response
Code Sample
GET /logs
Request the logs from the running blockchain daemon.
Parameters
lines
body
number
false
Number of log lines to retrieve. Leave blank for full log.
Responses
200
Successful operation
Example responses
200 Response
Code Sample
Last updated