time: Get server time

API: okx.com:okx-api
Endpoint: /public/time
Response format: application/json
Auth: unknown
Method: GET
Last Status: 200
Latency: 321ms

Description

Returns the current server timestamp. Use this to synchronize your local clock with the exchange server time, which is required for API authentication (timestamp must be within 30 seconds of server time).

From spec: Retrieve the current server time in milliseconds.

Usage Tips

- No parameters required - Returns Unix timestamp in milliseconds - Use to calculate time drift between your system and OKX servers - Critical for authenticated endpoints that require timestamp headers

Examples (1)

Get server time probe-gate

Demonstrates fetching the current server timestamp, essential for time synchronization and API authentication.

curl 'https://www.okx.com/api/v5/public/time'
import requests

resp = requests.get("https://www.okx.com/api/v5/public/time")
data = resp.json()
import zingu_apis

api = zingu_apis.api("okx")
result = api.fetch("public/time")

for item in result:
    print(item)
const resp = await fetch("https://www.okx.com/api/v5/public/time");
const data = await resp.json();

Probe History

Latency

Status Codes

TimeStatusLatencySize
2026-04-16 03:35:45.550013 200 321ms
2026-04-15 03:54:12.628607 200 457ms
2026-04-14 01:42:13.794574 200 318ms
2026-04-12 15:56:32.418752 200 371ms
2026-04-10 04:28:16.137607 200 264ms
2026-04-09 02:14:19.561523 200 277ms