Ankr JSON-RPC Endpoint

Obtaining the Ankr endpoint for XRP and making a simple request

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 Endpoint URL will have the following format:

http://<your_app_id>.ankr.com

Example (as shown in the image above):

http://app-7a0220ae-534a-49ae-b775-c32419844ed4.cls-a91a7dbc-1a23-42f6-a66f-876094349f03.ankr.com

JSON-RPC request example

//request
curl -H 'Content-Type: application/json' -d '{"method":"ledger","params":[{"ledger_index":"validated","full":false,"accounts":false,"transactions":false,"expand":false,"owner_funds":false}]}' http://app-7a0220ae-534a-49ae-b775-c32419844ed4.cls-a91a7dbc-1a23-42f6-a66f-876094349f03.ankr.com
//response
{
"id": 14,
"result": {
"ledger": {
"accepted": true,
"account_hash": "B846F879194B15662F05BD3417649F7C591FF7ED7B1A8501EEADBE8049BCB144",
"close_flags": 0,
"close_time": 661326362,
"close_time_human": "2020-Dec-15 05:46:02.000000000 UTC",
"close_time_resolution": 10,
"closed": true,
"hash": "60326089BEF7532141DC2C758499137F11B944574486A3E8C403E1EE58FB3001",
"ledger_hash": "60326089BEF7532141DC2C758499137F11B944574486A3E8C403E1EE58FB3001",
"ledger_index": "60228342",
"parent_close_time": 661326361,
"parent_hash": "B5F58022065967595CADC25EC850811F5555A13DB4B8E8CFD14A681F4F10179C",
"seqNum": "60228342",
"totalCoins": "99990816548838096",
"total_coins": "99990816548838096",
"transaction_hash": "4B9CCB63A41BDFD00266319F3B2ADB2A7994E78A6C1688F1E23E9185CD7E97CE"
},
"ledger_hash": "60326089BEF7532141DC2C758499137F11B944574486A3E8C403E1EE58FB3001",
"ledger_index": 60228342,
"validated": true
},
"status": "success",
"type": "response"
}

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