Strategies list
GET /api/v1/strategies returns the publicly visible trading signals on the platform. You get the content of the signal card itself — symbol, side, entry price, target price, stop price, take-profit ladder — plus the display details of the owning circle and the publisher.
Contract at a glance
Section titled “Contract at a glance”| Item | Value |
|---|---|
| Method and path | GET /api/v1/strategies |
| Full URL | https://ohmy.xin/api/v1/strategies |
| Authentication | Bearer key required |
| Request body | None |
| Response | data is an array of strategy objects, meta.pagination carries the page info |
| Pagination | Cursor based, 20 items per page by default, 100 maximum |
| Visibility | Only signals visible to public visitors are returned |
Request
Section titled “Request”GET /api/v1/strategies HTTP/1.1Host: ohmy.xinAuthorization: Bearer omx_live_xxxxxxxx_yyyyyyyy...Accept: application/jsonAuthentication, rate limiting, and the error envelope follow the shared API conventions; this page covers only what is specific to the endpoint.
Query parameters
Section titled “Query parameters”Every parameter is optional. Calling the endpoint with no parameters returns the first page in the default sort order.
| Parameter | Type | Default | Description |
|---|---|---|---|
limit |
integer | 20 |
Items per page, between 1 and 100. Out-of-range values return 400. |
cursor |
string | — | The meta.pagination.next_cursor from the previous page. An opaque string — send it back verbatim. |
sort |
string | published_at:desc |
Sort order: published_at:desc (newest first by publish time) or updated_at:desc (newest first by update time). |
circle_number |
string | — | Filter by circle, using the circle’s number (up to 32 characters). |
symbol |
string | — | Filter by trading symbol, case-insensitive (up to 32 characters) — BTC and btc are equivalent. |
side |
string | — | Filter by direction: long or short. |
state |
string | running,take_profit,stop_loss |
Filter by state, comma-separated. Allowed values: running, take_profit, stop_loss. |
published_after |
ISO 8601 timestamp | — | Lower bound on published_at (inclusive). |
published_before |
ISO 8601 timestamp | — | Upper bound on published_at (inclusive). |
updated_after |
ISO 8601 timestamp | — | Lower bound on updated_at (inclusive). |
Example request
Section titled “Example request”curl -s "https://ohmy.xin/api/v1/strategies?limit=2&symbol=BTC&side=long&state=running" \ -H "Authorization: Bearer omx_live_xxxxxxxx_yyyyyyyy..."Response
Section titled “Response”data[] fields
Section titled “data[] fields”data is an array; each element describes one strategy.
| Field | Type | Nullable | Description |
|---|---|---|---|
id |
integer | No | The signal’s record ID — useful for long-term de-duplication and idempotent handling. |
symbol |
string | No | Trading symbol, returned exactly as the author entered it — the platform does not normalize its case. Match it case-insensitively. |
side |
string | No | Direction: long or short. |
state |
string | No | State: running, take_profit, or stop_loss. |
entry_price |
string | No | Entry price. |
target_price |
string | No | Target price. |
stop_price |
string | No | Stop-loss price. |
exit_price |
string | Yes | Actual exit price; null while the signal is still open. |
target_stages |
array | No | The take-profit ladder — one entry per level with its target price and whether it was reached. |
note |
string | Yes | Note attached by the publisher; null when there is none. |
source_name |
string | Yes | Display name of the signal source; null when there is none. |
external_url |
string | Yes | Link to the original signal; null when there is none. |
published_at |
ISO 8601 timestamp | No | Publish time. |
closed_at |
ISO 8601 timestamp | Yes | Close time; null while the signal is still running. |
updated_at |
ISO 8601 timestamp | No | Last update time. |
circle |
object | No | The circle that owns the signal. |
author |
object | Yes | The member who published it; null when unavailable. |
Every price field is a string, not a number — trailing zeros are stripped (65000.00 comes back as "65000"). Convert before doing arithmetic to avoid floating-point drift.
target_stages[] fields
Section titled “target_stages[] fields”| Field | Type | Nullable | Description |
|---|---|---|---|
level |
integer | No | Position in the ladder, counting from 1. |
price |
string | No | Target price for this level. |
reached_at |
ISO 8601 timestamp | Yes | When the level was reached; null when it has not been. |
reached_price |
string | Yes | The actual price when the level was reached; null when it has not been. |
circle fields
Section titled “circle fields”| Field | Type | Nullable | Description |
|---|---|---|---|
number |
string | No | Circle number — feed it straight into the circle_number filter. |
name |
string | No | Circle name. |
url |
string | No | Circle home page, in the strategy channel view. |
avatar_url |
string | Yes | Circle avatar URL. |
author fields
Section titled “author fields”| Field | Type | Nullable | Description |
|---|---|---|---|
name |
string | No | Display name of the publisher. |
avatar_url |
string | Yes | Avatar URL of the publisher. |
meta.pagination fields
Section titled “meta.pagination fields”| 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. |
Example response
Section titled “Example response”{ "data": [ { "id": 4821, "symbol": "BTC", "side": "long", "state": "running", "entry_price": "65000", "target_price": "70000", "stop_price": "62000", "exit_price": null, "target_stages": [ { "level": 1, "price": "67000", "reached_at": "2024-01-15T04:00:00+08:00", "reached_price": "67050.5" }, { "level": 2, "price": "68500", "reached_at": null, "reached_price": null } ], "note": "Daily breakout; hold while the retest holds.", "source_name": "BTC Trend Tracker", "external_url": "https://example.com/signals/btc-4821", "published_at": "2024-01-15T10:00:00+08:00", "closed_at": null, "updated_at": "2024-01-16T09:30:00+08:00", "circle": { "number": "7000101526", "name": "Crypto Lab", "url": "https://ohmy.xin/circles/7000101526?channel=strategy", "avatar_url": "https://cdn.ohmy.xin/circles/7000101526/avatar.webp" }, "author": { "name": "Alice", "avatar_url": "https://cdn.ohmy.xin/users/a1b2c3/avatar.webp" } } ], "meta": { "pagination": { "limit": 20, "has_more": true, "next_cursor": "eyJzIjoidXB1bGlzaGVkX2F0OmRlc2MiLCJjIjpbIjIwMjQtMDEtMTVUMDI6MDA6MDBaIiw0ODIxIl19" }, "request_id": "9f4f2d1e-7c3b-4c68-9f9f-0a1b2c3d4e5f" }}Pagination
Section titled “Pagination”Pagination is cursor based: fetch the first page, take meta.pagination.next_cursor, pass it back as the cursor parameter on the next call, and stop when has_more is false.
# First pagecurl -s "https://ohmy.xin/api/v1/strategies?limit=2" \ -H "Authorization: Bearer omx_live_xxxxxxxx_yyyyyyyy..."
# Next page — pass the previous next_cursor back verbatimcurl -s "https://ohmy.xin/api/v1/strategies?limit=2&cursor=eyJzIjoidXB1bGlzaGVkX2F0OmRlc2MiLCJjIjpbIjIwMjQtMDEtMTVUMDI6MDA6MDBaIiw0ODIxIl19" \ -H "Authorization: Bearer omx_live_xxxxxxxx_yyyyyyyy..."Visibility rules
Section titled “Visibility rules”A strategy appears in the list only when all of these hold:
- Its state is
running,take_profit, orstop_loss; - It has been published (
published_atis set); - It carries no member-tier gate, and its audience is public (
everyone); - Its circle is bound to Mixin, not dormant, set to public, and either free or browsable in teaser mode.
Condition 4 means: strategies from circles that are paid and closed to browsing never appear in the public API. If a circle number returns nothing, check that first.
Errors
Section titled “Errors”Beyond the shared envelope, this endpoint adds one case:
| HTTP status | error.code |
When it happens |
|---|---|---|
400 |
invalid_parameter |
A query parameter is invalid: limit out of range, an illegal sort/state/side value, a malformed timestamp, an inverted time window, or an invalid cursor. |
The 400 response lists each offending parameter in error.details:
{ "error": { "code": "invalid_parameter", "message": "Invalid query parameter: limit must be an integer between 1 and 100.", "details": [ { "param": "limit", "reason": "must be an integer between 1 and 100" } ] }, "meta": { "request_id": "9f4f2d1e-7c3b-4c68-9f9f-0a1b2c3d4e5f" }}For the other status codes (401, 429, 503, 500), see the API conventions.
Related pages
Section titled “Related pages”- API reference — authentication, rate limits, response envelope, and error codes
- Quickstart — create an account, generate a key, make your first call
- Lives list — the other list endpoint
- OpenAPI spec — the machine-readable description of this endpoint (OpenAPI 3.1)