Files
xrpl-dev-portal/content/rippled-api-methods/ping.md
2018-01-22 16:27:33 -08:00

1.2 KiB

ping

[Source]

The ping command returns an acknowledgement, so that clients can test the connection status and latency.

Request Format

An example of the request format:

WebSocket

{
    "id": 1,
    "command": "ping"
}

JSON-RPC

{
    "method": "ping",
    "params": [
        {}
    ]
}

Commandline

#Syntax: ping
rippled ping

Try it! >

The request includes no parameters.

Response Format

An example of a successful response:

WebSocket

{
    "id": 1,
    "result": {},
    "status": "success",
    "type": "response"
}

JSON-RPC

200 OK
{
    "result": {
        "status": "success"
    }
}

The response follows the standard format, with a successful result containing no fields. The client can measure the round-trip time from request to response as latency.

Possible Errors