Introduction
Blocknet provides a simple and powerful API to build previously impossible multi-chain applications that consume services on different blockchains, all while remaining 100% trustless and decentralized.
The API is accessible through command line (cli) with additional endpoints on the way. Code examples can be viewed in the dark panels next to each respective API call.
Please see Getting Started to begin using the APIs or continue reading below to learn more about the Blocknet Protocol, the different components, and how they all work.
Blocknet Protocol
Blocknet is an interoperability protocol that can be used as a 2nd layer on any compatible blockchain to enable decentralized communication and exchange between different blockchains in a permissionless and trustless manner. Blockchain interoperability comes in 2 parts: exchange (XBridge) and communication (XRouter).
BLOCK is the utility token of the Blocknet blockchain and powers the Blocknet Protocol. BLOCK is used to pay fees for the network's services, such as those provided by XBridge and XRouter. Through these fees, BLOCK is also used for compensation to participating Service Nodes to incentivize support.
Service Nodes
The protocol is supported by a network of Service Nodes, which are similar to masternodes with an increased level of participation. Service Nodes host full nodes of the supported blockchains, host microservices, verify UTXOs, route communication between blockchains, participate in governance by voting, and perform anti-spam and anti-DOS measures for the network. Read more about Service Nodes here.
Service Nodes earn 100% of fees from XBridge, XRouter, and XCloud services. If you'd like to operate your own Service Node, see the Service Node Setup Guide.
XBridge
XBridge provides the ability to perform true trustless and decentralized exchanges between any digital asset that is supported by the Blocknet Protocol via APIs (view list). When paired with XRouter, any application can perform exchanges between any compatible blockchains using a decentralized SPV implementation. Unlike every other "decentralized" exchange protocols, XBridge doesn't use derivatives (proxy tokens or colored coins), the entire process is done in a trustless manner, and it decentralizes the four components of an exchange:
- Storage of Funds - Trading is non-custodial and occurs directly out of the client's wallet. Funds remain within the client's control throughout the entire process.
- Order Books - Orders are broadcasted directly peer-to-peer over the network. Each client compiles the order book themselves instead of relying on a central order book service. All integrators and services on the protocol share the orderbook and liquidity. Currently there is just support for a public order book, but there are plans for private order books and direct trading as well.
- Order Matching - This is performed peer-to-peer by the clients.
- Settlement - This is performed using BIP65 CLTV atomic swap contracts[1]. For blockchains that do not inherently support BIP65, such as Ethereum, similar methods are being emulated to extend the protocol to those blockchains and subsequent assets.
[1] ACCT using Check Lock Time Verify (#4)
The exchange takes place on each respective blockchain with the process overlooked by a network of 400+ Service Nodes running full nodes of the compatible blockchains to ensure no malicious behavior is ocurring.
Note that once an exchange is completed, when the funds are received will be dependent on the blockchain's accepted confirmation time. By default, the required amount of confirmations for most assets is 0 and the funds aren't spent until each blockchain achieves their respective required amount of confirmations. For instance, let's look at an example of an exchange between BTC requiring 1 confirmation and BLOCK requiring 2 confirmations. BLOCK has a faster confirmation time so it will receive 2 confirmations while BTC has 0, but the funds will not be spent until BLOCK has at least 2 confirmation and BTC has at least 1 confirmation. Both conditions must be met. This setting applies to the asset that you are receiving. The setting for the asset that is being sold is set by the opposite party.
There is currently a fixed fee of 0.015 BLOCK to take (fill) an order and no fee to make(create) an order.
XBridge Design
The following diagrams depict the events of an exchange with various outcomes. As seen in the diagrams, a "client" refers to software utilizing the Blocknet Protocol, which can be a blockchain, microservice, dApp, mobile app, website, etc.

The flow of the diagram above is top-to-bottom, left-to-right:
- The maker client creates an order locally.
- The order is put in
new
state.
- The order is put in
- The order is broadcasted to the network.
- A network transaction fee for the maker asset's blockchain is charged to the maker.
- The Service Node network verifies the order is good.
- The order is added to the order books, which the Service Nodes relay.
- The order is put in
open
state.
- The order is put in
- The taker client responds to take the order.
- A network transaction fee for the taker asset's blockchain is charged.
- A fixed 0.015 BLOCK fee is charged to the taker.
- The order is put in
accepting
state.
- The Service Node network verifies the response to take the order is good.
- The maker acknowledges the taker.
- The order is put in
hold
state.
- The order is put in
- The maker and trader assets are deposited into the atomic swap P2SH address.
- The order is put in
created
state.
- The order is put in
- The Service Nodes verify the terms of the atomic swap contract are good.
- The transactions to the P2SH meet the required amount of confirmations.
- The P2SH secrets are spent to the opposite party.
- The order is put in
signed
state. - The order is put in
commited
state.
- The order is put in
- The maker and taker successfully receive the exchanged assets.
- The order is put in
finished
state.
- The order is put in

The flow of the diagram above is top-to-bottom, left-to-right:
- The maker client creates an order locally.
- The order is put in
new
state.
- The order is put in
- The order is broadcasted to the network.
- A network transaction fee for the maker asset's blockchain is charged to the maker.
- The Service Node network verifies the order is bad.
- The order is rejected by the network.
- The order is put in
canceled
state.
- The order is put in

The flow of the diagram above is top-to-bottom, left-to-right:
- The maker client creates an order locally.
- The order is put in
new
state.
- The order is put in
- The order is broadcasted to the network.
- A network transaction fee for the maker asset's blockchain is charged to the maker.
- The Service Node network verifies the order is good.
- The order is added to the order books, which the Service Nodes relay.
- The order is put in
open
state.
- The order is put in
- The taker client responds to take the order.
- A network transaction fee for the taker asset's blockchain is charged.
- A fixed 0.015 BLOCK fee is charged to the taker.
- The order is put in
accepting
state.
- The Service Node network verifies the response to take the order is bad.
- The order is put in
canceled
state.
- The order is put in

The flow of the diagram above is top-to-bottom, left-to-right:
- The maker client creates an order locally.
- The order is put in
new
state.
- The order is put in
- The order is broadcasted to the network.
- A network transaction fee for the maker asset's blockchain is charged to the maker.
- The Service Node network verifies the order is good.
- The order is added to the order books, which the Service Nodes relay.
- The order is put in
open
state.
- The order is put in
- The taker client responds to take the order.
- A network transaction fee for the taker asset's blockchain is charged.
- A fixed 0.015 BLOCK fee is charged to the taker.
- The order is put in
accepting
state.
- The Service Node network verifies the response to take the order is good.
- The maker acknowledges the taker.
- The order is put in
hold
state.
- The order is put in
- The maker and trader assets are deposited into the atomic swap P2SH address.
- The order is put in
created
state.
- The order is put in
- The Service Nodes verify the terms of the atomic swap contract are bad.
- The funds in the P2SH addresses are redeemed back to the original party.
- The order is put in
canceled
state.
- The order is put in
XBridge Fees
Maker Fee - When creating an order with XBridge, there is no fee other than the transaction fee for the network of the asset being sold. This is the same type of fee you would incur if sending this asset to another party. Having no fee to place an order encourages market makers to add liquidity. This also makes it possible to acquire the BLOCK needed to take orders.
Taker Fee - When accepting an order with XBridge, a static fee of 0.015 BLOCK is charged at the time the order is taken. This fee is charged even if a trade is canceled or fails and is meant to discourage malicious behavior on the network. In addition to the 0.015 BLOCK fee, there is also the transaction fee for the network of the asset being sold. This is the same type of fee you would incur if sending this asset to another party. If the taker asset is BLOCK, there needs to be at least two UXTOs - one or more to cover the 0.015 BLOCK fee and one or more to cover the traded amount. In a future update, there will be a percent-based fee that’s charged when accepting an order, but the details of this are not yet finalized.
XBridge Use Cases
Below is a non-exhaustive list of possible use cases that XBridge enables.
Decentralized Exchange - A truly decentralized exchange can fairly easily be created utilizing XBridge since the protocol handles the order placement, order books, order matching, and settlement. A DEX dApp has already been developed call Block DX. The codebase is entirely open source under MIT license and can be used to create a white label DEX.
Decentralized ShapeShift - The idea of a decentralized exchange can be abstracted to offer a simpler interface similar to ShapeShift where a user enter the amount they want to exchange and the best price is provided.
OTC Trading - Due to the nature of XBridge, it can be used to exchange large amounts securely with the funds always remaining the user's control.
XRouter
XRouter provides the Blocknet Protocol with a communication layer consisting of an inter-blockchain SPV client backend, enabling the verification of blockchain records without requiring users to download the full blockchain. This empowers development of lightweight microservice architectures that harness contracts, protocols, and services from other blockchains, laying a foundation for a decentralized API ecosystem.
Since XRouter functions on the TCP/IP level, it is compatible with any network. This includes public and private DLT's from Bitcoin, to IOTA, to Hyperledger.
Service Nodes earn 100% of fees from XBridge, XRouter, and XCloud services. If you'd like to operate your own Service Node, see the Service Node Setup Guide.
XRouter Design
The XRouter system utilizes the Service Node network to route calls from the client directly to the respective blockchain. There are 2 types of XRouter calls: submissions and queries.
XRouter submissions are calls that involve interactions with a blockchain, such as xrSendTransaction
. With submissions, the packets are routed from the client to the respective blockchain and a response, if any, is routed back to the client.
XRouter queries are calls requesting information from a blockchain, such as xrGetBlockCount
. With queries, the packets are also routed from the client to the respective blockchain and the response of the information queried is routed back to the client. XRouter queries can require a specific amount of Service Nodes to receive a response from in order to achieve consensus on the final answer.

The following diagrams depict the events of an XRouter query and submission. As seen in the diagrams, a "client" refers to software utilizing the Blocknet Protocol, which can be a blockchain, microservice, dApp, mobile app, website, etc.

The flow of the diagram is top-to-bottom:
- The client dispatches a packet for a query via API call to the Service Node network.
- The Service Nodes supporting the queried blockchain receive the packet.
- The Service Nodes route the packet of the query to the blockchain.
- The Service Nodes route the response from the blockchain back to the client.
- The client receives all responses, as well as a response for a majority consensus on the answer.

- The client dispatches a packet for a submission via API call to the Service Node network.
- The Service Nodes supporting the desired blockchain receive the packet.
- The Service Nodes route the packet of the query to the blockchain.
- If there is a response from the blockchain, the Service Nodes route the response back to the client.
Namespace
XRouter SPV wallets utlize the xrs::
namespace while XCloud services utilize the xrs::
namespace. A list of the SPV wallets and services can be viewed using xrGetNetworkServices and you can pre-connect to the nodes with xrConnect.
Fees
With XRouter, and subsequently XCloud, fees are determined by a free market. Service Nodes can specify the fee that they wish to charge for a call and client can specify the max fee they are willing to pay for calls.
XRouter Node Scoring
Clients keep a score of each Service Node. When a Service Node reaches a score of -200
, the Service Node will be banned by the client for a 24hr period. After this 24hr period, the Service Node will start with a score of -25
. The ban score threshold can be adjusted using the xrouterbanscore
setting in blocknet.conf
(see setup).
Action | Change in Score |
---|---|
Failure to respond to call within 30s | -25 |
Failure to meet majority consensus | -5 |
Matching consensus | correct_nodes * 2 |
Sending bad XRouter config | -10 |
Sending bad XCloud config | -2 |
This mechanism and values are subject to change in future releases. Join the Developer mailing list to stay updated.
XRouter Use Cases
The applications for XRouter are as vast and imaginative as the internet. Below are a few examples of use cases:
Supply Chain - In supply chain there will be multiple blockchains being used at various steps of the process much like there is today with traditional software stacks. The Blocknet Protocol and XRouter would allow information to be accessible between these different blockchains. For Example, pharmaceutical manufacturers have strict regulations to follow and need to provide certain information and assurances. Being able to access batch information from the raw materials being consumed, temperature and humidity information during transportation, and final destinations are all important. A smart contract utilizing XRouter to gather this information from each respective chain and write it to the pharmaceutical’s blockchain along with the batch code. XRouter would enable this communication to occur in a trustless way, which is important to ensure validity of the information.
Storage and Hosting - If creating a dApp on Ethereum, you may require storage functionality. Ethereum doesn’t intrinsically handle file storage very efficiently. In this scenario, XRouter can be used to interact with other blockchains such as Storj, Filecoin, Sia, or Swarm to utilize their storage services.
Media and Content - For content creation, a creator has the option of publishing to the LBRY Credits or Alexandria blockchains. Similar to HootSuite, which is a tool that allows posting to multiple social media platforms simultaneously, a dApp can be created using XRouter that offers the same benefit. The user can post their content once, whether it’s audio, video, literature, or art, and have it published to Alexandria’s and LBRY Credit’s blockchain platform simultaneously.
Markets - There are many blockchains creating decentralized marketplaces including Origami, District0x, OpenBazaar, and Syscoin’s marketplace, but the offering of products are relatively low on each independent platform. A dApp that utilizes XRouter to aggregate all the products into a single hub would offer a lot more options to users and a fuller marketplace. It can also make publishing products easier by publishing to all platforms simultaneously through a single form, offering more exposure than posting to a single marketplace while saving time.
Business and Industry - There are many dApps and blockchains that will end up using health data. Rather than submitting health data to each application, a universal EHR (Electronic Health Record) blockchain can be created to manage personal medical data and accessibility of data by each application. The health data on this EHR ledger can be shared amongst healthcare providers, hospitals, and insurance blockchains, dApps, and applications via XRouter.
Certifications - Certifications and licensing records can be stored on a dedicated blockchain where they could be verified by a dApp built on the Blocknet Protocol. These records can be used to confirm qualifications and grant access or permissions.
XCloud
XCloud can be used to monetize any service with crypto payments without having to re-code or change anything about those existing applications. A good way to think of XCloud is like a decentralized AWS. CoinMarketCap could be connected in a matter of minutes and allow users to access their API for a fee paid in BLOCK, without requiring any signups or KYC.
XCloud sits on top of, and is powered by, XRouter. Services are hosted by Service Nodes and operate in a similar manner as the full node SPV wallets. For further explanation, refer to XRouter Design, Namespacing, Fees, and XRouter Node Scoring.
Service Nodes earn 100% of fees from XBridge, XRouter, and XCloud services. If you'd like to operate your own Service Node, see the Service Node Setup Guide.
Hydra
Hydra is a decentralized drop-in replacement for Infura. Its decentralized architecture is highly scalable and provides a foundation for a truly decentralized dApp ecosystem.
Blockchain Connector
Hydra enables easy connection for developers to access accurate and reliable blockchain information. Powered by Blocknet's XRouter protocol, Hydra provides users with an all-in-one solution for blockchain data, including Ethereum.
Fast Access
Access to some blockchains such as Ethereum require incredibly large amounts of data, storage, long sync times and ongoing maintenance, which carry high costs.
Hydra provides instant access to blockchain data with a simple drop-in URL. Developers can begin accessing blockchain data without any of the drawbacks of hosting their own nodes.
Archival Data
Running an Ethereum archival node is an extremely costly exercise and requires terabytes of storage space on fast drives. Multiple archival nodes run on Hydra, removing the barrier to entry for all developers.
Service Providers
Hydra is designed to allow anyone to potentially deploy and run a Hydra endpoint service. This can be a profitable activity for those that want to support the Hydra infrastructure.
FAQ
Q: How do I get started as a service provider?
A: Have a look at the Hydra Getting Started section.
Q: What kind of hardware is recommended as a service provider?
A: All blockchains require different levels of hardware but for GETH support it is recommended minimum 8vCPU, 16GB RAM, SSD for archival node.
Q: How are fees paid or collected?
A: Hydra users will be able to send a request with a payment in ETH or aBLOCK to service nodes in return for a project ID and API-key. This allows developers to make requests to the Blocknet network based on how much they paid.
Q: How do I get started as a developer?
A: Have a look at the Hydra API section
Getting Started
The Blocknet Protocol currently requires a synced Blocknet wallet, as well as the synced wallet of any blockchain that will be interacted with. In the future, with the use of XRouter, this will not be required. In addition, configuration files must also be composed.
Wallet Setup
Sample blocknet.conf
listen=1
server=1
rpcallowip=127.0.0.1
rpcuser=user
rpcpassword=pass
port=41412
rpcport=41414
- Download and install the latest Blocknet wallet.
- Open the wallet, encrypt it, and sync the blockchain.
- A bootstrap is also available for faster syncing.
- Compose
blocknet.conf
as seen in the sample. - Set an RPC username and password in
blocknet.conf
. - If using the XBridge API, see XBridge Setup.
- If using the XRouter API, see XRouter Setup.
XBridge Setup
- Follow the XBridge Setup Guide.
- If you would just like to view orders without having the other wallets installed (view order books only, no trading), add
dxnowallets=1
to yourblocknet.conf
orShowAllOrders=true
to the header of yourxbridge.conf
. - If any of the wallets are still open, they must be restarted in order to activate the new configurations.
- Open, sync, and unlock the Blocknet wallet, as well as whichever blockchains will be interacted with.
- Using the command line(cli), XBridge API calls can now be made.
- If also using the XRouter API, see XRouter Setup.
Note: Segwit and Bech32 addresses are not currently compatible. Staked (p2pk) inputs are not currently compatible. Integrations of these addresses and inputs are planned.
XRouter Setup
If you would like to operate a Service Node and monetize any microservice, blockchain, API, or cloud tech on your own hardware, in many cases without having to write any code, see the Service Node Setup Guide.
Sample blocknet.conf
xrouterbanscore=-200
listen=1
server=1
rpcallowip=127.0.0.1
rpcuser=user
rpcpassword=pass
port=41412
rpcport=41414
Sample xrouter.conf
[Main]
timeout=30
consensus=1
maxfee=0.5
tls=1
[BTC]
maxfee=0.03
[xrGetBlockCount]
maxfee=0.02
consensus=6
[SYS::xrGetBlockCount]
maxfee=0.02
Note: If you would like to utilize XRouter without syncing the Blocknet chain, see the C++ library sample project for help getting started. If you would just like to test and play around with XRouter you can also check out the XRouter Service Explorer.
- In
blocknet.conf
:- Use
xrouterbanscore
to specify the score a Service Node must drop below before it is banned. The default value is-200
. Service Nodes are banned for a 24hr period, after which they'll start with a score of-25
.
- Use
- Restart the Blocknet wallet.
- Compose
xrouter.conf
as seen in the sample. All settings are optional.timeout
- Defines how long (in seconds) your client waits for a response from a Service Node. The default value is30
.consensus
- The number of Service Nodes that are used to route calls and use the majority response from for consensus. This can be overridden when making calls via thenode_count
parameter. The default value is1
.maxfee
- The maximum fee you are willing to pay for calls. Service Nodes with fees higher than your specified max fee will not be queried. The default value is0
(i.e. free calls only). For now, all fees are paid in BLOCK.tls
- Enables TLS support for XRouter Enterprise (EXR) nodes.
- Values set under
[Main]
override the default values and become the new default settings for all subsections that don't have the respective setting specified. Subsection settings override[Main]
and default settings. Blockchain-specific subsections have the highest priority and override all other settings. The setting hierarchy from highiest priority to lowest priority is as follows: [BTC::xrGetBlockCount] > [BTC] > [xrGetBlockCount] > [Main] > default. The higher priority settings override the lower priority settings. - Use
xrReloadConfigs
to apply changes toxrouter.conf
without needing to restart the client. - Using the command line(cli), XRouter API calls can now be made. To begin you can use xrGetNetworkServices to view the supported SPV wallets (designated by the
xr::
namespace). To use services (designated by thexrs::
namespace), see XCloud Setup. - If also using the XBridge API, see XBridge Setup.
XCloud Setup
If you would like to operate a Service Node and monetize any microservice, blockchain, API, or cloud tech on your own hardware, in many cases without having to write any code, see the Service Node Setup Guide.
Sample xrouter.conf
[Main]
timeout=30
consensus=1
maxfee=0.5
[xrs::ServiceName]
maxfee=0.1
timeout=10
consensus=5
- Setup XRouter. This is required since XCloud is built on top of XRouter.
- In
xrouter.conf
, add settings for the services you would like to use. The subsection heading used the service name with the namespace as it's shown in theservices
array in the xrGetNetworkServices response. All settings are optional.timeout
- Defines how long (in seconds) your client waits for a response from a Service Node. The default value is30
.consensus
- The number of Service Nodes that are used to route calls and use the majority response from for consensus. This can be overridden when making calls via thenode_count
parameter. The default value is1
.maxfee
- The maximum fee you are willing to pay for calls. Service Nodes with fees higher than your specified max fee will not be queried. The default value is0
(i.e. free calls only). For now, all fees are paid in BLOCK.
- Values set under
[Main]
override the default values and become the new default settings for all subsections that don't have the respective setting specified. Service settings override[Main]
and default settings. The setting hierarchy from highiest priority to lowest priority is as follows: [xrs::ServiceName] > [Main] > default. The higher priority settings override the lower priority settings. - Use
xrReloadConfigs
to apply changes toxrouter.conf
without needing to restart the client. - Using the command line(cli) or console, XCloud API calls can now be made. To begin, use xrGetNetworkServices to view the calls under
services
and use xrService or xrServiceConsensus to make the call. - If also using the XBridge API, see XBridge Setup.
Hydra Setup
TL;DR
The easiest way to get started is by using the docker-compose file on the blocknetdx/exrproxy-env
GitHub repository.
Requirements
Deployment option 1
./deploy.sh
Deployment option 2
./deploy.sh gethexternal
Deployment input prompt
Install Docker? [y/n] n
Not installing Docker...
Your Public IP Address: x.x.x.x
Servicenode Name: example
Servicenode Private Key: example
Servicenode Address: example
Please specify an user and password for the new servicenode
RPC Username: example
RPC Password: example
The following requirements have to be met in order to install Hydra:
- Servicenode Private key (How to setup a servicenode here)
- Geth synced
- Port 80 must be opened on the host
Operators should use the docker-compose file to setup Hydra. There are three types of setup:
1) ./deploy.sh
(Using geth in the deployment)
2) ./deploy.sh gethexternal
(Using a local geth node outside of the deployment)
3) Manual Usage with setting environment variables.
More advanced operators could edit the existing docker-compose.yml
file for their own specialized setup.
Running option 1 or 2 will prompt operators to install Docker and Docker-compose, and ask for input to fill out the xbrdige, xrouter and uWSGI configuration files.
Payment Processor
Hydra is using PostgreSQL as the backend DB to keep track of payments, API counts, expirary dates. The eth-payment-processor
container connects to the operators geth through the WebSocket. The payment processor has a block ingestor that monitors each new incoming ETH block for any payments coming in. The payment processor also keeps API counts and send this data to the Postgres DB.
When everything is up and running, the operator needs to provide clients with a way to request a new project. The section Generate a Project showcases how clients can request a new project. Additionally, this is also showcased at the end of the README
of docker-compose file.
XBridge API
The following set of calls are used to conduct decentralized and trustless exchanges over the Blocknet network.
See XBridge Setup for instructions on setting up your environment for use with XBridge.
Call | Description |
---|---|
dxMakeOrder | Create an order |
dxTakeOrder | Take an existing order |
dxCancelOrder | Cancel your own order |
dxGetOrder | Returns order details by ID |
dxGetOrders | Returns all orders with details |
dxGetMyOrders | Returns all your own orders with details |
dxFlushCancelledOrders | Removes your cancelled orders |
dxGetOrderFills | Returns all recent filled orders |
dxGetOrderHistory | Returns the OHLCV data my market |
dxGetLocalTokens | Returns all assets connected locally |
dxGetNetworkTokens | Returns all assets connected on the network |
dxGetTokenBalances | Returns available balances for your assets |
dxGetNewTokenAddress | Returns a newly generated address |
dxGetOrderBook | Returns open orders |
dxLoadXBridgeConf | Reloads the xbridge.conf |
dxGetTradingData | Returns on-chain trading records |
Status Codes | XBridge order status codes |
Error Codes | Error codes |
dxMakeOrder
Sample Data
{
"maker": "SYS",
"maker_size": "0.100",
"maker_address": "SVTbaYZ8oApVn3uNyimst3GKyvvfzXQgdK",
"taker": "LTC",
"taker_size": "0.01",
"taker_address": "LVvFhzRoMRGTtGihHp7jVew3YoZRX8y35Z",
"type": "exact"
}
This call is used to create a new order. Only assets returned in dxGetLocalTokens can be used for the maker and taker asset. If an asset is not showing, it has not been properly configured (refer back to #2 in XBridge Setup. Use dxGetNetworkTokens to view all the assets currently supported on the network.
There are no fees to make orders, but there are transaction fees for the maker asset's native network.
Note: XBridge will first attempt use funds from the specified maker address. If this address does not have sufficient funds to cover the order, then it will pull funds from other addresses in the wallet. Change is deposited to the address with the largest input used. There are plans to add the capability of strictly only using funds from the specified address.
Request Parameters
Sample Request
blocknet-cli dxMakeOrder SYS 0.100 SVTbaYZ8oApVn3uNyimst3GKyvvfzXQgdK LTC 0.01 LVvFhzRoMRGTtGihHp7jVew3YoZRX8y35Z exact
dxMakeOrder [maker] [maker_size] [maker_address] [taker] [taker_size] [taker_address] [type] [dryrun](optional)
Parameter | Type | Description |
---|---|---|
maker | string | Maker trading asset; the ticker of the asset being sold by the maker. |
maker_size | string(float) | Maker trading size. String is used to preserve precision. |
maker_address | string | Maker address for sending the outgoing asset. |
taker | string | Taker trading asset; the ticker of the asset being sold by the taker. |
taker_size | string(float) | Taker trading size. String is used to preserve precision. |
taker_address | string | Maker address for receiving the incoming asset. |
type | string | This is the order type.exact : Matches a specific order. limit : (not yet supported) market : (not yet supported) |
dryrun | string | (Optional Parameter)dryrun : Validate the order without actually submitting the order to the network. |
Response Parameters
Sample 200 Response
{
"id": "4306aa07113c4562ffa6278ecd9a3990ead53a0227f74ddd9122272e453ae07d",
"maker": "SYS",
"maker_size": "0.100",
"maker_address": "SVTbaYZ8oApVn3uNyimst3GKyvvfzXQgdK",
"taker": "LTC",
"taker_size": "0.01",
"taker_address": "LVvFhzRoMRGTtGihHp7jVew3YoZRX8y35Z",
"updated_at": "2018-01-16T00:00:00.00000Z",
"created_at": "2018-01-15T18:15:30.12345Z",
"block_id": "38729344720578447445023782734923740427863289632489723984723",
"status": "created"
}
Parameter | Type | Description |
---|---|---|
id | string | The order ID. |
maker | string | Maker trading asset; the ticker of the asset being sold by the maker. |
maker_size | string(float) | Maker trading size. String is used to preserve precision. |
maker_address | string | Maker address for sending the outgoing asset. |
taker | string | Taker trading asset; the ticker of the asset being sold by the taker. |
taker_size | string(float) | Taker trading size. String is used to preserve precision. |
taker_address | string | Maker address for receiving the incoming asset. |
updated_at | string | ISO 8601 datetime, with microseconds, of the last time the order was updated. |
created_at | string | ISO 8601 datetime, with microseconds, of when the order was created. |
block_id | string | The block hash of the current block on the Blocknet blockchain at the time the order was created. |
status | string | View order status codes |
Sample 400 Response
{
"error": "Invalid parameters: Minimum supported size is 0.000001",
"code": 1025,
"name": "dxMakeOrder"
}
Parameter | Type | Description |
---|---|---|
error | string | Error message |
code | int | Error code |
name | string | Name of the RPC function |
Sample 500 Response
{
"error": "Internal error occurred",
"code": 1002,
"name": "dxMakeOrder"
}
Parameter | Type | Description |
---|---|---|
error | string | Error message |
code | int | Error code |
name | string | Name of the RPC function |
Code | Type | Error |
---|---|---|
1001 | 401 | Unauthorized |
1011 | 400 | Invalid maker symbol |
1012 | 400 | Invalid taker symbol |
1018 | 400 | Unable to connect to wallet |
1024 | 400 | Size must be greater than 0 |
1025 | 400 | Invalid parameters |
1026 | 400 | Bad address |
1002 | 500 | Internal server error |
dxTakeOrder
Sample Data
{
"id": "4306aa07113c4562ffa6278ecd9a3990ead53a0227f74ddd9122272e453ae07d",
"send_address": "LVvFhzRoMRGTtGihHp7jVew3YoZRX8y35Z",
"receive_address": "SVTbaYZ8oApVn3uNyimst3GKyvvfzXQgdK",
"dryrun": "dryrun"
}
This call is used to take an order. Taking your own order is currently not supported. Only assets returned in dxGetLocalTokens can be used for the maker and taker asset. If an asset is not showing, it has not been properly configured (refer back to #2 in XBridge Setup. Use dxGetNetworkTokens to view all the assets currently supported on the network.
Taking an order has a 0.015 BLOCK fee. There are also transaction fees for the taker asset's native network. If the taker asset is BLOCK, there needs to be at least two UXTOs - one or more to cover the 0.015 BLOCK fee and one or more to cover the traded amount.
Note: XBridge will first attempt use funds from the specified send address. If this address does not have sufficient funds to cover the order, then it will pull funds from other addresses in the wallet. Change is deposited to the address with the largest input used. There are plans to add the capability of strictly only using funds from the specified address.
Request Parameters
Sample Request
blocknet-cli dxTakeOrder 4306aa07113c4562ffa6278ecd9a3990ead53a0227f74ddd9122272e453ae07d LVvFhzRoMRGTtGihHp7jVew3YoZRX8y35Z SVTbaYZ8oApVn3uNyimst3GKyvvfzXQgdK
dxTakeOrder [order_id] [send_address] [receive_address] [dryrun](optional)
Parameter | Type | Description |
---|---|---|
id | string | ID of order being filled. |
send_address | string | Taker address for sending the outgoing asset. |
receive_address | string | Taker address for receiving the incoming asset. |
dryrun | string | (Optional Parameter) dryrun : Validate the order without actually submitting the order to the network. |
Response Parameters
Sample 200 Response
{
"id": "4306aa07113c4562ffa6278ecd9a3990ead53a0227f74ddd9122272e453ae07d",
"maker": "SYS",
"maker_size": "0.100",
"taker": "LTC",
"taker_size": "0.01",
"updated_at": "1970-01-01T00:00:00.00000Z",
"created_at": "2018-01-15T18:15:30.12345Z",
"status": "finished"
}
Parameter | Type | Description |
---|---|---|
id | string | The order ID. |
maker | string | Maker trading asset; the ticker of the asset being sold by the maker. |
maker_size | string(float) | Maker trading size. String is used to preserve precision. |
taker | string | Taker trading asset; the ticker of the asset being sold by the taker. |
taker_size | string(float) | Taker trading size. String is used to preserve precision. |
updated_at | string | ISO 8601 datetime, with microseconds, of the last time the order was updated. |
created_at | string | ISO 8601 datetime, with microseconds, of when the order was created. |
status | string | Order status: finished |
Sample 400 Response
{
"error": "Transaction 4306aa07113c4562ffa6278ecd9a3990ead53a0227f74ddd9122272e453ae07d not found",
"code": 1021,
"name": "dxTakeOrder"
}
Parameter | Type | Description |
---|---|---|
error | string | Error message |
code | int | Error code |
name | string | Name of the RPC function |
Sample 500 Response
{
"error": "Internal error occurred",
"code": 1002,
"name": "dxTakeOrder"
}
Parameter | Type | Description |
---|---|---|
error | string | Error message |
code | int | Error code |
name | string | Name of the RPC function |
Code | Type | Error |
---|---|---|
1001 | 401 | Unauthorized |
1011 | 400 | Invalid maker symbol |
1012 | 400 | Invalid taker symbol |
1020 | 400 | Invalid order |
1021 | 400 | Invalid order id |
1025 | 400 | Invalid parameters |
1026 | 400 | Bad address |
1002 | 500 | Internal server error |
dxCancelOrder
Sample Data
{
"id": "91d0ea83edc79b9a2041c51d08037cff87c181efb311a095dfdd4edbcc7993a9"
}
This call is used to cancel one of your own orders, which automatically rolls back the order if a trade is in process.
Request Parameters
Sample Request
blocknet-cli dxCancelOrder 91d0ea83edc79b9a2041c51d08037cff87c181efb311a095dfdd4edbcc7993a9
dxCancelOrder [order_id]
Parameter | Type | Description |
---|---|---|
id | string | ID of order being cancelled. |
Response Parameters
Sample 200 Response
{
"id": "91d0ea83edc79b9a2041c51d08037cff87c181efb311a095dfdd4edbcc7993a9",
"maker": "SYS",
"maker_size": "0.100",
"maker_address": "SVTbaYZ8oApVn3uNyimst3GKyvvfzXQgdK",
"taker": "LTC",
"taker_size": "0.01",
"taker_address": "LVvFhzRoMRGTtGihHp7jVew3YoZRX8y35Z",
"updated_at": "1970-01-01T00:00:00.00000Z",
"created_at": "2018-01-15T18:15:30.12345Z",
"status": "canceled"
}
Parameter | Type | Description |
---|---|---|
id | string | The order ID. |
maker | string | Sending asset of party cancelling the order. |
maker_size | string(float) | Sending trading size. String is used to preserve precision. |
maker_address | string | Address for sending the outgoing asset. |
taker | string | Receiving asset of party cancelling the order. |
taker_size | string(float) | Receiving trading size. String is used to preserve precision. |
taker_address | string | Address for receiving the incoming asset. |
updated_at | string | ISO 8601 datetime, with microseconds, of the last time the order was updated. |
created_at | string | ISO 8601 datetime, with microseconds, of when the order was created. |
status | string | View order status codes |
Sample 400 Response
{
"error": "Invalid order id",
"code": 1021,
"name": "dxCancelOrder"
}
Parameter | Type | Description |
---|---|---|
error | string | Error message |
code | int | Error code |
name | string | Name of the RPC function |
Sample 500 Response
{
"error": "Internal error occurred",
"code": 1002,
"name": "dxCancelOrder"
}
Parameter | Type | Description |
---|---|---|
error | string | Error message |
code | int | Error code |
name | string | Name of the RPC function |
Code | Type | Error |
---|---|---|
1001 | 401 | Unauthorized |
1021 | 400 | Invalid order id |
1025 | 400 | Invalid parameters |
1002 | 500 | Internal server error |
dxGetOrder
Sample Data
{
"id": "6be548bc46a3dcc69b6d56529948f7e679dd96657f85f5870a017e005caa050a"
}
This call is used to retrieve order info.
Request Parameters
Sample Request
blocknet-cli dxGetOrder 6be548bc46a3dcc69b6d56529948f7e679dd96657f85f5870a017e005caa050a
dxGetOrder [order_id]
Parameter | Type | Description |
---|---|---|
id | string | ID of order of interest. |
Response Parameters
Sample 200 Response
{
"id": "6be548bc46a3dcc69b6d56529948f7e679dd96657f85f5870a017e005caa050a",
"maker": "SYS",
"maker_size": "0.100",
"taker": "LTC",
"taker_size": "0.01",
"updated_at": "1970-01-01T00:00:00.00000Z",
"created_at": "2018-01-15T18:15:30.12345Z",
"status": "open"
}
Parameter | Type | Description |
---|---|---|
id | string | The order ID. |
maker | string | Maker trading asset; the ticker of the asset being sold by the maker. |
maker_size | string(float) | Maker trading size. String is used to preserve precision. |
taker | string | Taker trading asset; the ticker of the asset being sold by the taker. |
taker_size | string(float) | Taker trading size. String is used to preserve precision. |
updated_at | string | ISO 8601 datetime, with microseconds, of the last time the order was updated. |
created_at | string | ISO 8601 datetime, with microseconds, of when the order was created. |
status | string | View order status codes |
Sample 400 Response
{
"error": "Invalid order id",
"code": 1021,
"name": "dxGetOrder"
}
Parameter | Type | Description |
---|---|---|
error | string | Error message |
code | int | Error code |
name | string | Name of the RPC function |
Sample 500 Response
{
"error": "Internal error occurred",
"code": 1002,
"name": "dxGetOrder"
}
Parameter | Type | Description |
---|---|---|
error | string | Error message |
code | int | Error code |
name | string | Name of the RPC function |
Code | Type | Error |
---|---|---|
1001 | 401 | Unauthorized |
1021 | 400 | Invalid order id |
1025 | 400 | Invalid parameters |
1002 | 500 | Internal server error |
dxGetOrders
This call is used to retrieve all orders of every market pair. It will only return orders for assets returned in dxGetLocalTokens.
Note: This call will only return orders for markets with both assets returned in dxGetLocalTokens.
Request Parameters
Request
blocknet-cli dxGetOrders
dxGetOrders
This call does not take parameters.
Response Parameters
Sample 200 Response
[
{
"id": "91d0ea83edc79b9a2041c51d08037cff87c181efb311a095dfdd4edbcc7993a9",
"maker": "SYS",
"maker_size": "0.100",
"taker": "LTC",
"taker_size": "0.01",
"updated_at": "2018-01-15T18:25:05.12345Z",
"created_at": "2018-01-15T18:15:30.12345Z",
"status": "finished"
},
{
"id": "a1f40d53f75357eb914554359b207b7b745cf096dbcb028eb77b7b7e4043c6b4",
"maker": "SYS",
"maker_size": "0.100",
"taker": "LTC",
"taker_size": "0.01",
"updated_at": "2018-01-15T18:25:05.12345Z",
"created_at": "2018-01-15T18:15:30.12345Z",
"status": "finished"
},
{
"id": "6be548bc46a3dcc69b6d56529948f7e679dd96657f85f5870a017e005caa050a",
"maker": "SYS",
"maker_size": "0.100",
"taker": "LTC",
"taker_size": "0.01",
"updated_at": "2018-01-15T18:25:05.12345Z",
"created_at": "2018-01-15T18:15:30.12345Z",
"status": "finished"
}
]
Parameter | Type | Description |
---|---|---|
Array | array | An array of all orders with each order having the following parameters. |
id | string | The order ID. |
maker | string | Maker trading asset; the ticker of the asset being sold by the maker. |
maker_size | string(float) | Maker trading size. String is used to preserve precision. |
taker | string | Taker trading asset; the ticker of the asset being sold by the taker. |
taker_size | string(float) | Taker trading size. String is used to preserve precision. |
updated_at | string | ISO 8601 datetime, with microseconds, of the last time the order was updated. |
created_at | string | ISO 8601 datetime, with microseconds, of when the order was created. |
status | string | View order status codes |
Sample 400 Response
{
"error": "Invalid parameters: This function does not accept any parameters",
"code": 1025,
"name": "dxGetOrders"
}
Parameter | Type | Description |
---|---|---|
error | string | Error message |
code | int | Error code |
name | string | Name of the RPC function |
Sample 500 Response
{
"error": "Internal error occurred",
"code": 1002,
"name": "dxGetOrders"
}
Parameter | Type | Description |
---|---|---|
error | string | Error message |
code | int | Error code |
name | string | Name of the RPC function |
Code | Type | Error |
---|---|---|
1001 | 401 | Unauthorized |
1025 | 400 | Invalid parameters |
1002 | 500 | Internal server error |
dxGetMyOrders
This call is used to retrieve all of your orders (of all states) from the local client. It will only return orders from your current session.
Request Parameters
Request
blocknet-cli dxGetMyOrders
dxGetMyOrders
This call does not take parameters.
Response Parameters
Sample 200 Response
[
{
"id": "91b7da4eda3e5d4a7de8a67d8e7a8d768ea567da5e467d4ea7a6d7a6d7a6d75a",
"maker": "SYS",
"maker_size": "0.100",
"taker": "LTC",
"taker_size": "0.01",
"updated_at": "2018-01-15T18:25:35.12345Z",
"created_at": "2018-01-15T18:15:37.12345Z",
"status": "finished"
},
{
"id": "c3d0ea83edc79b9a2041c51d08037cff87c181efb311a095dfdd4edbcc7993a9",
"maker": "SYS",
"maker_size": "0.100",
"taker": "LTC",
"taker_size": "0.01",
"updated_at": "2018-01-15T18:25:25.12345Z",
"created_at": "2018-01-15T18:15:32.12345Z",
"status": "finished"
},
{
"id": "3ef40d53f75357eb914554359b207b7b745cf096dbcb028eb77b7b7e4043c6b4",
"maker": "SYS",
"maker_size": "0.100",
"taker": "LTC",
"taker_size": "0.01",
"updated_at": "2018-01-15T18:25:52.12345Z",
"created_at": "2018-01-15T18:15:26.12345Z",
"status": "finished"
}
]
Parameter | Type | Description |
---|---|---|
Array | array | An array of all orders with each order having the following parameters. |
id | string | The order ID. |
maker | string | Maker trading asset; the ticker of the asset being sold by the maker. |
maker_size | string(float) | Maker trading size. String is used to preserve precision. |
maker_address | string | Address for sending the outgoing asset. |
taker | string | Taker trading asset; the ticker of the asset being sold by the taker. |
taker_size | string(float) | Taker trading size. String is used to preserve precision. |
taker_address | string | Address for receiving the incoming asset. |
updated_at | string | ISO 8601 datetime, with microseconds, of the last time the order was updated. |
created_at | string | ISO 8601 datetime, with microseconds, of when the order was created. |
status | string | View order status codes |
Sample 400 Response
{
"error": "Invalid parameters: This function does not accept any parameters",
"code": 1025,
"name": "dxGetMyOrders"
}
Parameter | Type | Description |
---|---|---|
error | string | Error message |
code | int | Error code |
name | string | Name of the RPC function |
Sample 500 Response
{
"error": "Internal error occurred",
"code": 1002,
"name": "dxGetMyOrders"
}
Parameter | Type | Description |
---|---|---|
error | string | Error message |
code | int | Error code |
name | string | Name of the RPC function |
Code | Type | Error |
---|---|---|
1001 | 401 | Unauthorized |
1025 | 400 | Invalid parameters |
1002 | 500 | Internal server error |
dxFlushCancelledOrders
Sample Data
{
"ageMillis": 600000
}
This call is used to remove your cancelled orders that are older than the specified amount of time.
Request Parameters
Sample Request
blocknet-cli dxFlushCancelledOrders 600000
dxFlushCancelledOrders [ageMillis](optional)
Parameter | Type | Description |
---|---|---|
ageMillis | int | (Optional Parameter) Defaults to 0 .Remove cancelled orders older than this amount of milliseconds. If 0 , all cancelled orders will be removed. |
Response Parameters
Sample 200 Response
{
"ageMillis": 0,
"now": "20191126T024005.352285",
"durationMicrosec": 0,
"flushedOrders": [
{
"id": "582a02ada05c8a4bb39b34de0eb54767bcb95a7792e5865d3a0babece4715f47",
"txtime": "20191126T023945.855058",
"use_count": 1
},
{
"id": "a508cd8d110bdc0b1fd819a89d94cdbf702e3aa40edbe654af5d556ff3c43a0a",
"txtime": "20191126T023956.270409",
"use_count": 1
}
]
}
Parameter | Type | Description |
---|---|---|
ageMillis | int | The millisecond value specified when making the call. |
now* | string | ISO 8601 datetime, with microseconds, of when the call was executed. |
durationMicrosec* | int | The amount of time in milliseconds it took to process the call. |
flushedOrders | array | Array of cancelled orders that were removed. |
id | string | The order ID. |
txtime | string | ISO 8601 datetime, with microseconds, of when the order was created. |
use_count* | int | This value is strictly for debugging purposes. |
* For debugging pruposes
Sample 400 Response
{
"error": "Invalid parameters: ageMillis must be an integer >= 0",
"code": 1025,
"name": "dxFlushCancelledOrders"
}
Parameter | Type | Description |
---|---|---|
error | string | Error message |
code | int | Error code |
name | string | Name of the RPC function |
Sample 500 Response
{
"error": "Internal error occurred",
"code": 1002,
"name": "dxFlushCancelledOrders"
}
Parameter | Type | Description |
---|---|---|
error | string | Error message |
code | int | Error code |
name | string | Name of the RPC function |
Code | Type | Error |
---|---|---|
1001 | 401 | Unauthorized |
1011 | 400 | Invalid maker symbol |
1012 | 400 | Invalid taker symbol |
1025 | 400 | Invalid parameters |
1002 | 500 | Internal server error |
dxGetOrderFills
Sample Data
{
"maker": "SYS",
"taker": "LTC",
"combined": false
}
This call is used to retrieve all recent filled orders by a given trade pair. It will only return orders that have been filled in your current session.
Request Parameters
Sample Request
blocknet-cli dxGetOrderFills SYS LTC false
dxGetOrderFills [maker] [taker] [combined](optional)
Parameter | Type | Description |
---|---|---|
maker | string | Maker trading asset; the ticker of the asset being sold by the maker. |
taker | string | Taker trading asset; the ticker of the asset being sold by the taker. |
combines | boolean | (Optional Parameter) Defaults to true .true : Receive filled orders for both the maker and taker assets as specified, as well as the inverse with the maker asset as the taker and the taker asset as the maker.false : Receive filled orders only with the maker and taker assets as specified. |
Response Parameters
Sample 200 Response
[
{
"id": "a1f40d53f75357eb914554359b207b7b745cf096dbcb028eb77b7b7e4043c6b4",
"time": "2018-01-16T13:15:05.12345Z",
"maker": "SYS",
"maker_size": "101.00000000",
"taker": "LTC",
"taker_size": "0.01000000"
},
{
"id": "91d0ea83edc79b9a2041c51d08037cff87c181efb311a095dfdd4edbcc7993a9",
"time": "2018-01-16T13:15:05.12345Z",
"maker": "LTC",
"maker_size": "0.01000000",
"taker": "SYS",
"taker_size": "101.00000000"
}
]
Parameter | Type | Description |
---|---|---|
Array | array | Array of orders sorted by date descending (most recent filled trade first). |
id | string | The order ID. |
time | string | Time the order was filled. |
maker | string | Maker trading asset; the ticker of the asset being sold by the maker. |
maker_size | string(float) | Maker trading size. String is used to preserve precision. |
taker | string | Taker trading asset; the ticker of the asset being sold by the taker. |
taker_size | string(float) | Taker trading size. String is used to preserve precision. |
Sample 400 Response
{
"error": "Invalid parameters: (maker) (taker) (combined, default=true)[optional]",
"code": 1025,
"name": "dxGetOrderFills"
}
Parameter | Type | Description |
---|---|---|
error | string | Error message |
code | int | Error code |
name | string | Name of the RPC function |
Sample 500 Response
{
"error": "Internal error occurred",
"code": 1002,
"name": "dxGetOrderFills"
}
Parameter | Type | Description |
---|---|---|
error | string | Error message |
code | int | Error code |
name | string | Name of the RPC function |
Code | Type | Error |
---|---|---|
1001 | 401 | Unauthorized |
1011 | 400 | Invalid maker symbol |
1012 | 400 | Invalid taker symbol |
1025 | 400 | Invalid parameters |
1002 | 500 | Internal server error |
dxGetOrderHistory
Sample Data
{
"maker": "SYS",
"taker": "LTC",
"start_time": 1540660180,
"end_time": 1540660420,
"granularity": 60
}
This call is used to retrieve the OHLCV data by a trade pair within a specified time range. It can return the order history for any compatible asset since all trade history is stored on-chain.
Request Parameters
Sample Request
blocknet-cli dxGetOrderHistory SYS LTC 1540660180 1540660420 60 true
dxGetOrderHistory [maker] [taker] [start_time] [end_time] [granularity] [order_ids](optional) [with_inverse](optional) [limit](optional)
Parameter | Type | Description |
---|---|---|
maker | string | Maker trading asset; the ticker of the asset being sold by the maker. |
taker | string | Taker trading asset; the ticker of the asset being sold by the taker. |
start_time | int | Start time(Unix time) representing the lower boundary to search. |
end_time | int | End time(Unix time) representing the upper boundary to search. |
granularity | int | Time interval slice in seconds: 60 , 300 , 900 , 3600 , 21600 , 86400 |
order_ids | bool | (Optional Parameter) Defaults to false .true : Receive the GUIDs of all filled orders in each slice.false : Do not receive the order GUIDs. |
with_inverse | bool | (Optional Parameter) Defaults to false .false : Returns the orders in the specified market pair.true : Returns the orders in the inverse pair too, e.g. LTC SYS -> SYS LTC would be returned as well. |
limit | int | (Optional Parameter) Defaults to 2147483647 .The max number of interval slices returned. |
Response Parameters
Sample 200 Response
[
//[ time, low, high, open, close, volume, id(s) ],
[ "2018-01-16T13:15:05.12345Z", 1.10, 2.0, 1.10, 1.4, 1000, [ "0cc2e8a7222f1416cda996031ca21f67b53431614e89651887bc300499a6f83e" ] ],
[ "2018-01-16T14:15:05.12345Z", 0, 0, 0, 0, 0, [] ],
[ "2018-01-16T15:15:05.12345Z", 1.12, 2.2, 1.10, 1.4, 1000, [ "91d0ea83edc79b9a2041c51d08037cff87c181efb311a095dfdd4edbcc7993a9", "0cc2e8a7222f1416cda996031ca21f67b53431614e89651887bc300499a6f83e", "a1f40d53f75357eb914554359b207b7b745cf096dbcb028eb77b7b7e4043c6b4" ] ],
[ "2018-01-16T16:15:05.12345Z", 1.14, 2.0, 1.10, 1.4, 1000, [ "a1f40d53f75357eb914554359b207b7b745cf096dbcb028eb77b7b7e4043c6b4" ] ],
[ "2018-01-16T17:15:05.12345Z", 1.15, 2.0, 1.10, 1.4, 1000, [ "6be548bc46a3dcc69b6d56529948f7e679dd96657f85f5870a017e005caa050a" ] ]
]
Parameter | Type | Description |
---|---|---|
time | string | ISO 8601 datetime, with microseconds, of the time at the beginning of the time slice. |
low | float64 | Exchange rate lower bound within the time slice. |
high | float64 | Exchange rate upper bound within the time slice. |
open | float64 | Exchange rate of first filled order at the beginning of the time slice. |
close | float64 | Exchange rate of last filled order at the end of the time slice. |
volume | int64 | Total volume of the taker asset within the time slice. |
order_ids | array | Array of GUIDs of all filled orders within the time slice. |
Sample 400 Response
{
"error": "Invalid parameters: granularity=6 must be one of: 60,300,900,3600,21600,86400",
"code": 1025,
"name": "dxGetOrderHistory"
}
Parameter | Type | Description |
---|---|---|
error | string | Error message |
code | int | Error code |
name | string | Name of the RPC function |
Sample 500 Response
{
"error": "Internal error occurred",
"code": 1002,
"name": "dxGetOrderHistory"
}
Parameter | Type | Description |
---|---|---|
error | string | Error message |
code | int | Error code |
name | string | Name of the RPC function |
Code | Type | Error |
---|---|---|
1001 | 401 | Unauthorized |
1004 | 400 | Bad request |
1011 | 400 | Invalid maker symbol |
1012 | 400 | Invalid taker symbol |
1025 | 400 | Invalid parameters |
1002 | 500 | Internal server error |
dxGetLocalTokens
This call is used to retrieve all the assets supported by the local client. You can only trade on markets with these assets. If an asset is not showing, it has not been properly configured (refer back to #2 in XBridge Setup.
Request Parameters
Request
blocknet-cli dxGetLocalTokens
dxGetLocalTokens
This call does not take parameters.
Response Parameters
Sample 200 Response
[
"LTC",
"SYS",
"MONA",
"BLOCK"
]
Parameter | Type | Description |
---|---|---|
Array | array | An array of all the assets supported by the local client. |
Sample 400 Response
{
"error": "Bad request",
"code": 1004,
"name": "dxGetLocalTokens"
}
Parameter | Type | Description |
---|---|---|
error | string | Error message |
code | int | Error code |
name | string | Name of the RPC function |
Sample 500 Response
{
"error": "Internal error occurred",
"code": 1002,
"name": "dxGetLocalTokens"
}
Parameter | Type | Description |
---|---|---|
error | string | Error message |
code | int | Error code |
name | string | Name of the RPC function |
Code | Type | Error |
---|---|---|
1001 | 401 | Unauthorized |
1004 | 400 | Bad request |
1025 | 400 | Invalid parameters |
1002 | 500 | Internal server error |
dxGetNetworkTokens
This call is used to retrieve all the assets currently supported by the network. This list may differ from the compatibility list due to assets being unofficially supported or assets not being supported by any nodes on the network.
Request Parameters
Request
blocknet-cli dxGetNetworkTokens
dxGetNetworkTokens
This call does not take parameters.
Response Parameters
Sample 200 Response
[
"LTC",
"SYS",
"MONA",
"BLOCK"
]
Parameter | Type | Description |
---|---|---|
Array | array | An array of all the assets supported by the network. |
Sample 400 Response
{
"error": "Bad request",
"code": 1004,
"name": "dxGetNetworkTokens"
}
Parameter | Type | Description |
---|---|---|
error | string | Error message |
code | int | Error code |
name | string | Name of the RPC function |
Sample 500 Response
{
"error": "Internal error occurred",
"code": 1002,
"name": "dxGetNetworkTokens"
}
Parameter | Type | Description |
---|---|---|
error | string | Error message |
code | int | Error code |
name | string | Name of the RPC function |
Code | Type | Error |
---|---|---|
1001 | 401 | Unauthorized |
1004 | 400 | Bad request |
1025 | 400 | Invalid parameters |
1002 | 500 | Internal server error |
dxGetTokenBalances
This call is used to retrieve the asset available balances for all connected wallets on the local client. This will only return balances for the assets returned in dxGetLocalTokens. If an asset is not showing and is not returned in or the value is showing 0, it has not been properly configured (refer back to #2 in XBridge Setup.
Note: These balances do not include orders that are using locked UTXOs to support a pending or open order. XBridge works best with pre-sliced UTXOs so that your entire wallet balance is capable of multiple simultaneous trades.
Request Parameters
Request
blocknet-cli dxGetTokenBalances
dxGetTokenBalances
This call does not take parameters.
Response Parameters
Sample 200 Response
{
"LTC": "0.568942",
"SYS": "1050.128493",
"MONA": "3.452",
"BLOCK": "250.83492174"
}
Parameter | Type | Description |
---|---|---|
Object | object | Key-value object of the assets and respective balances. |
-- key | string | The asset symbol. |
-- value | string(float) | The available wallet balance amount. String is used to preserve precision. |
Sample 400 Response
{
"error": "Bad request",
"code": 1004,
"name": "dxGetTokenBalances"
}
Parameter | Type | Description |
---|---|---|
error | string | Error message |
code | int | Error code |
name | string | Name of the RPC function |
Sample 500 Response
{
"error": "Internal error occurred",
"code": 1002,
"name": "dxGetTokenBalances"
}
Parameter | Type | Description |
---|---|---|
error | string | Error message |
code | int | Error code |
name | string | Name of the RPC function |
Code | Type | Error |
---|---|---|
1001 | 401 | Unauthorized |
1004 | 400 | Bad request |
1025 | 400 | Invalid parameters |
1002 | 500 | Internal server error |
dxGetNewTokenAddress
Sample Data
{
"asset": "SYS"
}
This call is used to generate a new address for the specified asset. This call will only work for the assets returned in dxGetLocalTokens.
Request Parameters
Sample Request
blocknet-cli dxGetNewTokenAddress SYS
dxGetNewTokenAddress [asset]
Parameter | Type | Description |
---|---|---|
asset | string | The ticker of the asset you want to generate an address for. |
Response Parameters
Sample 200 Response
[
"SVTbaYZ8oApVn3uNyimst3GKyvvfzXQgdK"
]
Parameter | Type | Description |
---|---|---|
Array | array | An array containing the newly generated address for the given asset. |
Sample 400 Response
{
"error": "Bad request",
"code": 1004,
"name": "dxGetNewTokenAddress"
}
Parameter | Type | Description |
---|---|---|
error | string | Error message |
code | int | Error code |
name | string | Name of the RPC function |
Sample 500 Response
{
"error": "Internal error occurred",
"code": 1002,
"name": "dxGetNewTokenAddress"
}
Parameter | Type | Description |
---|---|---|
error | string | Error message |
code | int | Error code |
name | string | Name of the RPC function |
Code | Type | Error |
---|---|---|
1001 | 401 | Unauthorized |
1004 | 400 | Bad request |
1025 | 400 | Invalid parameters |
1002 | 500 | Internal server error |
dxGetOrderBook
Sample Data
{
"detail": 1,
"maker": "LTC",
"taker": "SYS",
"max_orders": 100
}
This call is used to retrieve open orders at various detail levels:
Detail 1 - Retrieves the best bid and ask.
Detail 2 - Retrieves a list of aggregated orders. This is useful for charting.
Detail 3 - Retrieves a list of non-aggregated orders. This is useful for bot trading.
Detail 4 - Retrieves the best bid and ask with the order GUIDs.
Note: This call will only return orders for markets with both assets returned in dxGetLocalTokens.
Request Parameters
Sample Request
blocknet-cli dxGetOrderBook 1 LTC SYS 100
dxGetOrderBook [detail] [maker] [taker] [max_orders](optional)
Parameter | Type | Description |
---|---|---|
detail | int | Detail level: 1 , 2 , 3 , 4 |
maker | string | Maker trading asset; the ticker of the asset being sold by the maker. |
taker | string | Taker trading asset; the ticker of the asset being sold by the taker. |
max_orders | int | (Optional Parameter) Defaults to 50 .The maximum total orders to display for bids and asks combined. Odd values are rounded up 1. Quantity is split evenly between bids and asks. |
Response Parameters
Sample 200 Response (Detail 1)
{
"detail": 1,
"maker": "LTC",
"taker": "SYS",
"bids": [
//[ price, size, quantity ],
[ "253", "15", 1 ],
],
"asks": [
//[ price, size, quantity ],
[ "253.01", "15", 3 ],
]
}
Detail 1
Retrieves the best bid and ask.
Parameter | Type | Description |
---|---|---|
detail | int | Detail level: 1 |
maker | string | Maker trading asset; the ticker of the asset being sold by the maker. |
taker | string | Taker trading asset; the ticker of the asset being sold by the taker. |
bids | array | An array of the best bids. |
- price | string(float) | The highest bid price for the asset. String is used to preserve precision. |
- size | string(float) | The size of bid orders at this price. String is used to preserve precision. |
- quantity | int | The total bid orders at this price. |
asks | array | An array of the best asks. |
- price | string(float) | The lowest ask price for the asset. String is used to preserve precision. |
- size | string(float) | The size of ask orders at this price. String is used to preserve precision. |
- quantity | int | The total ask orders at this price. |
Sample 200 Response (Detail 2)
{
"detail": 2,
"maker": "LTC",
"taker": "SYS",
"bids": [
//[ price, size, quantity ],
[ "253.00", "15.00", 1 ]
],
"asks": [
//[ price, size, quantity ],
[ "254.15", "15.01", 3 ]
]
}
Detail 2
Retrieves a list of aggregated orders. This is useful for charting.
Parameter | Type | Description |
---|---|---|
detail | int | Detail level: 2 |
maker | string | Maker trading asset; the ticker of the asset being sold by the maker. |
taker | string | Taker trading asset; the ticker of the asset being sold by the taker. |
bids | array | An array of bids. |
- price | string(float) | The bid price for the asset. String is used to preserve precision. |
- size | string(float) | The size of bid orders at this price. String is used to preserve precision. |
- quantity | int | The total bid orders at this price. |
asks | array | An array of asks. |
- price | string(float) | The ask price for the asset. String is used to preserve precision. |
- size | string(float) | The size of ask orders at this price. String is used to preserve precision. |
- quantity | int | The total ask orders at this price. |
Sample 200 Response (Detail 3)
{
"detail": 3,
"maker": "LTC",
"taker": "SYS",
"bids": [
//[ price, size, order_id ],
[ "253.00", "15.00", "0cc2e8a7222f1416cda996031ca21f67b53431614e89651887bc300499a6f83e" ]
],
"asks": [
//[ price, size, order_id ],
[ "254.15", "15.01", "b20f0028eb77b7b745c1953f7521cbef31f40d5543595196d7eb911db43c6434" ],
[ "254.15", "15.01", "920f53f7521cbef3c64343b0020d554196d7eb98eb7735911db45b7b745c11f4" ],
[ "254.15", "15.01", "1dbbf31f7b745c12120f0028eb7795196dbcbe4043c6434d554953f75357eb91" ]
]
}
Detail 3
Retrieves a list of non-aggregated orders. This is useful for bot trading.
Parameter | Type | Description |
---|---|---|
detail | int | Detail level: 3 |
maker | string | Maker trading asset; the ticker of the asset being sold by the maker. |
taker | string | Taker trading asset; the ticker of the asset being sold by the taker. |
bids | array | An array of bids. |
- price | string(float) | The highest bid price for the asset. String is used to preserve precision. |
- size | string(float) | The size of the bid order. String is used to preserve precision. |
- order_id | string | The ID of the bid order. |
asks | array | An array of asks. |
- price | string(float) | The lowest ask price for the asset. String is used to preserve precision. |
- size | string(float) | The size of the ask order. String is used to preserve precision. |
- order_id | string | The ID of the ask order. |
Sample 200 Response (Detail 4)
{
"detail": 4,
"maker": "LTC",
"taker": "SYS",
"bids": [
//[ price, size, [order_ids] ],
[ "253.00", "15", [ "920f53f7521cbef3c64343b0020d554196d7eb98eb7735911db45b7b745c11f4" ] ],
],
"asks": [
//[ price, size, [order_ids] ],
[ "254.00", "15", [ "32f5a551-3da6-4ff0-8ae6-0b60535c5237", "b20f0028eb77b7b745c1953f7521cbef31f40d5543595196d7eb911db43c6434", "a1f40d53f75357eb914554359b207b7b745cf096dbcb028eb77b7b7e4043c6b4", "1dbbf31f7b745c12120f0028eb7795196dbcbe4043c6434d554953f75357eb91" ] ],
]
}
Detail 4
Retrieves the best bid and ask with the order GUIDs.
Parameter | Type | Description |
---|---|---|
detail | int | Detail level: 4 |
maker | string | Maker trading asset; the ticker of the asset being sold by the maker. |
taker | string | Taker trading asset; the ticker of the asset being sold by the taker. |
bids | array | An array of the best bids. |
- price | string(float) | The highest bid price for the asset. String is used to preserve precision. |
- size | string(float) | The size of bid orders at this price. String is used to preserve precision. |
- order_ids | array | An array of ID for bid orders at this price. |
asks | array | An array of the best asks. |
- price | string(float) | The lowest ask price for the asset. String is used to preserve precision. |
- size | string(float) | The size of ask orders at this price. String is used to preserve precision. |
- order_ids | array | An array of ID for ask orders at this price. |
Sample 400 Response
{
"error": "Invalid detail level",
"code": 1015,
"name": "dxGetOrderBook"
}
Parameter | Type | Description |
---|---|---|
error | string | Error message |
code | int | Error code |
name | string | Name of the RPC function |
Sample 500 Response
{
"error": "Internal error occurred",
"code": 1002,
"name": "dxGetOrderBook"
}
Parameter | Type | Description |
---|---|---|
error | string | Error message |
code | int | Error code |
name | string | Name of the RPC function |
Code | Type | Error |
---|---|---|
1001 | 401 | Unauthorized |
1004 | 400 | Bad request |
1011 | 400 | Invalid maker symbol |
1012 | 400 | Invalid taker symbol |
1015 | 400 | Invalid detail level |
1025 | 400 | Invalid parameters |
1002 | 500 | Internal server error |
dxLoadXBridgeConf
This call is used to reload xbridge.conf
to run newly configured settings without needing to restart the Blocknet client.
Note: This may disrupt trades in progress.
Request Parameters
Request
blocknet-cli dxLoadXBridgeConf
dxLoadXBridgeConf
This call does not take parameters.
Response Parameters
200 Response
true
Type | Description |
---|---|
bool | true : Successfully reloaded file. |
Sample 400 Response
{
"error": "Bad request",
"code": 1004,
"name": "dxLoadXBridgeConf"
}
Parameter | Type | Description |
---|---|---|
error | string | Error message |
code | int | Error code |
name | string | Name of the RPC function |
Sample 500 Response
{
"error": "Internal error occurred",
"code": 1002,
"name": "dxLoadXBridgeConf"
}
Parameter | Type | Description |
---|---|---|
error | string | Error message |
code | int | Error code |
name | string | Name of the RPC function |
Code | Type | Error |
---|---|---|
1001 | 401 | Unauthorized |
1004 | 400 | Bad request |
1025 | 400 | Invalid parameters |
1002 | 500 | Internal server error |
dxGetTradingData
This call returns the XBridge trading records. This information is pulled from on-chain history so pulling a large amount of blocks will result in longer response times.
This call replaces the gettradingdata
call, which will be deprecated. Please update to use dxGetTradingData
as soon as possible
Request Parameters
Sample Request
blocknet-cli dxGetTradingData 1440
dxGetTradingData [blocks](optional) [errors](optional)
Parameter | Type | Description |
---|---|---|
blocks | int | (Optional Parameter) Defaults to 43200 .Number of blocks to return trade records for (60s block time). |
errors | bool | (Optional Parameter) Defaults to false .Shows and error if there's an error detected. This may be useful if you're building a custom client and change the on-chain order history data format. |
Response Parameters
Sample 200 Response
[
{
"timestamp" : 1559970139,
"fee_txid" : "4b409e5c5fb1986930cf7c19afec2c89ac2ad4fddc13c1d5479b66ddf4a8fefb",
"nodepubkey" : "Bqtms8j1zrE65kcpsEorE5JDzDaHidMtLG",
"id" : "9eb57bac331eab34f3daefd8364cdb2bb05259c407d805d0bd0c",
"taker" : "BLOCK",
"taker_size" : 0.001111,
"maker" : "SYS",
"maker_size" : 0.001000
},
{
"timestamp" : 1559970139,
"fee_txid" : "3de7479e8a88ebed986d3b7e7e135291d3fd10e4e6d4c6238663db42c5019286",
"nodepubkey" : "Bqtms8j1zrE65kcpsEorE5JDzDaHidMtLG",
"id" : "fd0fed3ee9fe557d5735768c9bdcd4ab2908165353e0f0cef0d5",
"taker" : "BLOCK",
"taker_size" : 0.001577,
"maker" : "SYS",
"maker_size" : 0.001420
},
{
"timestamp" : 1559970139,
"fee_txid" : "9cc4a0dae46f2f1849b3ab6f93ea1c59aeaf0e95662d90398814113f12127eae",
"nodepubkey" : "BbrQKtutGBLuWHvq26EmHKuNaztnfBFWVB",
"id" : "f74c614489bd77efe545c239d1f9a57363c5428e7401b2018d350",
"taker" : "BLOCK",
"taker_size" : 0.000231,
"maker" : "SYS",
"maker_size" : 0.001100
}
]
Parameter | Type | Description |
---|---|---|
timestamp | int | Unix epoch timestamp of when the trade took place. |
fee_txid | string | The Blocknet trade fee transaction ID. |
nodepubkey | string | Service Node that received the trade fee. |
id | string | XBridge transaction ID. |
taker | string | Taker trading asset; the ticker of the asset being sold by the taker. |
taker_size | int | Taker trading size. |
maker | string | Maker trading asset; the ticker of the asset being sold by the maker. |
maker_size | int | Maker trading size. |
Status Codes
The XBridge API uses the following order status codes:
Status | Description |
---|---|
new | New order, not yet broadcasted |
open | Open order, waiting for taker |
accepting | Taker accepting order |
hold | Counterparties acknowledge each other |
initialized | Counterparties agree on order |
created | Swap process starting |
commited | Swap finalized |
finished | Order complete |
expired | Order expired |
offline | Maker or taker went offline |
canceled | Order was canceled |
invalid | Problem detected with the order |
rolled back | Trade failed, funds being rolled back |
rollback failed | Funds unsuccessfully redeemed in failed trade |
Error Codes
The XBridge API uses the following error codes:
Code | Type | Error |
---|---|---|
1004 | 400 | Bad request |
1011 | 400 | Invalid maker symbol |
1012 | 400 | Invalid taker symbol |
1015 | 400 | Invalid detail level |
1016 | 400 | Invalid time |
1017 | 400 | Invalid asset |
1018 | 400 | Unable to connect to wallet |
1019 | 400 | Insufficient funds |
1020 | 400 | Funds not signed for |
1021 | 400 | Invalid order ID |
1022 | 400 | Unknown session |
1023 | 400 | Revert transaction failed |
1024 | 400 | Invalid amount |
1025 | 400 | Invalid parameters |
1026 | 400 | Invalid address |
1027 | 400 | Invalid signature |
1028 | 400 | Invalid state |
1029 | 400 | Not an exchange node |
1030 | 400 | Dust amount |
1031 | 400 | Insufficient funds |
1032 | 400 | Unsupported asset |
1024 | 400 | Size must be greater than 0 |
1001 | 401 | Unauthorized |
1002 | 500 | Internal server error |
XRouter API
The following set of calls are used to communicate and interact with blockchains remotely over the Blocknet network via XRouter.
See XRouter Setup for instructions on setting up your environment for use with XRouter.
Call | Description |
---|---|
xrGetNetworkServices | Returns supported XRouter services |
xrConnect | Pre-connect to XRouter nodes |
xrConnectedNodes | Returns connected node services and fees |
xrGetBlockCount | Returns a blockchain's block height |
xrGetBlockHash | Returns a block number's hash |
xrGetBlock | Returns a block hash's block number |
xrGetBlocks | Returns block hashes for multiple block numbers |
xrDecodeRawTransaction | Returns decoded transaction HEX |
xrGetTransaction | Returns transaction data for transaction ID |
xrGetTransactions | Returns transaction data for multiple transaction IDs |
xrSendTransaction | Submit a signed transaction to the network |
xrService | Use to interact with XCloud services |
xrServiceConsensus | Use to interact with XCloud services with consensus |
xrGetReply | Returns prior response associated with UUID |
xrShowConfigs | Returns all node configs received as raw text |
xrReloadConfigs | Applies changes made to your configs |
xrStatus | Returns your XRouter configurations |
xrGetNetworkServices
This call is used to view the XRouter services currently supported on the network, along with the number of nodes supporting each service. XRouter SPV calls use the xr::
namespace. XCloud services use the xrs::
namespace and can be called using xrService and xrServiceConsensus.
Request Parameters
Sample Request
blocknet-cli xrGetNetworkServices
xrGetNetworkServices
This call does not take parameters.
Response Parameters
Sample 200 Response
{
"reply": {
"spvwallets": [ "xr::BLOCK", "xr::BTC", "xr::LTC", "xr::MNP", "xr::SYS", "xr::TBLOCK" ],
"services": [ "xrs::BTCgetbestblockhash", "xrs::BTCgetblockhash", "xrs::BTCgettransaction", "xrs::SYSgetbestblockhash", "xrs::SYSgetblock", "xrs::SYSgetgovernanceinfo", "xrs::SYSgetmempool", "xrs::SYSlistoffers", "xrs::SYSofferinfo", "xrs::twilio" ],
"nodecounts": {
"xr::BLOCK": 27,
"xr::BTC": 13,
"xr::LTC": 21,
"xr::MNP": 1,
"xr::SYS": 9,
"xrs::BTCgetbestblockhash": 12,
"xrs::BTCgetblockhash": 12,
"xrs::BTCgettransaction": 5,
"xrs::SYSgetbestblockhash": 7,
"xrs::SYSgetblock": 6,
"xrs::SYSgetgovernanceinfo": 4,
"xrs::SYSgetmempool": 4,
"xrs::SYSlistoffers": 4,
"xrs::SYSofferinfo": 4,
"xrs::twilio": 1
}
},
"uuid": "cd408df7-0ff8-4e29-b5cf-0148af83f93a"
}
Parameter | Type | Description |
---|---|---|
reply | object | An object containing information on supported services. |
spvwallets | array | An array of supported SPV wallets, represented by the asset's ticker. |
services | array | An array of supported XCloud services. |
nodecounts | object | An object of supported SPV wallets and XCloud services with how many nodes support each. |
-- key | string | The SPV wallet or XCloud service with it's namespace. |
-- value | int | The amount of nodes supporting each respective service. |
uuid | string | The response ID, which can be used to view this response again with xrGetReply. |
xrConnect
Sample Data
{
"service": "SYS"
}
This call is used to connect to XRouter nodes with the specified service and download their configs. This command is useful to determine how much nodes are charging for services. It's also useful to "warm up" connections. By connecting to nodes immediately before making a large request it can speed up the reponse time (since those connections will be open). However, XRouter nodes close inactive connections after 15 seconds, so keep that in mind. After connecting, call xrConnectedNodes to display information about these XRouter nodes.
Request Parameters
Sample Requests
// Connect to one XRouter node supporting SYS
blocknet-cli xrConnect xr::SYS
// Connect to two XRouter nodes supporting SYS
blocknet-cli xrConnect xr::SYS 2
// Connect to one XRouter node supporting XCloud service twilio
blocknet-cli xrConnect xrs::twilio
xrConnect [service] [node_count](optional)
Parameter | Type | Description |
---|---|---|
service | string | Service name including the namespace (xr::[spv_call] or xrs::[xcloud_service]). |
node_count | int | (Optional Parameter) Defaults to 1 if no consensus= setting in xrouter.conf .The number of nodes to pre-connect to that will be used to route calls. The most common response (i.e. the response with the most consensus) will be returned as reply . |
Response Parameters
Sample 200 Response
// Sample response for xrConnect SYS 2
{
"reply": [
{
"nodepubkey": "02c6c79a75846fd9bb064788b03145e347fa5464558fa9030ebb009df2833369f0",
"score": 0,
"banned": false,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"spvwallets": [ "MNP", "SYS" ],
"spvconfigs": [
{
"spvwallet": "MNP",
"commands": [
{
"command": "xrGetConfig",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
},
{
"command": "xrGetBlockCount",
"fee": 0.000000,
"requestlimit": 10,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
},
{
"command": "xrGetBlockHash",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
},
{
"command": "xrGetBlock",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
},
{
"command": "xrGetTransaction",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
},
{
"command": "xrSendTransaction",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
},
{
"command": "xrGetBlocks",
"fee": 0.100000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
},
{
"command": "xrGetTransactions",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
},
{
"command": "xrDecodeRawTransaction",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
}
]
},
{
"spvwallet": "SYS",
"commands": [
{
"command": "xrGetConfig",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
},
{
"command": "xrGetBlockCount",
"fee": 0.100000,
"requestlimit": 10,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
},
{
"command": "xrGetBlockHash",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
},
{
"command": "xrGetBlock",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
},
{
"command": "xrGetTransaction",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
},
{
"command": "xrSendTransaction",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
},
{
"command": "xrGetBlocks",
"fee": 0.100000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
},
{
"command": "xrGetTransactions",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
},
{
"command": "xrDecodeRawTransaction",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
}
]
}
],
"feedefault": 0.000000,
"fees": {
"xrGetBlockCount": 0.000000,
"xrGetBlocks": 0.100000
},
"services": {
"SYSgetbestblockhash": {
"parameters": "",
"fee": 0.100000,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"requestlimit": -1,
"fetchlimit": 50,
"timeout": 30,
"disabled": false
},
"SYSgetgovernanceinfo": {
"parameters": "",
"fee": 0.100000,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"requestlimit": -1,
"fetchlimit": 50,
"timeout": 30,
"disabled": false
}
}
},
{
"nodepubkey": "0370874cad6252bb94afa9a253c90122760ce2862e623b515e57bfe0697f3fc515",
"score": 0,
"banned": false,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"spvwallets": [ "BLOCK", "BTC", "LTC", "SYS" ],
"spvconfigs": [
{
"spvwallet": "BLOCK",
"commands": [
{
"command": "xrGetConfig",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetBlockCount",
"fee": 0.000000,
"requestlimit": -1,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetBlockHash",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetBlock",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetTransaction",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrSendTransaction",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetBlocks",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetTransactions",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrDecodeRawTransaction",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
}
]
},
{
"spvwallet": "BTC",
"commands": [
{
"command": "xrGetConfig",
"fee": 0.200000,
"requestlimit": 100,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetBlockCount",
"fee": 0.200000,
"requestlimit": 100,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetBlockHash",
"fee": 0.200000,
"requestlimit": 100,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetBlock",
"fee": 0.200000,
"requestlimit": 100,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetTransaction",
"fee": 0.200000,
"requestlimit": 100,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrSendTransaction",
"fee": 0.200000,
"requestlimit": 100,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetBlocks",
"fee": 0.200000,
"requestlimit": 100,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetTransactions",
"fee": 0.200000,
"requestlimit": 100,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrDecodeRawTransaction",
"fee": 0.200000,
"requestlimit": 100,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
}
]
},
{
"spvwallet": "LTC",
"commands": [
{
"command": "xrGetConfig",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetBlockCount",
"fee": 0.000000,
"requestlimit": -1,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetBlockHash",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetBlock",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetTransaction",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrSendTransaction",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetBlocks",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetTransactions",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrDecodeRawTransaction",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
}
]
},
{
"spvwallet": "SYS",
"commands": [
{
"command": "xrGetConfig",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetBlockCount",
"fee": 0.000000,
"requestlimit": -1,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetBlockHash",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetBlock",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetTransaction",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrSendTransaction",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetBlocks",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetTransactions",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrDecodeRawTransaction",
"fee": 0.000000,
"requestlimit": 50,
"fetchlimit" : 50,
"timeout" : 30,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
}
]
}
],
"feedefault": 0.000000,
"fees": {
"BTC": 0.200000,
"xrGetBlockCount": 0.000000
},
"services": {
"BTCgetbestblockhash": {
"parameters": "",
"fee": 0.000000,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"requestlimit": 50,
"fetchlimit": 50,
"timeout": 30,
"disabled": false
},
"BTCgetblockhash": {
"parameters": "int",
"fee": 0.000000,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"requestlimit": 50,
"fetchlimit": 50,
"timeout": 30,
"disabled": false
},
"BTCgettransaction": {
"parameters": "string",
"fee": 0.000000,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"requestlimit": 50,
"fetchlimit": 50,
"timeout": 30,
"disabled": false
},
"SYSgetbestblockhash": {
"parameters": "",
"fee": 0.000000,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"requestlimit": 10,
"fetchlimit": 50,
"timeout": 30,
"disabled": false
}
}
}
],
"uuid": "88A16FDB-464D-470B-94CD-D827E63285CC"
}
Parameter | Type | Description |
---|---|---|
reply | array | An array of nodes providing the specified service, along with their configs. |
nodepubkey | string | The node ID. |
score | int | The node's score based on quality of service. A score of -200 will ban the node for a 24hr period. You can change the ban threshold with the xrouterbanscore setting in blocknet.conf . See node scoring for more details. |
banned | bool | Signifies if the node is currently banned.true : Node is banned.false : Node is not banned. See node scoring for more details. |
paymentaddress | string | The node's payment address. |
spvwallets | array | An array of supported SPV wallets, represented by the asset's ticker. |
spvconfigs | array | An array of each SPV wallets and command configurations. |
spvwallet | string | The SPV wallet that the configurations under commands pertains to. |
commands | array | An array of each SPV wallet command and respective configurations. |
command | string | The SPV command. |
fee | float | The command fee, overrides the feedefault and fees values. This priority has already been accounted for in this value. |
requestlimit | int | The minimum time allowed between calls in milliseconds. A value of -1 means there is no limit. If you exceed this value you will be penalized and eventually banned by this specific node. |
paymentaddress | string | The node's payment address for this specific command. |
disabled | bool | Signifies if the node has disabled this command.true : Call is disabled and not supported.false : Call is enabled and supported. |
feedefault | float | The node's default service fee. This fee is overridden by the values specified in fees , SPV command configuration fee , and XCloud service command configuration fee . |
fees | object | Object of SPV commands and respective fees. These values are overridden by the SPV wallet-specific configuration fee . |
services | object | Object of the node's XCloud service calls with respective properties. |
parameters | string | Information on the parameters the command takes. |
fee | float | The service command fee. This overrides the feedefault value. |
paymentaddress | string | The node's payment address for this specific command. |
requestlimit | int | The minimum time allowed between calls in milliseconds. A value of -1 means there is no limit. If you exceed this value you will be penalized and eventually banned by this specific node. |
fetchlimit | int | The maximum number of records returned. This pertains to calls such as xrGetBlocks and xrGetTransactions where multiple records are returned. A value of -1 means there is no limit. A value of 0 means no blocks will be processed. |
timeout | int | The value for timeout you set in xrouter.conf for this call. Defines how long (in seconds) your client waits for a response from a Service Node. The default value is 30 . |
uuid | string | The response ID, which can be used to view this response again with xrGetReply. |
xrConnectedNodes
This call is used to lists all the data about current and previously connected nodes. This information includes supported SPV wallets, SPV calls, services, fees, and other service settings.
Request Parameters
Sample Requests
blocknet-cli xrConnectedNodes
xrConnectedNodes
This call does not take parameters.
Response Parameters
Sample 200 Response
{
"reply": [
{
"nodepubkey": "02c6c79a75846fd9bb064788b03145e347fa5464558fa9030ebb009df2833369f0",
"score": 0,
"banned": false,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"spvwallets": [ "MNP", "SYS" ],
"spvconfigs": [
{
"spvwallet": "MNP",
"commands": [
{
"command": "xrGetConfig",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
},
{
"command": "xrGetBlockCount",
"fee": 0.000000,
"requestlimit": 10,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
},
{
"command": "xrGetBlockHash",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
},
{
"command": "xrGetBlock",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
},
{
"command": "xrGetTransaction",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
},
{
"command": "xrSendTransaction",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
},
{
"command": "xrGetBlocks",
"fee": 0.100000,
"requestlimit": 50,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
},
{
"command": "xrGetTransactions",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
},
{
"command": "xrDecodeRawTransaction",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
}
]
},
{
"spvwallet": "SYS",
"commands": [
{
"command": "xrGetConfig",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
},
{
"command": "xrGetBlockCount",
"fee": 0.100000,
"requestlimit": 10,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
},
{
"command": "xrGetBlockHash",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
},
{
"command": "xrGetBlock",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
},
{
"command": "xrGetTransaction",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
},
{
"command": "xrSendTransaction",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
},
{
"command": "xrGetBlocks",
"fee": 0.100000,
"requestlimit": 50,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
},
{
"command": "xrGetTransactions",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
},
{
"command": "xrDecodeRawTransaction",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"disabled": false
}
]
}
],
"feedefault": 0.000000,
"fees": {
"xrGetBlockCount": 0.000000,
"xrGetBlocks": 0.100000
},
"services": {
"SYSgetbestblockhash": {
"parameters": "",
"fee": 0.100000,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"requestlimit": -1,
"fetchlimit": 50,
"timeout": 30,
"disabled": false
},
"SYSgetgovernanceinfo": {
"parameters": "",
"fee": 0.100000,
"paymentaddress": "B8zc9PuDJC3XaF7UkQ2CnRDCmXiCs9bDuS",
"requestlimit": -1,
"fetchlimit": 50,
"timeout": 30,
"disabled": false
}
}
},
{
"nodepubkey": "0370874cad6252bb94afa9a253c90122760ce2862e623b515e57bfe0697f3fc515",
"score": 0,
"banned": false,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"spvwallets": [ "BLOCK", "BTC", "LTC", "SYS" ],
"spvconfigs": [
{
"spvwallet": "BLOCK",
"commands": [
{
"command": "xrGetConfig",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetBlockCount",
"fee": 0.000000,
"requestlimit": -1,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetBlockHash",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetBlock",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetTransaction",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrSendTransaction",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetBlocks",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetTransactions",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrDecodeRawTransaction",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
}
]
},
{
"spvwallet": "BTC",
"commands": [
{
"command": "xrGetConfig",
"fee": 0.200000,
"requestlimit": 100,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetBlockCount",
"fee": 0.200000,
"requestlimit": 100,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetBlockHash",
"fee": 0.200000,
"requestlimit": 100,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetBlock",
"fee": 0.200000,
"requestlimit": 100,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetTransaction",
"fee": 0.200000,
"requestlimit": 100,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrSendTransaction",
"fee": 0.200000,
"requestlimit": 100,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetBlocks",
"fee": 0.200000,
"requestlimit": 100,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetTransactions",
"fee": 0.200000,
"requestlimit": 100,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrDecodeRawTransaction",
"fee": 0.200000,
"requestlimit": 100,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
}
]
},
{
"spvwallet": "LTC",
"commands": [
{
"command": "xrGetConfig",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetBlockCount",
"fee": 0.000000,
"requestlimit": -1,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetBlockHash",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetBlock",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetTransaction",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrSendTransaction",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetBlocks",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetTransactions",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrDecodeRawTransaction",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
}
]
},
{
"spvwallet": "SYS",
"commands": [
{
"command": "xrGetConfig",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetBlockCount",
"fee": 0.000000,
"requestlimit": -1,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetBlockHash",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetBlock",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetTransaction",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrSendTransaction",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetBlocks",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrGetTransactions",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
},
{
"command": "xrDecodeRawTransaction",
"fee": 0.000000,
"requestlimit": 50,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"disabled": false
}
]
}
],
"feedefault": 0.000000,
"fees": {
"BTC": 0.200000,
"xrGetBlockCount": 0.000000
},
"services": {
"BTCgetbestblockhash": {
"parameters": "",
"fee": 0.000000,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"requestlimit": 50,
"fetchlimit": 50,
"timeout": 30,
"disabled": false
},
"BTCgetblockhash": {
"parameters": "int",
"fee": 0.000000,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"requestlimit": 50,
"fetchlimit": 50,
"timeout": 30,
"disabled": false
},
"BTCgettransaction": {
"parameters": "string",
"fee": 0.000000,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"requestlimit": 50,
"fetchlimit": 50,
"timeout": 30,
"disabled": false
},
"SYSgetbestblockhash": {
"parameters": "",
"fee": 0.000000,
"paymentaddress": "BGyvu6uHJ9WLftPgwHeAU5HwmgGmpB3Juh",
"requestlimit": 10,
"fetchlimit": 50,
"timeout": 30,
"disabled": false
}
}
}
],
"uuid": "88A16FDB-464D-470B-94CD-D827E63285CC"
}
Parameter | Type | Description |
---|---|---|
reply | array | An array of nodes providing the specified service. |
nodepubkey | string | The node ID. |
score | int | The node's score based on quality of service. A score of -200 will ban the node for a 24hr period. You can change the ban threshold with the xrouterbanscore setting in blocknet.conf . See node scoring for more details. |
banned | bool | Signifies if the node is currently banned.true : Node is banned.false : Node is not banned. See node scoring for more details. |
paymentaddress | string | The node's payment address. |
spvwallets | array | An array of supported SPV wallets, represented by the asset's ticker. |
spvconfigs | array | An array of each SPV wallets and command configurations. |
spvwallet | string | The SPV wallet that the configurations under commands pertains to. |
commands | array | An array of each SPV wallet command and respective configurations. |
command | string | The SPV command. |
fee | float | The SPV command fee. This overrides the feedefault and fees values. |
requestlimit | int | The minimum time allowed between calls in milliseconds. A value of -1 means there is no limit. If you exceed this value you will be penalized and eventually banned by this specific node. |
paymentaddress | string | The node's payment address for this specific command. |
disabled | bool | Signifies if the node has disabled this command.true : Call is disabled and not supported.false : Call is enabled and supported. |
feedefault | float | The node's default service fee. This fee is overridden by the values specified in fees , SPV command configuration fee , and XCloud service command configuration fee . |
fees | object | Object of SPV commands and respective fees. These values are overridden by the SPV wallet-specific configuration fee . |
services | object | Object of the node's XCloud service calls with respective properties. |
parameters | string | Information on the parameters the command takes. |
fee | float | The service command fee. This overrides the feedefault value. |
paymentaddress | string | The node's payment address for this specific command. |
requestlimit | int | The minimum time allowed between calls in milliseconds. A value of -1 means there is no limit. If you exceed this value you will be penalized and eventually banned by this specific node. |
fetchlimit | int | The maximum number of records returned. This pertains to calls such as xrGetBlocks and xrGetTransactions where multiple records are returned. A value of -1 means there is no limit. A value of 0 means no blocks will be processed. |
timeout | int | The value for timeout you set in xrouter.conf for this call. Defines how long (in seconds) your client waits for a response from a Service Node. The default value is 30 . |
uuid | string | The response ID, which can be used to view this response again with xrGetReply. |
xrGetBlockCount
Sample Data
{
"blockchain": "SYS"
}
This call is used to retrieve the current block height of the longest chain for the specified blockchain. It requires the blockchain to be SPV wallet supported.
Request Parameters
Sample Request
blocknet-cli xrGetBlockCount SYS 2
xrGetBlockCount [blockchain] [node_count](optional)
Parameter | Type | Description |
---|---|---|
blockchain | string | The blockchain, represented by the asset's ticker (BTC, LTC, SYS, etc.). |
node_count | int | (Optional Parameter) Defaults to 1 if no consensus= setting in xrouter.conf .The number of nodes that will be used to route calls. The most common response (i.e. the response with the most consensus) will be returned as reply . |
Response Parameters
Sample 200 Response
{
"reply": 482107,
"allreplies": [
{
"nodepubkey": "02c6c79a75846fd9bb064788b03145e347fa5464558fa9030ebb009df2833369f0",
"score": 48,
"reply": 482107
},
{
"nodepubkey": "0370874cad6252bb94afa9a253c90122760ce2862e623b515e57bfe0697f3fc515",
"score": 52,
"reply": 482107
}
],
"uuid": "34d0998e-a950-4fd8-b1d6-7571c83abb50"
}
Parameter | Type | Description |
---|---|---|
reply | int | The latest block number of the specified blockchain. If using a node_count greater than 1 , this returns the most common reply within allreplies . If there is a tie then one is chosen, or if one is an error then the non-error is chosen. |
allreplies* | array | An array of objects with responses from each node. This can be useful if you wanted to do your own analysis/filtering of the responses. |
nodepubkey* | string | The node ID. |
score* | int | The respective node's score based on quality of service. A score of -200 will ban the node for a 24hr period. You can change the ban threshold with the xrouterbanscore setting in blocknet.conf . See node scoring for more details. |
reply* | int | The latest block number of the specified blockchain from the respective node. |
uuid | string | The response ID, which can be used to view this response again with xrGetReply. |
* This is only returned if using a node_count
greater than 1
.
xrGetBlockHash
Sample Data
{
"blockchain": "SYS",
"block_number": 91510
}
This call is used to retrieve the block hash of the specified block and blockchain.
Request Parameters
Sample Request
blocknet-cli xrGetBlockHash SYS 482107 2
xrGetBlockHash [blockchain] [block_number] [node_count](optional)
Parameter | Type | Description |
---|---|---|
blockchain | string | The blockchain, represented by the asset's ticker (BTC, LTC, SYS, etc.). |
block_number | string | The block number or hex for the block hash of interest. |
node_count | int | (Optional Parameter) Defaults to 1 if no consensus= setting in xrouter.conf .The number of nodes that will be used to route calls. The most common response (i.e. the response with the most consensus) will be returned as reply . |
Response Parameters
Sample 200 Response
{
"reply": "52583afcd857e45234e7c8981804b36d13a7b3025c17f3535c3e724542590a79",
"allreplies": [
{
"nodepubkey": "02c6c79a75846fd9bb064788b03145e347fa5464558fa9030ebb009df2833369f0",
"score": 238,
"reply": "52583afcd857e45234e7c8981804b36d13a7b3025c17f3535c3e724542590a79"
},
{
"nodepubkey": "0370874cad6252bb94afa9a253c90122760ce2862e623b515e57bfe0697f3fc515",
"score": 288,
"reply": "52583afcd857e45234e7c8981804b36d13a7b3025c17f3535c3e724542590a79"
}
],
"uuid": "3c84d025-8a03-4b64-848f-99892fe481ff"
}
Parameter | Type | Description |
---|---|---|
reply | string | The block hash of the specified block and blockchain. If using a node_count greater than 1 , this returns the most common reply within allreplies . If there is a tie then one is chosen, or if one is an error then the non-error is chosen. |
allreplies* | array | An array of objects with responses from each node. This can be useful if you wanted to do your own analysis/filtering of the responses. |
nodepubkey* | string | The node ID. |
score* | int | The respective node's score based on quality of service. A score of -200 will ban the node for a 24hr period. You can change the ban threshold with the xrouterbanscore setting in blocknet.conf . See node scoring for more details. |
reply* | string | The block hash of the specified block and blockchain from the respective node. |
uuid | string | The response ID, which can be used to view this response again with xrGetReply. |
* This is only returned if using a node_count
greater than 1
.
xrGetBlock
Sample Data
{
"blockchain": "SYS",
"block_hash": "0cf18712db68be85793dc06cd0a4fbc8edb166157e6847bb3c9f55d462b02837"
}
This call is used to retrieve the block data for the specified block hash and blockchain.
Request Parameters
Sample Request
blocknet-cli xrGetBlock SYS 0cf18712db68be85793dc06cd0a4fbc8edb166157e6847bb3c9f55d462b02837 2
xrGetBlock [blockchain] [block_hash] [node_count](optional)
Parameter | Type | Description |
---|---|---|
blockchain | string | The blockchain, represented by the asset's ticker (BTC, LTC, SYS, etc.). |
block_hash | string | The block hash for the block of interest. |
node_count | int | (Optional Parameter) Defaults to 1 if no consensus= setting in xrouter.conf .The number of nodes that will be used to route calls. The most common response (i.e. the response with the most consensus) will be returned as reply . |
Response Parameters
Sample 200 Response
{
"reply": [
{
"hash": "0cf18712db68be85793dc06cd0a4fbc8edb166157e6847bb3c9f55d462b02837",
"confirmations": 390700,
"size": 734,
"height": 91510,
"version": 805306624,
"versionHex": "30000100",
"merkleroot": "55554df0ea7f66552beffe433d2c2f620bada79063a343ffc23c60c67cdf028f",
"tx": [ "55554df0ea7f66552beffe433d2c2f620bada79063a343ffc23c60c67cdf028f" ],
"time": 1530894673,
"mediantime": 1530894336,
"nonce": 0,
"bits": "180761db",
"difficulty": 148937676133.261200,
"chainwork": "00000000000000000000000000000000000000000028ad56864c458781e21970",
"auxpow": {
"tx": {
"hex": "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff5703dd3408142f5669614254432f626d67706f6f6c2e636f6d2f2cfabe6d6d75654ab7a6b163e7a04e56e43f8e7ca0087f11e8bd6c3c72c69732e849532878040000000000000010d51dbb0b9301409ff96ef9f588c50200ffffffff01c051824a000000001976a914f1c075a01882ae0972f95d3a4177c86c852b7d9188ac00000000",
"txid": "c8fc123672fffb3c6a45b94bdd30afc114f282742338809380bc84fe8666d489",
"size": 172,
"version": 1,
"locktime": 0,
"vin": [
{
"coinbase": "03dd3408142f5669614254432f626d67706f6f6c2e636f6d2f2cfabe6d6d75654ab7a6b163e7a04e56e43f8e7ca0087f11e8bd6c3c72c69732e849532878040000000000000010d51dbb0b9301409ff96ef9f588c50200",
"sequence": 4294967295
}
],
"vout": [
{
"value": 12.500546,
"valueSat": 1250054592,
"n": 0,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 f1c075a01882ae0972f95d3a4177c86c852b7d91 OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a914f1c075a01882ae0972f95d3a4177c86c852b7d9188ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [ "SjLGSPfmF3kVPA6A213hShYc4aRtiWZ8Wu" ]
}
}
],
"blockhash": "000000000000000004bdb8e3fdf28ffc528f4e6b1871a6177579cbd4dabde955"
},
"index": 0,
"chainindex": 2,
"merklebranch": [ "a67d749dfa7006b9d66d2284b20a64ebcb8c2e5aae18e355c790b90a060a30c1", "9ab5c057ecf43aa0552c21be4f86b1c9b248fe2dd0821bee38e5a25a22c49c25", "ec11fd79e02fe98bf9f4b624e5460a3221dbae27d24f36c9988dcc5beaf3c592", "dbc42b7360a7165b277f73094a366e951d3ac6d6a1e9493d838d35372e5e846b", "c7260dbfb6b196bd2e4e4dbde1799592627a3e6fa384e6692be8387a9251e5e2" ],
"chainmerklebranch": [ "89af0bc973bc0308f14c5c50c3d75f68783eab40a4688064cd56cfaed977d138", "5360cbf0991b4b0e09d589631c232d1f229104faad9e65375695230c47bc2493" ],
"parentblock": "0000002024653d98f3eace4b66b6269fa9205e08b647e23cf7880e0000000000000000003feae4c877b2f8b73f6f92a589ed8870fe98abb3551f1539373597f5b44514ada9993f5bb1830118d5793688"
},
"previousblockhash": "ba53d715abf76ac8adc025120ffb48b2331f3a1b9b7d01167ffd7dcd23934390",
"nextblockhash": "cd3a236542491089bffd8ba49cbe1d11a20dd4c4ad188307027e60c710732409"
}
],
"allreplies": [
{
"nodepubkey": "02c6c79a75846fd9bb064788b03145e347fa5464558fa9030ebb009df2833369f0",
"score": 242,
"reply": [
{
"hash": "0cf18712db68be85793dc06cd0a4fbc8edb166157e6847bb3c9f55d462b02837",
"confirmations": 390700,
"size": 734,
"height": 91510,
"version": 805306624,
"versionHex": "30000100",
"merkleroot": "55554df0ea7f66552beffe433d2c2f620bada79063a343ffc23c60c67cdf028f",
"tx": [ "55554df0ea7f66552beffe433d2c2f620bada79063a343ffc23c60c67cdf028f" ],
"time": 1530894673,
"mediantime": 1530894336,
"nonce": 0,
"bits": "180761db",
"difficulty": 148937676133.261200,
"chainwork": "00000000000000000000000000000000000000000028ad56864c458781e21970",
"auxpow": {
"tx": {
"hex": "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff5703dd3408142f5669614254432f626d67706f6f6c2e636f6d2f2cfabe6d6d75654ab7a6b163e7a04e56e43f8e7ca0087f11e8bd6c3c72c69732e849532878040000000000000010d51dbb0b9301409ff96ef9f588c50200ffffffff01c051824a000000001976a914f1c075a01882ae0972f95d3a4177c86c852b7d9188ac00000000",
"txid": "c8fc123672fffb3c6a45b94bdd30afc114f282742338809380bc84fe8666d489",
"size": 172,
"version": 1,
"locktime": 0,
"vin": [
{
"coinbase": "03dd3408142f5669614254432f626d67706f6f6c2e636f6d2f2cfabe6d6d75654ab7a6b163e7a04e56e43f8e7ca0087f11e8bd6c3c72c69732e849532878040000000000000010d51dbb0b9301409ff96ef9f588c50200",
"sequence": 4294967295
}
],
"vout": [
{
"value": 12.500546,
"valueSat": 1250054592,
"n": 0,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 f1c075a01882ae0972f95d3a4177c86c852b7d91 OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a914f1c075a01882ae0972f95d3a4177c86c852b7d9188ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [ "SjLGSPfmF3kVPA6A213hShYc4aRtiWZ8Wu" ]
}
}
],
"blockhash": "000000000000000004bdb8e3fdf28ffc528f4e6b1871a6177579cbd4dabde955"
},
"index": 0,
"chainindex": 2,
"merklebranch": [ "a67d749dfa7006b9d66d2284b20a64ebcb8c2e5aae18e355c790b90a060a30c1", "9ab5c057ecf43aa0552c21be4f86b1c9b248fe2dd0821bee38e5a25a22c49c25", "ec11fd79e02fe98bf9f4b624e5460a3221dbae27d24f36c9988dcc5beaf3c592", "dbc42b7360a7165b277f73094a366e951d3ac6d6a1e9493d838d35372e5e846b", "c7260dbfb6b196bd2e4e4dbde1799592627a3e6fa384e6692be8387a9251e5e2" ],
"chainmerklebranch": [ "89af0bc973bc0308f14c5c50c3d75f68783eab40a4688064cd56cfaed977d138", "5360cbf0991b4b0e09d589631c232d1f229104faad9e65375695230c47bc2493" ],
"parentblock": "0000002024653d98f3eace4b66b6269fa9205e08b647e23cf7880e0000000000000000003feae4c877b2f8b73f6f92a589ed8870fe98abb3551f1539373597f5b44514ada9993f5bb1830118d5793688"
},
"previousblockhash": "ba53d715abf76ac8adc025120ffb48b2331f3a1b9b7d01167ffd7dcd23934390",
"nextblockhash": "cd3a236542491089bffd8ba49cbe1d11a20dd4c4ad188307027e60c710732409"
}
]
},
{
"nodepubkey": "0370874cad6252bb94afa9a253c90122760ce2862e623b515e57bfe0697f3fc515",
"score": 292,
"reply": [
{
"hash": "0cf18712db68be85793dc06cd0a4fbc8edb166157e6847bb3c9f55d462b02837",
"confirmations": 390700,
"size": 734,
"height": 91510,
"version": 805306624,
"versionHex": "30000100",
"merkleroot": "55554df0ea7f66552beffe433d2c2f620bada79063a343ffc23c60c67cdf028f",
"tx": [ "55554df0ea7f66552beffe433d2c2f620bada79063a343ffc23c60c67cdf028f" ],
"time": 1530894673,
"mediantime": 1530894336,
"nonce": 0,
"bits": "180761db",
"difficulty": 148937676133.261200,
"chainwork": "00000000000000000000000000000000000000000028ad56864c458781e21970",
"auxpow": {
"tx": {
"hex": "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff5703dd3408142f5669614254432f626d67706f6f6c2e636f6d2f2cfabe6d6d75654ab7a6b163e7a04e56e43f8e7ca0087f11e8bd6c3c72c69732e849532878040000000000000010d51dbb0b9301409ff96ef9f588c50200ffffffff01c051824a000000001976a914f1c075a01882ae0972f95d3a4177c86c852b7d9188ac00000000",
"txid": "c8fc123672fffb3c6a45b94bdd30afc114f282742338809380bc84fe8666d489",
"size": 172,
"version": 1,
"locktime": 0,
"vin": [
{
"coinbase": "03dd3408142f5669614254432f626d67706f6f6c2e636f6d2f2cfabe6d6d75654ab7a6b163e7a04e56e43f8e7ca0087f11e8bd6c3c72c69732e849532878040000000000000010d51dbb0b9301409ff96ef9f588c50200",
"sequence": 4294967295
}
],
"vout": [
{
"value": 12.500546,
"valueSat": 1250054592,
"n": 0,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 f1c075a01882ae0972f95d3a4177c86c852b7d91 OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a914f1c075a01882ae0972f95d3a4177c86c852b7d9188ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [ "SjLGSPfmF3kVPA6A213hShYc4aRtiWZ8Wu" ]
}
}
],
"blockhash": "000000000000000004bdb8e3fdf28ffc528f4e6b1871a6177579cbd4dabde955"
},
"index": 0,
"chainindex": 2,
"merklebranch": [ "a67d749dfa7006b9d66d2284b20a64ebcb8c2e5aae18e355c790b90a060a30c1", "9ab5c057ecf43aa0552c21be4f86b1c9b248fe2dd0821bee38e5a25a22c49c25", "ec11fd79e02fe98bf9f4b624e5460a3221dbae27d24f36c9988dcc5beaf3c592", "dbc42b7360a7165b277f73094a366e951d3ac6d6a1e9493d838d35372e5e846b", "c7260dbfb6b196bd2e4e4dbde1799592627a3e6fa384e6692be8387a9251e5e2" ],
"chainmerklebranch": [ "89af0bc973bc0308f14c5c50c3d75f68783eab40a4688064cd56cfaed977d138", "5360cbf0991b4b0e09d589631c232d1f229104faad9e65375695230c47bc2493" ],
"parentblock": "0000002024653d98f3eace4b66b6269fa9205e08b647e23cf7880e0000000000000000003feae4c877b2f8b73f6f92a589ed8870fe98abb3551f1539373597f5b44514ada9993f5bb1830118d5793688"
},
"previousblockhash": "ba53d715abf76ac8adc025120ffb48b2331f3a1b9b7d01167ffd7dcd23934390",
"nextblockhash": "cd3a236542491089bffd8ba49cbe1d11a20dd4c4ad188307027e60c710732409"
}
]
}
],
"uuid": "5404cc31-2b01-48eb-8599-e6adcd8f9216"
}
Parameter | Type | Description |
---|---|---|
reply | object | An object containing the block data for the specified block hash and blockchain. If using a node_count greater than 1 , this returns the most common reply within allreplies . If there is a tie then one is chosen, or if one is an error then the non-error is chosen. |
allreplies* | array | An array of objects with responses from each node. This can be useful if you wanted to do your own analysis/filtering of the responses. |
nodepubkey* | string | The node ID. |
score* | int | The respective node's score based on quality of service. A score of -200 will ban the node for a 24hr period. You can change the ban threshold with the xrouterbanscore setting in blocknet.conf . See node scoring for more details. |
reply* | object | An object containing the block data for the specified block hash and blockchain from the respective node. |
uuid | string | The response ID, which can be used to view this response again with xrGetReply. |
* This is only returned if using a node_count
greater than 1
.
xrGetBlocks
Sample Data
{
"blockchain": "SYS",
"block_hash1": "0cf18712db68be85793dc06cd0a4fbc8edb166157e6847bb3c9f55d462b02837",
"block_hash2": "52583afcd857e45234e7c8981804b36d13a7b3025c17f3535c3e724542590a79"
}
This call is used to retrieve block data for multiple block hashes on the specified blockchain. Currently the maximum request is 50 blocks, although a node may set this limit to less.
Request Parameters
Sample Request
blocknet-cli xrGetBlocks SYS "0cf18712db68be85793dc06cd0a4fbc8edb166157e6847bb3c9f55d462b02837,52583afcd857e45234e7c8981804b36d13a7b3025c17f3535c3e724542590a79" 2
xrGetBlocks [blockchain] [block_hashes] [node_count](optional)
Parameter | Type | Description |
---|---|---|
blockchain | string | The blockchain, represented by the asset's ticker (BTC, LTC, SYS, etc.). |
block_hashes | string | A comma-demilited string of block hashes for the blocks of interest. The hashes must be separated by a comma with no spaces. |
node_count | int | (Optional Parameter) Defaults to 1 if no consensus= setting in xrouter.conf .The number of nodes that will be used to route calls. The most common response (i.e. the response with the most consensus) will be returned as reply . |
Response Parameters
Sample 200 Response
{
"reply": [
{
"hash": "0cf18712db68be85793dc06cd0a4fbc8edb166157e6847bb3c9f55d462b02837",
"confirmations": 390700,
"size": 734,
"height": 91510,
"version": 805306624,
"versionHex": "30000100",
"merkleroot": "55554df0ea7f66552beffe433d2c2f620bada79063a343ffc23c60c67cdf028f",
"tx": [ "55554df0ea7f66552beffe433d2c2f620bada79063a343ffc23c60c67cdf028f" ],
"time": 1530894673,
"mediantime": 1530894336,
"nonce": 0,
"bits": "180761db",
"difficulty": 148937676133.261200,
"chainwork": "00000000000000000000000000000000000000000028ad56864c458781e21970",
"auxpow": {
"tx": {
"hex": "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff5703dd3408142f5669614254432f626d67706f6f6c2e636f6d2f2cfabe6d6d75654ab7a6b163e7a04e56e43f8e7ca0087f11e8bd6c3c72c69732e849532878040000000000000010d51dbb0b9301409ff96ef9f588c50200ffffffff01c051824a000000001976a914f1c075a01882ae0972f95d3a4177c86c852b7d9188ac00000000",
"txid": "c8fc123672fffb3c6a45b94bdd30afc114f282742338809380bc84fe8666d489",
"size": 172,
"version": 1,
"locktime": 0,
"vin": [
{
"coinbase": "03dd3408142f5669614254432f626d67706f6f6c2e636f6d2f2cfabe6d6d75654ab7a6b163e7a04e56e43f8e7ca0087f11e8bd6c3c72c69732e849532878040000000000000010d51dbb0b9301409ff96ef9f588c50200",
"sequence": 4294967295
}
],
"vout": [
{
"value": 12.500546,
"valueSat": 1250054592,
"n": 0,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 f1c075a01882ae0972f95d3a4177c86c852b7d91 OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a914f1c075a01882ae0972f95d3a4177c86c852b7d9188ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [ "SjLGSPfmF3kVPA6A213hShYc4aRtiWZ8Wu" ]
}
}
],
"blockhash": "000000000000000004bdb8e3fdf28ffc528f4e6b1871a6177579cbd4dabde955"
},
"index": 0,
"chainindex": 2,
"merklebranch": [ "a67d749dfa7006b9d66d2284b20a64ebcb8c2e5aae18e355c790b90a060a30c1", "9ab5c057ecf43aa0552c21be4f86b1c9b248fe2dd0821bee38e5a25a22c49c25", "ec11fd79e02fe98bf9f4b624e5460a3221dbae27d24f36c9988dcc5beaf3c592", "dbc42b7360a7165b277f73094a366e951d3ac6d6a1e9493d838d35372e5e846b", "c7260dbfb6b196bd2e4e4dbde1799592627a3e6fa384e6692be8387a9251e5e2" ],
"chainmerklebranch": [ "89af0bc973bc0308f14c5c50c3d75f68783eab40a4688064cd56cfaed977d138", "5360cbf0991b4b0e09d589631c232d1f229104faad9e65375695230c47bc2493" ],
"parentblock": "0000002024653d98f3eace4b66b6269fa9205e08b647e23cf7880e0000000000000000003feae4c877b2f8b73f6f92a589ed8870fe98abb3551f1539373597f5b44514ada9993f5bb1830118d5793688"
},
"previousblockhash": "ba53d715abf76ac8adc025120ffb48b2331f3a1b9b7d01167ffd7dcd23934390",
"nextblockhash": "cd3a236542491089bffd8ba49cbe1d11a20dd4c4ad188307027e60c710732409"
},
{
"hash": "52583afcd857e45234e7c8981804b36d13a7b3025c17f3535c3e724542590a79",
"confirmations": 115,
"size": 1073,
"height": 482107,
"version": 805306624,
"versionHex": "30000100",
"merkleroot": "d1de796d10826dcc97af3d9683711da0f8e8aad996277034bd9b11631ce0d1f2",
"tx": [ "d1de796d10826dcc97af3d9683711da0f8e8aad996277034bd9b11631ce0d1f2" ],
"time": 1555482589,
"mediantime": 1555482282,
"nonce": 0,
"bits": "1805ec8b",
"difficulty": 185600202264.865814,
"chainwork": "000000000000000000000000000000000000000000f8bf3057c91ffc80efc4fc",
"auxpow": {
"tx": {
"hex": "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff5b0355ba08182f5669614254432f4d696e65642062792067656e6469722f2cfabe6d6daa2651dfd7b34e3cf5b87fd5ab3b70a78d23194d2269c502280de7193d73790f10000000000000001056691e0c261e0b871f9d92be0000259bffffffff0206baf84b000000001976a914536ffa992491508dca0354e52f32a3a7a679a53a88ac0000000000000000266a24aa21a9ed6e46f58e0097a34b65b4d332ebde4a0cedb300fab27549b3ee1c09fd2d7875d300000000",
"txid": "94ce9c796176df4cbe67695c0bfcd63587b1b664e23b716233980dc07d2874d7",
"size": 223,
"version": 1,
"locktime": 0,
"vin": [
{
"coinbase": "0355ba08182f5669614254432f4d696e65642062792067656e6469722f2cfabe6d6daa2651dfd7b34e3cf5b87fd5ab3b70a78d23194d2269c502280de7193d73790f10000000000000001056691e0c261e0b871f9d92be0000259b",
"sequence": 4294967295
}
],
"vout": [
{
"value": 12.745918,
"valueSat": 1274591750,
"n": 0,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 536ffa992491508dca0354e52f32a3a7a679a53a OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a914536ffa992491508dca0354e52f32a3a7a679a53a88ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [ "SUuBGCD7Ff3C2ozR6osYguPeXNho98S5qR" ]
}
},
{
"value": 0.000000,
"valueSat": 0,
"n": 1,
"scriptPubKey": {
"asm": "OP_RETURN aa21a9ed6e46f58e0097a34b65b4d332ebde4a0cedb300fab27549b3ee1c09fd2d7875d3",
"hex": "6a24aa21a9ed6e46f58e0097a34b65b4d332ebde4a0cedb300fab27549b3ee1c09fd2d7875d3",
"type": "nulldata"
}
}
],
"blockhash": "000000000000000000bcf15d287a324f073b1e0239452a6d4d513c27dc73150a"
},
"index": 0,
"chainindex": 14,
"merklebranch": [ "b468e6225dbecfbbf9f86cc8414afb70ae1fade27008e5f8080f74341dbc103c", "c5ec7ac7fb9405564c2afffcd0279c8237a883f0e414011cfe4439572fd8f476", "72731cb13f6ef60cc4647c5c98a48a67ae83a8b2db8e6fcc3ffc2e5cb33e45e3", "3975f42ce7c1be1dfd2118fd7bce4bc2b67993a5f03f6389089e86446e391533", "1fa4527c16a1fd05735914c568d0265ec92e9608890d22ece6f1edcb989fad1a", "018223df5ec9acd3a1ce30e445477d8ca368a6a1dcba8616f5178c9e41287f42", "86dff2db9b12c6afd1cdcd60415e5d19356eaffe5d938fbc2b6147c2430363f5", "77d0cb1a7e0d3cebc57380bd3546a45923107aff5b8bb969d0272d2fd6709280", "04a2a80fdd3a2ccf24642fec547bbb7415922ee6348a0c5b8efbe25611120258", "822ee423a7c096e070117f7573824922c2d612027278d8f330977abf75657ddc", "b7bb4ddf8d79219e9e0e8bb599c23e943317e3c4d8f0e31bd712a08edaace138", "47828c64e2141a2417f271a22dc80fa716604ce044fc0db1827a9a3818c0ca22" ],
"chainmerklebranch": [ "0000000000000000000000000000000000000000000000000000000000000000", "f98c4e9736d8eb8bb46299798906695c755369a3df99a93ffdded1713f1cf6e2", "36e70e1ae90b14efb14d594dff72647f862e97c4f704ad0d609041bb7d73aaa5", "63e9f83bff026dcfa4d967e727ceb35dbdf7e02225d88f2ce2f3842f10c16481" ],
"parentblock": "000000208100da1ca9afee2f159a537c64aa7fcfce77dbdce07009000000000000000000d63acfaac8ae4bc195f8ba076f306c45ec06a8a740a182263e96732d842984cee6c7b65c1d072c174919714b"
},
"previousblockhash": "abe70792116fd7806b211b6d67cc6bfa1490aa0dea71587d0bbbe9ee435c9c2a",
"nextblockhash": "2d7adca3fe7a51018b909aa1c63a7669a75a6729a2da66a08de19d4f13e66032"
}
],
"allreplies": [
{
"nodepubkey": "02c6c79a75846fd9bb064788b03145e347fa5464558fa9030ebb009df2833369f0",
"score": 242,
"reply": [
{
"hash": "0cf18712db68be85793dc06cd0a4fbc8edb166157e6847bb3c9f55d462b02837",
"confirmations": 390700,
"size": 734,
"height": 91510,
"version": 805306624,
"versionHex": "30000100",
"merkleroot": "55554df0ea7f66552beffe433d2c2f620bada79063a343ffc23c60c67cdf028f",
"tx": [ "55554df0ea7f66552beffe433d2c2f620bada79063a343ffc23c60c67cdf028f" ],
"time": 1530894673,
"mediantime": 1530894336,
"nonce": 0,
"bits": "180761db",
"difficulty": 148937676133.261200,
"chainwork": "00000000000000000000000000000000000000000028ad56864c458781e21970",
"auxpow": {
"tx": {
"hex": "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff5703dd3408142f5669614254432f626d67706f6f6c2e636f6d2f2cfabe6d6d75654ab7a6b163e7a04e56e43f8e7ca0087f11e8bd6c3c72c69732e849532878040000000000000010d51dbb0b9301409ff96ef9f588c50200ffffffff01c051824a000000001976a914f1c075a01882ae0972f95d3a4177c86c852b7d9188ac00000000",
"txid": "c8fc123672fffb3c6a45b94bdd30afc114f282742338809380bc84fe8666d489",
"size": 172,
"version": 1,
"locktime": 0,
"vin": [
{
"coinbase": "03dd3408142f5669614254432f626d67706f6f6c2e636f6d2f2cfabe6d6d75654ab7a6b163e7a04e56e43f8e7ca0087f11e8bd6c3c72c69732e849532878040000000000000010d51dbb0b9301409ff96ef9f588c50200",
"sequence": 4294967295
}
],
"vout": [
{
"value": 12.500546,
"valueSat": 1250054592,
"n": 0,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 f1c075a01882ae0972f95d3a4177c86c852b7d91 OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a914f1c075a01882ae0972f95d3a4177c86c852b7d9188ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [ "SjLGSPfmF3kVPA6A213hShYc4aRtiWZ8Wu" ]
}
}
],
"blockhash": "000000000000000004bdb8e3fdf28ffc528f4e6b1871a6177579cbd4dabde955"
},
"index": 0,
"chainindex": 2,
"merklebranch": [ "a67d749dfa7006b9d66d2284b20a64ebcb8c2e5aae18e355c790b90a060a30c1", "9ab5c057ecf43aa0552c21be4f86b1c9b248fe2dd0821bee38e5a25a22c49c25", "ec11fd79e02fe98bf9f4b624e5460a3221dbae27d24f36c9988dcc5beaf3c592", "dbc42b7360a7165b277f73094a366e951d3ac6d6a1e9493d838d35372e5e846b", "c7260dbfb6b196bd2e4e4dbde1799592627a3e6fa384e6692be8387a9251e5e2" ],
"chainmerklebranch": [ "89af0bc973bc0308f14c5c50c3d75f68783eab40a4688064cd56cfaed977d138", "5360cbf0991b4b0e09d589631c232d1f229104faad9e65375695230c47bc2493" ],
"parentblock": "0000002024653d98f3eace4b66b6269fa9205e08b647e23cf7880e0000000000000000003feae4c877b2f8b73f6f92a589ed8870fe98abb3551f1539373597f5b44514ada9993f5bb1830118d5793688"
},
"previousblockhash": "ba53d715abf76ac8adc025120ffb48b2331f3a1b9b7d01167ffd7dcd23934390",
"nextblockhash": "cd3a236542491089bffd8ba49cbe1d11a20dd4c4ad188307027e60c710732409"
},
{
"hash": "52583afcd857e45234e7c8981804b36d13a7b3025c17f3535c3e724542590a79",
"confirmations": 115,
"size": 1073,
"height": 482107,
"version": 805306624,
"versionHex": "30000100",
"merkleroot": "d1de796d10826dcc97af3d9683711da0f8e8aad996277034bd9b11631ce0d1f2",
"tx": [ "d1de796d10826dcc97af3d9683711da0f8e8aad996277034bd9b11631ce0d1f2" ],
"time": 1555482589,
"mediantime": 1555482282,
"nonce": 0,
"bits": "1805ec8b",
"difficulty": 185600202264.865814,
"chainwork": "000000000000000000000000000000000000000000f8bf3057c91ffc80efc4fc",
"auxpow": {
"tx": {
"hex": "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff5b0355ba08182f5669614254432f4d696e65642062792067656e6469722f2cfabe6d6daa2651dfd7b34e3cf5b87fd5ab3b70a78d23194d2269c502280de7193d73790f10000000000000001056691e0c261e0b871f9d92be0000259bffffffff0206baf84b000000001976a914536ffa992491508dca0354e52f32a3a7a679a53a88ac0000000000000000266a24aa21a9ed6e46f58e0097a34b65b4d332ebde4a0cedb300fab27549b3ee1c09fd2d7875d300000000",
"txid": "94ce9c796176df4cbe67695c0bfcd63587b1b664e23b716233980dc07d2874d7",
"size": 223,
"version": 1,
"locktime": 0,
"vin": [
{
"coinbase": "0355ba08182f5669614254432f4d696e65642062792067656e6469722f2cfabe6d6daa2651dfd7b34e3cf5b87fd5ab3b70a78d23194d2269c502280de7193d73790f10000000000000001056691e0c261e0b871f9d92be0000259b",
"sequence": 4294967295
}
],
"vout": [
{
"value": 12.745918,
"valueSat": 1274591750,
"n": 0,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 536ffa992491508dca0354e52f32a3a7a679a53a OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a914536ffa992491508dca0354e52f32a3a7a679a53a88ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [ "SUuBGCD7Ff3C2ozR6osYguPeXNho98S5qR" ]
}
},
{
"value": 0.000000,
"valueSat": 0,
"n": 1,
"scriptPubKey": {
"asm": "OP_RETURN aa21a9ed6e46f58e0097a34b65b4d332ebde4a0cedb300fab27549b3ee1c09fd2d7875d3",
"hex": "6a24aa21a9ed6e46f58e0097a34b65b4d332ebde4a0cedb300fab27549b3ee1c09fd2d7875d3",
"type": "nulldata"
}
}
],
"blockhash": "000000000000000000bcf15d287a324f073b1e0239452a6d4d513c27dc73150a"
},
"index": 0,
"chainindex": 14,
"merklebranch": [ "b468e6225dbecfbbf9f86cc8414afb70ae1fade27008e5f8080f74341dbc103c", "c5ec7ac7fb9405564c2afffcd0279c8237a883f0e414011cfe4439572fd8f476", "72731cb13f6ef60cc4647c5c98a48a67ae83a8b2db8e6fcc3ffc2e5cb33e45e3", "3975f42ce7c1be1dfd2118fd7bce4bc2b67993a5f03f6389089e86446e391533", "1fa4527c16a1fd05735914c568d0265ec92e9608890d22ece6f1edcb989fad1a", "018223df5ec9acd3a1ce30e445477d8ca368a6a1dcba8616f5178c9e41287f42", "86dff2db9b12c6afd1cdcd60415e5d19356eaffe5d938fbc2b6147c2430363f5", "77d0cb1a7e0d3cebc57380bd3546a45923107aff5b8bb969d0272d2fd6709280", "04a2a80fdd3a2ccf24642fec547bbb7415922ee6348a0c5b8efbe25611120258", "822ee423a7c096e070117f7573824922c2d612027278d8f330977abf75657ddc", "b7bb4ddf8d79219e9e0e8bb599c23e943317e3c4d8f0e31bd712a08edaace138", "47828c64e2141a2417f271a22dc80fa716604ce044fc0db1827a9a3818c0ca22" ],
"chainmerklebranch": [ "0000000000000000000000000000000000000000000000000000000000000000", "f98c4e9736d8eb8bb46299798906695c755369a3df99a93ffdded1713f1cf6e2", "36e70e1ae90b14efb14d594dff72647f862e97c4f704ad0d609041bb7d73aaa5", "63e9f83bff026dcfa4d967e727ceb35dbdf7e02225d88f2ce2f3842f10c16481" ],
"parentblock": "000000208100da1ca9afee2f159a537c64aa7fcfce77dbdce07009000000000000000000d63acfaac8ae4bc195f8ba076f306c45ec06a8a740a182263e96732d842984cee6c7b65c1d072c174919714b"
},
"previousblockhash": "abe70792116fd7806b211b6d67cc6bfa1490aa0dea71587d0bbbe9ee435c9c2a",
"nextblockhash": "2d7adca3fe7a51018b909aa1c63a7669a75a6729a2da66a08de19d4f13e66032"
}
]
},
{
"nodepubkey": "0370874cad6252bb94afa9a253c90122760ce2862e623b515e57bfe0697f3fc515",
"score": 292,
"reply": [
{
"hash": "0cf18712db68be85793dc06cd0a4fbc8edb166157e6847bb3c9f55d462b02837",
"confirmations": 390700,
"size": 734,
"height": 91510,
"version": 805306624,
"versionHex": "30000100",
"merkleroot": "55554df0ea7f66552beffe433d2c2f620bada79063a343ffc23c60c67cdf028f",
"tx": [ "55554df0ea7f66552beffe433d2c2f620bada79063a343ffc23c60c67cdf028f" ],
"time": 1530894673,
"mediantime": 1530894336,
"nonce": 0,
"bits": "180761db",
"difficulty": 148937676133.261200,
"chainwork": "00000000000000000000000000000000000000000028ad56864c458781e21970",
"auxpow": {
"tx": {
"hex": "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff5703dd3408142f5669614254432f626d67706f6f6c2e636f6d2f2cfabe6d6d75654ab7a6b163e7a04e56e43f8e7ca0087f11e8bd6c3c72c69732e849532878040000000000000010d51dbb0b9301409ff96ef9f588c50200ffffffff01c051824a000000001976a914f1c075a01882ae0972f95d3a4177c86c852b7d9188ac00000000",
"txid": "c8fc123672fffb3c6a45b94bdd30afc114f282742338809380bc84fe8666d489",
"size": 172,
"version": 1,
"locktime": 0,
"vin": [
{
"coinbase": "03dd3408142f5669614254432f626d67706f6f6c2e636f6d2f2cfabe6d6d75654ab7a6b163e7a04e56e43f8e7ca0087f11e8bd6c3c72c69732e849532878040000000000000010d51dbb0b9301409ff96ef9f588c50200",
"sequence": 4294967295
}
],
"vout": [
{
"value": 12.500546,
"valueSat": 1250054592,
"n": 0,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 f1c075a01882ae0972f95d3a4177c86c852b7d91 OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a914f1c075a01882ae0972f95d3a4177c86c852b7d9188ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [ "SjLGSPfmF3kVPA6A213hShYc4aRtiWZ8Wu" ]
}
}
],
"blockhash": "000000000000000004bdb8e3fdf28ffc528f4e6b1871a6177579cbd4dabde955"
},
"index": 0,
"chainindex": 2,
"merklebranch": [ "a67d749dfa7006b9d66d2284b20a64ebcb8c2e5aae18e355c790b90a060a30c1", "9ab5c057ecf43aa0552c21be4f86b1c9b248fe2dd0821bee38e5a25a22c49c25", "ec11fd79e02fe98bf9f4b624e5460a3221dbae27d24f36c9988dcc5beaf3c592", "dbc42b7360a7165b277f73094a366e951d3ac6d6a1e9493d838d35372e5e846b", "c7260dbfb6b196bd2e4e4dbde1799592627a3e6fa384e6692be8387a9251e5e2" ],
"chainmerklebranch": [ "89af0bc973bc0308f14c5c50c3d75f68783eab40a4688064cd56cfaed977d138", "5360cbf0991b4b0e09d589631c232d1f229104faad9e65375695230c47bc2493" ],
"parentblock": "0000002024653d98f3eace4b66b6269fa9205e08b647e23cf7880e0000000000000000003feae4c877b2f8b73f6f92a589ed8870fe98abb3551f1539373597f5b44514ada9993f5bb1830118d5793688"
},
"previousblockhash": "ba53d715abf76ac8adc025120ffb48b2331f3a1b9b7d01167ffd7dcd23934390",
"nextblockhash": "cd3a236542491089bffd8ba49cbe1d11a20dd4c4ad188307027e60c710732409"
},
{
"hash": "52583afcd857e45234e7c8981804b36d13a7b3025c17f3535c3e724542590a79",
"confirmations": 115,
"size": 1073,
"height": 482107,
"version": 805306624,
"versionHex": "30000100",
"merkleroot": "d1de796d10826dcc97af3d9683711da0f8e8aad996277034bd9b11631ce0d1f2",
"tx": [ "d1de796d10826dcc97af3d9683711da0f8e8aad996277034bd9b11631ce0d1f2" ],
"time": 1555482589,
"mediantime": 1555482282,
"nonce": 0,
"bits": "1805ec8b",
"difficulty": 185600202264.865814,
"chainwork": "000000000000000000000000000000000000000000f8bf3057c91ffc80efc4fc",
"auxpow": {
"tx": {
"hex": "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff5b0355ba08182f5669614254432f4d696e65642062792067656e6469722f2cfabe6d6daa2651dfd7b34e3cf5b87fd5ab3b70a78d23194d2269c502280de7193d73790f10000000000000001056691e0c261e0b871f9d92be0000259bffffffff0206baf84b000000001976a914536ffa992491508dca0354e52f32a3a7a679a53a88ac0000000000000000266a24aa21a9ed6e46f58e0097a34b65b4d332ebde4a0cedb300fab27549b3ee1c09fd2d7875d300000000",
"txid": "94ce9c796176df4cbe67695c0bfcd63587b1b664e23b716233980dc07d2874d7",
"size": 223,
"version": 1,
"locktime": 0,
"vin": [
{
"coinbase": "0355ba08182f5669614254432f4d696e65642062792067656e6469722f2cfabe6d6daa2651dfd7b34e3cf5b87fd5ab3b70a78d23194d2269c502280de7193d73790f10000000000000001056691e0c261e0b871f9d92be0000259b",
"sequence": 4294967295
}
],
"vout": [
{
"value": 12.745918,
"valueSat": 1274591750,
"n": 0,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 536ffa992491508dca0354e52f32a3a7a679a53a OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a914536ffa992491508dca0354e52f32a3a7a679a53a88ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [ "SUuBGCD7Ff3C2ozR6osYguPeXNho98S5qR" ]
}
},
{
"value": 0.000000,
"valueSat": 0,
"n": 1,
"scriptPubKey": {
"asm": "OP_RETURN aa21a9ed6e46f58e0097a34b65b4d332ebde4a0cedb300fab27549b3ee1c09fd2d7875d3",
"hex": "6a24aa21a9ed6e46f58e0097a34b65b4d332ebde4a0cedb300fab27549b3ee1c09fd2d7875d3",
"type": "nulldata"
}
}
],
"blockhash": "000000000000000000bcf15d287a324f073b1e0239452a6d4d513c27dc73150a"
},
"index": 0,
"chainindex": 14,
"merklebranch": [ "b468e6225dbecfbbf9f86cc8414afb70ae1fade27008e5f8080f74341dbc103c", "c5ec7ac7fb9405564c2afffcd0279c8237a883f0e414011cfe4439572fd8f476", "72731cb13f6ef60cc4647c5c98a48a67ae83a8b2db8e6fcc3ffc2e5cb33e45e3", "3975f42ce7c1be1dfd2118fd7bce4bc2b67993a5f03f6389089e86446e391533", "1fa4527c16a1fd05735914c568d0265ec92e9608890d22ece6f1edcb989fad1a", "018223df5ec9acd3a1ce30e445477d8ca368a6a1dcba8616f5178c9e41287f42", "86dff2db9b12c6afd1cdcd60415e5d19356eaffe5d938fbc2b6147c2430363f5", "77d0cb1a7e0d3cebc57380bd3546a45923107aff5b8bb969d0272d2fd6709280", "04a2a80fdd3a2ccf24642fec547bbb7415922ee6348a0c5b8efbe25611120258", "822ee423a7c096e070117f7573824922c2d612027278d8f330977abf75657ddc", "b7bb4ddf8d79219e9e0e8bb599c23e943317e3c4d8f0e31bd712a08edaace138", "47828c64e2141a2417f271a22dc80fa716604ce044fc0db1827a9a3818c0ca22" ],
"chainmerklebranch": [ "0000000000000000000000000000000000000000000000000000000000000000", "f98c4e9736d8eb8bb46299798906695c755369a3df99a93ffdded1713f1cf6e2", "36e70e1ae90b14efb14d594dff72647f862e97c4f704ad0d609041bb7d73aaa5", "63e9f83bff026dcfa4d967e727ceb35dbdf7e02225d88f2ce2f3842f10c16481" ],
"parentblock": "000000208100da1ca9afee2f159a537c64aa7fcfce77dbdce07009000000000000000000d63acfaac8ae4bc195f8ba076f306c45ec06a8a740a182263e96732d842984cee6c7b65c1d072c174919714b"
},
"previousblockhash": "abe70792116fd7806b211b6d67cc6bfa1490aa0dea71587d0bbbe9ee435c9c2a",
"nextblockhash": "2d7adca3fe7a51018b909aa1c63a7669a75a6729a2da66a08de19d4f13e66032"
}
]
}
],
"uuid": "5404cc31-2b01-48eb-8599-e6adcd8f9216"
}
Parameter | Type | Description |
---|---|---|
reply | array | An array containing objects of the block data for each requested block on the specified blockchain. If using a node_count greater than 1 , this returns the most common reply within allreplies . If there is a tie then one is chosen, or if one is an error then the non-error is chosen. |
allreplies* | array | An array of objects with responses from each node. This can be useful if you wanted to do your own analysis/filtering of the responses. |
nodepubkey* | string | The node ID. |
score* | int | The respective node's score based on quality of service. A score of -200 will ban the node for a 24hr period. You can change the ban threshold with the xrouterbanscore setting in blocknet.conf . See node scoring for more details. |
reply* | array | An array containing objects of the block data for each requested block on the specified blockchain from the respective node. |
uuid | string | The response ID, which can be used to view this response again with xrGetReply. |
* This is only returned if using a node_count
greater than 1
.
xrDecodeRawTransaction
Sample Data
{
"spvwallet": "SYS",
"tx_hex": "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff640363b1082cfabe6d6df75a401bb4e29d77b2162d476557c4bc879380dad926e44c1b2a7c49893a3cc108000000f09f909f000f4d696e6564206279206c616e636163000000000000000000000000000000000000000000000000000000000500c5a00000000000000330952d4b000000001976a914c825a1ecf2a6830c4401620c3a16f1995057c2ab88ac00000000000000002f6a24aa21a9ed2ac560369b71e58f0618a79d2f03bcf7283945e20eef7813de376a6f503448c108000000000000000000000000000000002c6a4c2952534b424c4f434b3a81c66dc456024e97e518ac2ab3ec51bf85b294b9a140c6e9376a040607edc39ddc962c3b"
}
This call is used to decode a specified bockchain transaction HEX. It requires the blockchain to be SPV wallet supported.
Request Parameters
Sample Request
blocknet-cli xrDecodeRawTransaction SYS 01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff640363b1082cfabe6d6df75a401bb4e29d77b2162d476557c4bc879380dad926e44c1b2a7c49893a3cc108000000f09f909f000f4d696e6564206279206c616e636163000000000000000000000000000000000000000000000000000000000500c5a00000000000000330952d4b000000001976a914c825a1ecf2a6830c4401620c3a16f1995057c2ab88ac00000000000000002f6a24aa21a9ed2ac560369b71e58f0618a79d2f03bcf7283945e20eef7813de376a6f503448c108000000000000000000000000000000002c6a4c2952534b424c4f434b3a81c66dc456024e97e518ac2ab3ec51bf85b294b9a140c6e9376a040607edc39ddc962c3b 2
xrDecodeRawTransaction [blockchain] [tx_hex] [node_count](optional)
Parameter | Type | Description |
---|---|---|
blockchain | string | The blockchain, represented by the asset's ticker (BTC, LTC, SYS, etc.). |
tx_hex | string | The raw transaction HEX to decode. |
node_count | int | (Optional Parameter) Defaults to 1 if no consensus= setting in xrouter.conf .The number of nodes that will be used to route calls. The most common response (i.e. the response with the most consensus) will be returned as reply . |
Response Parameters
Sample 200 Response
{
"reply": {
"txid": "aa1838dee180e5c4ad5041ded25aa5d88c41bedb1c339b42f54dbad0e7563c5e",
"size": 294,
"version": 1,
"locktime": 992777948,
"vin": [
{
"coinbase": "0363b1082cfabe6d6df75a401bb4e29d77b2162d476557c4bc879380dad926e44c1b2a7c49893a3cc108000000f09f909f000f4d696e6564206279206c616e636163000000000000000000000000000000000000000000000000000000000500c5a00000",
"sequence": 0
}
],
"vout": [
{
"value": 12.612785,
"valueSat": 1261278512,
"n": 0,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 c825a1ecf2a6830c4401620c3a16f1995057c2ab OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a914c825a1ecf2a6830c4401620c3a16f1995057c2ab88ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [ "SfYHFxiGv4mRtUfQVHxfMWknEt53Bjj286" ]
}
},
{
"value": 0.000000,
"valueSat": 0,
"n": 1,
"scriptPubKey": {
"asm": "OP_RETURN aa21a9ed2ac560369b71e58f0618a79d2f03bcf7283945e20eef7813de376a6f503448c1 0000000000000000",
"hex": "6a24aa21a9ed2ac560369b71e58f0618a79d2f03bcf7283945e20eef7813de376a6f503448c1080000000000000000",
"type": "nulldata"
}
},
{
"value": 0.000000,
"valueSat": 0,
"n": 2,
"scriptPubKey": {
"asm": "OP_RETURN 52534b424c4f434b3a81c66dc456024e97e518ac2ab3ec51bf85b294b9a140c6e9376a040607edc39d",
"hex": "6a4c2952534b424c4f434b3a81c66dc456024e97e518ac2ab3ec51bf85b294b9a140c6e9376a040607edc39d",
"type": "nulldata"
}
}
]
},
"allreplies": [
{
"nodepubkey": "02c6c79a75846fd9bb064788b03145e347fa5464558fa9030ebb009df2833369f0",
"score": 250,
"reply": {
"txid": "aa1838dee180e5c4ad5041ded25aa5d88c41bedb1c339b42f54dbad0e7563c5e",
"size": 294,
"version": 1,
"locktime": 992777948,
"vin": [
{
"coinbase": "0363b1082cfabe6d6df75a401bb4e29d77b2162d476557c4bc879380dad926e44c1b2a7c49893a3cc108000000f09f909f000f4d696e6564206279206c616e636163000000000000000000000000000000000000000000000000000000000500c5a00000",
"sequence": 0
}
],
"vout": [
{
"value": 12.612785,
"valueSat": 1261278512,
"n": 0,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 c825a1ecf2a6830c4401620c3a16f1995057c2ab OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a914c825a1ecf2a6830c4401620c3a16f1995057c2ab88ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [ "SfYHFxiGv4mRtUfQVHxfMWknEt53Bjj286" ]
}
},
{
"value": 0.000000,
"valueSat": 0,
"n": 1,
"scriptPubKey": {
"asm": "OP_RETURN aa21a9ed2ac560369b71e58f0618a79d2f03bcf7283945e20eef7813de376a6f503448c1 0000000000000000",
"hex": "6a24aa21a9ed2ac560369b71e58f0618a79d2f03bcf7283945e20eef7813de376a6f503448c1080000000000000000",
"type": "nulldata"
}
},
{
"value": 0.000000,
"valueSat": 0,
"n": 2,
"scriptPubKey": {
"asm": "OP_RETURN 52534b424c4f434b3a81c66dc456024e97e518ac2ab3ec51bf85b294b9a140c6e9376a040607edc39d",
"hex": "6a4c2952534b424c4f434b3a81c66dc456024e97e518ac2ab3ec51bf85b294b9a140c6e9376a040607edc39d",
"type": "nulldata"
}
}
]
}
},
{
"nodepubkey": "0370874cad6252bb94afa9a253c90122760ce2862e623b515e57bfe0697f3fc515",
"score": 300,
"reply": {
"txid": "aa1838dee180e5c4ad5041ded25aa5d88c41bedb1c339b42f54dbad0e7563c5e",
"size": 294,
"version": 1,
"locktime": 992777948,
"vin": [
{
"coinbase": "0363b1082cfabe6d6df75a401bb4e29d77b2162d476557c4bc879380dad926e44c1b2a7c49893a3cc108000000f09f909f000f4d696e6564206279206c616e636163000000000000000000000000000000000000000000000000000000000500c5a00000",
"sequence": 0
}
],
"vout": [
{
"value": 12.612785,
"valueSat": 1261278512,
"n": 0,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 c825a1ecf2a6830c4401620c3a16f1995057c2ab OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a914c825a1ecf2a6830c4401620c3a16f1995057c2ab88ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [ "SfYHFxiGv4mRtUfQVHxfMWknEt53Bjj286" ]
}
},
{
"value": 0.000000,
"valueSat": 0,
"n": 1,
"scriptPubKey": {
"asm": "OP_RETURN aa21a9ed2ac560369b71e58f0618a79d2f03bcf7283945e20eef7813de376a6f503448c1 0000000000000000",
"hex": "6a24aa21a9ed2ac560369b71e58f0618a79d2f03bcf7283945e20eef7813de376a6f503448c1080000000000000000",
"type": "nulldata"
}
},
{
"value": 0.000000,
"valueSat": 0,
"n": 2,
"scriptPubKey": {
"asm": "OP_RETURN 52534b424c4f434b3a81c66dc456024e97e518ac2ab3ec51bf85b294b9a140c6e9376a040607edc39d",
"hex": "6a4c2952534b424c4f434b3a81c66dc456024e97e518ac2ab3ec51bf85b294b9a140c6e9376a040607edc39d",
"type": "nulldata"
}
}
]
}
}
],
"uuid": "95e612f1-3505-493d-8097-452052223417"
}
Parameter | Type | Description |
---|---|---|
reply | object | An object containing the decoded transaction data. If using a node_count greater than 1 , this returns the most common reply within allreplies . If there is a tie then one is chosen, or if one is an error then the non-error is chosen. |
allreplies* | array | An array of objects with responses from each node. This can be useful if you wanted to do your own analysis/filtering of the responses. |
nodepubkey* | string | The node ID. |
score* | int | The respective node's score based on quality of service. A score of -200 will ban the node for a 24hr period. You can change the ban threshold with the xrouterbanscore setting in blocknet.conf . See node scoring for more details. |
reply* | object | An object containing the decoded transaction data from the respective node. |
uuid | string | The response ID, which can be used to view this response again with xrGetReply. |
* This is only returned if using a node_count
greater than 1
.
xrGetTransaction
Sample Data
{
"blockchain": "SYS",
"tx_id": "9e5db236f75babe4e28c17f0ed1eddbcfdb5bde8a69750e1a4952d110c620e51"
}
This call is used to retrieve the transaction data for the specified transaction ID (hash) and blockchain.
Request Parameters
Sample Request
blocknet-cli xrGetTransaction SYS 9e5db236f75babe4e28c17f0ed1eddbcfdb5bde8a69750e1a4952d110c620e51 2
xrGetTransaction [blockchain] [tx_id] [node_count](optional)
Parameter | Type | Description |
---|---|---|
blockchain | string | The blockchain, represented by the asset's ticker (BTC, LTC, SYS, etc.). |
tx_id | string | The transaction ID (hash) for the transaction of interest. |
node_count | int | (Optional Parameter) Defaults to 1 if no consensus= setting in xrouter.conf .The number of nodes that will be used to route calls. The most common response (i.e. the response with the most consensus) will be returned as reply . |
Response Parameters
Sample 200 Response
{
"reply": {
"txid": "9e5db236f75babe4e28c17f0ed1eddbcfdb5bde8a69750e1a4952d110c620e51",
"size": 192,
"version": 2,
"locktime": 0,
"vin": [
{
"txid": "10f28315098fff366e2dfba23afacc10ddb5ac30a403d6396cc2d35739f06a79",
"vout": 1,
"scriptSig": {
"asm": "30450221008d807ad2585d4775e57c105d16f12f5eb7925a3f8f66b077f7944ec74e421ed9022067105602af2705d4456ccd68db8b4eb327cdb5e55e7de98d7ba9f1213a75a1ad[ALL] 02e927a2a1d4a613ed3fa73bf1169beaf4e95a6348afac6613e283d80b9bf2abba",
"hex": "4830450221008d807ad2585d4775e57c105d16f12f5eb7925a3f8f66b077f7944ec74e421ed9022067105602af2705d4456ccd68db8b4eb327cdb5e55e7de98d7ba9f1213a75a1ad012102e927a2a1d4a613ed3fa73bf1169beaf4e95a6348afac6613e283d80b9bf2abba"
},
"sequence": 4294967295
}
],
"vout": [
{
"value": 1.430000,
"valueSat": 143000000,
"n": 0,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 7be755600f2fd9f3518be6ededb38e2498f51ff5 OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a9147be755600f2fd9f3518be6ededb38e2498f51ff588ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [ "SYb9Gmcwj1aXUV86cKpnCD8SR7hvZgbKTP" ]
}
}
]
},
"allreplies": [
{
"nodepubkey": "02c6c79a75846fd9bb064788b03145e347fa5464558fa9030ebb009df2833369f0",
"score": 250,
"reply": {
"txid": "9e5db236f75babe4e28c17f0ed1eddbcfdb5bde8a69750e1a4952d110c620e51",
"size": 192,
"version": 2,
"locktime": 0,
"vin": [
{
"txid": "10f28315098fff366e2dfba23afacc10ddb5ac30a403d6396cc2d35739f06a79",
"vout": 1,
"scriptSig": {
"asm": "30450221008d807ad2585d4775e57c105d16f12f5eb7925a3f8f66b077f7944ec74e421ed9022067105602af2705d4456ccd68db8b4eb327cdb5e55e7de98d7ba9f1213a75a1ad[ALL] 02e927a2a1d4a613ed3fa73bf1169beaf4e95a6348afac6613e283d80b9bf2abba",
"hex": "4830450221008d807ad2585d4775e57c105d16f12f5eb7925a3f8f66b077f7944ec74e421ed9022067105602af2705d4456ccd68db8b4eb327cdb5e55e7de98d7ba9f1213a75a1ad012102e927a2a1d4a613ed3fa73bf1169beaf4e95a6348afac6613e283d80b9bf2abba"
},
"sequence": 4294967295
}
],
"vout": [
{
"value": 1.430000,
"valueSat": 143000000,
"n": 0,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 7be755600f2fd9f3518be6ededb38e2498f51ff5 OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a9147be755600f2fd9f3518be6ededb38e2498f51ff588ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [ "SYb9Gmcwj1aXUV86cKpnCD8SR7hvZgbKTP" ]
}
}
]
}
},
{
"nodepubkey": "0370874cad6252bb94afa9a253c90122760ce2862e623b515e57bfe0697f3fc515",
"score": 300,
"reply": {
"txid": "9e5db236f75babe4e28c17f0ed1eddbcfdb5bde8a69750e1a4952d110c620e51",
"size": 192,
"version": 2,
"locktime": 0,
"vin": [
{
"txid": "10f28315098fff366e2dfba23afacc10ddb5ac30a403d6396cc2d35739f06a79",
"vout": 1,
"scriptSig": {
"asm": "30450221008d807ad2585d4775e57c105d16f12f5eb7925a3f8f66b077f7944ec74e421ed9022067105602af2705d4456ccd68db8b4eb327cdb5e55e7de98d7ba9f1213a75a1ad[ALL] 02e927a2a1d4a613ed3fa73bf1169beaf4e95a6348afac6613e283d80b9bf2abba",
"hex": "4830450221008d807ad2585d4775e57c105d16f12f5eb7925a3f8f66b077f7944ec74e421ed9022067105602af2705d4456ccd68db8b4eb327cdb5e55e7de98d7ba9f1213a75a1ad012102e927a2a1d4a613ed3fa73bf1169beaf4e95a6348afac6613e283d80b9bf2abba"
},
"sequence": 4294967295
}
],
"vout": [
{
"value": 1.430000,
"valueSat": 143000000,
"n": 0,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 7be755600f2fd9f3518be6ededb38e2498f51ff5 OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a9147be755600f2fd9f3518be6ededb38e2498f51ff588ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [ "SYb9Gmcwj1aXUV86cKpnCD8SR7hvZgbKTP" ]
}
}
]
}
}
],
"uuid": "cd7c9b1a-8fd5-46a7-84af-98c0f8850148"
}
Parameter | Type | Description |
---|---|---|
reply | object | An object containing the transaction data for the specified transaction ID and blockchain. If using a node_count greater than 1 , this returns the most common reply within allreplies . If there is a tie then one is chosen, or if one is an error then the non-error is chosen. |
allreplies* | array | An array of objects with responses from each node. This can be useful if you wanted to do your own analysis/filtering of the responses. |
nodepubkey* | string | The node ID. |
score* | int | The respective node's score based on quality of service. A score of -200 will ban the node for a 24hr period. You can change the ban threshold with the xrouterbanscore setting in blocknet.conf . See node scoring for more details. |
reply* | object | An object containing the transaction data for the specified transaction ID and blockchain from the respective node. |
uuid | string | The response ID, which can be used to view this response again with xrGetReply. |
* This is only returned if using a node_count
greater than 1
.
xrGetTransactions
Sample Data
{
"blockchain": "SYS",
"tx_id1": "f7efcb33c817153dbea86b827380ffce108c6c8e4707356e874d98d0426339bd",
"tx_id2": "f63543bb90800a601065d6f6d8380d8a98ac1a9f208921febde4eb0168e6fd8e",
}
This call is used to retrieve transaction data for multiple transaction IDs (hashes) on the specified blockchain. Currently the maximum request is 50 transactions, although a node may set this limit to less.
Request Parameters
Sample Request
blocknet-cli xrGetTransactions SYS "f7efcb33c817153dbea86b827380ffce108c6c8e4707356e874d98d0426339bd,f63543bb90800a601065d6f6d8380d8a98ac1a9f208921febde4eb0168e6fd8e" 2
xrGetTransactions [blockchain] [tx_ids] [node_count](optional)
Parameter | Type | Description |
---|---|---|
blockchain | string | The blockchain, represented by the asset's ticker (BTC, LTC, SYS, etc.). |
tx_ids | string | A comma-delimited list of transaction IDs (hashes) for the transactions of interest. The hashes must be separated by a comma with no spaces. |
node_count | int | (Optional Parameter) Defaults to 1 if no consensus= setting in xrouter.conf .The number of nodes that will be used to route calls. The most common response (i.e. the response with the most consensus) will be returned as reply . |
Response Parameters
Sample 200 Response
{
"reply": [
{
"txid": "f7efcb33c817153dbea86b827380ffce108c6c8e4707356e874d98d0426339bd",
"size": 135,
"version": 2,
"locktime": 0,
"vin": [
{
"coinbase": "03dc1a070101",
"sequence": 4294967295
}
],
"vout": [
{
"value": 8.662500,
"valueSat": 866250000,
"n": 0,
"scriptPubKey": {
"asm": "02bcff8305d8bb9e536c5bc31c4ad74cbd15ac9d138d5d756f12099c96d541f14c OP_CHECKSIG",
"hex": "2102bcff8305d8bb9e536c5bc31c4ad74cbd15ac9d138d5d756f12099c96d541f14cac",
"reqSigs": 1,
"type": "pubkey",
"addresses": [ "SiibszzNJSGAFTAKqWZKyEkkf4Wq4pYH7c" ]
}
},
{
"value": 25.987500,
"valueSat": 2598750000,
"n": 1,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 a47209c6649cf99e6db2e1bde99b44ce10c76e52 OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a914a47209c6649cf99e6db2e1bde99b44ce10c76e5288ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [ "ScHWTpAFNo93Jv1RAfMBFp9VZCjpLq82Rf" ]
}
}
]
},
{
"txid": "f63543bb90800a601065d6f6d8380d8a98ac1a9f208921febde4eb0168e6fd8e",
"size": 135,
"version": 2,
"locktime": 0,
"vin": [
{
"coinbase": "03dd1a070101",
"sequence": 4294967295
}
],
"vout": [
{
"value": 8.662500,
"valueSat": 866250000,
"n": 0,
"scriptPubKey": {
"asm": "0248d791d1b048e8fc79da7ba9f6c0a44fe14641d13a772ff25dc60103580d1a3e OP_CHECKSIG",
"hex": "210248d791d1b048e8fc79da7ba9f6c0a44fe14641d13a772ff25dc60103580d1a3eac",
"reqSigs": 1,
"type": "pubkey",
"addresses": [ "ScdSb9g4b77DsA9vLipDYP8V1zEP1ru4d8" ]
}
},
{
"value": 27.546750,
"valueSat": 2754675000,
"n": 1,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 3ed09824728101512565c187fdd061df0cc1cac5 OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a9143ed09824728101512565c187fdd061df0cc1cac588ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [ "ST28p81wqsSL6of7Em9mZGvVonVBfM36wX" ]
}
}
]
}
],
"allreplies": [
{
"nodepubkey": "02c6c79a75846fd9bb064788b03145e347fa5464558fa9030ebb009df2833369f0",
"score": 250,
"reply": [
{
"txid": "f7efcb33c817153dbea86b827380ffce108c6c8e4707356e874d98d0426339bd",
"size": 135,
"version": 2,
"locktime": 0,
"vin": [
{
"coinbase": "03dc1a070101",
"sequence": 4294967295
}
],
"vout": [
{
"value": 8.662500,
"valueSat": 866250000,
"n": 0,
"scriptPubKey": {
"asm": "02bcff8305d8bb9e536c5bc31c4ad74cbd15ac9d138d5d756f12099c96d541f14c OP_CHECKSIG",
"hex": "2102bcff8305d8bb9e536c5bc31c4ad74cbd15ac9d138d5d756f12099c96d541f14cac",
"reqSigs": 1,
"type": "pubkey",
"addresses": [ "SiibszzNJSGAFTAKqWZKyEkkf4Wq4pYH7c" ]
}
},
{
"value": 25.987500,
"valueSat": 2598750000,
"n": 1,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 a47209c6649cf99e6db2e1bde99b44ce10c76e52 OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a914a47209c6649cf99e6db2e1bde99b44ce10c76e5288ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [ "ScHWTpAFNo93Jv1RAfMBFp9VZCjpLq82Rf" ]
}
}
]
},
{
"txid": "f63543bb90800a601065d6f6d8380d8a98ac1a9f208921febde4eb0168e6fd8e",
"size": 135,
"version": 2,
"locktime": 0,
"vin": [
{
"coinbase": "03dd1a070101",
"sequence": 4294967295
}
],
"vout": [
{
"value": 8.662500,
"valueSat": 866250000,
"n": 0,
"scriptPubKey": {
"asm": "0248d791d1b048e8fc79da7ba9f6c0a44fe14641d13a772ff25dc60103580d1a3e OP_CHECKSIG",
"hex": "210248d791d1b048e8fc79da7ba9f6c0a44fe14641d13a772ff25dc60103580d1a3eac",
"reqSigs": 1,
"type": "pubkey",
"addresses": [ "ScdSb9g4b77DsA9vLipDYP8V1zEP1ru4d8" ]
}
},
{
"value": 27.546750,
"valueSat": 2754675000,
"n": 1,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 3ed09824728101512565c187fdd061df0cc1cac5 OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a9143ed09824728101512565c187fdd061df0cc1cac588ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [ "ST28p81wqsSL6of7Em9mZGvVonVBfM36wX" ]
}
}
]
}
]
},
{
"nodepubkey": "0370874cad6252bb94afa9a253c90122760ce2862e623b515e57bfe0697f3fc515",
"score": 300,
"reply": [
{
"txid": "f7efcb33c817153dbea86b827380ffce108c6c8e4707356e874d98d0426339bd",
"size": 135,
"version": 2,
"locktime": 0,
"vin": [
{
"coinbase": "03dc1a070101",
"sequence": 4294967295
}
],
"vout": [
{
"value": 8.662500,
"valueSat": 866250000,
"n": 0,
"scriptPubKey": {
"asm": "02bcff8305d8bb9e536c5bc31c4ad74cbd15ac9d138d5d756f12099c96d541f14c OP_CHECKSIG",
"hex": "2102bcff8305d8bb9e536c5bc31c4ad74cbd15ac9d138d5d756f12099c96d541f14cac",
"reqSigs": 1,
"type": "pubkey",
"addresses": [ "SiibszzNJSGAFTAKqWZKyEkkf4Wq4pYH7c" ]
}
},
{
"value": 25.987500,
"valueSat": 2598750000,
"n": 1,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 a47209c6649cf99e6db2e1bde99b44ce10c76e52 OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a914a47209c6649cf99e6db2e1bde99b44ce10c76e5288ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [ "ScHWTpAFNo93Jv1RAfMBFp9VZCjpLq82Rf" ]
}
}
]
},
{
"txid": "f63543bb90800a601065d6f6d8380d8a98ac1a9f208921febde4eb0168e6fd8e",
"size": 135,
"version": 2,
"locktime": 0,
"vin": [
{
"coinbase": "03dd1a070101",
"sequence": 4294967295
}
],
"vout": [
{
"value": 8.662500,
"valueSat": 866250000,
"n": 0,
"scriptPubKey": {
"asm": "0248d791d1b048e8fc79da7ba9f6c0a44fe14641d13a772ff25dc60103580d1a3e OP_CHECKSIG",
"hex": "210248d791d1b048e8fc79da7ba9f6c0a44fe14641d13a772ff25dc60103580d1a3eac",
"reqSigs": 1,
"type": "pubkey",
"addresses": [ "ScdSb9g4b77DsA9vLipDYP8V1zEP1ru4d8" ]
}
},
{
"value": 27.546750,
"valueSat": 2754675000,
"n": 1,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 3ed09824728101512565c187fdd061df0cc1cac5 OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a9143ed09824728101512565c187fdd061df0cc1cac588ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [ "ST28p81wqsSL6of7Em9mZGvVonVBfM36wX" ]
}
}
]
}
]
}
],
"uuid": "c778c124-af28-48b6-b3c4-22f2c5518b8b"
}
Parameter | Type | Description |
---|---|---|
reply | array | An array containing objects with the transaction data for each requested transaction on the specified blockchain. If using a node_count greater than 1 , this returns the most common reply within allreplies . If there is a tie then one is chosen, or if one is an error then the non-error is chosen. |
allreplies* | array | An array of objects with responses from each node. This can be useful if you wanted to do your own analysis/filtering of the responses. |
nodepubkey* | string | The node ID. |
score* | int | The respective node's score based on quality of service. A score of -200 will ban the node for a 24hr period. You can change the ban threshold with the xrouterbanscore setting in blocknet.conf . See node scoring for more details. |
reply* | array | An array containing objects with the transaction data for each requested transaction on the specified blockchain from the respective node. |
uuid | string | The response ID, which can be used to view this response again with xrGetReply. |
* This is only returned if using a node_count
greater than 1
.
xrSendTransaction
Sample Data
{
"blockchain": "SYS",
"signed_tx_hex": "0200000001ce2faed018f4776b41245f78695fdabcc68567b64d13851a7f8277693a23f3e0000000006b483045022100d6e0f7c193e0ae5168e0e8c87a29837f4b8be5c5cdcfa2826a8ddc7cf6cbf43802207ddaa377bc042f9df63eb6f755d23170b9109cb05c18c7ce2fe9993e65434c8b01210323f7e071df863cf20ce13613c68579cdedb6d7c6cf3912f26dac53ec4309c777ffffffff0120a10700000000001976a914eff8cb97723237fe3059774d2a66d02f936e1f1188ac00000000"
}
This call is used to submit a locally signed transaction on the specified blockchain.
Request Parameters
Sample Request
blocknet-cli xrSendTransaction SYS 0200000001ce2faed018f4776b41245f78695fdabcc68567b64d13851a7f8277693a23f3e0000000006b483045022100d6e0f7c193e0ae5168e0e8c87a29837f4b8be5c5cdcfa2826a8ddc7cf6cbf43802207ddaa377bc042f9df63eb6f755d23170b9109cb05c18c7ce2fe9993e65434c8b01210323f7e071df863cf20ce13613c68579cdedb6d7c6cf3912f26dac53ec4309c777ffffffff0120a10700000000001976a914eff8cb97723237fe3059774d2a66d02f936e1f1188ac00000000
xrSendTransaction [blockchain] [signed_tx_hex] [node_count](optional)
Parameter | Type | Description |
---|---|---|
blockchain | string | The blockchain, represented by the asset's ticker (BTC, LTC, SYS, etc.). |
signed_tx_hex | string | The signed transaction HEX. |
node_count | int | (Optional Parameter) Defaults to 1 if no consensus= setting in xrouter.conf .The number of nodes that will be used to route calls. The most common response (i.e. the response with the most consensus) will be returned as reply . |
Response Parameters
Sample 200 Response
{
"reply": "9f978c91840adbc4e074395f8f793cb7369c48e2ce831a10c32090bf71ae29ae",
"uuid": "ACA0874C-C45F-4F40-94AD-794A7E18085A"
}
Parameter | Type | Description |
---|---|---|
reply | object | The transaction hash of the sent transaction. |
xrGetReply
Sample Data
{
"uuid": "3243a24b-3e9d-40d1-8c33-37a57878ce85"
}
This call is used to look up responses from previous XRouter calls without having to request them from the network. There are no fees for this call.
Request Parameters
Sample Request
blocknet-cli xrGetReply 3243a24b-3e9d-40d1-8c33-37a57878ce85
xrGetReply [uuid]
Parameter | Type | Description |
---|---|---|
uuid | string | The UUID of the response you want to look up. |
Response Parameters
Sample 200 Response
{
"reply": "464931",
"uuid": "3243a24b-3e9d-40d1-8c33-37a57878ce85"
}
Parameter | Type | Description |
---|---|---|
reply | array | The response for the previous call associated with the UUID. |
uuid | string | The response ID, which can be used to view this response again with xrGetReply. |
xrShowConfigs
This call is used to show the configurations received from all nodes as raw text.
Request Parameters
Sample Request
blocknet-cli xrShowConfigs
xrShowConfigs
This call does not take parameters.
Response Parameters
Sample 200 Response
[
{
"nodepubkey" : "03ca15d619cf36fdc043892b12a3881dd08f2d3905e2ff399ac39cf34b28a995c7",
"paymentaddress" : "BiBbLf8wDyYcSAzsX1SNzZKrc2zZQjS2pa",
"config" : "[Main]\nwallets=BTC,ETH,LTC,BLOCK,CRW,MERGE,TRC\nmaxfee=0\n[BTC::xrGetBlocks]\n#fee=0.1\n#clientrequestlimit=-1\ndisabled=0\nfetchlimit=50\n\n\n",
"plugins" : {
}
},
{
"nodepubkey" : "0252d7959e25a8f1a15b4e3e487d310211534dd71ca3316abe463d40a5cf0d67ca",
"paymentaddress" : "BXhndtvEEM5Yh9UEPzrzpBLksjZReGV6Kv",
"config" : "[Main]\nwallets=BLOCK,LTC,BTC,PIVX,MON\nmaxfee=0\nconsensus=1\ntimeout=30\npaymentaddress=BXhndtvEEM5Yh9UEPzrzpBLksjZReGV6Kv\n\n\n",
"plugins" : {
}
}
]
Parameter | Type | Description |
---|---|---|
Array | array | An array of objects containing the configurations for each node you are connected to. |
nodepubkey | string | The node ID. |
paymentaddress | string | The node's payment address, may also be specific per command. |
config | string | The raw text contents of xrouter.conf . |
plugins | obj | An object containing the raw configuration text contents for each of this node's plugins. |
xrReloadConfigs
This call is used to reload xrouter.conf
and all associated plugin configs after changes have been made to apply newly configured settings without needing to restart the Blocknet client.
Request Parameters
Sample Request
blocknet-cli xrReloadConfigs
xrReloadConfigs
This call does not take parameters.
Response Parameters
Sample 200 Response
true
Parameter | Type | Description |
---|---|---|
true | bool | A confirmation that xrouter.conf has been reloaded. |
xrStatus
This call is used to print your XRouter configuration and has two different outputs depending on if this call is made from a user client or a Service Node.
Request Parameters
Sample Request
blocknet-cli xrStatus
xrStatus
This call does not take parameters.
Response Parameters
Sample 200 Response (User Client)
{
"xrouter": true,
"servicenode": false,
"config": "[Main]\ntimeout=30\nconsensus=1\nmaxfee=0.5"
}
User Client
Parameter | Type | Description |
---|---|---|
xrouter | bool | Signifies XRouter activation.true : XRouter is enabled.false : XRouter is disabled. |
servicenode | bool | Signifies if your client is a Service Node.true : Client is a Service Node.false : Client is not a Service Node. |
config | string | The raw text contents of your xrouter.conf . |
Sample 200 Response (Service Node)
{
"nodepubkey": "03f1bf0087e5a0036176560493fb05fedb0eb841993536c6a86c78687c4e73a527",
"score": 0,
"banned": false,
"paymentaddress": "B2B8HVr7BuxBXx7JTqmPgUZJ11CGcL9vtS",
"spvwallets": [
"SYS"
],
"spvconfigs": [
{
"spvwallet": "SYS",
"commands": [
{
"command": "xrGetConfig",
"fee": 0.00000000,
"requestlimit": -1,
"paymentaddress": "B2B8HVr7BuxBXx7JTqmPgUZJ11CGcL9vtS",
"disabled": false
},
{
"command": "xrGetBlockCount",
"fee": 0.00000000,
"requestlimit": -1,
"paymentaddress": "B2B8HVr7BuxBXx7JTqmPgUZJ11CGcL9vtS",
"disabled": false
},
{
"command": "xrGetBlockHash",
"fee": 0.00000000,
"requestlimit": -1,
"paymentaddress": "B2B8HVr7BuxBXx7JTqmPgUZJ11CGcL9vtS",
"disabled": false
},
{
"command": "xrGetBlock",
"fee": 0.00000000,
"requestlimit": -1,
"paymentaddress": "B2B8HVr7BuxBXx7JTqmPgUZJ11CGcL9vtS",
"disabled": false
},
{
"command": "xrGetTransaction",
"fee": 0.00000000,
"requestlimit": -1,
"paymentaddress": "B2B8HVr7BuxBXx7JTqmPgUZJ11CGcL9vtS",
"disabled": false
},
{
"command": "xrSendTransaction",
"fee": 0.00000000,
"requestlimit": -1,
"paymentaddress": "B2B8HVr7BuxBXx7JTqmPgUZJ11CGcL9vtS",
"disabled": false
},
{
"command": "xrGetBlocks",
"fee": 0.00000000,
"requestlimit": -1,
"paymentaddress": "B2B8HVr7BuxBXx7JTqmPgUZJ11CGcL9vtS",
"disabled": false
},
{
"command": "xrGetTransactions",
"fee": 0.00000000,
"requestlimit": -1,
"paymentaddress": "B2B8HVr7BuxBXx7JTqmPgUZJ11CGcL9vtS",
"disabled": false
},
{
"command": "xrDecodeRawTransaction",
"fee": 0.00000000,
"requestlimit": -1,
"paymentaddress": "B2B8HVr7BuxBXx7JTqmPgUZJ11CGcL9vtS",
"disabled": false
}
]
}
],
"feedefault": 0.00000000,
"fees": {
},
"services": {
"SYSlistoffers": {
"parameters": "",
"fee": 0.00000000,
"paymentaddress": "B2B8HVr7BuxBXx7JTqmPgUZJ11CGcL9vtS",
"requestlimit": -1,
"fetchlimit": 50,
"timeout": 30,
"disabled": false
}
},
"xrouter": true,
"servicenode": true,
"config": "[Main]\nwallets=SYS\nplugins=hanniabu\nmaxfee=0.5\npaymentaddress=B2B8HVr7BuxBXx7JTqmPgUZJ11CGcL9vtS\n",
"plugins": {
"SYSlistoffers": "parameters=\nprivate::type=rpc\nprivate::rpcip=127.0.0.1\nprivate::rpcport=8370\nprivate::rpcuser=username\nprivate::rpcpassword=password\nprivate::rpccommand=listoffers"
}
}
Service Node
This is the output presented from a Service Node client.
Parameter | Type | Description |
---|---|---|
nodepubkey | string | Your node ID. |
score | int | Not applicable when viewing your own score. |
paymentaddress | string | Your node's general payment address. |
spvwallets | array | An array of SPV wallets you're supporting, represented by the asset's ticker. |
spvconfigs | array | An array of each SPV wallets and command configurations. |
spvwallet | string | The SPV wallet that the configurations under commands pertains to. |
commands | array | An array of each SPV wallet command and respective configurations. |
command | string | The SPV command. |
fee | float | The command fee, overrides the feedefault and fees values. This priority has already been accounted for in this value. |
requestlimit | int | The minimum time allowed between calls in milliseconds. A value of -1 means there is no limit. If a client exceeds this value they will be penalized and eventually banned by your node. |
paymentaddress | string | Your node's payment address for this specific command. |
disabled | bool | Signifies if your node has disabled this command.true : Call is disabled and not supported.false : Call is enabled and supported. |
feedefault | float | Your node's default service fee. This fee is overridden by the values specified in fees , SPV command configuration fee , and XCloud service command configuration fee . |
fees | object | Object of SPV commands and respective fees. These values are overridden by the SPV wallet-specific configuration fee . |
services | object | Object of your node's XCloud service calls with respective properties. |
parameters | string | Information on the parameters the command takes. |
fee | float | The service command fee. This overrides the feedefault value. |
paymentaddress | string | Your node's payment address for this specific command. |
requestlimit | int | The minimum time allowed between calls in milliseconds. A value of -1 means there is no limit. If a client exceeds this value they will be penalized and eventually banned by your node. |
fetchlimit | int | The maximum number of blocks processed. A value of -1 means there is no limit. A value of 0 means no blocks will be processed. |
timeout | int | The value for timeout you set in xrouter.conf for this call. Defines how long (in seconds) your client waits for a response from another Service Node. The default value is 30 . |
disabled | bool | Signifies if your node has disabled this service.true : Call is disabled and not supported.false : Call is enabled and supported. |
xrouter | bool | Signifies XRouter activation.true : XRouter is enabled.false : XRouter is disabled. |
servicenode | bool | Signifies if your client is a Service Node.true : Client is a Service Node.false : Client is not a Service Node. |
config | string | The raw text contents of your xrouter.conf . |
plugins | object | An object of each service you have setup and the raw text contents of the respective config file in the plugins folder within the Blocknet data directory. |
XCloud API
The following set of calls are used to communicate and interact with XCloud services remotely over the Blocknet network via XRouter. XCloud consists of services that are powered by XRouter and are therefore interacted with using a subset of commands from the XRouter API.
You can use the XCloud Services forum category as an alternative medium for discovering services, learning more about each service, and finding instructions on how to interact with the service. A simple list of services can also be found on blockdx.co.
See XCloud Setup for instructions on setting up your environment for use with XCloud.
Call | Description |
---|---|
xrGetNetworkServices | Returns supported services |
xrConnect | Pre-connect to XRouter nodes |
xrConnectedNodes | Returns connected node services and fees |
xrService* | Use to interact with XCloud services |
xrServiceConsensus* | Use to interact with XCloud services with consensus |
xrGetReply | Returns prior response associated with UUID |
xrShowConfigs | Returns all node configs received as raw text |
xrUpdateConfigs | Requests latest configs from nodes |
xrReloadConfigs | Applies changes made to your configs |
xrStatus | Returns your XRouter configurations |
xrService
Sample Data
{
"service": "BTCgetbestblockhash"
}
This call is used to send a request to an XCloud service. XCloud is a decentralized oracle and microservice cloud network powered by XRouter that allows for interaction with microservices, blockchains, off-chain APIs, and cloud tech that's hosted by Service Nodes. If you'd like to operate your own Service Node, see the Service Node Setup Guide.
Request Parameters
Sample Request
blocknet-cli xrService SYSgetbestblockhash
xrService [service] [param1 param2 paramN]
Parameter | Type | Description |
---|---|---|
service | string | The service name without the namespace (xcloud_service, not xrs::[xcloud_service]). |
paramN | unknown | (Optional Parameter) Refer to service documentation for parameter requirements. Information about an XCloud service can be viewed in the service configuration. Use xrConnect to find a node with the service, then use xrConnectedNodes to review the service information. |
Response Parameters
Sample 200 Response
{
"reply" : "6a29264f48a40cc88f7c56cdc5fd4c62d1daa7f83b204fdcd4a022d8676438c2",
"error" : null,
"id" : 1,
"uuid" : "54b6ec00-8b06-4c2c-9e56-acdff4da69fe"
}
Parameter | Type | Description |
---|---|---|
reply | unknown | The service's response data. |
error | object | The native error response if an error occurred, otherwise a successful response will contain a null error. |
uuid | string | The response ID, which can be used to view this response again with xrGetReply. |
xrServiceConsensus
Sample Data
{
"service": "SYSgetbestblockhash"
}
This call is used to send a request to an XCloud service, along with a specified amount of nodes for consensus. XCloud is a decentralized oracle and microservice cloud network powered by XRouter that allows for interaction with microservices, blockchains, off-chain APIs, and cloud tech that's hosted by Service Nodes. If you'd like to operate your own Service Node, see the Service Node Setup Guide.
Request Parameters
Sample Request
blocknet-cli xrServiceConsensus 1 SYSgetbestblockhash
xrServiceConsensus [node_count] [service] [param1 param2 paramN]
Parameter | Type | Description |
---|---|---|
node_count | int | The number of nodes that will be used to route calls. The most common response (i.e. the response with the most consensus) will be returned as reply . |
service | string | The service name without the namespace (xcloud_service, not xrs::[xcloud_service]). |
paramN | unknown | (Optional Parameter) Refer to service documentation for parameter requirements. Information about an XCloud service can be viewed in the service configuration. Use xrConnect to find a node with the service, then use xrConnectedNodes to review the service information. |
Response Parameters
Sample 200 Response
{
"reply" : "6a29264f48a40cc88f7c56cdc5fd4c62d1daa7f83b204fdcd4a022d8676438c2",
"allreplies" : [
{
"nodepubkey" : "02c6c79a75846fd9bb064788b03145e347fa5464558fa9030ebb009df2833369f0",
"score" : 250,
"reply" : "6a29264f48a40cc88f7c56cdc5fd4c62d1daa7f83b204fdcd4a022d8676438c2"
},
{
"nodepubkey" : "0370874cad6252bb94afa9a253c90122760ce2862e623b515e57bfe0697f3fc515",
"score" : 300,
"reply" : "6a29264f48a40cc88f7c56cdc5fd4c62d1daa7f83b204fdcd4a022d8676438c2"
}
],
"error" : null,
"id" : 1,
"uuid" : "54b6ec00-8b06-4c2c-9e56-acdff4da69fe"
}
Parameter | Type | Description |
---|---|---|
reply | unknown | The service's response data. If using a node_count greater than 1 , this returns the most common reply within allreplies . If there is a tie then one is chosen, or if one is an error then the non-error is chosen. |
allreplies* | array | An array of objects with responses from each node. This can be useful if you wanted to do your own analysis/filtering of the responses. |
nodepubkey* | string | The node ID. |
score* | int | The respective node's score based on quality of service. A score of -200 will ban the node for a 24hr period. You can change the ban threshold with the xrouterbanscore setting in blocknet.conf . See node scoring for more details. |
reply* | unknown | The service's response data from the respective node. |
error | object | The native error response if an error occurred, otherwise a successful response will contain a null error. |
uuid | string | The response ID, which can be used to view this response again with xrGetReply. |
* This is only returned if using a node_count
greater than 1
.
Hydra API
Hydra Nodes
Available hydra nodes in the hydra network.
Hydra Node | Node URL |
---|---|
Cloudchains Inc. | https://eth-api.core.cloudchainsinc.com |
Oracle Miner | https://api.oracleminer.com |
The Node URL is henceforth referred to as <NODE-URL>
in the rest of the documentation.
Generate A Project
As a client it is necessary to create a project at your Hydra node. A payment in ETH or aBLOCK is necessary for the project to become active. The payment amounts are fixed in USD, but denominated in ETH.
Create a project as follows with the request_project
call.
request_project
Request a Hydra Project, this creates a project ID (project_id
) in the database of the hydra node and returns an ETH address for payment.
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"request_project","params": [],"id":1}'
request_project
This call does not take parameters.
Responses
Sample Response
{
"error": 0,
"result":
{
"api_key": "uiF_scQgopWWhgDFT7AMbM2Vf2b66xlfnVrJe6e1gUE",
"expiry_time": "2020-11-19 22:17:53 EST",
"payment_address": "0x0x0xxx",
"payment_amount_tier1": 0.073597,
"payment_amount_tier2": 0.420557,
"project_id": "85f1641d-f8ab-4acb-aa00-5d19601a9dd7"
}
}
Parameter | Type | Description |
---|---|---|
error | integer | Error code. |
result | object | Object of the result. |
api_key | string | API Key of the Hydra Project. |
expiry_time | string | Expiry time of the Hydra Project request. |
payment_address | string | The Ethereum address to send the payment to. |
payment_amount_tier1 | number | The amount of ETH to pay for a standard Ethereum node |
payment_amount_tier2 | number | The amount of ETH to pay for an archival Ethereum node. |
project_id | string | The project ID needed as a path parameter for all ETH methods. |
The returned project_id
should be passed as a path parameter to the Hydra Node you have paid for. Henceforth from now project-id
is referred as <PROJECT-ID>
in the rest of the documentation.
The returned api_key
should be passed in the request body of the POST request. Henceforth from now api_key
is referred as <API-KEY>
in the rest of the documentation.
Authentication
Authenticating using a Project ID
Authentication headers
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>"
Hydra's Ethereum API requires a valid Project ID
to be included with your request. This identifier should be appended to the request URL as a path parameter.
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID>
In order to authenticate, it is necessary to include a <API_KEY>
in the Api-Key
header of a request.
Error Codes
If an authentication error is returned after a eth_passthrough
request, the error
field in the response object must be an error number and the message
field must be a string. The following table displays all error codes and its associated messages.
Error Code | Error Name | Message |
---|---|---|
1 | MISSING_API_KEY | API_KEY header missing or project-id missing. |
2 | MISSING_PROJECT_ID | Missing project-id in url. |
3 | PROJECT_NOT_EXIST | Bad API_KEY or project-id does not exist. |
4 | PROJECT_EXPIRED | Project has expired. Please request a new project and api key. |
5 | API_TOKENS_EXCEEDED | API calls exceeded! |
6 | MISSING_PAYMENT | Payment not received yet. Please submit payment or wait until payment confirms. |
7 | API_KEY_DISABLED | API key is disabled. |
ApiError MISSING_API_KEY
{
"message": "API_KEY header missing or project-id missing",
"error": 1
}
Parameter | Type | Description |
---|---|---|
message | string | Authentication error message. |
error | number | Authentication error code. |
ApiError MISSING_PROJECT_ID
{
"message": "Missing project-id in url",
"error": 2
}
Parameter | Type | Description |
---|---|---|
message | string | Authentication error message. |
error | number | Authentication error code. |
ApiError PROJECT_NOT_EXIST
{
"message": "Bad API_KEY or project-id does not exist",
"error": 3
}
Parameter | Type | Description |
---|---|---|
message | string | Authentication error message. |
error | number | Authentication error code. |
ApiError PROJECT_EXPIRED
{
"message": "Project has expired. Please request a new project and api key",
"error": 4
}
Parameter | Type | Description |
---|---|---|
message | string | Authentication error Message. |
error | number | Authentication error code. |
ApiError API_TOKENS_EXCEEDED
{
"message": "Project has expired. Please request a new project and api key",
"error": 5
}
Parameter | Type | Description |
---|---|---|
message | string | Authentication error Message. |
error | number | Authentication error code. |
ApiError MISSING_PAYMENT
{
"message": "Payment not received yet. Please submit payment or wait until payment confirms",
"error": 6
}
Parameter | Type | Description |
---|---|---|
message | string | Authentication error Message. |
error | number | Authentication error code. |
ApiError API_KEY_DISABLED
{
"message": "API key is disabled",
"error": 7
}
Field | Type | Description |
---|---|---|
message | string | Authentication error Message. |
error | number | Authentication error code. |
Make Requests
Ethereum JSON-RPC requests are made via the /xrs/eth_passthrough/<PROJECT-ID>
route. A JSON-RPC request should have a request body containing the method
(string) and optionally params
(string array).
method [params]
Parameter | Type | Description |
---|---|---|
method | string | Ethereum JSON-RPC method. |
params | string array | Parameters of Ethereum JSON-RPC method. |
An example
On the right there is a quick command line example using curl
where method
= eth_blockNumber
and params
= [].
Sample Ethereum JSON-RPC Request
# Be sure to replace YOUR-PROJECT-ID with a Project ID from the generated project
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params": [],"id":1}'
eth_blockNumber
This call does not take parameters.
Sample Ethereum JSON-RPC Response Body
{
"jsonrpc": "2.0",
"result": "0x895cc6",
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | string | Integer of the current block number the client is on. |
id | int | ID number. |
Error codes
If one of the inputs (method
and/or params
) are malformed, then the client may receive one the following error responses:
MalformedJSONData Response Headers
PROJECT-ID: <PROJECT-ID>
API-TOKENS: <API Token Count>
API-TOKENS-USED: <API Tokens Used Count>
API-TOKENS-REMAINING: <API Tokens Remaining Count>
MalformedJSONData Response Body
{
"message": "malformed json post data"
"error": 1000
}
Parameter | Type | Description |
---|---|---|
message | string | Request contains malformed JSON POST data. |
error | number | Error code. |
MissingParameters Response Body
{
"error": "missing parameters"
}
Parameter | Type | Description |
---|---|---|
error | string | Request misses parameters. |
DisallowedMethod Response Body
{
"error": "disallowed method <method>"
}
Parameter | Type | Description |
---|---|---|
error | string | Disallowed JSON-RPC eth method. |
Ethereum Error Codes
If the request body input for the eth_passthrough
route is correct, then the following errors may be returned by the geth
client.
If an error is returned after a Ethereum JSON-RPC request, the error
field in the response object MUST be an object which contains a code
and message
field. The following table displays all error codes and its associated messages.
Sample Error Response Body
{
"id": 1
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Code | Message | Description | Object Name |
---|---|---|---|
-32700 | Parse error | Invalid JSON | ParseError |
-32600 | Invalid request | JSON is not a valid request object | InvalidRequest |
-32601 | Method not found | Method does not exist | MethodNotFound |
-32602 | Invalid params | Invalid method parameters | InvalidParams |
-32603 | Internal error | Internal JSON-RPC error | InternalError |
-32000 | Invalid input | Missing or invalid parameters | InvalidInput |
-32001 | Resource not found | Requested resource not found | ResourceNotFound |
-32002 | Resource unavailable | Requested resource not available | ResourceUnavailable |
-32003 | Transaction rejected | Transaction creation failed | TransactionRejected |
-32004 | Method not supported | Method is not implemented | MethodNotSupported |
-32005 | Limit exceeded | Request exceeds defined limit | LimitExceeded |
-32006 | JSON-RPC version not supported | Version of JSON-RPC protocol is not supported | Json-rpcVersionNotSupported |
JSON-RPC Methods
Call | Description |
---|---|
web3_clientVersion | Returns the current client version. |
web3_sha3 | Returns Keccak-256 (not the standardized SHA3-256) of the given data. |
net_listening | Returns true if client is actively listening for network connections. |
net_peerCount | Returns number of peers currenly connected to the client. |
net_version | Returns the current network protocol version. |
eth_accounts | Returns a list of addresses owned by the client. |
eth_blockNumber | Returns the number of the most recent block. |
eth_call | Executes a new message call immediately without creating a transaction on the block chain. |
eth_chainId | Returns the EIP155 chain ID used for transaction signing at the current best block. Null is returned if not available. |
eth_estimateGas | Makes a call or transaction, which won’t be added to the blockchain and returns the used gas, which can be used for estimating the used gas. |
eth_gasPrice | Returns the current gas price in wei. |
eth_getBalance | Returns the balance of the account of given address. |
eth_getBlockByHash | Returns information about a block by hash. |
eth_getBlockByNumber | Returns information about a block by block number. |
eth_getBlockTransactionCountByHash | Returns the number of transactions in a block from a block matching the given block hash. |
eth_getBlockTransactionCountByNumber | Returns the number of transactions in a block from a block matching the given block number. |
eth_getCode | Returns code at a given address. |
eth_getLogs | Returns an array of all logs matching a given filter object. |
eth_getStorageAt | Returns the value from a storage position at a given address. |
eth_getTransactionByBlockHashAndIndex | Returns information about a transaction by block number and transaction index position. |
eth_getTransactionByHash | Returns the information about a transaction requested by transaction hash. |
eth_getTransactionCount | Returns the number of transactions sent from an address. |
eth_getTransactionReceipt | Returns the receipt of a transaction by transaction hash. |
eth_getUncleByBlockHashAndIndex | Returns information about a uncle of a block by hash and uncle index position. |
eth_getUncleByBlockNumberAndIndex | Returns information about a uncle of a block by number and uncle index position. |
eth_getUncleCountByBlockHash | Returns the number of uncles in a block from a block matching the given block hash. |
eth_getUncleCountByBlockNumber | Returns the number of uncles in a block from a block matching the given block number. |
eth_getWork | Returns the hash of the current block, the seedHash, and the boundary condition to be met ("target"). |
eth_hashrate | Returns the number of hashes per second that the node is mining with. |
eth_mining | Returns true if client is actively mining new blocks. |
eth_protocolVersion | Returns the current ethereum protocol version. |
eth_sendRawTransaction | Creates new message call transaction or a contract creation for signed transactions. |
eth_submitWork | Used for submitting a proof-of-work solution. |
eth_syncing | Returns an object with data about the sync status or false . |
web3_clientVersion
Returns the current web3 client version.
Request Parameters
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"web3_clientVersion","params": [],"id":1}'
web3_clientVersion
This call does not take parameters.
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": "Geth/v1.9.23-stable-8c2f2715/linux-amd64/go1.15.3",
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | string | The current client version. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
web3_sha3
Returns Keccak-256 (not the standardized SHA3-256) of the given data.
Request Parameters
Sample Data
{
"sha3_data": "0x68656c6c6f20776f726c64"
}
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"web3_sha3","params": ["0x68656c6c6f20776f726c64"],"id":1}'
web3_sha3 [sha3_data]
Parameter | Type | Description |
---|---|---|
sha3_data | string | The data to convert into a SHA3 hash. |
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": "0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad",
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | string | The Keccak-256 hash of the given string. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
net_listening
Returns true
if client is actively listening for network connections.
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"net_listening","params": [],"id":1}'
net_listening
This call does not take parameters.
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": true,
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | boolean | true when listening, otherwise false . |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
net_peerCount
Returns number of peers currenly connected to the client.
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"net_peerCount","params": [],"id":1}'
net_peerCount
This call does not take parameters.
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": "0x19",
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | string | Integer of the number of connected peers. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
net_version
Returns the current network protocol version.
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"net_version","params": [],"id":1}'
net_version
This call does not take parameters.
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": "1",
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | string | The current network protocol version. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_accounts
Returns a list of addresses owned by the client.
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}'
eth_accounts
This call does not take parameters.
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": ["string"],
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | array | List of addresses owned by the client. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_blockNumber
Returns the number of the most recent block.
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params": [],"id":1}'
eth_blockNumber
This call does not take parameters.
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": "0x895cc6",
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | string | Integer of the current block number the client is on. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_call
Executes a new message call immediately without creating a transaction on the block chain.
Sample Data
{
"from": "0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"to": 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x186a0",
"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",
"block_parameter": "latest"
}
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_call","params": [{"from": "0x407d73d8a49eeb85d32cf465507dd71d507100c1","to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b","gas": "0x76c0","gasPrice": "0x9184e72a000","value": "0x186a0","data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"],"id":1}'
eth_call [from] [to] [gas] [gasPrice] [value] [data] [block_parameter]
Parameter | Type | Description |
---|---|---|
from | string | The address the transaction is sent from. |
to | string | The address the transaction is directed to. |
gas | string | Integer of the gas provided for the transaction execution. [eth_call(#eth_call) consumes zero gas, but this parameter may be needed by some executions. |
gasPrice | string | Integer of the gas price used for each paid gas. |
value | string | Integer of the value sent with this transaction. |
data | string | Hash of the method signature and encoded parameters. |
block_parameter | string | Integer block number, or the string 'latest', 'earliest' or 'pending'. |
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": "0x",
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | string | The return value of the executed contract. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_chainId
Returns the EIP155 chain ID used for transaction signing at the current best block. null
is returned if not available.
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_chainId","params": [],"id":1}'
eth_chainId
This call does not take parameters.
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": "0x1",
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | string | EIP 155 Chain ID, or null if not available. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_estimateGas
Makes a call or transaction, which won’t be added to the blockchain and returns the used gas, which can be used for estimating the used gas.
Request Parameters
Sample Data
{
"from": "0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"to": 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x186a0",
"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
}
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_estimateGas","params": [{"from": "0x407d73d8a49eeb85d32cf465507dd71d507100c1","to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b","gas": "0x76c0","gasPrice": "0x9184e72a000","value": "0x186a0","data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}],"id":1}'
eth_estimateGas [from] [to] [gas] [gasPrice] [value] [data]
Parameter | Type | Description |
---|---|---|
from | string | The address the transaction is sent from. |
to | string | The address the transaction is directed to. |
gas | string | Integer of the gas provided for the transaction execution. eth_call consumes zero gas, but this parameter may be needed by some executions. |
gasPrice | string | Integer of the gas price used for each paid gas. |
value | string | Integer of the value sent with this transaction. |
data | string | Hash of the method signature and encoded parameters. |
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": "0x5cec",
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | string | The amount of gas used. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_getBalance
Returns the balance of the account of given address.
Request Parameters
Sample Data
{
"address": "0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"block_parameter": "latest"
}
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_getBalance","params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"],"id":1}'
eth_getBalance [address] [block_parameter]
Parameter | Type | Description |
---|---|---|
address | string | The address to check for balance. |
block_parameter | string | Integer block number, or the string 'latest', 'earliest' or 'pending'. |
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": "0x0",
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | string | Integer of the current balance in wei. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_getBlockByHash
Returns information about a block by hash.
Request Parameters
Sample Data
{
"block_hash": "0x5bc28118ff3f15c4ae1cd14548c9a89c87405c5a9f0536c517f5955ace4b1011",
"show_tx_details: "false"
}
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params": ["0x5bc28118ff3f15c4ae1cd14548c9a89c87405c5a9f0536c517f5955ace4b1011",false],"id":1}'
eth_getBlockByHash [block_hash] [show_tx_details]
Parameter | Type | Description |
---|---|---|
block_hash | string | Hash of a block. |
show_tx_details | string | If true it returns the full transaction objects, if false only the hashes of the transactions. |
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": {
"author": "0x04668ec2f57cc15c381b461b9fedab5d451c8f7f",
"difficulty": "0x8fc884a6ef5d3",
"extraData": "0x737069646572303808148293",
"gasLimit": "0x97eca0",
"gasUsed": "0x93c8e0",
"hash": "0x5bc28118ff3f15c4ae1cd14548c9a89c87405c5a9f0536c517f5955ace4b1011",
"logsBloom": "0xb54fd322d4722e4086848ca0101b7a4540400102088d40cd02e38106515881c10cb0844a840482220581dc221f02090a8d731a020340b74be026c0f6623c964463a028e0a609b18662b0f6ea20c1c0142e9f0026840430801f131f318a8d307c0e40b10602330d049190f0a0900d0c0d08c85661104d20101c2281973901585ac203405eaa8ef48148034481e080036c0001db0149149903e76090282412407c860c11f6041613c305ec2bc08f1b9e2103d58018b08509676c66c2036856c48143702bb78a5025999de78807f2a8061430203785640c24b18d93901f045a692030d04a2f1b702829d28b8a91101821660aa8d1128411c7828041900668e8b0ac",
"miner": "0x04668ec2f57cc15c381b461b9fedab5d451c8f7f",
"mixHash": "0xc4eff2c5e48a5516daf6847a9161ccec9488887c5e43b4772d27809dc0781cf1",
"nonce": "0xb92ff3801727d0f8",
"number": "0x899ec6",
"parentHash": "0xb0d783f4d16d860251c8b891b5b36c8014d5704c27f094defec6f1e8c5968459",
"receiptsRoot": "0x99a36ee91c716bb56de300ed3929d14c4f929098c3e3a693898e28157e718081",
"sealFields": [
"0xa0c4eff2c5e48a5516daf6847a9161ccec9488887c5e43b4772d27809dc0781cf1",
"0x88b92ff3801727d0f8"
],
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x882a",
"stateRoot": "0xf103dce771f5b5af88d822002d3ecc51294056e2a4c2282375086e605a867a14",
"timestamp": "0x5de09562",
"totalDifficulty": "0x2c416379f60ef20fb1c",
"transactions": [
"0x5cfcf948c5b93ce012e381dacdfc8fe829e3f7828c015aa32c2d0aff333b6d69",
"0x9d0559cc6e6484dbcfa16e3767203e7add7c978b2eef0272af2784634ec50974",
"0x4fe5e1bac1fb05eafd7921438f0d70ea367049aa0d5ed4828f3c6d412e803e91",
"0x0dc7d5377728506a7f790ae45911817a26ff9cfc05e27a57590d94d0edefb967",
"0x65fc7f666ce352974b18a1d952d29a4280ff2161d13b503b0f335123e0766000",
"0x63f589ed630edf6f68156dd03191e50164caa1990bd3725b630da5dbe018f7b3",
"0x1f289a438ef8dae4753be7774cf043b05973aebd66c3bff95488f4cd16bd1196",
"0xced9a652a80497323e6519e5cd81052157694875d24ad289bc7001a8dfe00bcb",
"0x039300300a9732c495cc26c1280f15718592e9682f8e32bc18bd8d42e16a0577",
"0xc4ca5a967dc0c0c54e5e82ade7da850f6cdb5fa6789de904bc0e8936794bb0f2",
"0xeca49b5b48dbb748d0471c4c16b5044bae3b877c423f49dab534beed2729cdde",
"0xe5eb8709c09d6902cbe6c012b81bf8b3e15409fe19c63bf153a6d5fefdf5cf16",
"0x3e32c69abe8c4a8cfba6daf79ea6a51d07afae7bc2abce7d8daa077587562e74",
"0x8f96943a084f3766fe70c7baf2dc4a5ffb9a661a3e5ce42e03075f7ea2769378",
"0x4d6495579d1886d716903371f3cd044d4433cbd31c4a933e7d313483c64ec530",
"0xdc7d2a16be795215cf11eb4415a1aa493a9c31f8eb1f89adf87a23b3d4bea3d0",
"0xa705415a2489c896f5a929fc97bdfa3394dd48497ad66a06752ce54297c8b842",
"0x14bb43db31b60a107ede336bb6f6e44605399f55e4792f3ff7bb4af7210ad285",
"0xf8d60ddbca6115691cc440c6a1aab34b4ffd13c126f31b92425ef7edb620d479",
"0xdfb50b65cbaa58900b7fe77f3b42f4ecc1ca4f96646c7bf1762ed3aeb63c7688",
"0x99f21998e84ac9200efbb07f605bc8afbf117f244af7a29388e6e087c19fbdb0",
"0x07fb11af81cc814506f1a1ac7103965c451aee2b4cce9ceecef45b8fc81d836a",
"0x0315af1a375d2fdf0a9d7a521f7f19acc2fe1d9227f83884dd5b4f47d98e6efd",
"0x428529907787995c9ce33d111e2894c358064030d1529763bb32339a967e5992",
"0xe4c726fdbe76706649e3a9ed6c7a56f7891bc3e1976957812251b61dd5f6c027",
"0x401ed47d7555bca1c5138d6b7c4c578cc31dc1e4dad3c3675caabe1c5c299e9b",
"0x178f17e86414475cd37c08b87c7fe107dc2d07aa712089bce7898a84dd37329c",
"0x50650e090b234e9b69f81a4ffde1d49326a789c0cb449cab204dc406b9475c10",
"0xd3bf79237eefcf3e8087c903a096c0a3af75e087ee3301766f5da43e516cd2b7",
"0xf07a9f7855cd2bd58f16f17fa0ef2053fa98fd03ba269179710eccb551978d14",
"0x5bcf5fc14ff8d72096b1204e42c811c48978d452c2db666bf4c7e99150c2c16e",
"0x4325c1585e053093d092fe172c1f98bf09929a4dd86c368e85ae27c6dcdbef85",
"0x31080266eddb27f53a3480730549a85dedfa32016a41ad075f8b13fe5ec13263",
"0xb07ac99a62e51111acd6565556c62e406430d794f097a2d800a9932f3ebb08e5",
"0x44255b0b8d7467c9b48e8b215f742e921305dedc7812b3c30081f26806b5cc9b",
"0x690ef6ff3f8e41f26a308d42244c7a268fe2a8bdd35c65fd21fd015224bb87ca",
"0xbdc071164c5f3ee53359e454950fa7a36f8aad14e270395bc993b71932e31c84",
"0xd022ca49c5be1304e26956a72e4e7efbd2eea6cbd2de831ee79a428ce48c2a3d",
"0x3b918c1d53de319494fd8892390f0e6cd6eb217a6dd3e5c2bb3777a3e7ddd6d4",
"0x90879e23911df700b8613ece8ee35ca30eb5a89d1ca04d24c602ba84dbce8e0a",
"0x45273285759f20353de9cf076d429e3daee87e821fbb746f3a0c77c670d12920",
"0xdc4b1635791e748804d5332dba5b36a870098154510f944d4f1c14e3200aeab7",
"0xb02b5e0f84be828b074efc3a5ffdcf1d6d188423aee5fea02a0ed6d9d92f5d79",
"0x93ad2cafe4fef762ffb838115b625ffd76023f171f1d4da23572c3717ab429c3",
"0x59e52718da689cd66405c27724a4b188a401df680c0cb3e0dcbb9f9c0e46a493",
"0x496ab9c3e4c79c4f797aa7d76b376cd19c147a2a57eb48dbd52dcb61e5a45ab7",
"0x8f46d0351a0697eebad9e65f35626e02f04aac36c5c4f5817de4b53ee7903e52",
"0x8b9b6b3c4987c8f41a0c33d6eda6a79a07352d449ec606dfbee53c5bbf58bce2",
"0xce2e08f4104f96637206b30d0e0b838549fba98b4b46b0cb2899573dbf838393",
"0x74985b94902e276f86041771f920226a61307bace3986a6ab0176c042aab8e0e",
"0x15722f46a7e834eb43a3111afb8b236efe3780107e476e4cd2d8a4574c146643",
"0xd86fed31c4ef94d290eb9b9a7287da5c87a0b8b9872544a071e4febf8f80af69",
"0x0be519ac2a2e39bdd875f278bb2ba3d8c1413130f4708cef459a6de75749a852",
"0x94923595b1e26a5dc2e0d59d39d63698a35588e713434238d315401fbbde29f8",
"0xc94d0ec19d3df5951fba1306b9b097f418e0ccc4ee4088865925ba4116825ac5",
"0x7b5cceb1aa7e9a17d6429eb475b29a6e12cfc5137ac01054ca706a9648d0de33",
"0xd820707f3ae4aa04ab4fe19eadc8b4945803cea6f57680c3970f377ca154fbf1",
"0x1aae653b0b7130f0fc40678c94309ccb170271efff7d914a062e7a7c49496b3a",
"0xc9e6b1d707f44771f44f93f1de52fe0ed57dd6f9db33ced966980d717b1fb127",
"0x93b52b088ab167700eda4401f5ca1e6a6148b7d822a49c03863891912d6ac9a4",
"0xb90b421879412770e758bdd45b7195b81279e7da1eead734e1749feeb13b5918",
"0xc585710e9880d8215986fae102a2bf11caf82d1f81680f9d8c8fa86bb16c93d1",
"0x5788a99cf99bf3161307ad9b0d6091c00666fe08868521afc384c18f8400315f",
"0x06823c999440325edd867c094ca5ebb41dc28eb9ea6dd04dfdfc5d809e1bf9c1",
"0x68cec353137215e13d3a2667105782feb6d56531c7ba9011604261a2e282eb88",
"0xa787ed36b95df9257747f5af0a35cddb1b5eed4270ec48188e1db5bd489d9948",
"0xa35cbf7903416e3d4cbf551c4bc0afa778fd014a2fcd05ff1490ca63c2d136cd",
"0xf7b18ea5e22c1e54948811a2330be75163890250b6a0b720fece11ddde12a9fb",
"0xd9a128ea60815ef43b33f089d59521cc11c86d76e85a1f2d853f2c26daeec221",
"0x10a718193976caa332d9de09302c38265bc5ddfa7394dd2cad517675cc46cfad",
"0x4534dbd4dfadd0a234744f1fac53b125712f54a50810a9e548e03dbd05b92752",
"0xceb5a50055161b2daf52abc7ba7862b3d7c0a3ede5e56d5a414a24ea7af1710f",
"0x7c9f30c0f294542a8868cba9bac8967e9398e3cc7e654f0f6b294ae869bd7712",
"0x198cfb78cc1be5ce3526375439222e0a1e13ec052a95a97d79c677355695d8e8",
"0x561d7c0a3ec74cc7ad129647300c25610982202348dba00a168921579817e540",
"0x6afab9b5e3463a9d25ca3306b30980bdcc27421bedd3a2b24daf5abe29d8f1c6",
"0x0c0cec67ffbe564ba85071dbed58f746257c7052367365c38a72c7c5f331f1a6",
"0x8b9d1c44a39a7d04fa53143e27fc38a41936a7898b3b32c22260d7aff762f7f9",
"0x249dba5287216b027cfc7fb5a9b92c33417484d68f7ecd50cfce29f1bafa7f14",
"0xa4bb7036e625de02af7a389ad83695de9b225649414dfc839d1e0e98d15914c4",
"0x576c6183980df86297e4b54255928786516b2a8b029fc13b059419451d59c0b1",
"0x0230c6dd3f6383464b82abe1594356f5238db244713e2828410a52f69b515af4",
"0x36e54958c7606f107516526c9d855e863029a73b10d6375c4de9bca4f5e55448",
"0xebc0d3d709d04e74441ea5dbefaabb68e66b7f6007fb7c0e1f3146ebd0bd2145",
"0xf6294fef87e9a8767a332b20d30f912357497deb3de1c65f80dd650aad8ff0e9",
"0xdac1997ea5ef55ba0d3443ddfaa3748dc3dcb0e995537d49c92c4b7c4ea02599",
"0xc6caadca4246469ac34857c2278155b8e07d96465552f42e27e29772a203df2f",
"0xcc8474658822e1ace734558219adfa8463006ddc47beec3a35b2a62d8061fa20",
"0x00a7a891ea0786f8b4fcb72a3291e10c7e2031bdd30515da408de2d5c784c4b5",
"0x5f3a52bc746b87fa5cd148f33d434bd07be3c0d378cb2350657b315e13f08ca2",
"0x2d8a03457d9d5a90e61fc927f806b18190ed33366f8a70a0f3bd88dedd275de7",
"0xcf5da6fb2fa3c5ad461cd6ce198e02651644b5dcccc4eeb57e80fe6c1f714127",
"0x5adee0d00aa01767441616a2b1cd8a2d6e35828cbf358aa0bc5c0e4026678e01",
"0x1ec03369744ad69c9a5e22d7afb455c38930687654540c214d34b9761d5aaee0",
"0x56c48612f3ffc8e3064dc66c02bd6ef932c1548a004573f037f23ebd71b61b71",
"0x835ad5e80858c4f3b5bb91427cdb6aa50d7eeee7d6f868e9d3155469fef26eb1",
"0xb94067688a6a667f22a95220d29d92ed8401fd842344cd67c1e0e0e0c717f17b",
"0x14f265d013d51f7c122a5032d06ec58439beaf06e68d810635b44950cc508796",
"0x9bb4e6dd707e69510c1cef3602c4e46901a9ec61bc79b73c315f0594ff7ce5e2",
"0xefeeb9bef1026305495ac3694e22ac22d6a56fd10c482c8cf6e3da0e561ea6f8",
"0xd649f43433f151096431674b297f29a2cc79f55180f870d73fdcf61d1c72e053",
"0x624dd38e1a775a2fd2040d30979dcfd65e9bbbe1283615c844afe0ab81daf2cc",
"0xb34670919db74dbf4803b23d6c36a68e138300e538e1001f06156dab5ac4cd82",
"0x9e7f40f5fe63d1ed5429733c4f6bc6a480fb5fdf3f080015a32828e27898aeff",
"0x608bd230419ab1939d942e12dd6c2cfea4847342f0600d7b5c7ba32e77b578bc",
"0x2214d586392bab5976bdba36b1dcb1b5750377f83c7cfd9a66fdf93ff6014a0b",
"0xf29c2859851627a1ed2722d0b08b5ab40359534a8140950284c8b0f7527d0705",
"0x6fd3f2266ae429bd41ba05e2389e5745a99402f0bf7b13f14fbd42183f149d22",
"0x00fdae5f47ea62c5287e34721729a93b9d33bff3ded29b73dcce5f4e1fd412fa",
"0x864ae872a968339c1d01b083ecdca074a0098998c12e1a09095ff242f26ffc9f",
"0x9e86c592291d225d1572c88247921639fb6c6e8a273bc690460d75517b8307e7",
"0xdc4d5cc8749957d29436d8d9e0fa13af09d336533fa1dd9f1a9c28ce6e11cef8",
"0x5603c8eaaf3101ce662cc56bef395c88a812e1575bfc58be7d790ea4dc65aafd",
"0x5921d458195e827fe96089215350855efa2d4793b07a688df1d8c4a623a5799f",
"0x5fdd73e69f6ff8d13d189c3fcd9f9e07160c1e7ac5c8d49710ec995a032530dd",
"0x5ef5bf0ac00c37c9a0189e01685bd55a49063d21f824cb42029075a8a5692de6",
"0xe2bbf787fe13eeda2e5c5507980330b16fdbe3ea33081baacd9570d608f71be6",
"0xf772e14be8f79b101d9e322d2d06c76e97856d5fc8e81a1967b837b37f212f21",
"0x00329ee26509279b26ccfdb6b63d06e6372fa2c0f91b4b6d732c5f849ba3d598",
"0x343f113699f9a9a3be8778f4566e102a7586c48a736a2e66a8871d026bbe591b",
"0xa1341a72bee8ee1e19bb8dc46bb5fda07dcdd6761c6343fdec491951b071fda6",
"0x6973775310887548b9bc0526feec1c5fbbae3ef4c91b3289cad59ff4a31fa6e2",
"0xc9d59730fcc592fae79aedf1bd90363be1de66ded2fc58b06fd1dc3965447544",
"0x2783745825b0e9440d8f62c4cee24f518632962ef6112675673eaad4aa176792",
"0x7ce35bbd3f705190096cf97c5b03357b94f9a09057d3d17f6ea6fd12714719b9",
"0xb98d780167358951bcbc315bd63daa98e14140efe379d7cf7bba6333b2e5474c",
"0xf14d02a85773749cc7863bf21c1d060429a9826fdb280a6d3806d093b874bf52",
"0x86a951dc9320b71ef11ee4b5522ea315f4c73e0add4c257a7ecba056264227db",
"0xe0f1d301dd515db71cc00ab697267797469a09d3a5b8928107351e086c79b548",
"0x223d84cc639875e3fb1db9a86e881276cb9bc855fd561a23cd49015ea6d95d84",
"0x2679121eadb62ac673869b263b93212c8bfef71838af6dcf76c38ad5c1cfb82b",
"0x7302e2398de8a5f4b2f2bf2fef9bbe985de0f6587d5e9ca6506e837bb550621d",
"0x0f73506d46fb3268194628601fe220dd215083016a21a235cbaf41b39903194c",
"0xc2cf64038579d57cf5bf944433eb06543810580198094b7c93b280f32aa742f1",
"0x51a4392e48f1c7840499a2e2b5627ec886c955c1271ce810079b8da79c205121",
"0x50c598726695002a1fdc7ec918fda1d837383c896ba3df377db467270814032b",
"0xff738df7a7d02b289caf1f3abca8e3bbe83c7404fa7175f4a2bb862fdc315c9a",
"0xc3adf448a8b477274ff129edd51c82aa8620a4630a17fc44de00bd875743368e",
"0x5f5a9e1569d55e93af11bf51e9c8c579ac30e93c6ecc68f51fba2b4a0d2470f2",
"0x53a22fed0fe79c3e307caec367cf0b5d1a5027c367c8d59402d0cf73b725e130",
"0xbc74f21b1251d0d7d7bef6ec65de0acbe9bffee03eca5a563eb737ff01e3b3ad",
"0x2fcf9b8b6689f2927e3ea6d17a5b13c202cc47f8730739e69af6a3b7da56ad52",
"0x17b8fe4ffba27bb9f30b6f539c6f68ed268e596dfa96693d6cff220b2a3a3a96",
"0x99477172724eae9b79a0b0807c3963f13073e2f54fb3d61dc817ad4760c6d999",
"0xb599b01b7d6d1a3b4e3f169f7e8133e260cfbb415536b210c319c078ab4f79a6",
"0x790f23f1ed6728d36d715652a59a3c8bb0c44fbbe3d10bb8d0f07ea71ad84fc7",
"0x7460717055e45f9a28c2e175775bdae8b2d8ba6784c930bde6daaa2cd198dce8",
"0x9e62b0332c192fcaa226f38a0bd32d17aa479ecea17e38fca78f57238368a604",
"0xada52ebda60b993b93a318f04556c06487b6d334ea4792ea882951560716493f",
"0xe5b0c409ce816c4d38a2bfc353cebbaa6e53dd1c726fe2477b065bee5877f734",
"0x1e2f0bcb66acfb6bebcccb9087809e5c3d1693aa19153992b70a1045b92c488b",
"0x357787f38361a4595d33ab272d4e780764f7c36d338f79e6e50d85c98797c02a",
"0x1e8c7f0093fbf45b25b1ca96e767a03c6b0df33d1d9951042d9c7fbccabee933",
"0x1ebb80e6ad9f54fe03308d6acb5985f8b751e659bcd1adda7669a179f5a829c5",
"0x2da72e404857eec247954006f6f744e954234e7b419089a4d8a13a9f150dafd4",
"0x01570ffd879d5658e9f68796e7db9b8f4071f815d8b520eb0238602d0cdfa26f",
"0x8ad45f2d06c52b21107003f53198c77c1379f229edb78d5d8a81e6167b25d819",
"0x5ba86c83c16e6e1416a234f0c161c3011fa7bc0757108f10f7567e740989450e",
"0x2ff2ab1766d791ebc63d0471fd7f9f2ea5c8ef12101f19ab30a3ee4f74145af2",
"0xe551f70057fafa622263e69ba9f62bf97ae0b3a2dff4e8616607066c6b7ad5e0",
"0xaf4934b2cb48ee018d9a78c0e4e05339eece74ac1d4f7ea29b37147ce62fa212",
"0x57b085efa1a7958a44f9d49230d247e625602ff1a5ce40095d6fa97530ae3b52",
"0xf69f0c6d5153349df96cfdcd5ea7af4e2d36069f74c1586e912a01479fe47b21",
"0x58ce2d769b58865aebc9bdfc69f7ec6e687aaab8333a5ccbc4c99a20397cc3c7",
"0x70c077c8d00321e4d9cb31dcdb31bba53b98b7bffd8433d804511e32275c76f3",
"0x323091c8bb1a54407915b449ec173bce42bebe7d9d3801331c3bfd90cb053550",
"0xf96fb121bd40f2858401718489428cc792c1af8411dae66fd61c53c7b6582adc",
"0xf5b38f037c9496a248a82003debfe21ebd41d19dbbc37e24dd690f521f8cd010",
"0xb41955657877328a96ded97e469876faaa51b2126aef5fc823368ba06f471bdd",
"0x7e28400e7140eae17d26a21a59c1330285bfd441ca0c2394f0602a61ec3b94fe",
"0x09514fc9b40e3fe8254fb0484fcfb42fc667d6a12c2289f0a515cec89467c097",
"0xa650c5e53c7b68503dee2d4b2582e0fa546c7cab465bb1bf69f24527d2243825",
"0xd660f1e85cb7c947fc0c32796f49b7349240c36f50d63112c6e80434d878d607",
"0x98208aa8f812674fd934c5799750dd76191263399734400f6b1099f25f1aa420",
"0xce59aae8bff5e46c731c627d1613e5f05f6b615530155fd0e0170d80233bf19d",
"0x0cd322fb873a9fa131f6cd5f996a7095426e302cf72c6b1bf2fedf5af1a53973",
"0x403778cfeffb6d89290f74751a03f27a6b44c7213c831c71509a72cc44d211d7",
"0x8910bf1b65e7ab163a04544d876412729eae264cdad9d5f5c142fca97cc3f468",
"0x9e2629f702874d4cab0c8d7aa996cdf0c1e28563559fd8090e975c8b43f7c5da",
"0x7184425b1e153ad4c264ff6ee39fe945c3478fceb10062bed7f84fc63b825441",
"0xb7ff20ce4593e29d704125472c39ee6d7e610577fb0670cd28080940b66f0da3",
"0xd6cdeb7ef37b46b42a1c8da039101ea3e296a0c80443749622309b6cb32ad5bd",
"0x72bb0bfb35a8632f19e73f6b95cc3c17093407baf1e8b1aba6fa95d458274227",
"0x42b4dd3574cef4c04ee1598b2613abd2a04db0ecfaa6cde89dd725b97a5e3396",
"0x2138c080ba3bfc7e44f93f61c0be343aea5f6c9cfd90c3dbeb6506bce6986660",
"0x2dd8337e4774e440d335283501a21db0ab7d006461952662fe5c22b311400060",
"0xe33046ebbcfeec214dea7d4e13f632cbb1b147ab0700dac6824d4d023872f92e",
"0xaed0d78b2326a7876333138469542e43c810f42ce607fb3415a333da27609999",
"0x57e7bfe4c87462b9ed2eb9e893e05f67ebba3082d551baf6f6a2954ccb8924d9",
"0xfec0b431ad594ec43ceb6fe1522ace71bc0ed674a2c65e4bad252ce552d2879d",
"0xc865a37dfc79f84d37e3770ed095975129a565f65f3d02fdc8eb10032886e1dc",
"0xe21e2c4feb59c24ab4db15c7ff4e63e91a7841e5a08ef431a1d417b948be282f",
"0x21d67c2cf664e1e0482414c8a11de0ac01597fa74a3071141fb17eba1fa11c9f",
"0xc4c92fc7b5bd25ebbfc65844d85376219a13705c9d7f213ba93cfc8dd71f0bcd",
"0x9a61819b335804466d9c09ad2807154202e9e6a88d50c85ef20afc163ba3f093",
"0xa6e921525033982f975e77588a7107e8f63c0b6b567209aca9352c8f31e7c5f6",
"0x1ae504db4dde9f2d82eccc2c13db850edd9f8eb7af0df3fdab4a7cd43358b013",
"0x4b39442f31a3fdc09d7156eaab9ddbaa105743c9b93732fbfb38f9f62a8d0da1",
"0xdd511c99aa2fcb12e4b1aa9204ab1145b9a0c9758df18a8e18477841d0f53fce",
"0x4b5b45ce67b47fc94461e10ea648f4a832c5e0dbffd6560d9d538f8d978a5909",
"0x346a58f1fdaa751fc149fc5d07d03b740f7df964e5c266d9e02a01f1c32be87f",
"0x4dac57d992da935d5859266666cbbcdf95af537a08ca53258e5738f0f44bdbee",
"0x39c8fb8e0b0bf3bb42a2f12fb54a65555b4fd55b01bed3236d0f47edf6b960e3",
"0xff8214b2ea605b629ab11381420e79c0ff37f423047b9ad8eec0a0e40a2487cc",
"0x238ddc1946da5ca7c85c06d67f41638b68f5ae4ef78612e628167ee9c925e5a1"
],
"transactionsRoot": "0xd5ac4c4bb5d2e024e7781da24e0c830525c2c3b1694d080019da38419bd1aecb",
"uncles": []
},
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | string | Block object. |
author | string | The address of the author of the block. |
difficulty | string | Integer of the difficulty for this block. |
extraData | string | The ‘extra data’ field of this block. |
gasLimit | string | The maximum gas allowed in this block. |
gasUsed | string | The total used gas by all transactions in this block. |
hash | string | Hash of the block. null when its pending block. |
logsBloom | string | The bloom filter for the logs of the block. null when its pending block. |
miner | string | Alias of ‘author’. |
mixHash | string | The mix hash. |
nonce | string | Hash of the generated proof-of-work. null when its pending block. Missing in case of PoA. |
number | string | The block number. null when its pending block. |
parentHash | string | Hash of the parent block. |
receiptsRoot | string | The root of the receipts tree of the block. |
sealFields | array | Array of seal fields. |
sha3Uncles | string | SHA3 of the uncles data in the block. |
size | string | Integer the size of this block in bytes. |
stateRoot | string | The root of the final state tree of the block. |
timestamp | string | The unix timestamp for when the block was collated. |
totalDifficulty | string | Integer of the total difficulty of the chain until this block. |
transactions | array | Array of transaction objects, or 32 bytes transaction hashes depending on the last given parameter. |
transactionsRoot | string | The root of the transaction trie of the block. |
uncles | array | Array of uncle hashes. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_getBlockByNumber
Returns information about a block by block number.
Request Parameters
Sample Data
{
"block_parameter": "0x899eef",
"show_tx_details: "false"
}
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params": ["0x899eef",false],"id":1}'
eth_getBlockByNumber [block_parameter] [show_tx_details]
Parameter | Type | Description |
---|---|---|
block_parameter | string | Integer block number, or the string 'latest', 'earliest' or 'pending'. |
show_tx_details | boolean | If true it returns the full transaction objects, if false only the hashes of the transactions. |
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": {
"author": "0xeea5b82b61424df8020f5fedd81767f2d0d25bfb",
"difficulty": "0x8f3b4bbc6db44",
"extraData": "0x424a30312f4254432e434f4d2f00074e81",
"gasLimit": "0x981106",
"gasUsed": "0x980b62",
"hash": "0x6980a67cfb87b83005cc21310922d0809173dff9a13767a7dc403bfdf63b18a1",
"logsBloom": "0x84a2e522ab32826a0a5c9e3c3040581128c1b5c40419523d1006c1c8439680c6162312e75314a02221912282b20a8bd81b93133209c4eb5ac022d4b360edbf851a138042c65288004b119e19982254378212200e6ace305b2a022c3492547058b411a1ca57a2841002cdb001e26f094a4d6710220ad49c548269a270313038aa50b0c05f4c130011040fc3dee131861108402f7f29159c4b0d8438ae833921b327122d2c80ace0c2b4078db07b78dd808b240b85e82008a36ad7300c0e2c3934141290a7cdf89f41ec4c012403b2b235208ec2a6a20a416847899cb3534c6333e936a43c51d33a0888938996eab38770a9e74122dcb380c81c8402101d5808d6",
"miner": "0xeea5b82b61424df8020f5fedd81767f2d0d25bfb",
"mixHash": "0x306c193162c2513c1b8ac0ed30ea8b32e24deae3bceeebc4977e43c12d4d3700",
"nonce": "0xba6200996d3eb51c",
"number": "0x899eef",
"parentHash": "0x756d19a6ec9d0612dad99b1c4092adc098f112b87d0909ac1d0e95bd59bcf4e6",
"receiptsRoot": "0x5fa05c98ac82b86f7c50b9800875080a6619b610dfdea0e759563131ddbaff5c",
"sealFields": [
"0xa0306c193162c2513c1b8ac0ed30ea8b32e24deae3bceeebc4977e43c12d4d3700",
"0x88ba6200996d3eb51c"
],
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x8d19",
"stateRoot": "0xbfd16c094150c7a205990d9b7ebae66900dd3f986c64abfd1f5f84b4835d2e97",
"timestamp": "0x5de09832",
"totalDifficulty": "0x2c417a6dff0ab7e6a61",
"transactions": [
"0x8c7f557db86c456b1c1bf4f8ee9b9c61b3505b30b550968c9eabb11ee451120f",
"0x1e8fd505ef60d3312b2afb7fbc2db426fcfcf9393960b5c06fc6f082ebb3a89f",
"0x22e61ad6d7ea50e95cb5ec3877493381784d7f498d1755fc6379c97d7a3a5902",
"0x97ccccbf333e5e83155f72c0eaaa354b5b9b3695ff92e8d96fb4ba9a3cdbdedc",
"0x94d2edeb65889f81323ff7e9f7e68cd72ee6b5840db03b082952ecd89fea5cdc",
"0x71fed9886897892b86a0aacffc3b18d29720580ab0f39759b34155a8b3d00146",
"0xfa893777634ce7fabf90dab0c8567180828b55dcc1d8eaf564ff4de03b8a5527",
"0xba36a43e80f460501f4069588cca0deda767073954ad72cb79030cefc580a6a7",
"0xb22c728592179267d09aaad3f2b57e7f3a7e659aea8a3b30935c73d0652159b8",
"0x8cb8ac5b6ef22d7a400e3c57c9e004c219d82fd3a5823eb3f15520b0468e02c8",
"0xf5b25b6d7807759bb440d4c196408733dcc352a5341398f0063ae9eea94a2ff7",
"0x5dac88661df90095522895781b2317b7daf01f99f5c2ed9d8c9440eb6ce71fa5",
"0x8e4d5bc8d7735a32c3e86abd8e2c7a910a894f633be55e90b09e384ef2797990",
"0x6b98e3e757336041ae64928afcbb64c832d609bb9a193aae2b21bb6f12681fe0",
"0x78b7aaffe9eb0dc22ff53322590b94c64a4502d31f981218052c8b2fc732680b",
"0xae30436278b22488900452b104565206b5f27070ca41219ff6cfdec7cdad93d2",
"0x9b814adc4f6943405c1b358b846aa940aef91097ea7e6eed4c757eec58528442",
"0xb00a47238959f9504542e3c678e3b4a9d37c6395935e2d4a16a15e1756d1a402",
"0xf98128b93b3f9285292db37fc0cbb47c49020a5a580cec184765bb2493e23feb",
"0xc1ced43235c26b0659e531af434772ade7f535ea98e39e28f1489b1d883f3e67",
"0xf037d1597b45c5e3d25756687c6c2e092b982b7c558836d5e7f7b84c423ddcf4",
"0xa228094820abccfcbd380c5c9f757bb75e893347e8a579c4d0a61592da3a92b6",
"0xa0b5c64e62c66df4e45eb0e470aadd5f215537f233029ef00d284cf03c68490f",
"0x362693814b23a1d842df99cdb89eaf7cebd874f4c15295e34e8500687b31b7e9",
"0xe467c642a6cf14a05ae1ecd3593891026aac91c54ef5c5334d585702a6265322",
"0xa386b9a428f7f0ce1e4378a983be4c81907a83ad3fc09c1014429116bd4d3ff4",
"0x1ca8da030029f70d8d2054f3c6d0b565395b303b82e550b1e302552af9b28e20",
"0xec7238f2673a1cd245c565daa5935b421afd48dc8bf465640943b2a1032ed7be",
"0x9360f9d583eeb7d8033eedc08ef3618d278300f2f857fd3e5dc03f0f9f1a8257",
"0xd0adbe2f610b1c531eacb64cf0cd1fb9518bdd82f9395f9ce12c53fee52927e4",
"0x6880c4cb13e10d92cb1da12de57ef35adc9482a34ef0eba026b3160f35e04e22",
"0x94b80a3d13c54d315c763a69ac5dd995303c815abdc69ba147961e1c6d235d82",
"0x14a1adeb19da8b6a987d5ea179dc7974235758ffa815b3521d1b7108e15b2a90",
"0xc9548ceb70f87398dd508d054b5a167e99e53ca1b93fce60ff2a15dfef1bb572",
"0xb053295cac5d4ea4715f97525b06fa4ec1770d4e137134e37ca38b623496d662",
"0xfff92c8653475136723588c8973c0032f25cd2e206a46a75ae77f313d5bb7d06",
"0x4134839604c21ca483ae5566c9e6e7d708d9319e9b4afca3222ee11a99fee968",
"0xaf2d60b9f8de2d06cd7777aeda94b35785366b16e540d64016090dc302d12a55",
"0x267c3305c54668c3c5608b398978e827bbd334862749716c2d4c96e917f8b98c",
"0x7907eae9a62bfe38e62476d9feb9125e39a73e82f8b8e646577dfe623a0b5371",
"0x41f48caf7805d8565d06a70e6c5844e3a115e67b92755a24619d4881292ea2f1",
"0xaae0c24c29168b54343f44be8ccaa7e3a4f5452056f354bc7d8f46735e1e419b",
"0x9332463555765c4aecd6f15406709576d0f3e210210a170a7f13dfb4ae1ade6a",
"0x099d55e335ebd1bbbf20309fee63d979e84245504288c71961be191517d3bdb1",
"0x73655b63fd40780dc582484e3c0c578292af159f3b0d241dbbcfddbfa3a3c31d",
"0x36128576779194f8e2023c3a2d1ad490ff533ecafe65d7fa92a9d07b783ea294",
"0x7b74a8a8c408a9ec26e6a182f20d64a7124414d69d8b5d6afecc9d4de58c5a97",
"0x7743a0c102ba0db156213858a5b3f9e4ce5440309e5b9bfa2ba446693487062e",
"0x7c42f134c4811ae82a2328837c8d753bca8db4bc8f11c513d6ebafcce3143e65",
"0x55869ee8789a8fc32f894343ba7a60d3cd08c6f019415270d6276b074fe65962",
"0xcf8feebfa5693e2de8a8748af411be501610addea68b45e5284a019d6dedbad2",
"0x9ddf86fb484d5936b7ef035a5b1084482842e4e41af842927355706c8d5e5686",
"0xb0592253b55bfd3beeb100c888cd82b162d68e03ba5fdbd4a55d2236d6e6883e",
"0xb1b01dd5a81e97de8236b574d3d2ca1adfcb3484d0cf631e8e0b162dcb9d9dc5",
"0x4b1b0e57ed9afb2af730e42f3bf282b1449423b3a10c8e3df9a8ed5e0db8f510",
"0x51f49c320a66e50a070d8b6250275ed8b61c76658b78e2bf663532efd01fd305",
"0x313ee0a13b8b098002f52edf15652c14e8761fed7a92c61b4d9cae635892ee7e",
"0x90c51ac39831ef9e7e5dd8b662e65112e45d2181c793a5331f588783555ddc2a",
"0x35b727c5c57e2c375f8b32895c58d019b21e6e19f3e20acf45a06626cd2c8734",
"0x1bd2d7d6002cc210f3427fc5c2125784c831edefbf0aa67f88fc012cf5f30d20",
"0x2aeeb1be72152dfda39acefcab5e0d382854e15941e66734e0752a2939cf7171",
"0x398e7c23519332404a09c478c3ebbdc8fd412b57a72fed96ae28490d4c8645c8",
"0x25e6ad33aac8eb7c5f648de2cf3c93fdcabeb5771608298faeffa02ce6c14ca5",
"0x616965177e41550e07a577b7361fc86c2c4bc4ad0d458fcc3683730ca923963a",
"0xb24f34da66843850fc9323599989718dd3118140df5d2df28166e2d59a6b6348",
"0x3d93c916e3a50abacdc260a3d416d6faf17a2a1a48a0e64edc41657a91e55945",
"0x9e1066b3296ea327ac012825be5295ec246a08616266248c21ee674530a9f4d1",
"0x2d2dbf2c042b5fc06ffa249bfb0a7450a41d53315c26f244a7dfc9fe9be44253",
"0x68591cc4f07d0f06d9e1f184badedc76ee8b1e7c3ca18418453c8aa4ab51a6f8",
"0x4dcfde1f227e1c839445a4414b2b17db979a46805f5b582eff448fa7d39c75c6",
"0x553811a67dc6514fb96ce75ed881ae10699189f6fb8ebcbb0c64f2bb61714ab9",
"0x1c89b9e484857142cfa2b9e3c3b059c93b9d227304c81dc2fbba8d26a0cd47f6",
"0x93979b113d14c21c89cf90fb46287b17760f759e16b7d99d3965b6bbb1821090",
"0xda7e2786e6aac21fdbf16904f5934c1938aeb52d62a96151979974f66a0f091a",
"0x515eb46b0502963016a3d6713bf8e2da596bc6a523955a2254d859a62c904338",
"0x7a78f8ede6645d1eae48d2ba248ff37adb3a4f2e7d3b68b65601b0cc98747da4",
"0xe8fbb56dbecb1c03613a0329677f12fd0ca80235fa5cdd950bcfcb81efd3bf9d",
"0xb223b4cf014e1419ef9e1f6555aed430e73c01f0a25e3f29cc3f946ffd22ec18",
"0xdf1aab0db4db7e0582014d6535791f63e7567affaf368e312024b3c464ef8a76",
"0x84ea882b51696784293e296057507e9abb92d3b2dc135d2b0156eac170e9d366",
"0x8ee9d9271f3ba7c51e7660c551e31e26946574e0d8e4864e9eed99de23954552",
"0x725c6091718776428909cc88a4163691fd5914c08e928b7d88ca2d5ed4b829f1",
"0xed9dcac818559de2699434abfc160ff39b9a957586f905ad17c2ee32c4390fe7",
"0xbfc13d421dfc8213a70d4fee815e942edc15060cdf53a2f64093262a7b8c6a52",
"0xf433edce21943fd120f51a6164966d11fda5d45745b3b6ccd6fc397108f4aa76",
"0x25b5976e9ec2304cc3b29683f3542c7f435c9bf752b7dc080b883f6b2b38a86e",
"0x3cff17284741d86ab80dd7c6ff157986f6f9a2d8cb159009050fe96484d2bf5a",
"0x59c134783c166b9049d2e3ace23ac6d496ae249fbc12ed5464d3607597be1ee9",
"0x9ce8a9d57636fd21b53f0465148359aaa8c0774403ca44788035f18dabb5cf9e",
"0x17013799e74eaac474d853386dd2d8477a29807857ba860e2bbe9214ebd1fb54",
"0xc2e8d2239ae49b47e0a4549f134e04e626d988f7af24cda5e95e07e750360e84",
"0x2e15dcd8b69843536b2fcc2e0286f3c09ba90534b3a19a88f301a1d9e62aa0c9",
"0x804b66d5abfa6fc35e1a917de4d385514d00dabf834c9f61bb539231c872a384",
"0xd2920e5de37bb78386438b8c3fd392bf0a6eba44c81143fd2b0127053f5f922a",
"0x00c674e1311e58683d009d01af1989ae6a74b77c7371cb0692fac3fd5216d5e1",
"0xbdd332a6b75affb5eb504bf8e54c8074c87ea7a13300de67d4ef1f9bf0d7f0fd",
"0x7bf4a9bd232a2d3bcc95dee2b89e1fa9bb7e7405df6b59ec3cfa796f1e491d94",
"0xfeff5d3daf3041226d7e56e893ad9b2bb554ec4dce4a586d23047f787a1def5a",
"0x4d95edaca0652c7fae069a859d52b650bce2ff34a7c1190b12cb8ae00af197e9",
"0x6b735f204c65443cb86e9f5793cd3095fe8ebc4aac9d9bb9693e56a09d9991dd",
"0x29fa3b84ee421488a3e59e4d93a65b5f65041bd5551bc0b6f52282929f38fd65",
"0x4b4b3b925cfa3015f3f74ed1562787475b0a1e9a556d58de3fbaddb545dbaf38",
"0x40379603c7a7f1bf4c5277ee012ac5ae8a0e3426e397f532256114a62bc85e24",
"0x5f35ca4f98a2c1924f51adbc1949d949e2a95c5c7f07adaa07158cc7b1af60e3",
"0xa3d183e68ba9b5062e0b9719a41a510a47188338e4cd9bbaa93fb7ba5ca3e66e",
"0x77fadb35eb7a1f7fe9088ea28bfd6a8a5359bb722e95a0d464a2c3dc5a0a10a7",
"0xb97bca2e28a6f31ef6a118a43e98159eb075d3a218916358c5b64798dcb64c0c",
"0x2ca5e0a727906be8832f5c0d123825a9c7a49a55d663f1fbea0f512f102f4309",
"0x3b505362ff6cecfe3d51b6dc6df7bc450c40315ec978150b3f9e24180f628ec3",
"0xa5fe52cd37ad5ab2e1c6497689aebdeac9c06d6f7585cb71eb8c42466ad3c70b",
"0x3d4861eb2b2240bcc2d5d29f95e11be5461159eca4f81b886cf5d4a2dc160093",
"0x7083e2db70d84378828069a9d82eef1c824a07725fe5d6655d4b557322af7d9b",
"0x736d108ba97735a60333d2df0c6b9c7e6ddcc3f06cdd5b2631c1d7f9619f06ac",
"0x30d21e8f625ec1d803cf8d7b7ecb61d9e19c6ee1fb286bbec806d8ba839f492c",
"0xa9db7e5b44f2bdb2c7324c91178c2503dfa75f613efd9d4df560e50d6e074e9f",
"0x5073228204952831c4068526916aac257361adf2b9e29241ed53a86e9433dbc2",
"0xf06e14cdbd2a1b46ec57f7de1f955f50158be79a09bdad568960f892f99e1876",
"0x7451543e985925400fe0331366b6c3aced952590f6f53235ca15a1f3066f0efe",
"0xd3cf3cbdfe7a1a1ebf5438c4d8b98286de975b9c5687ce6b4663c10af21e7494",
"0xa85785314c3c7c17b82db846cbfef67cc23a4f997dab6386cb3805164cdffc6c",
"0xc36bb82002cada6ab52a874bff78d3e0b3d58d3a29d6bf9be438ea76d329bc0c",
"0x8477b4d9ffdcf926b9771192ecf6469b6b9a371e6f9c578d4a9d7dee0eb9d157",
"0x0153a845b3f3e00f7ecc0244e110dbabb9e84fc37b5e6aa42f759c6ed4623d7e",
"0xed508572512eb795c332049103ed6abac0214ecacc124436c5bc3c61e66d5553",
"0xb27b2cb463bfb95f4f3ab68931c1ceae26b8b078ebe0b9230b02ce6ee5a8371f",
"0x9cba5b48599a4861800fcbf180c2b65ea72e905de964b9e3ade2351bfa6026ab",
"0x0ca3b81fe65dac2662643b07b322c4452d260e654fd0fe5389d39956ade55ae4",
"0xb316228a37e418408248bf5e32fc19cb97879c4789a40b1a7e50aa48955315c9",
"0xa6002559dc983b436fd1639641a75a9b114362f1470d60c62d7d7bf807120052",
"0x9edec20164a73509cbd7d0931f2cb434806e6ab71e212f763afb81a402a99129",
"0x160f52ef17252c4705231c14905db97fd137dfe5ed93564cb833dae7c74ee063",
"0x4ec287fdafc6fe1b20169bd461e766933bbd5871a41b7b00024bb19f86dc2cc8",
"0x5b7d8412a446470c8b4debbd85758aba5c4cf52df9dbd6ab6e493620c1803965",
"0x547dbd142590efabca87be6ce46b8ebcdd30f11af0292c6757c0623cdbcc69bf",
"0x31be2b9136736d94078f6aa5fd9e951f1bf4bfc7df863581d77aa8eca6e3f88d",
"0x8bd691433e4ce619090b0242d4f8cbd4963c173213e92f626d4c00dba7ee3730",
"0x01ec3b80fded7f46deca8a82f9da88b0330acae4e4b3451b528ca1e074bc6bb8",
"0x8d8e895b07af06142dc37d1fc42dcc302f3300bad1db278a057dee436d2bb3f7",
"0x0b59ddd7483f656e949aa07da21ccc67d4808f1adcdfdb4e072cda221868d1b0",
"0x341c2e0699ba717d29b1156f40e0b2bf02a79ddde35091893cf0475de7b749aa",
"0xe835be19817369c878cde2c628ba51fffed116f47ec5a17accd2cce80f5d2b9e",
"0x574ef6a04cd331f496541b2d61568ed86fd3893067832ab941a665ab5749134a",
"0xceb2acfac747d8331245e466e539982695b73c647f3421eea8245b9fb72ddd38",
"0xd9cfab1625fdead7bed56276ff24ee03edbefce0ab2e4550eaba0c470801b83b",
"0x26f29b46f5db2c7c9f06510b0a4a705038700fd0f343d16e6dd8fdaec0435371",
"0x2a870afb156e6c8ddf77c002dd9aba5a70502e9b55b7e1babf17512cdbcf446c",
"0x470913545772a37496e8864066bf3d7b76476fb0b7f17f847ad8a70fe9273235",
"0xfa60012c38d75e7369c317c87abba46ae00261861ff7470c329c3cb78d7b836d",
"0x1ac92f9b79cca8f26ec9fcbd44f804229b3cc9023985ab15932267c0e99a7256",
"0xbe11b21b41ca1dd9bf6d5223916f3b2dcf4673381538c6f0284dae92e759bcfc",
"0x147a2115992fb0a6794e4c8302de09289ca896a9c0465c5779790fd5302a2276",
"0x0928d1b66da6829d7599ba58eb56bf9b6104d32d6949a947c2bfab6e37ba248d",
"0xc7f5cb3f7705742b6435cc28225bc04fcc8ba6334f8bdc2c1a6bd980908aa07a",
"0x8e48c7c710189466854e84fc7c85267ed5c43813be06623b412c025537fdd632",
"0x40c82396defede7004ec7065ffbe813e4b698f0661fb8fe7d1275f645406b890",
"0xee8dd4cfb737fcf116f2a0ac7ab47a097a3dec869af1e7d4e373f2a4951ae1ac",
"0xb81407241306461dbe9f0f171e1c192fa72feaa512a5b0ca706c2fcef7ac87e7",
"0xa415cb01e232b758df9a364bf59f51b0fc38e3aa6f5365f5e1784569ca411d4a",
"0x6b6185a0b54b44d8c6c4645633343561230dd5369341d00a40f69f4eb6d08465",
"0x3017e334b2ae9f54560493bcda857b1c596dfec1a5af0190f32211ffeb413547",
"0x6bd9884060174d294b6f34b00b0d058e94497ccbb1a214254c89cb5ec60d00a0",
"0x5a87637f331f180292df0b5ea70b6525e044ca804de538e1d3e1a69f32aaae33",
"0xb184a3a5d4f1aecb857102750df78d78fff2931d7e02855972635c156796ab0a",
"0x27bf92c559aa54196d71dc9a615d377ecd3dc73fd37bce93e4a8cda60885d75c",
"0x5c7ce01d89e08848ffbfc57ae995f731b7d3be10ae28218cbb357519ea6decbd",
"0x30b1c00686deef42e22c78fb935ee9a22955dc6b001d2367f64d7fe22e2b5038",
"0x2338a4709ab616b05abe43e74d1c37de7f512e2188dfe9ecb59e02829f9dfae1",
"0x4da0008b0c6aff6e2ff5f2e12dfecaa7757998b779607d1b48befc964e18fe04",
"0x6cf0687f9737bcc687028c618916318a5544ef038d0a01db0b51917ba93ec7be",
"0x144b8feb2ca393a1c0efac70fb34ad9ef285fe9f3f85a1352559b606bac7c8a7",
"0x3783da36cad1cbcc9614a372a1073cc79f6a178c1b65c6d0405056ea8b1441eb",
"0x4c44b22cd23e4e4adce5ba6029a3e3650af9a754120c0425e7210a8d551774cb",
"0x0546210776cbd2e00208c2fa6f3ff01a2858b0b4be32a5d3846962ec7323d724",
"0xc4446797af855548a297f0032a117557a8a359c3fe5514879ee0bb86cba6aeff",
"0x75c5d8abb889048c31f6b346b627425626ba4b3c1a8a34855e051c58b41bc423",
"0xb8f0cf4192ec59e6272beabed5b63f395a93d85a31d5b4c1e76660f1838e54b0",
"0xf09e4a64d058b37a9c81293a186466b8a81e4260b33a13a8c4b86f4310779e06",
"0x31c7f885a2eec4bc8dbcb579fcaafb96b631dde10e37524a0c4bf6c8a3c26383",
"0x2846cd96c05621d101d3fc3e3339ba01e14dd694c1003487f2cbbd1e037d9029",
"0xee42740aa488645646955b9a782514a9d3b73822b2574c31d65e16e86360fd5f",
"0x8a5f7d0b1408ab063c73c16b608aa4e1c0b9d2e111083126844b4506aca7b62c",
"0x096df1a6e95c4a455aef820ae82d43b96804cd5b9fc290ca772bc8a79d5f8be5",
"0x4f81f0054155eb439a0ad61826218e2695350b02c1c91535e171f156461b5748",
"0x710ca4e51f2ae0cd187866e39400059ec349798e20f4b14f0f9c6ca18b2f83b9",
"0x630e33d85b5a2ee3c1a0ab69bb3498bac4b0f58b4fff29eec4d345dd8f783afd",
"0xe2d19501bb682569bdf30c1f96775f9d64c457430c20f557b37f98db7ecc1a5d",
"0x2be6013804312d261a51ca94f27a0d5da8b357ff24cf6f231f3c9247266c010a",
"0xf538b7a4591dc98fc5f473b39e38387741a2505ada5252d6bff511fe55a913e7",
"0x90aafee7605b3dd4fae58ec820bd01000821ab1277ce4d2f2a56d81c56b5101f",
"0x58bd6f6c48850ccbc8c379eec3848b4a800b2214ff9c99e3a845a428764cd130",
"0x11960b9e1e467009f2cbd9db5e583be709bf836b1953f49dad21ae6913023769",
"0x6eefb7f32cd377462c1cfb9fd93c8591010cf6a3c153b78343314e06752a0eb5",
"0x0cda22dfec4780c41c3606925f4f9380fc0c16256ae420dcf8f9315a7a245b6e",
"0xe8dedd36ef30b6ad6f626d0fd9d3dea2ab3a6497bfa62e94fdadedabf212c5c9",
"0x54856976775236d1779b315a4a25981efe335352ba6a8fd7f1ca62bc080b465c",
"0xd75886c66a98ade344e4000ce4e0f9521e7be82fc5e4a471b3d36616928b25fb",
"0x0299b30b76b29737ed48290b9a6536a917231eac83056e3f607d64566b8d66e7",
"0x219749ec4cc4a7bc33f43a38ba54cfd2e73c77bfae1dc42327caca98ec2b5a67",
"0x93c94d4b68edf0e928b16e7411f99a6fe73e523023e9d0594a515dc0563afca0",
"0x14b62bc786bf169abaa36865d91f41a9b30101905a79544a1ef9fe116a695be9",
"0x72d3902f033643c03f40ff76121622a949afc9d426cf8657cb16f69910a52448",
"0x74841fb4daaf9f16dc1792a3c6cc4b82ee8941c91e9e5bd63387846dfe15f891",
"0x0e04b0528bb9edfdc0024e0e8077bea300e3d7a97684b1dbf672487727e61511",
"0x4036773eaf5bd24d93547b25debff3e238a9a3147b8fbda0cfda78daf8395933",
"0xf51bf5efecf882741cd32190a0702ea967e2a74754cbeeb6c8d9ed22978889e2"
],
"transactionsRoot": "0x03384378a4d327b4bd34d198554cea29030d843e3df1a433350f6b1be94e550d",
"uncles": []
},
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | string | Block object. |
author | string | The address of the author of the block. |
difficulty | string | Integer of the difficulty for this block. |
extraData | string | The ‘extra data’ field of this block. |
gasLimit | string | The maximum gas allowed in this block. |
gasUsed | string | The total used gas by all transactions in this block. |
hash | string | Hash of the block. null when its pending block. |
logsBloom | string | The bloom filter for the logs of the block. null when its pending block. |
miner | string | Alias of ‘author’. |
mixHash | string | The mix hash. |
nonce | string | Hash of the generated proof-of-work. null when its pending block. Missing in case of PoA. |
number | string | The block number. null when its pending block. |
parentHash | string | Hash of the parent block. |
receiptsRoot | string | The root of the receipts tree of the block. |
sealFields | array | Array of seal fields. |
sha3Uncles | string | SHA3 of the uncles data in the block. |
size | string | Integer the size of this block in bytes. |
stateRoot | string | The root of the final state tree of the block. |
timestamp | string | The unix timestamp for when the block was collated. |
totalDifficulty | string | Integer of the total difficulty of the chain until this block. |
transactions | array | Array of transaction objects, or 32 bytes transaction hashes depending on the last given parameter. |
transactionsRoot | string | The root of the transaction trie of the block. |
uncles | array | Array of uncle hashes. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_getBlockTransactionCountByHash
Returns the number of transactions in a block from a block matching the given block hash.
Request Parameters
Sample Data
{
"block_hash": "0x4faaf9dc3b7f58275d18d0d08a9c2aaf91c41102cfe915bbbd208506f1b85ebe"
}
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params": ["0x4faaf9dc3b7f58275d18d0d08a9c2aaf91c41102cfe915bbbd208506f1b85ebe"],"id":1}'
eth_getBlockTransactionCountByHash [block_hash]
Parameter | Type | Description |
---|---|---|
block_hash | string | Hash of a block. |
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": "0xef",
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | string | Integer of the number of transactions in this block. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_getBlockTransactionCountByNumber
Returns the number of transactions in the block with the given block number.
Request Parameters
Sample Data
{
"block_parameter": "latest"
}
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByNumber","params": ["latest"],"id":1}'
eth_getBlockTransactionCountByNumber [block_parameter]
Parameter | Type | Description |
---|---|---|
block_parameter | string | Integer block number, or the string 'latest', 'earliest' or 'pending'. |
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": "0xac",
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | string | Integer of the number of transactions in this block. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_getCode
Returns code at a given address.
Request Parameters
Sample Data
{
"address": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"block_parameter": "latest"
}
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_getCode","params": ["0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "latest"],"id":1}'
eth_getCode [address] [block_parameter]
Parameter | Type | Description |
---|---|---|
block_parameter | string | Integer block number, or the string 'latest', 'earliest' or 'pending'. |
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": "0x",
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | string | The code from the given address. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_getLogs
Returns an array of all logs matching a given filter object.
Request Parameters
Sample Data
{
"fromBlock": "0x1",
"toBlock": 0x2",
"address": "0x8888f1f195afa192cfee860698584c030f4c9db1",
"topics": "0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b"
}
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"fromBlock":"0x1","toBlock":"0x2","address":"0x8888f1f195afa192cfee860698584c030f4c9db1","topics":["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b"]}],"id":1}'
eth_getLogs [fromBlock] [toBlock] [address] [topics]
Parameter | Type | Description |
---|---|---|
fromBlock | string | Integer block number, or 'latest' for the last mined block or 'pending', 'earliest' for not yet mined transactions. |
toBlock | string | Integer block number, or 'latest' for the last mined block or 'pending', 'earliest' for not yet mined transactions. |
address | string | Contract address or a list of addresses from which logs should originate. |
topics | Array | Topics are order-dependent. It’s possible to pass in null to match any topic, or a subarray of multiple topics of which one should be matching. |
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": [
{
"address": "string",
"blockHash": "string",
"blockNumber": "string",
"data": "string",
"logIndex": "string",
"topics": [
"string"
],
"transactionHash": "string",
"transactionIndex": "string"
}
]
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | array | Array of log objects, or an empty array if nothing has changed since last poll. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_getStorageAt
Returns the value from a storage position at a given address.
Request Parameters
Sample Data
{
"address": "0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"storage_position": "0x0",
"block_parameter": "0x2"
}
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_getStorageAt","params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "0x0", "0x2"],"id":1}'
eth_getStorageAt [address] [storage_position] [block_parameter]
Parameter | Type | Description |
---|---|---|
address | string | Address of the code. |
storage_position | string | Integer of the position in the storage. |
block_parameter | string | Integer block number, or the string 'latest', 'earliest' or 'pending'. |
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": "0x0000000000000000000000000000000000000000000000000000000000000000",
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | array | The value at this storage position. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_getTransactionByBlockHashAndIndex
Returns information about a transaction by block hash and transaction index position.
Request Parameters
Sample Data
{
"block_hash": "0x4faaf9dc3b7f58275d18d0d08a9c2aaf91c41102cfe915bbbd208506f1b85ebe",
"tx_index_position": "0x0"
}
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params": ["0x4faaf9dc3b7f58275d18d0d08a9c2aaf91c41102cfe915bbbd208506f1b85ebe","0x0"],"id":1}'
eth_getTransactionByBlockHashAndIndex [block_hash] [tx_index_position]
Parameter | Type | Description |
---|---|---|
block_hash | string | Hash of block. |
tx_index_position | string | Integer of the transaction index position. |
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": {
"blockHash": "0x4faaf9dc3b7f58275d18d0d08a9c2aaf91c41102cfe915bbbd208506f1b85ebe",
"blockNumber": "0x899eff",
"chainId": null,
"condition": null,
"creates": null,
"from": "0x4b21981d6b29545e7b0741ec88e46971e89fcd03",
"gas": "0xf618",
"gasPrice": "0xdf8475800",
"hash": "0xaeb94782f2fb8749ed688eec51da4a92d556b2903d55feb6e55ed8024d564879",
"input": "0x",
"nonce": "0x70",
"publicKey": "0x52da29319261294d49f0e8554ff82ae4804a028524c80053844bad3ac106cec6d70e66f709b7d9b4fabfb8c9896da61fc45c764a83fb1e7608d5c8ce50b1bb5e",
"r": "0xf8e4a34b54843a744563a3eefe2dd592e8969ff0aac224c310d96cf060e594a2",
"raw": "0xf86b70850df847580082f6189411667ee05a59d8b481d3f8081a9c0665680f105787d529ae9e860000801ba0f8e4a34b54843a744563a3eefe2dd592e8969ff0aac224c310d96cf060e594a2a05ac3adfbc859f4ea1cee116fd59ae0b28e417dc04c813bf9515323621036691f",
"s": "0x5ac3adfbc859f4ea1cee116fd59ae0b28e417dc04c813bf9515323621036691f",
"standardV": "0x0",
"to": "0x11667ee05a59d8b481d3f8081a9c0665680f1057",
"transactionIndex": "0x0",
"v": "0x1b",
"value": "0xd529ae9e860000"
},
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | string | Transaction object. |
blockHash | string | Hash of the block where this transaction was in. null when its pending. |
blockNumber | string | Block number where this transaction was in. null when its pending. |
chainId | string | The chain id of the transaction, if any. |
condition | string | (optional) conditional submission, Block number in block or timestamp in time or null . |
creates | string | Creates contract hash. |
from | string | Address of the sender. |
gas | string | Gas provided by the sender. |
gasPrice | string | Gas price provided by the sender in Wei. |
hash | string | Hash of the transaction. |
input | string | The data send along with the transaction. |
nonce | string | The number of transactions made by the sender prior to this one. |
publicKey | string | Public key of the signer. |
r | string | The R field of the signature. |
raw | string | Raw transaction data. |
s | string | The S field of the signature. |
standardV | string | The standardised V field of the signature (0 or 1). |
to | string | Address of the receiver. null when its a contract creation transaction. |
transactionIndex | string | Integer of the transactions index position in the block. null when its pending. |
v | string | The standardised V field of the signature. |
value | string | Value transferred in Wei. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_getTransactionByBlockNumberAndIndex
Returns information about a transaction by block number and transaction index position.
Request Parameters
Sample Data
{
"block_parameter": "latest",
"tx_index_position": "0x0"
}
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params": ["0x4faaf9dc3b7f58275d18d0d08a9c2aaf91c41102cfe915bbbd208506f1b85ebe","0x0"],"id":1}'
eth_getTransactionByBlockNumberAndIndex [block_parameter] [tx_index_position]
Parameter | Type | Description |
---|---|---|
block_parameter | string | Integer block number, or the string 'latest', 'earliest' or 'pending'. |
tx_index_position | string | Integer of the transaction index position. |
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": {
"blockHash": "0xb37a1ab54c006e8e33eed645154395f88386dc2d5fdd27ffc2a6def1506e4aff",
"blockNumber": "0xa4d4e4",
"chainId": "0x1",
"condition": null,
"creates": null,
"from": "0xe62193bc1c340ef2205c0bd71691fad5e5072253",
"gas": "0x7530",
"gasPrice": "0x267ddb953d7",
"hash": "0x858b3fe4664c5fd635665a58c8f6fcb18e50b58966973dca821d35351d630bd8",
"input": "0x0000001d0000000000000000000000000000000000000000000000000000000000000072",
"nonce": "0x6e98",
"publicKey": "0x0cd7e5751be4a638ad4b2fe02d960f86b211e6a9aa6b1dcf156c70605c7231b1b8ccfa06727e226424d7a49ccd2fed2260159c59642eda637ae8c4f803748703",
"r": "0xf0f639556c62bbe7dfd8ac06219c14c1470df14b47ae00d5ede457d8be1e5a30",
"raw": "0xf88b826e98860267ddb953d78275309400000000b1786c9698c160d78232c78d6f6474fe80a40000001d000000000000000000000000000000000000000000000000000000000000007226a0f0f639556c62bbe7dfd8ac06219c14c1470df14b47ae00d5ede457d8be1e5a30a0613d0c71160c9eeec28d9cc9def558e3a551c52b40ec398a2ed0dc67083da230",
"s": "0x613d0c71160c9eeec28d9cc9def558e3a551c52b40ec398a2ed0dc67083da230",
"standardV": "0x1",
"to": "0x00000000b1786c9698c160d78232c78d6f6474fe",
"transactionIndex": "0x0",
"v": "0x26",
"value": "0x0"
},
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | string | Transaction object. |
blockHash | string | Hash of the block where this transaction was in. null when its pending. |
blockNumber | string | Block number where this transaction was in. null when its pending. |
chainId | string | The chain id of the transaction, if any. |
condition | string | (optional) conditional submission, Block number in block or timestamp in time or null . |
creates | string | Creates contract hash. |
from | string | Address of the sender. |
gas | string | Gas provided by the sender. |
gasPrice | string | Gas price provided by the sender in Wei. |
hash | string | Hash of the transaction. |
input | string | The data send along with the transaction. |
nonce | string | The number of transactions made by the sender prior to this one. |
publicKey | string | Public key of the signer. |
r | string | The R field of the signature. |
raw | string | Raw transaction data. |
s | string | The S field of the signature. |
standardV | string | The standardised V field of the signature (0 or 1). |
to | string | Address of the receiver. null when its a contract creation transaction. |
transactionIndex | string | Integer of the transactions index position in the block. null when its pending. |
v | string | The standardised V field of the signature. |
value | string | Value transferred in Wei. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_getTransactionByHash
Returns the information about a transaction requested by transaction hash.
Request Parameters
Sample Data
{
"tx_hash": "0x091e312f48b184fc86c1d14f6dac5ffad3e49e10752d59d4de4e87655d0156f4"
}
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params": ["0x091e312f48b184fc86c1d14f6dac5ffad3e49e10752d59d4de4e87655d0156f4"],"id":1}'
eth_getTransactionByHash [tx_hash]
Parameter | Type | Description |
---|---|---|
tx_hash | string | Hash of a transaction. |
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": {
"blockHash": "0xf9d2f0c8a90055028ea4185e204de7c920cdeabb4135a7525e203089025f1c26",
"blockNumber": "0x89aa13",
"chainId": "0x1",
"condition": null,
"creates": null,
"from": "0x4b729cf402cfcffd057e254924b32241aedc1795",
"gas": "0x5208",
"gasPrice": "0xdf8475800",
"hash": "0x091e312f48b184fc86c1d14f6dac5ffad3e49e10752d59d4de4e87655d0156f4",
"input": "0x",
"nonce": "0x1cd69",
"publicKey": "0x5957d98b80b878a98306bca8ff66f0fcac79894becea5d369cc4c348025f355d2fe4a9b1aa8a94f369529f6e3302c9d1d2f7cff0c0acc877091edf1534b96897",
"r": "0x639332e84dccaffc930168855650530400d691c6ce51d6061695feee0434b63f",
"raw": "0xf86f8301cd69850df8475800825208944e0ab04e7a1fd61dac88a1f4b54efc6de730d0d98803300c3206ed2c008025a0639332e84dccaffc930168855650530400d691c6ce51d6061695feee0434b63fa0674acfef71f6f9f4434e119d0c2b7580fddd28ac530c8f1a85d6b5af601df075",
"s": "0x674acfef71f6f9f4434e119d0c2b7580fddd28ac530c8f1a85d6b5af601df075",
"standardV": "0x0",
"to": "0x4e0ab04e7a1fd61dac88a1f4b54efc6de730d0d9",
"transactionIndex": "0x0",
"v": "0x25",
"value": "0x3300c3206ed2c00"
},
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | string | Transaction object. |
blockHash | string | Hash of the block where this transaction was in. null when its pending. |
blockNumber | string | Block number where this transaction was in. null when its pending. |
chainId | string | The chain id of the transaction, if any. |
condition | string | (optional) conditional submission, Block number in block or timestamp in time or null . |
creates | string | Creates contract hash. |
from | string | Address of the sender. |
gas | string | Gas provided by the sender. |
gasPrice | string | Gas price provided by the sender in Wei. |
hash | string | Hash of the transaction. |
input | string | The data send along with the transaction. |
nonce | string | The number of transactions made by the sender prior to this one. |
publicKey | string | Public key of the signer. |
r | string | The R field of the signature. |
raw | string | Raw transaction data. |
s | string | The S field of the signature. |
standardV | string | The standardised V field of the signature (0 or 1). |
to | string | Address of the receiver. null when its a contract creation transaction. |
transactionIndex | string | Integer of the transactions index position in the block. null when its pending. |
v | string | The standardised V field of the signature. |
value | string | Value transferred in Wei. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_getTransactionCount
Returns the number of transactions sent from an address.
Request Parameters
Sample Data
{
"address": "0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"block_parameter": "latest"
}
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1","latest"],"id":1}'
eth_getTransactionCount [address] [block_parameter]
Parameter | Type | Description |
---|---|---|
address | string | The address. |
block_parameter | string | Integer block number, or the string 'latest', 'earliest' or 'pending'. |
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": "0x0",
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | array | Integer of the number of transactions send from this address. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_getTransactionReceipt
Returns the receipt of a transaction by transaction hash.
Note: Receipt not available for pending transactions.
Request Parameters
Sample Data
{
"tx_hash": "0x091e312f48b184fc86c1d14f6dac5ffad3e49e10752d59d4de4e87655d0156f4"
}
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params": ["0x091e312f48b184fc86c1d14f6dac5ffad3e49e10752d59d4de4e87655d0156f4"],"id":1}'
eth_getTransactionReceipt [tx_hash]
Parameter | Type | Description |
---|---|---|
tx_hash | string | Hash of a transaction. |
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": {
"blockHash": "0xf9d2f0c8a90055028ea4185e204de7c920cdeabb4135a7525e203089025f1c26",
"blockNumber": "0x89aa13",
"contractAddress": null,
"cumulativeGasUsed": "0x5208",
"from": "0x4b729cf402cfcffd057e254924b32241aedc1795",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0x4e0ab04e7a1fd61dac88a1f4b54efc6de730d0d9",
"transactionHash": "0x091e312f48b184fc86c1d14f6dac5ffad3e49e10752d59d4de4e87655d0156f4",
"transactionIndex": "0x0"
},
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | object | Transaction receipt object. |
blockHash | string | Hash of the block where this transaction was in. |
blockNumber | string | Block number where this transaction was in. |
contractAddress | string | The contract address created, if the transaction was a contract creation, otherwise null . |
cumulativeGasUsed | string | The total amount of gas used when this transaction was executed in the block. |
from | string | The address of the sender. |
gasUsed | string | The amount of gas used by this specific transaction alone. |
logs | array | Array of log objects, which this transaction generated. |
logsBloom | string | A bloom filter of logs/events generated by contracts during transaction execution. Used to efficiently rule out transactions without expected logs. |
status | string | 0x0 indicates transaction failure, 0x1 indicates transaction success. Set for blocks mined after Byzantium hard fork EIP609, null before. |
to | string | Address of the receiver. null when its a contract creation transaction |
transactionHash | string | Hash of the transaction. |
transactionIndex | string | Integer of the transactions index position in the block. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_getUncleByBlockHashAndIndex
Returns information about a uncle of a block by hash and uncle index position.
Note: An uncle doesn’t contain individual transactions.
Request Parameters
Sample Data
{
"block_hash": "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
"uncleindex_position": "0x0"
}
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}'
eth_getUncleByBlockHashAndIndex [block_hash] [uncle_index_position]
Parameter | Type | Description |
---|---|---|
block_hash | string | Hash of a block. |
uncle_index_position | string | Integer of the uncle index position. |
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": {
"author": "0xea674fdde714fd979de3edf0f56aa9716b898ec8",
"difficulty": "0xbf93da424b943",
"extraData": "0x65746865726d696e652d657539",
"gasLimit": "0x7a121d",
"gasUsed": "0x79ea62",
"hash": "0x824cce7c7c2ec6874b9fa9a9a898eb5f27cbaf3991dfa81084c3af60d1db618c",
"logsBloom": "0x0948432021200401804810002000000000381001001202440000010020000080a016262050e44850268052000400100505022305a64000054004200b0c04110000080c1055c42001054b804940a0401401008a00112d80082113400c10006580140005011a40220020000010001c0a00082300434002000050840010102082801c2000148540201004491814020480080111a0300600000003800640024200109c00202010044000880000106810a1a010000028a0100000422000140011000050a2a44b3080001060800000540c108102102600d000004730404a880100600021080100403000180000062642408b440060590400080101e046f08000000430",
"miner": "0xea674fdde714fd979de3edf0f56aa9716b898ec8",
"mixHash": "0x0b15fe0a9aa789c167b0f5ade7b72969d9f2193014cb4e98382254f60ffb2f4a",
"nonce": "0xa212d6400b89b3f6",
"number": "0x5bad54",
"parentHash": "0x05e19fb68d9ec798073808e8b3170875cb327d4b6cde7d6f60fe194677bb26fd",
"receiptsRoot": "0x90807b32c4aa4610c57289de57fa68ba50ed53f14dd2c25f1862aa049029dcd6",
"sealFields": [
"0xa00b15fe0a9aa789c167b0f5ade7b72969d9f2193014cb4e98382254f60ffb2f4a",
"0x88a212d6400b89b3f6"
],
"sha3Uncles": "0xf763576c1ea6a8c61a206e16b1a2451bec5cba1c7545d7ff733a1e8c78715569",
"size": null,
"stateRoot": "0xebc7a1603bfffe0a14bdb89f898e2f2824abb40f04579beb7b920c56d6e273c9",
"timestamp": "0x5b54143f",
"totalDifficulty": "0x12ac10796e617adf1f3",
"transactions": [],
"transactionsRoot": "0x7562cba41e067b364b933e7b566fb2444f6954fef3964a5a487d4cd79d97a56c",
"uncles": []
},
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | object | Transaction receipt object. |
author | string | The address of the author of the block. |
difficulty | string | Integer of the difficulty for this block. |
extraData | string | The ‘extra data’ field of this block. |
gasLimit | string | The maximum gas allowed in this block. |
gasUsed | string | The total used gas by all transactions in this block. |
hash | string | Hash of the block. null when its pending block. |
logsBloom | string | The bloom filter for the logs of the block. null when its pending block. |
miner | string | Alias of ‘author’. |
mixHash | string | The mix hash. |
nonce | string | Hash of the generated proof-of-work. null when its pending block. Missing in case of PoA. |
number | string | The block number. null when its pending block. |
parentHash | string | Hash of the parent block. |
receiptsRoot | string | The root of the receipts trie of the block. |
sealFields | array | Array of seal fields. |
sha3Uncles | string | SHA3 of the uncles data in the block. |
size | string | Integer the size of this block in bytes. |
stateRoot | string | The root of the final state trie of the block. |
timestamp | string | The unix timestamp for when the block was collated. |
totalDifficulty | string | Integer of the total difficulty of the chain until this block. |
transactions | array | Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter. |
transactionsRoot | string | The root of the transaction trie of the block. |
uncles | array | Array of uncle hashes. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_getUncleByBlockNumberAndIndex
Returns information about a uncle of a block by number and uncle index position.
Note: An uncle doesn’t contain individual transactions.
Request Parameters
Sample Data
{
"block_parameter": "0x29c",
"uncle_index_position": "0x0"
}
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockNumberAndIndex","params": ["0x29c","0x0"],"id":1}'
eth_getUncleByBlockNumberAndIndex [block_parameter] [uncle_index_position]
Parameter | Type | Description |
---|---|---|
block_parameter | string | Integer block number, or the string 'latest', 'earliest' or 'pending'. |
uncle_index_position | string | Integer of the uncle index position. |
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": {
"author": "0x5bf5e9cf9b456d6591073513de7fd69a9bef04bc",
"difficulty": "0x57f117f5c",
"extraData": "0x476574682f76312e302e302f77696e646f77732f676f312e342e32",
"gasLimit": "0x1388",
"gasUsed": "0x0",
"hash": "0x932bdf904546a2287a2c9b2ede37925f698a7657484b172d4e5184f80bdd464d",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"miner": "0x5bf5e9cf9b456d6591073513de7fd69a9bef04bc",
"mixHash": "0x4500aa4ee2b3044a155252e35273770edeb2ab6f8cb19ca8e732771484462169",
"nonce": "0x24732773618192ac",
"number": "0x299",
"parentHash": "0xa779859b1ee558258b7008bbabff272280136c5dd3eb3ea3bfa8f6ae03bf91e5",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sealFields": [
"0xa04500aa4ee2b3044a155252e35273770edeb2ab6f8cb19ca8e732771484462169",
"0x8824732773618192ac"
],
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": null,
"stateRoot": "0x2604fbf5183f5360da249b51f1b9f1e0f315d2ff3ffa1a4143ff221ad9ca1fec",
"timestamp": "0x55ba4827",
"totalDifficulty": "0xc3601160946",
"transactions": [],
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
},
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | object | Transaction receipt object. |
author | string | The address of the author of the block. |
difficulty | string | Integer of the difficulty for this block. |
extraData | string | The ‘extra data’ field of this block. |
gasLimit | string | The maximum gas allowed in this block. |
gasUsed | string | The total used gas by all transactions in this block. |
hash | string | Hash of the block. null when its pending block. |
logsBloom | string | The bloom filter for the logs of the block. null when its pending block. |
miner | string | Alias of ‘author’. |
mixHash | string | The mix hash. |
nonce | string | Hash of the generated proof-of-work. null when its pending block. Missing in case of PoA. |
number | string | The block number. null when its pending block. |
parentHash | string | Hash of the parent block. |
receiptsRoot | string | The root of the receipts trie of the block. |
sealFields | array | Array of seal fields. |
sha3Uncles | string | SHA3 of the uncles data in the block. |
size | string | Integer the size of this block in bytes. |
stateRoot | string | The root of the final state trie of the block. |
timestamp | string | The unix timestamp for when the block was collated. |
totalDifficulty | string | Integer of the total difficulty of the chain until this block. |
transactions | array | Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter. |
transactionsRoot | string | The root of the transaction trie of the block. |
uncles | array | Array of uncle hashes. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_getUncleCountByBlockHash
Returns information about a uncle of a block by number and uncle index position.
Note: An uncle doesn’t contain individual transactions.
Request Parameters
Sample Data
{
"block_hash": "0x4faaf9dc3b7f58275d18d0d08a9c2aaf91c41102cfe915bbbd208506f1b85ebe"
}
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockHash","params": ["0x4faaf9dc3b7f58275d18d0d08a9c2aaf91c41102cfe915bbbd208506f1b85ebe"],"id":1}'
eth_getUncleByBlockNumberAndIndex [block_parameter] [uncle_index_position]
Parameter | Type | Description |
---|---|---|
block_hash | string | Hash of a block. |
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": "0x0",
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | object | Integer of the number of uncles in this block. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_getUncleCountByBlockNumber
Returns the number of uncles in a block from a block matching the given block number.
Request Parameters
Sample Data
{
"block_parameter": "latest"
}
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber","params": ["latest"],"id":1}'
eth_getUncleCountByBlockNumber [block_parameter]
Parameter | Type | Description |
---|---|---|
block_parameter | string | Integer block number, or the string 'latest', 'earliest' or 'pending'. |
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": "0x0",
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | object | Integer of the number of uncles in this block. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_getWork
Returns the hash of the current block, the seedHash, and the boundary condition to be met (“target”).
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_getWork","params": [],"id":1}'
eth_getWork
This call does not take parameters.
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": [
"string"
],
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | array | Array of current block header pow-hash, seed hash used for the DAG, boudary condition ("target") 2^256/difficulty and the current block number. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_hashrate
Returns the number of hashes per second that the node is mining with.
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_hashrate","params": [],"id":1}'
eth_hashrate
This call does not take parameters.
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": "0x0",
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | array | Number of hashes per second. |
id | int | ID number. |
Note: This call will only return 0x0 as the mining hash rate.
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_mining
Returns true
if client is actively mining new blocks.
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_mining","params": [],"id":1}'
eth_mining
This call does not take parameters.
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": false,
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | array | true if the client is mining, otherwise false |
id | int | ID number. |
Note: This call will only return false.
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_protocolVersion
Returns the current Ethereum protocol version.
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_protocolVersion","params": [],"id":1}'
eth_protocolVersion
This call does not take parameters.
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": "64",
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | array | The current Ethereum protocol version. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_sendRawTransaction
Submits a signed transaction to the Ethereum network.
Sample Data
{
"tx_data": "0xf86c8085098bca5a008307a1209437ede5f23cdcecfba18331126668ef705ea78489872386f26fc100008025a04058f161da3a3b028d2a0cbb98f3d22045f97a41150506cb9a52cbf0238622e8a077b6880c0d4c2c1c4ebe23c51d86954aebafaa766cd38806d299997f3face0dd"
}
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0xf86c8085098bca5a008307a1209437ede5f23cdcecfba18331126668ef705ea78489872386f26fc100008025a04058f161da3a3b028d2a0cbb98f3d22045f97a41150506cb9a52cbf0238622e8a077b6880c0d4c2c1c4ebe23c51d86954aebafaa766cd38806d299997f3face0dd"],"id":1}'
eth_sendRawTransaction [tx_data]
Parameter | Type | Description |
---|---|---|
tx_data | string | The signed transaction data |
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": "0xbb4e52e164889e0f9a7228792ab18ba866a32934f0f136e0e563fdfaaefd34dc",
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | array | The transaction hash, or the zero hash if the transaction is not yet available. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_submitWork
Used for submitting a proof-of-work solution.
Sample Data
{
"nonce": "0x0000000000000001",
"pow_hash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"mix_digest": "0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000"
}
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_submitWork","params": ["0x0000000000000001","0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef","0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000"],"id":1}'
eth_submitWork [nonce] [pow_hash] [mix_digest]
Parameter | Type | Description |
---|---|---|
nonce string | The nonce found (64 bits). | |
pow_hash | string | The header’s pow-hash (256 bits) |
mix_digest | string | The mix digest (256 bits). |
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": false,
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | array | true if the provided solution is valid, otherwise false . |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_syncing
Returns an object with data about the sync status or false
.
Request Parameters
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_syncing","params": [],"id":1}'
web3_clientVersion
This call does not take parameters.
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": false,
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | boolean | An object with sync status data or false, when not syncing. |
id | int | ID number. |
Filter Methods
Call | Description |
---|---|
eth_getFilterChanges | Polling method for a filter, which returns an array of logs which occurred since last poll. |
eth_getFilterLogs | Returns an array of all logs matching filter with given id. |
eth_newBlockFilter | Creates a filter in the node, to notify when a new block arrives. To check if the state has changed, call eth_getFilterChanges. |
eth_newFilter | Creates a filter object, based on filter options, to notify when the state changes (logs). To check if the state has changed, call eth_getFilterChanges. |
eth_newPendingTransactionFilter | Creates a filter in the node, to notify when new pending transactions arrive. To check if the state has changed, call eth_getFilterChanges. |
eth_uninstallFilter | Uninstalls a filter with given id. Should always be called when watch is no longer needed. Additonally Filters timeout when they aren’t requested with eth_getFilterChanges for a period of time. |
eth_getFilterChanges
Polling method for a filter, which returns an array of logs which occurred since last poll.
Request Parameters
Sample Data
{
"filter_id": "0x16"
}
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_getFilterChanges","params": ["0x16"],"id":1}'
eth_getFilterChanges [filter_id]
Parameter | Type | Description |
---|---|---|
filter_id | string | Filter ID. |
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": [
{
"logIndex": "0x1",
"blockNumber": "0x1b4",
"blockHash": "0x8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"transactionHash": "0xdf829c5a142f1fccd7d8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcf",
"transactionIndex": "0x0",
"address": "0x16c5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",
"topics": ["0x59ebeb90bc63057b6515673c3ecf9438e5058bca0f92585014eced636878c9a5"]
},
...
]
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | array | Array of log objects, or an empty array if nothing has changed since last poll. |
logIndex | string | Integer of the log index position in the block. Value is null when its pending. |
blockNumber | string | The block number. Value is null when its pending. |
blockHash | string | Hash of the block where this log was in. Value is null when its pending. |
transactionHash | string | Hash of the transactions this log was created fom. Value is null when its pending. |
transactionIndex | string | Integer of the transactions index position log was created from. Value is null when its pending. |
address | string | Address from which this log originated. |
data | string | Contains the non-indexed arguments of the log. |
topics | array | Array of indexed log arguments. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_getFilterLogs
Returns an array of all logs matching filter with given id.
Request Parameters
Sample Data
{
"filter_id": "0x16"
}
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_getFilterLogs","params": ["0x16"],"id":1}'
eth_getFilterLogs [filter_id]
Parameter | Type | Description |
---|---|---|
filter_id | string | Filter ID. |
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": [
{
"logIndex": "0x1",
"blockNumber": "0x1b4",
"blockHash": "0x8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"transactionHash": "0xdf829c5a142f1fccd7d8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcf",
"transactionIndex": "0x0",
"address": "0x16c5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",
"topics": ["0x59ebeb90bc63057b6515673c3ecf9438e5058bca0f92585014eced636878c9a5"]
},
...
]
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | array | Array of log objects, or an empty array if nothing has changed since last poll. |
logIndex | string | Integer of the log index position in the block. Value is null when its pending. |
blockNumber | string | The block number. Value is null when its pending. |
blockHash | string | Hash of the block where this log was in. Value is null when its pending. |
transactionHash | string | Hash of the transactions this log was created fom. Value is null when its pending. |
transactionIndex | string | Integer of the transactions index position log was created from. Value is null when its pending. |
address | string | Address from which this log originated. |
data | string | Contains the non-indexed arguments of the log. |
topics | array | Array of indexed log arguments. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_newBlockFilter
Creates a filter in the node, to notify when a new block arrives. To check if the state has changed, call eth_getFilterChanges.
Request Parameters
Sample Data
{
"filter_id": "0x16"
}
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_newBlockFilter","params": [],"id":1}'
eth_newBlockFilter
This call does not take parameters.
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": "0x1",
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | array | A filter id. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_newFilter
Creates a filter object, based on filter options, to notify when the state changes (logs). To check if the state has changed, call eth_getFilterChanges.
Request Parameters
Sample Data
{
"fromBlock": "0x1",
"toBlock": 0x2",
"address": "0x8888f1f195afa192cfee860698584c030f4c9db1",
"topics": "0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b"
}
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_newFilter","params": ["0x1","0x2","0x8888f1f195afa192cfee860698584c030f4c9db1","0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b"],"id":1}'
eth_newFilter [fromBlock] [toBlock] [address] [topics]
Parameter | Type | Description |
---|---|---|
fromBlock | string | Integer block number, or 'latest' for the last mined block or 'pending', 'earliest' for not yet mined transactions. |
toBlock | string | Integer block number, or 'latest' for the last mined block or 'pending', 'earliest' for not yet mined transactions. |
address | string | Contract address or a list of addresses from which logs should originate. |
topics | array | Topics are order-dependent. It’s possible to pass in null to match any topic, or a subarray of multiple topics of which one should be matching. |
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": "0x1",
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | array | The filter id. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_newPendingTransactionFilter
Creates a filter in the node, to notify when new pending transactions arrive. To check if the state has changed, call eth_getFilterChanges.
Request Parameters
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_newPendingTransactionFilter","params": [],"id":1}'
eth_newPendingTransactionFilter
This call does not take parameters.
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": "0x3",
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | array | A filter id. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_newFilter
Creates a filter object, based on filter options, to notify when the state changes (logs). To check if the state has changed, call eth_getFilterChanges.
Request Parameters
Sample Data
{
"fromBlock": "0x1",
"toBlock": 0x2",
"address": "0x8888f1f195afa192cfee860698584c030f4c9db1",
"topics": "0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b"
}
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_newFilter","params": ["0x1","0x2","0x8888f1f195afa192cfee860698584c030f4c9db1","0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b"],"id":1}'
eth_newFilter [fromBlock] [toBlock] [address] [topics]
Parameter | Type | Description |
---|---|---|
fromBlock | string | Integer block number, or 'latest' for the last mined block or 'pending', 'earliest' for not yet mined transactions. |
toBlock | string | Integer block number, or 'latest' for the last mined block or 'pending', 'earliest' for not yet mined transactions. |
address | string | Contract address or a list of addresses from which logs should originate. |
topics | array | Topics are order-dependent. It’s possible to pass in null to match any topic, or a subarray of multiple topics of which one should be matching. |
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": "0x1",
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | array | The filter id. |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
eth_uninstallFilter
Uninstalls a filter with given id. Should always be called when watch is no longer needed. Additonally filters timeout when they aren’t requested with eth_getFilterChanges for a period of time.
Request Parameters
Sample Request
curl https://<NODE-URL>/xrs/eth_passthrough/<PROJECT-ID> \
-X POST \
-H "Content-Type: application/json" \
-H "Api-Key: <API-KEY>" \
-d '{"jsonrpc":"2.0","method":"eth_newPendingTransactionFilter","params": [],"id":1}'
eth_uninstallFilter [filter_id]
Parameter | Type | Description |
---|---|---|
filter_id | string | Filter id. |
Responses
Sample Response
{
"jsonrpc": "2.0",
"result": true,
"id": 1
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
result | boolean | true if the filter was successfully uninstalled, otherwise false . |
id | int | ID number. |
ErrorResponse
{
"id": 0,
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error"
}
}
Parameter | Type | Description |
---|---|---|
jsonrpc | string | JSON RPC version. |
id | int | ID number. |
error | ParseError (object) or InvalidRequest (object) or MethodNotFound (object) or InvalidParams (object) or InternalError (object) or InvalidInput (object) or ResourceNotFound (object) or ResourceUnavailable (object) or TransactionRejected (object) or MethodNotSupported (object) or LimitExceeded (object) or Json-rpcVersionNotSupported (object) | JSON RPC Error |
Core API
The following set of calls are select, useful core API calls used to interact with the Blocknet blockchain.
Call | Description |
---|---|
getnetworkinfo | Returns network info |
servicenodelist | Returns a list of registered Service Nodes |
listproposals | Returns a list governance proposals |
getnetworkinfo
This call is used to retrieve an object containing various state info regarding P2P networking.
Request Parameters
Sample Request
blocknet-cli getnetworkinfo
getnetworkinfo
This call does not take parameters.
Response Parameters
Sample 200 Response
{
"version": 4000100,
"subversion": "/Blocknet:4.0.1/",
"protocolversion": 70713,
"xbridgeprotocolversion": 51,
"xrouterprotocolversion": 50,
"localservices": "000000000000040d",
"localrelay": true,
"timeoffset": -3,
"networkactive": true,
"connections": 12,
"networks": [
{
"name": "ipv4",
"limited": false,
"reachable": true,
"proxy": "",
"proxy_randomize_credentials": false
},
{
"name": "ipv6",
"limited": false,
"reachable": true,
"proxy": "",
"proxy_randomize_credentials": false
},
{
"name": "onion",
"limited": true,
"reachable": false,
"proxy": "",
"proxy_randomize_credentials": false
}
],
"relayfee": 0.00010000,
"incrementalfee": 0.00001000,
"localaddresses": [
],
"warnings": ""
}
Parameter | Type | Description |
---|---|---|
version | int | The wallet version (i.e. 4000100 = v4.0.1.) |
subversion | string | The wallet version string. |
protocolversion | int | The consensus protocol version. |
xbridgeprotocolversion | int | The XBridge protocol version. |
xrouterprotocolversion | int | The XRouter protocol version. |
connections | int | The number of peers your client has. |
warnings | string | Any network of blockchain workings. |
* Only a limited portion of the response is described
servicenodelist
This call is used to retrieve a list of all Service Nodes registered on the Blocknet network.
Request Parameters
Sample Request
blocknet-cli servicenodelist
servicenodelist
This call does not take parameters.
Response Parameters
Sample 200 Response
[
{
"snodekey": "0b38bfac90cc5c683b6a27f952b2346a1009fc0f9c1a0790809f185ab27b14ecc6",
"tier": "SPV",
"address": "BUVqkvqD7GCtHRHmchhXVuHqzm77cLuXs1",
"timelastseen": 1581082882,
"timelastseenstr": "2020-02-07T13:41:22.000Z",
"status": "offline",
"score": 0,
"services": [
"xr",
"xr::BLOCK",
"xr::BTC",
"xr::LTC"
]
},
{
"snodekey": "0d9f04d506df6a870b3d823ab209a281c95112c0c53afa1a222e051857822a9c95",
"tier": "SPV",
"address": "B1KELxido2Sqshd2pDvqr56VexPDRzSCi4",
"timelastseen": 1581087561,
"timelastseenstr": "2020-02-07T14:59:21.000Z",
"status": "running",
"score": 0,
"services": [
"xr",
"xr::BLOCK",
"xr::BTC",,
"xr::ETH",
"xr::LTC",
"xr::XST",
"xr::ZEN",,
"xrs::eth_accounts",
"xrs::eth_blockNumber",
"xrs::eth_call",
"xrs::eth_chainId",
"xrs::eth_estimateGas",
"xrs::eth_gasPrice",
"xrs::eth_getBalance",
"xrs::eth_getBlockByHash",
"xrs::eth_getBlockByNumber",
"xrs::eth_getBlockTransactionCountByHash",
"xrs::eth_getBlockTransactionCountByNumber",
"xrs::ltc_getbestblockhash",
"xrs::sc_consensus",
"xrs::sc_consensusblock",
"xrs::xmr_get_block_count",
"xrs::xmr_on_get_block_hash",
"xrs::xst_getbestblockhash",
"xrs::zen_getbestblockhash"
]
}
]
Parameter | Type | Description |
---|---|---|
Array | array | A list of information on all registered Service Nodes. |
Object | object | An object containing information on each respective Service Node. |
snodekey | string | The Service Node's pubkey. |
tier | string | The tier of this Service Node (currently only SPV is supported). |
address | string | The Service Node's BLOCK address. |
timelastseen | int | The Unix time the Service Node was last seen. |
timelastseenstr | string | The ISO 8601 datetime the Service Node was last seen. |
status | string | The status of the Service Node (running , offline ). |
score | array | The Service Node's local reputation score. |
services | string | An array of services the Service Node is supporting. |
listproposals
Sample Data
{
"sinceblock": 45000
}
This call is used to retrieves a list of proposals since the specified block. By default this returns proposals for the current and upcoming proposals.
Request Parameters
Sample Request
blocknet-cli listproposals 45000
listproposals [sinceblock](optional)
Parameter | Type | Description |
---|---|---|
sinceblock | int | (Optional Parameter) Defaults to 0 Specifies the block number of how far back to pull proposals from. A value of 0 will return the proposals for the current and upcoming Superblock. |
Response Parameters
Sample 200 Response
[
{
"hash": "06dfa870ac90cc5c683b6a2752b2346a10012c0c3afa1a9fc0f9c1b3d823a209",
"name": "sample-proposal-name",
"superblock": 1339200,
"amount": 1200,
"address": "Bc6Vqzdo2hdexPDRELxVuH2pDvqhiCtHRz",
"url": "https://google.com",
"description": "This is a sample proposal for an example.",
"votes_yes": 87,
"votes_no": 3,
"votes_abstain": 0,
"status": "passing"
}
]
Parameter | Type | Description |
---|---|---|
Array | array | A list of details on all returned proposals. |
Object | object | An object containing the details of each respective proposal. |
hash | string | The HEX string of the proposal hash. |
name | string | The name of the proposal. |
superblock | int | The Superblock the proposal has been submitted for. |
amount | int | The amount of BLOCK funding being requested by the proposal. |
address | string | The address that your propsal will be paid out to if it passes. |
url | string | The URL of your proposal description. |
description | string | A short description of the proposal. |
votes_yes | int | The number of yes votes. |
votes_no | int | The number of no votes. |
votes_abstain | int | The number of abstained votes. |
status | string | The current status of the proposal.passing : Active and passing. failing : Active and failing. passed : Finished and passed. failed : Finished and failed. pending : Active future proposal. |
Web Endpoints
The following set of calls can be used to access data via web endpoints.
Call | Description |
---|---|
ticker (1.0) | XBridge 24hr trade summary (static list) |
ticker (2.0) | XBridge 24hr trade summary (dynamic list) |
history | XBridge 24hr trade history |
status | XBridge asset availability |
dxgetnetworktokens | Returns online XBridge assets |
dxgetorders | Returns all network orders with details |
xrgetnetworkservices | Returns supported XRouter services |
ticker (1.0)
This call is used to view the XBridge trade summary for the past 24 hours and includes values of the inverse market. It is hard-coded to only include the following markets: BLOCK-LTC, LTC-BLOCK, LTC-SYS, SYS-LTC.
Use ticker (2.0) for a dynamic list that updates with whichever markets have had trades in the past 24 hours.
Endpoint
https://data.blocknet.co/api/v1.0/ticker
Response Parameters
Sample 200 Response
[
{
"symbol": "BLOCK-LTC",
"open": 0.022216,
"high": 0.022240,
"low": 0.019437,
"close": 0.019437,
"volume": 27.945614,
"lastprice": 0.019437,
"timestamp": 1564444800
},
{
"symbol": "LTC-BLOCK",
"open": 45.012306,
"high": 51.447171,
"low": 44.96224,
"close": 51.447171,
"volume": 0.586885,
"lastprice": 51.447171,
"timestamp": 1564444800
},
{
"symbol": "SYS-LTC",
"open": 0.022216,
"high": 0.022240,
"low": 0.019437,
"close": 0.019437,
"volume": 27.945614,
"lastprice": 0.019437,
"timestamp": 1564444800
},
{
"symbol": "LTC-SYS",
"open": 45.012306,
"high": 51.447171,
"low": 44.96224,
"close": 51.447171,
"volume": 0.586885,
"lastprice": 51.447171,
"timestamp": 1564444800
}
]
Parameter | Type | Description |
---|---|---|
symbol | string | The market in maker-taker format. Use the status call to view the associated blockchain name for each ticker and the availabiity status. |
open | int | Rolling 24hr opning trade price. |
high | int | Highest trade price in the past 24hrs. |
low | int | Lowest trade price in the past 24hrs. |
close | int | Rolling 24hr closing trade price. |
volume | int | Rolling 24hr trade volume denominated in the maker (first asset in the market pair). |
ticker (2.0)
This call is used to view a dynamic list of the XBridge trade summary for the past 24 hours and does not include values of the inverse market. Only markets that have had trades in the past 24 hours it will be included.
Endpoint
https://data.blocknet.co/api/v2.0/ticker
Response Parameters
Sample 200 Response
{
"BLOCK-LTC": {
"volume": "548.12435100",
"price": "44.72284723252284837351528359",
"open": "44.72284723252284837351528359",
"high": "55.86592178770949720670391061",
"low": "44.63642193485968680902170911",
"close": "44.93061261235648931280709984",
"timestamp": 1563219207
},
"LTC-BLOCK": {
"volume": "29.70000000",
"price": "0.022",
"open": "0.022",
"high": "0.022",
"low": "0.022",
"close": "0.022",
"timestamp": 1563176655
},
"BTC-BLOCK": {
"volume": "0.68000000",
"price": "0.00021",
"open": "0.00021",
"high": "0.00021",
"low": "0.0002",
"close": "0.0002",
"timestamp": 1563175709
}
}
Parameter | Type | Description |
---|---|---|
Object | object | The market in maker-taker format and associated data. Use the status call to view the associated blockchain name for each ticker and the availabiity status. |
volume | string | Rolling 24hr trade volume denominated in the maker (first asset in the market pair). |
price | string | The last trade price. |
open | string | Rolling 24hr opning trade price. |
high | string | Highest trade price in the past 24hrs. |
low | string | Lowest trade price in the past 24hrs. |
close | string | Rolling 24hr closing trade price. |
timestamp | int | The Unix epoch timestamp of when the last trade took place. |
history
This call is used to view the XBridge trade history for the past 24 hours.
Endpoint
https://data.blocknet.co/api/v2.0/history
Response Parameters
Sample 200 Response
[
{
"timestamp": 1559970139,
"txid": "4b409e5c5fb1986930cf7c19afec2c89ac2ad4fddc13c1d5479b66ddf4a8fefb",
"to": "Bqtms8j1zrE65kcpsEorE5JDzDaHidMtLG",
"xid": "9eb57bac331eab34f3daefd8364cdb2bb05259c407d805d0bd0c",
"from": "BLOCK",
"fromAmount": 0.001111,
"to": "SYS",
"toAmount": 0.001000
},
{
"timestamp": 1559970139,
"txid": "3de7479e8a88ebed986d3b7e7e135291d3fd10e4e6d4c6238663db42c5019286",
"to": "Bqtms8j1zrE65kcpsEorE5JDzDaHidMtLG",
"xid": "fd0fed3ee9fe557d5735768c9bdcd4ab2908165353e0f0cef0d5",
"from": "BLOCK",
"fromAmount": 0.001577,
"to": "SYS",
"toAmount": 0.001420
},
{
"timestamp": 1559970139,
"txid": "9cc4a0dae46f2f1849b3ab6f93ea1c59aeaf0e95662d90398814113f12127eae",
"to": "BbrQKtutGBLuWHvq26EmHKuNaztnfBFWVB",
"xid": "f74c614489bd77efe545c239d1f9a57363c5428e7401b2018d350",
"from": "BLOCK",
"fromAmount": 0.000231,
"to": "SYS",
"toAmount": 0.001100
}
]
[{
"timestamp":1564516002,
"txid":"9f9592e4e5954645e8093c51e63cee73832b000e47dac45d8580deea3ebff8ef",
"to":"BLOCK",
"xid":"ca2c928552682d762d54b3cb124f9b663a7752faae11d13a",
"from":"LTC",
"fromAmount":"0.07393600",
"toAmount":"3.80379800"
},{"timestamp":1564515003,"txid":"fe7dac3f28ea7873aebc210ebb2fe77e60c8cd75204e2b37fb3ef0dac4a6213b","to":"BLOCK","xid":"6b169c7d40459411709a04405d3cd00d039ca78961536d57","from":"LTC","fromAmount":"0.07506700","toAmount":"3.85911500"},{"timestamp":1564513052,"txid":"edeffa602035e0f812f949206a2a9002fe1ebec9fb07148196db8b2fc082e6f1","to":"BLOCK","xid":"42e9a34f6334d58ca7aec96634ec80c902286a2088bfaf08","from":"LTC","fromAmount":"0.09047400","toAmount":"4.65205600"},{"timestamp":1564464003,"txid":"e4fd6f48dcf5fdc9af90f5237b496186a37af063a1fb07bab4a67db8e9763a0d","to":"BLOCK","xid":"27b3d828bae0c1cb9ee5cef8c6ff6609ada121d0f3676b0","from":"LTC","fromAmount":"0.13961800","toAmount":"6.27753800"},{"timestamp":1564463888,"txid":"317b70d0e54b25ed635cdc76fd85a3fc21b088bc0b4764246aefd68d7c812c29","to":"BLOCK","xid":"c822bca709ee64572a4888eda1419ac06cb5e9a016753f7","from":"LTC","fromAmount":"0.20779000","toAmount":"9.35310700"}]
Parameter | Type | Description |
---|---|---|
timestamp | int | Unix epoch timestamp of when the trade took place. |
txid | string | Blocknet trade fee transaction ID. |
to | string | Service Node that received the trade fee. |
xid | string | XBridge transaction ID. |
from | string | Taker trading asset; the ticker of the asset being sold by the taker. |
fromAmount | int | Taker trading size. |
to | string | Maker trading asset; the ticker of the asset being sold by the maker. |
toAmount | int | Maker trading size. |
status
This call is used to view XBridge asset availability for trading and associated blockchain name for each ticker. It is hard-coded to only include assets for the markets returned in ticker (1.0).
To view a full list of supported assets for trading, use dxgetnetworktokens.
Endpoint
https://data.blocknet.co/api/v2.0/status
Response Parameters
Sample 200 Response
{
"BLOCK": {
"id":1,
"name": "Blocknet",
"frozen":0
},
"LTC": {
"id":2,
"name": "Litecoin",
"frozen":0
},
"SYS": {
"id":3,
"name": "Syscoin",
"frozen":0
}
}
Parameter | Type | Description |
---|---|---|
Object | object | An object with the ticker's blockchain name, ID, and availability status. |
id | int | The asset's ID number. |
name | string | The asset's blockchain name. |
frozen | bool | Online status. If 0 , the asset is online. If 1 , the asset is offline. Both assets of a market pair must show 0 for the market to be available for trading. |
dxgetnetworktokens (web)
This call is used to retrieve all the assets currently supported by the network for XBridge. This list may differ from the compatibility list due to assets being unofficially supported or assets not being supported by any nodes on the network.
Endpoint
https://data.blocknet.co/api/v2.0/dxgetnetworktokens
Response Parameters
Sample 200 Response
[
"LTC",
"SYS",
"MONA",
"BLOCK"
]
Parameter | Type | Description |
---|---|---|
Array | array | An array of all the assets supported by the network for trading. |
dxgetorders (web)
This call is used to retrieve all orders of every market pair. Unlike with dxGetOrders, it will return all orders on the network.
Endpoint
https://data.blocknet.co/api/v2.0/dxgetorders
Response Parameters
Sample 200 Response
[
{
"id": "91d0ea83edc79b9a2041c51d08037cff87c181efb311a095dfdd4edbcc7993a9",
"maker": "SYS",
"maker_size": "0.100",
"taker": "LTC",
"taker_size": "0.01",
"updated_at": "2018-01-15T18:25:05.12345Z",
"created_at": "2018-01-15T18:15:30.12345Z",
"status": "finished"
},
{
"id": "a1f40d53f75357eb914554359b207b7b745cf096dbcb028eb77b7b7e4043c6b4",
"maker": "SYS",
"maker_size": "0.100",
"taker": "LTC",
"taker_size": "0.01",
"updated_at": "2018-01-15T18:25:05.12345Z",
"created_at": "2018-01-15T18:15:30.12345Z",
"status": "finished"
},
{
"id": "6be548bc46a3dcc69b6d56529948f7e679dd96657f85f5870a017e005caa050a",
"maker": "SYS",
"maker_size": "0.100",
"taker": "LTC",
"taker_size": "0.01",
"updated_at": "2018-01-15T18:25:05.12345Z",
"created_at": "2018-01-15T18:15:30.12345Z",
"status": "finished"
}
]
Parameter | Type | Description |
---|---|---|
Array | array | An array of all orders with each order having the following parameters. |
id | string | The order ID. |
maker | string | Maker trading asset; the ticker of the asset being sold by the maker. |
maker_size | string(float) | Maker trading size. String is used to preserve precision. |
taker | string | Taker trading asset; the ticker of the asset being sold by the taker. |
taker_size | string(float) | Taker trading size. String is used to preserve precision. |
updated_at | string | ISO 8601 datetime, with microseconds, of the last time the order was updated. |
created_at | string | ISO 8601 datetime, with microseconds, of when the order was created. |
status | string | View order status codes |
xrgetnetworkservices (web)
This call is used to view the XRouter services currently supported on the network, along with the number of nodes supporting each service. XRouter SPV calls use the xr::
namespace and XCloud services use the xrs::
namespace.
Endpoint
https://data.blocknet.co/api/v2.0/xrgetnetworkservices
Response Parameters
Sample 200 Response
{
"reply": {
"spvwallets": [ "xr::BLOCK", "xr::BTC", "xr::LTC", "xr::MNP", "xr::SYS", "xr::TBLOCK" ],
"services": [ "xrs::BTCgetbestblockhash", "xrs::BTCgetblockhash", "xrs::BTCgettransaction", "xrs::SYSgetbestblockhash", "xrs::SYSgetblock", "xrs::SYSgetgovernanceinfo", "xrs::SYSgetmempool", "xrs::SYSlistoffers", "xrs::SYSofferinfo", "xrs::twilio" ],
"nodecounts": {
"xr::BLOCK": 27,
"xr::BTC": 13,
"xr::LTC": 21,
"xr::MNP": 1,
"xr::SYS": 9,
"xrs::BTCgetbestblockhash": 12,
"xrs::BTCgetblockhash": 12,
"xrs::BTCgettransaction": 5,
"xrs::SYSgetbestblockhash": 7,
"xrs::SYSgetblock": 6,
"xrs::SYSgetgovernanceinfo": 4,
"xrs::SYSgetmempool": 4,
"xrs::SYSlistoffers": 4,
"xrs::SYSofferinfo": 4,
"xrs::twilio": 1
}
},
"uuid": "cd408df7-0ff8-4e29-b5cf-0148af83f93a"
}
Parameter | Type | Description |
---|---|---|
reply | object | An object containing information on supported services. |
spvwallets | array | An array of supported SPV wallets, represented by the asset's ticker. |
services | array | An array of supported XCloud services. |
nodecounts | object | An object of supported SPV wallets and XCloud services with how many nodes support each. |
-- key | string | The SPV wallet or XCloud service with it's namespace. |
-- value | int | The amount of nodes supporting each respective service. |
uuid | string | The response ID, which can be used to view this response again with xrGetReply (not supported via web API). |
Changelog
This API documentation will be continuously updated to improve descriptions, instructions, and overall clarity on how to use the API and begin building on the Blocknet Protocol. An overview of changes can be viewed below. For a more detailed view of changes, see the site's Github repository.
To receive notifications and stay informed on important developer updates and changes relating to the Blocknet Protocol, subscribe to the developer notification emailing list.
Updates
14/01/2021 |
---|
• Minor typos and editing in intro and hydra section |
13/01/2021 |
---|
• Added Error Responses to Hydra API section |
• Fixed favicon |
• Removed hydra eth subscription |
10/01/2021 |
---|
• Added Hydra Introduction |
• Added Hydra Getting Started |
• Added Hydra API Docs |
5/11/2020 |
---|
• Wallet v4.2.x release |
• Added dxgetorders web endpoint |
• Added XRouter Service Explorer link |
• Added C++ library guide link |
• Added tls setting to xrouter.conf setup |
• Added dxnowallets and ShowAllOrders setting to the XBridge Setup |
• Update dxGetTradingData output |
4/20/2020 |
---|
• Wallet v4.1.x release |
• Added status to listproposals response details |
2/7/2020 |
---|
• Wallet v4.0.x release |
• Added dxFlushCancelledOrders call |
• Added dxGetTradingData call |
• Removed gettradingdata call, in progress towards being deprecated |
• Update blocknetdx.conf references to blocknet.conf |
• Update blocknetdx-cli references to blocknet-cli |
• Remove xrUpdateConfigs command, replaced by servicenodesendping |
• Remove xrouter=1 from XRouter setup |
• Added selective Core API calls |
11/26/2019 |
---|
• Wallet v3.14.1 release |
• Added dxGetNewTokenAddress call |
• Updated XBridge Setup to note that Segwit/Bech32 address and p2pk inputs are not yet compatible |
• Updated dxMakeOrder and dxTakeOrder to note usage of funds are not restricted to the speficied address |
• Corrected xrGetBlocks and xrGetTransactions to include quotes in the string array |
• Updated XBridge order IDs in examples to be representative of real IDs |
8/2/2019 |
---|
• Updated the xrConnect output to include the added fetchlimit and timeout settings with the returned configs |
• Updated the ticker (1.0) call output to include lastprice and timestamp |
• Added clarification ticker (1.0) description on inverse market data inclusion |
7/12/2019 |
---|
• Updated XBridge Setup to reference the guide in the documentation portal |
• Added ticker (2.0) call |
7/5/2019 |
---|
• Added gettradingdata call |
• Added Web API section and calls |
5/9/2019 |
---|
• Updated Github links from /BlocknetDX to /blocknetdx |
• Updated Blocknet repo links from /BlockDX to /blocknet |
4/18/2019 |
---|
• Updated XRouter setup instructions |
• Updated XBridge setup instructions |
• Added XCloud setup instructions |
• Updated XBridge API descriptions |
• Updated XRouter API for beta release |
• Added XCloud API for beta release |
• Updated XBridge confirmations info for clarifications |
• Updated XRouter intro to include node scoring information |
• Added XCloud introduction |
3/5/2019 |
---|
• Update links to Github to reflect change in repository names |
• Updated link to compatible blockchains |
• Updated XRouter [confirmations] to [node_count] |
• Updated XRouter [block] to [block_number] |
• Updated language from token to asset |
12/7/2018 |
---|
• Updated Introduction Service Node description |
• Updated 'coin' verbiage to 'token' |
• Updated description of how XBridge orderbooks are decentralized |
• Updated order statuses for dxMakeOrder, dxCancelOrder, dxGetOrder, dxGetOrders, dxGetMyOrders to remove signed , include initiated , and improve hold description |
• Updated XBridge Error Codes |
• Updated sample 400 response for dxGetOrders, dxGetMyOrders, dxGetOrderFills, dxGetOrderHistory |
• Updated dxTakeOrder, dxGetOrders, dxGetMyOrders, and dxGetOrderBook description for improved clarity |
• Updated dxGetOrderFills sample response to not include maker_txid , taker_txid , and block_id |
• Updated dxGetOrderHistory parameters and removed 'not yet supported' comment |
• Updated dxGetNetworkTokens to remove 'not yet supported' comment |
• Updated dxGetTokenBalances description to clarify it returns available balances |
• Updated dxGetOrderBook max_orders description and sample responses with better examples |
• Consolidated order status codes to a single location |
• Updated Status Codes to include rolled back and rollback failed |
• Added dxLoadXBridgeConf call |
• Added historic versioning, which can be viewed next to each changelog date |
• Corrected XRouter confirmations data type from 'string' to 'int' |
8/31/2018 |
---|
• Updated XBridge design details and diagrams to reflect fee switch from maker to taker |
• Updated mentions of XBridge from 0.005 BLOCK to 0.015 BLOCK |
• Added reference for atomic swap type in XBridge introduction |
8/21/2018 |
---|
• Added information on the design of XBridge and XRouter |
• Added hyperlink to site branding leading to the site root |
8/10/2018 |
---|
• Added additonal information on the Blocknet Protocol, XBridge, and XRouter |
• Added information on configuration and setup needed to use the API |
• Moved Error Codes to under the XBridge API category |
• Updated the xrGetBalanceUpdate description for better clarity |
• Updated xrGetBalance, dxGetOrderHistory, and dxGetNetworkTokens descriptions to reflect the level of support |
• Updated XBridge order statuses and added explanations |
• Added a changelog |
• Added developer newsletter link in changelog and sidebar |
• Updated sidebar links |
• Updated design |
8/3/2018 |
---|
• Added documentation for XRouter CLI API calls |
6/4/2018 |
---|
• API documentation went live |
• Includes documentation for XBridge CLI API calls |