Skip to content

ping

ping asks the server for its current time. Send your own timestamp with it to measure round-trip latency and clock offset.

{
"cmd": "ping",
"sent_at": 1788940000.25
}
Field Type Required Description
sent_at number No Your clock when you sent the request, in Unix seconds. Fractions are allowed.

With a positive sent_at, the server echoes it and adds its own timestamps:

{
"cmd": "ping",
"sent_at": 1788940000.25,
"server_received_at": 1788940000.31,
"server_sent_at": 1788940000.31
}

Without sent_at, or when it is zero, negative, or not a number, you get the server clock only:

{
"cmd": "ping",
"server_time": 1788940000.31
}

All times are Unix seconds. See time and latency for how to turn them into a latency and offset.

You must be logged in.

None besides the generic authentication errors.