Long/short ratio for one coin
Self-data layer: long/short ratio for one coin
/api/sd/lsRequest
Query parameters
| Name | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
| coin | string | Required | — | — | Coin symbol; 400 when missing. Alias: `base`. Example: BTC |
Example request
curl -s "https://www.coinboss.com/api/sd/ls?coin=BTC"Response fields
The field table is generated from real responses, so it lists exactly what the endpoint returns. Paths use a[] for array items and {*} for objects keyed by a dynamic name such as a coin or an exchange.
| Field | Type | Unit | Description |
|---|---|---|---|
| success | boolean | — | true when the request succeeded. On failure the body is `{ success: false, code, error, request_id }`. |
| coin | string | — | Coin symbol, upper case (for example BTC). |
| now | number | ms | Server time when the response was built. |
| account | object | — | Share of all accounts that are net long vs net short. |
| account.long_pct | number | % | Long share. |
| account.short_pct | number | % | Short share. |
| account.ratio | number | — | Long share divided by short share (1 = balanced). |
| account.n_exchanges | number | — | Number of exchanges contributing. |
| account.by_exchange | array | — | Per-exchange breakdown. |
| account.by_exchange[] | object | — | Per-exchange breakdown. |
| account.by_exchange[].exchange | string | — | Exchange id, lower case (for example `binance`). |
| account.by_exchange[].symbol | string | — | Instrument symbol as normalised by CoinBoss (for example BTCUSDT). |
| account.by_exchange[].long_pct | number | % | Long share. |
| account.by_exchange[].short_pct | number | % | Short share. |
| account.by_exchange[].ratio | number | — | Long share divided by short share (1 = balanced). |
| account.by_exchange[].updated_at | number | ms | When this row was last updated. |
| account.by_exchange[].age_s | number | s | Seconds since this row was last updated. |
| account.by_exchange[].is_stale | boolean | — | true when the row is older than the freshness window; stale rows are not used in totals. |
| account.by_exchange[].source | string | — | Which exchange statistic the row comes from. |
| account.by_exchange[].period | string | — | Sampling period of the exchange statistic (for example `5m`). |
| top_account | object | — | Same, restricted to the exchange-defined top traders. |
| top_account.long_pct | number|null | % | Long share. |
| top_account.short_pct | number|null | % | Short share. |
| top_account.ratio | number|null | — | Long share divided by short share (1 = balanced). |
| top_account.n_exchanges | number | — | Number of exchanges contributing. |
| top_account.by_exchange | array | — | Per-exchange breakdown. |
| top_account.by_exchange[] | object | — | Per-exchange breakdown. |
| top_account.by_exchange[].exchange | string | — | Exchange id, lower case (for example `binance`). |
| top_account.by_exchange[].symbol | string | — | Instrument symbol as normalised by CoinBoss (for example BTCUSDT). |
| top_account.by_exchange[].long_pct | number | % | Long share. |
| top_account.by_exchange[].short_pct | number | % | Short share. |
| top_account.by_exchange[].ratio | number | — | Long share divided by short share (1 = balanced). |
| top_account.by_exchange[].updated_at | number | ms | When this row was last updated. |
| top_account.by_exchange[].age_s | number | s | Seconds since this row was last updated. |
| top_account.by_exchange[].is_stale | boolean | — | true when the row is older than the freshness window; stale rows are not used in totals. |
| top_account.by_exchange[].source | string | — | Which exchange statistic the row comes from. |
| top_account.by_exchange[].period | string | — | Sampling period of the exchange statistic (for example `5m`). |
| top_position | object | — | Long vs short share of the positions held by top traders. |
| top_position.long_pct | number|null | % | Long share. |
| top_position.short_pct | number|null | % | Short share. |
| top_position.ratio | number|null | — | Long share divided by short share (1 = balanced). |
| top_position.n_exchanges | number | — | Number of exchanges contributing. |
| top_position.by_exchange | array | — | Per-exchange breakdown. |
| top_position.by_exchange[] | object | — | Per-exchange breakdown. |
| top_position.by_exchange[].exchange | string | — | Exchange id, lower case (for example `binance`). |
| top_position.by_exchange[].symbol | string | — | Instrument symbol as normalised by CoinBoss (for example BTCUSDT). |
| top_position.by_exchange[].long_pct | number | % | Long share. |
| top_position.by_exchange[].short_pct | number | % | Short share. |
| top_position.by_exchange[].ratio | number | — | Long share divided by short share (1 = balanced). |
| top_position.by_exchange[].updated_at | number | ms | When this row was last updated. |
| top_position.by_exchange[].age_s | number | s | Seconds since this row was last updated. |
| top_position.by_exchange[].is_stale | boolean | — | true when the row is older than the freshness window; stale rows are not used in totals. |
| top_position.by_exchange[].source | string | — | Which exchange statistic the row comes from. |
| top_position.by_exchange[].period | string | — | Sampling period of the exchange statistic (for example `5m`). |
| position_all | object | — | Long vs short share of all positions (venues that publish it). |
| position_all.long_pct | number|null | % | Long share. |
| position_all.short_pct | number|null | % | Short share. |
| position_all.ratio | number|null | — | Long share divided by short share (1 = balanced). |
| position_all.n_exchanges | number | — | Number of exchanges contributing. |
| position_all.by_exchange | array | — | Per-exchange breakdown. |
| position_all.by_exchange[] | object | — | Per-exchange breakdown. |
| position_all.by_exchange[].exchange | string | — | Exchange id, lower case (for example `binance`). |
| position_all.by_exchange[].symbol | string | — | Instrument symbol as normalised by CoinBoss (for example BTCUSDT). |
| position_all.by_exchange[].long_pct | number | % | Long share. |
| position_all.by_exchange[].short_pct | number | % | Short share. |
| position_all.by_exchange[].ratio | number | — | Long share divided by short share (1 = balanced). |
| position_all.by_exchange[].updated_at | number | ms | When this row was last updated. |
| position_all.by_exchange[].age_s | number | s | Seconds since this row was last updated. |
| position_all.by_exchange[].is_stale | boolean | — | true when the row is older than the freshness window; stale rows are not used in totals. |
| position_all.by_exchange[].source | string | — | Which exchange statistic the row comes from. |
| position_all.by_exchange[].period | string | — | Sampling period of the exchange statistic (for example `5m`). |
| taker | object | — | Taker buy vs taker sell volume share. |
| taker.long_pct | number|null | % | Long share. |
| taker.short_pct | number|null | % | Short share. |
| taker.ratio | number|null | — | Long share divided by short share (1 = balanced). |
| taker.n_exchanges | number | — | Number of exchanges contributing. |
| taker.by_exchange | array | — | Per-exchange breakdown. |
| taker.by_exchange[] | object | — | Per-exchange breakdown. |
| taker.by_exchange[].exchange | string | — | Exchange id, lower case (for example `binance`). |
| taker.by_exchange[].symbol | string | — | Instrument symbol as normalised by CoinBoss (for example BTCUSDT). |
| taker.by_exchange[].long_pct | number | % | Long share. |
| taker.by_exchange[].short_pct | number | % | Short share. |
| taker.by_exchange[].ratio | number | — | Long share divided by short share (1 = balanced). |
| taker.by_exchange[].updated_at | number | ms | When this row was last updated. |
| taker.by_exchange[].age_s | number | s | Seconds since this row was last updated. |
| taker.by_exchange[].is_stale | boolean | — | true when the row is older than the freshness window; stale rows are not used in totals. |
| taker.by_exchange[].source | string | — | Which exchange statistic the row comes from. |
| taker.by_exchange[].period | string | — | Sampling period of the exchange statistic (for example `5m`). |
| definitions | object | — | Definition of each measure. The five measures answer different questions and are never blended. |
| definitions.account | string | — | Account-based measure. |
| definitions.top_account | string | — | Top-trader account measure. |
| definitions.top_position | string | — | Top-trader position measure. |
| definitions.position_all | string | — | All-position measure. |
| definitions.taker | string | — | Taker buy / sell measure. |
| method | object | — | Plain-text statement of the formulas used for this response. |
| method.normalize | string | — | Plain-text note on normalisation: each exchange value is rescaled so long % + short % = 100, and ratio = long % ÷ short %. |
| method.aggregate | string | — | Aggregate across exchanges. |
| method.freshness | string | — | Plain-text freshness rule: rows updated within 24 hours are shown and `is_stale` marks rows older than 2 hours. |
Generated 2026-11-11 23:00 UTC from 4 real responses.
Example response
/api/sd/ls?coin=BTC · Real response captured 2026-11-13 03:57:48 UTC. Long arrays and maps are shortened for display: taker.by_exchange had 4 items; account.by_exchange had 6 items; top_position.by_exchange had 4 items.
- "success"true
- "coin""BTC"
- "now"1794542268813
- "account"
- "long_pct"73.52
- "short_pct"26.48
- "ratio"2.7764
- "n_exchanges"6
- "by_exchange"
- "top_account"
- "long_pct"66.89
- "short_pct"33.11
- "ratio"2.0198
- "n_exchanges"2
- "by_exchange"
- "top_position"
- "long_pct"49.7
- "short_pct"50.3
- "ratio"0.9881
- "n_exchanges"4
- "by_exchange"
- "position_all"
- "long_pct"49.43
- "short_pct"50.57
- "ratio"0.9775
- "n_exchanges"1
- "by_exchange"
- "taker"
- "long_pct"43.47
- "short_pct"56.54
- "ratio"0.7688
- "n_exchanges"4
- "by_exchange"
- "definitions"
- "account""all accounts: share of accounts that are net long vs net short (headcount, not size)"
- "top_account""top traders only: share of top-trader accounts net long vs net short"
- "top_position""top traders only: long position size vs short position size"
- "position_all""all traders: long position size vs short position size (Bitget only; kept separate from top-trader figures)"
- "taker""taker buy volume vs taker sell volume in the period (aggressor flow; not positions)"
- "method"
- "normalize""each exchange value converted to long% + short% = 100; ratio = long% / short%"
- "aggregate""simple mean of long% across exchanges within the same definition; different definitions are never mixed"
- "freshness""rows updated within 24h are shown; is_stale marks rows older than 2h"
Verified samples
Besides the example above, the probe calls this endpoint with these parameters and checks the schema each time.
| Parameters | HTTP | Latency | Result |
|---|---|---|---|
| coin=ETH | 200 | 5 ms | Pass |
| coin=SOL | 200 | 5 ms | Pass |
| coin=ARKM | 200 | 4 ms | Pass |
| — | 400 | 1 ms | Pass returns the expected error |
Checked 2026-11-13 03:27:48 UTC
Details
- Authentication
- None. Public endpoint.
- Rate limit
- 1200 requests per minute per IP
- Server cache
- 30s
- Edge micro-cache
- 10s
- Update frequency
- every 5 min (binance top-trader account ratio and okx taker / top-trader position ratios hourly; long-tail symbols every 30 min)
- Window
- latest snapshot (rows within 24 h; is_stale flag after 2 h)
- Data sources
- Long/short ratios polled by in-house collectors from the public statistics endpoints of 7 exchanges (binance, okx, bybit, bitget, gate, htx, kraken).
- Exchange coverage
- account ratio: binance, okx, bybit, bitget, gate, kraken; top-trader account ratio: binance, htx; position ratio: binance, okx, gate, htx, bitget; taker buy/sell ratio: binance, okx, bitget, gate; upstream sampling periods differ (5 min to 1 h); symbol coverage is a rolling top-by-volume list (about 280 coins on binance account ratio, about 20-60 coins on other venues / types); the response lists each upstream endpoint and its sampling period
- Units
- long / short as percentages of 100; ratio = long / short
- Method
- per group (account, top_account, top_position, position_all, taker): simple mean of long% across exchanges; groups are never mixed
- Timestamps
- Unix epoch milliseconds (UTC) unless the field description says otherwise
- Response format
- json
- Stability
- Stable
- Available since
- 2026-11-11
Live status
Availability, last 30 days
100% of 410 checks passed
Errors
Failed calls share one shape on every endpoint. The full list is on the errors page. Errors and rate limits →
| Code | HTTP | Meaning | What to do |
|---|---|---|---|
| INVALID_PARAM | 400 | A required parameter is missing or a value is not accepted. `param` names the parameter when it is known. | Do not retry unchanged; fix the request. |
| UNAUTHORIZED | 401 | The `CB-API-KEY` header was sent but the key is unknown or revoked. Public data needs no key — drop the header or use a valid key. | Do not retry unchanged. |
| FORBIDDEN | 403 | The route is not part of the public API (internal or account-only). | Do not retry. |
| NOT_FOUND | 404 | Unknown route, or the requested coin / exchange / fund does not exist. | Do not retry; check the path and identifiers against the catalog. |
| RATE_LIMITED | 429 | More requests than the per-minute limit. `Retry-After` gives the seconds to wait. | Wait for `Retry-After`, then retry with backoff. |
| INTERNAL | 500 | Unexpected server error. The message is generic by design; quote `request_id` when reporting it. | Retry once after a few seconds; report it with the request id if it persists. |
| UPSTREAM_FAILED | 503 | The data source behind this endpoint did not answer in time. No stale or substitute numbers are returned in its place. | Retry with backoff; check the status page. |
| UNAVAILABLE | 501 / 503 | The dataset is temporarily not ready (cache warming) or the endpoint has no lawful public source yet. | Retry later; the catalog marks endpoints that are unavailable by design. |
| REQUEST_FAILED | 200 | Some older endpoints answer HTTP 200 with `success: false`. Always check `success`, not only the HTTP status. | Depends on the message; treat as a failed request. |
Try it
/api/sd/lsAvailablestring — Coin symbol; 400 when missing. Alias: `base`.
https://www.coinboss.com/api/sd/ls?coin=BTCMore in this category
- Long/short ratio for one coin /api/sd/ls
- Coin-page long/short cards /api/currency/ls-cards
- Long/short ratio history for a coin on one exchange /api/exchanges/ls-history
- Per-exchange long/short cards for one coin /api/ls/cards
- Long/short ratio chart series for one coin /api/ls/chart
- Long/short ratios for one coin across exchanges and flavours /api/ls/coin
- Long/short ratio history for one coin on one exchange /api/ls/history
- Long/short ratio matrix /api/ls/matrix
- Long/short ratio list v2 /api/market/long-short-v2
- Long/short ratio list /api/market/long-short