GET /v1/ping

$0.001realtimetier: utilitycache 1sCore

Returns ok with the server time and whether this call was paid. Use it to verify your x402 client end to end before spending on data endpoints.

Parameters

None.

Example

curl "https://x402-factory.com/v1/ping"

No parameters. Returns paid=false when PAYMENT_MODE=disabled.

Example response

{
  "data": {
    "ok": true,
    "paid": false,
    "server_time": "2026-08-18T22:54:15.966Z"
  },
  "meta": {
    "endpoint": "/v1/ping",
    "version": "1.0.0",
    "generated_at": "2026-08-18T22:54:15.967Z",
    "freshness": "realtime",
    "sources": [],
    "request_id": "req_00000000",
    "docs": "https://x402-factory.com/docs/core.ping",
    "data_mode": "fixture"
  }
}

Response schema (data payload)

{
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean",
      "const": true
    },
    "paid": {
      "type": "boolean"
    },
    "server_time": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
    }
  },
  "required": [
    "ok",
    "paid",
    "server_time"
  ],
  "additionalProperties": false
}

The platform wraps every payload in an envelope: { "data": …, "meta": { endpoint, version, generated_at, freshness, sources, request_id, docs, data_mode } }.

Payment (x402)

Unpaid requests receive 402 with payment requirements (accepts). Pay $0.001 in USDC on Base per call via an X-PAYMENT header — see docs.x402.org. With PAYMENT_MODE=disabled (local dev) the endpoint is open.

Errors

StatusCodeMeaning
400INVALID_PARAMSInput failed validation; message lists the offending fields.
404NOT_FOUNDNo matching resource; suggestion may point to a sibling endpoint.
410RESOLVEDMarket/event settled; body includes a resolution summary.
503STALE_DATAUpstream feed down; stale data is never silently served beyond 2× cache TTL.
500INTERNALOur bug. The request_id helps us find it.