Ankr JSON-RPC Enpoint

How to obtain the Elastos Ankr Endpoint and execute a simple request.

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 Endpoint URL will have 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 -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "getbestblockhash","params": []}' http://app-64ba85e4-8e9f-4567-9460-71d84ace977b.cls-dec3c32b-4f06-462f-b827-dee931d39a72.ankr.com
//response
{
"error":null,
"id":1,
"jsonrpc":"2.0",
"result":"a1316202adc6c0e9b0a0c1e2681a3c495c9574aff8004c97213e6b6329860af8"
}

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