Ankr JSON-RPC Endpoint

How to obtain the JSON-RPC Endpoint URL from your Ankr Node

Deploy a node and setup credentials

Before deploying a Bitcoin Full Node on Ankr you will be asked to provide a set of credentials which you will use later in order to successfully make RPC calls.

Please remember that all Bitcoin RPC requests made using the Endpoint URL provided from Ankr will require these credentials.

Get the Endpoint URL

After successfully deploying a node on Ankr you can get the endpoint from the Application details section as seen below:

The RPC Endpoint has the following format:

http://<your_app_id>.ankr.com

Example (as shown in the image above):

http://app-3ca28d07-1baa-4c3b-bf46-f2ccd91a43af.cls-dec3c32b-4f06-462f-b827-dee931d39a72.ankr.com

JSON-RPC request example

//request
curl -u user:password -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "getblockchaininfo","params": []}' app-beac30e3-a34b-467a-a510-ccde175a3a68.cls-593f3f46-316e-4f00-8ebd-9a45cfde390d.ankr.com
//response
{
"result":{
"chain":"main",
"blocks":1094028,
"headers":1301917,
"bestblockhash":"000000000000000f2ccffdff81c21e16ff845af479d58317899f451c750cb23c",
"difficulty":95232010.26899502,
"mediantime":1561621475,
"verificationprogress":0.6472761032918589,
"chainwork":"000000000000000000000000000000000000000000001743bedae37ee39def60",
"pruned":false,
"softforks":[
{
"id":"bip34",
"version":2,
"reject":{
"status":true
}
},
{
"id":"bip66",
"version":3,
"reject":{
"status":true
}
},
{
"id":"bip65",
"version":4,
"reject":{
"status":true
}
}
],
"bip9_softforks":{
"csv":{
"status":"active",
"startTime":1486252800,
"timeout":1517788800,
"since":622944
},
"dip0001":{
"status":"active",
"startTime":1508025600,
"timeout":1539561600,
"since":782208
},
"bip147":{
"status":"active",
"startTime":1524477600,
"timeout":1556013600,
"since":939456
},
"dip0003":{
"status":"active",
"startTime":1546300800,
"timeout":1577836800,
"since":1028160
},
"dip0008":{
"status":"active",
"startTime":1557878400,
"timeout":1589500800,
"since":1088640
}
}
},
"error":null,
"id":1
}

In the next section, you will find a detailed description of the provided Bitcoin API endpoints which can also be consulted in the Bitcoin Official Documentation.