Skip to Content
API ReferenceREST APIGET /timestamp

GET /timestamp

Returns the current server timestamp. Used for signing actions that require a current_timestamp field.

Request

curl https://zo-mainnet.n1.xyz/timestamp

Response

Returns a plain integer timestamp (Unix seconds):

1705312800

Usage

The server timestamp should be used when constructing actions to ensure they are accepted. Using a local timestamp may cause actions to be rejected if clocks are out of sync.

Example: Python

import requests def get_server_timestamp(): response = requests.get("https://zo-mainnet.n1.xyz/timestamp") return int(response.json()) server_time = get_server_timestamp() print(f"Server time: {server_time}")

Example: cURL + jq

# Get timestamp as integer curl -s https://zo-mainnet.n1.xyz/timestamp | jq '.'

Notes

  • Always fetch a fresh timestamp before constructing trading actions
  • The timestamp is in Unix seconds (not milliseconds)
  • Actions with timestamps too far in the past or future will be rejected
Last updated on