Ankr Json-RPC End-Point

How to obtain the Ankr End-Point and execute a simple request.

Choose the desired Full Node Implementation

When deploying a Qtum node from the Ankr Marketplace you will be able to choose between two Full Node Implementations as shown below.

Get the Endpoint URL

After successfully deploying an endpoint for Ankr you can get the endpoint from the Application details section as seen below:

The RPC endpoint will have the following format:

QTUM RPC API:

http://<your-app-id>.ankr.com

Example (as shown in the image above):

http://app-70d6db24-05e1-4d3c-b567-d80e3f72a3ff.cls-dec3c32b-4f06-462f-b827-dee931d39a72.ankr.com

QTUM-INFO API:

http://<your-app-id>.ankr.com/qtuminfo

Example (as shown in the image above):

http://app-70d6db24-05e1-4d3c-b567-d80e3f72a3ff.cls-dec3c32b-4f06-462f-b827-dee931d39a72.ankr.com/qtuminfo

Simple Json-RPC Request

Qtum RPC API requires basic authentication. Secure the RPC API by specifying the username and password.

// Request
curl --user test-user:test-password --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnetworkinfo", "params": [] }' http://<your-app-id>.ankr.com
// Result
{
"result": {
"version": 190100,
"subversion": "/Satoshi:0.19.1/",
"protocolversion": 70018,
"localservices": "0000000000000409",
"localservicesnames": [
"NETWORK",
"WITNESS",
"NETWORK_LIMITED"
],
"localrelay": true,
"timeoffset": 0,
"networkactive": true,
"connections": 11,
"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.004,
"incrementalfee": 0.0001,
"localaddresses": [],
"warnings": ""
},
"error": null,
"id": "curltest"
}

Simple Qtum-Info Request

// Request
curl http://<your-app-id>.ankr.com/qtuminfo/info
// Result
{
"height":685375,
"supply":102721500,
"circulatingSupply":96971500,
"netStakeWeight":1269540701531097,
"feeRate":0.00507843,
"dgpInfo":{
"maxBlockSize":2000000,
"minGasPrice":40,
"blockGasLimit":40000000
}
}

In the next sections, we will describe some of the RPC / REST requests. Most of them can be found in the Official Documentation.