Ankr JSON-RPC Endpoint

Obtaining the Ankr endpoint and making 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-d21064cf-f791-439d-b926-cad3af36b578.cls-dec3c32b-4f06-462f-b827-dee931d39a72.ankr.com

JSON-RPC request example

//request
curl -X GET "http://app-d21064cf-f791-439d-b926-cad3af36b578.cls-dec3c32b-4f06-462f-b827-dee931d39a72.ankr.com/node_info" -H "accept: application/json"
//response
{
"node_info":{
"protocol_version":{
"p2p":"7",
"block":"10",
"app":"0"
},
"id":"60fb09b8db271ce59876c1455098b74c7b4f67e5",
"listen_addr":"tcp://0.0.0.0:26656",
"network":"cosmoshub-3",
"version":"0.32.14",
"channels":"4020212223303800",
"moniker":"ankr",
"other":{
"tx_index":"on",
"rpc_address":"tcp://0.0.0.0:26657"
}
},
"application_version":{
"name":"gaia",
"server_name":"gaiad",
"client_name":"gaiacli",
"version":"2.0.14",
"commit":"86343f24f39dbc800922e5fb296b77b9d30ebaae",
"build_tags":"netgo ledger,",
"go":"go version go1.15.6 linux/amd64"
}
}

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