A
A
Ankr Docs
Search…
Ankr JSON-RPC Endpoint
This is a guide on how to obtain the Nuls Ankr End-Point and execute a simple request.

Obtain Ankr End-point

After successfully deploying an Ankr Full node, the End-point can be found on the application details, on the left side of the screen:
The RPC endpoint will have the following format:
http://<your-app-id>.ankr.com
Example (as shown in the image above):
https://app.ankr.com/apps/details/app-17f65f75-b04e-4eb7-b133-703394258d86

Simple Json-RPC Request

1
// Request:
2
curl -s -X POST -H 'Content-Type: application/json' --data '{"jsonrpc":"2.0","method":"getInfo","params":[1], "id":1234}' http://<your-app-id>.ankr.com
3
4
// Result:
5
6
{
7
"jsonrpc": "2.0",
8
"id": "1234",
9
"result": {
10
"networkHeight": 41493,
11
"isRunSmartContract": true,
12
"chainId": 1,
13
"agentAsset": {
14
"symbol": "NULS",
15
"chainId": 1,
16
"assetId": 1,
17
"decimals": 8
18
},
19
"localHeight": 41493,
20
"magicNumber": 20191222,
21
"defaultAsset": {
22
"symbol": "NULS",
23
"chainId": 1,
24
"assetId": 1,
25
"decimals": 8
26
},
27
"isRunCrossChain": true
28
}
29
}
30
Copied!
In the next sections, we will describe some of the RPC requests. Most of them can be found in the official documentation for NULS API Service or Public service API, both of which we currently support.
Last modified 1mo ago