ping - XRPL

Example code for the ping JSON RPC method. Complete guide to using ping JSON-RPC in the GetBlock Web3 documentation.

This method returns an acknowledgement, so that clients can test the connection status and latency.

Parameters

  • None

Request Example

curl
curl --location --request POST 'https://xrp.getblock.io/mainnet/' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "ping",
    "params": [{}],
    "id": "getblock.io"
}'

Response Example

{
    "result": {
        "status": "success"
    }
}

Response Parameters

Parameter
Type
Description

status

string

Connection status

Use Cases

  • Test connectivity

  • Measure latency

  • Health checks

Error Handling

Error Code
Description

noNetwork

Not connected

SDK Integration

Last updated

Was this helpful?