Skip to content

API reference

The complete integration contract for open platform v1. Every endpoint follows the conventions on this page, and future business endpoints will be mounted under /api/v1 the same way.

Endpoint Auth Purpose
GET /api/v1/health None Confirm the service is reachable.
GET /api/v1/me Required Inspect the account and key behind the credential.
GET /api/v1/strategies Required List publicly visible trading signals. Details
GET /api/v1/lives Required List publicly visible livestreams. Details
  • Base URL: https://ohmy.xin/api/v1 — the “Quick Integration Guide” section at the bottom of the Developer API page shows the base URL of the environment you are on.
  • Production is served over HTTPS only.
  • Paths carry a version prefix (/v1); if a breaking change ever becomes necessary it ships under a new prefix, with the old version retired on notice.

Everything except the health check requires a Bearer key in the request header:

Authorization: Bearer omx_live_<8-char-id>_<32-char-secret>
  • Keys are generated on an account’s page in the Developer API area and look like omx_live_xxxxxxxx_yyyyyyyy….
  • The platform stores only a one-way digest; no page, response, or log ever shows the full secret again.
  • Once a key is disabled or revoked — or its account is disabled or frozen — the very next request returns 401.

Successes return data, failures return error; both carry meta.request_id:

{
"data": { "...": "..." },
"meta": {
"request_id": "9f4f2d1e-7c3b-4c68-9f9f-0a1b2c3d4e5f"
}
}
{
"error": {
"code": "unauthorized",
"message": "Invalid or inactive API credentials."
},
"meta": {
"request_id": "9f4f2d1e-7c3b-4c68-9f9f-0a1b2c3d4e5f"
}
}

meta.request_id is the unique tracking ID of the request and also appears in the X-Request-Id response header; include it when contacting the platform about a problem.

Header When Meaning
X-Request-Id Every response Same value as meta.request_id
X-RateLimit-Limit After auth The account’s per-minute request ceiling
X-RateLimit-Remaining After auth and on 429 Requests left in the current window (0 when throttled)
X-RateLimit-Reset After auth and on 429 Unix epoch seconds when the window resets
Retry-After On 429 Suggested wait in seconds
  • Every API account defaults to 60 requests per minute; the platform may raise or lower individual accounts — the Developer API page always shows the value in effect.
  • The budget belongs to the account: all keys under one account share it.
  • On top of that, a fallback bucket counts per source IP (default 300 per minute) across all /api/ traffic from one IP, valid credentials or not.
  • When throttled you get 429 plus Retry-After — wait as advised instead of retrying concurrently. A 429 from the IP-level bucket carries no X-RateLimit-* headers, says “Too many requests. Please retry later.”, and leaves no call-log record.
HTTP status error.code Meaning
400 invalid_parameter A query parameter is invalid. error.details lists each offending parameter as { "param": "...", "reason": "..." }.
401 unauthorized Credentials missing or malformed, key disabled/revoked, or its account disabled/frozen (one shared message by design — no specifics).
404 not_found Unknown endpoint path.
429 rate_limit_exceeded Rate limit exceeded.
503 service_unavailable The open API is temporarily switched off platform-wide.
500 internal_error Unexpected server error — include meta.request_id when contacting the platform.
GET /api/v1/health

No authentication; confirms the service is reachable:

{
"data": {
"status": "ok",
"version": "v1",
"timestamp": "2026-11-15T22:15:00+08:00"
},
"meta": {
"request_id": "9f4f2d1e-7c3b-4c68-9f9f-0a1b2c3d4e5f"
}
}
GET /api/v1/me

Authentication required; returns the account and key behind the credential:

{
"data": {
"account": {
"number": "8392014",
"name": "Production Integration",
"state": "active",
"rate_limit_per_minute": 60
},
"key": {
"name": "Primary Key",
"masked_token": "omx_live_a1b2c3d4••••••••x9y0",
"state": "active",
"last_used_at": "2026-11-15T22:14:12+08:00"
}
},
"meta": {
"request_id": "9f4f2d1e-7c3b-4c68-9f9f-0a1b2c3d4e5f"
}
}

account.state is one of active, disabled, frozen; key.state is one of active, disabled, revoked.

Any unregistered /api/* path returns the shared 404 envelope instead of an internal error page:

{
"error": {
"code": "not_found",
"message": "API endpoint not found."
},
"meta": {
"request_id": "9f4f2d1e-7c3b-4c68-9f9f-0a1b2c3d4e5f"
}
}

Endpoints that return a list share one contract, so an integration written against one works against the next.

Parameter Type Default Description
limit integer 20 Items per page, between 1 and 100.
cursor string — The meta.pagination.next_cursor from the previous page. Opaque — send it back verbatim.
sort string Endpoint-specific The endpoint’s own documented sort options; the cursor is bound to the sort used.
circle_number string — Restrict results to one circle (up to 32 characters).
state string Endpoint-specific Comma-separated list of the endpoint’s own allowed states.
updated_after ISO 8601 timestamp — Lower bound on updated_at (inclusive).

Endpoints may add their own filters on top of these — symbol, side, published_after, and published_before on strategies; scheduled_after and scheduled_before on lives.

Every collection response carries the same meta.pagination block:

{
"meta": {
"pagination": {
"limit": 20,
"has_more": true,
"next_cursor": "eyJzIjoi..."
},
"request_id": "9f4f2d1e-7c3b-4c68-9f9f-0a1b2c3d4e5f"
}
}
Field Type Nullable Description
limit integer No The page size actually applied.
has_more boolean No Whether another page exists.
next_cursor string Yes Cursor for the next page; null when has_more is false.

To fetch the next page, pass next_cursor back as cursor and keep every other parameter unchanged. Changing sort between pages invalidates the cursor and returns 400.