Long/short ratio history for a coin on one exchange
Long/short ratio history for a coin on one exchange
/api/exchanges/ls-historyRequest
Query parameters
| Name | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
| ex | string | Required | — | — | Exchange id (lower-cased, a-z0-9. only); 400 when missing. Example: binance |
| coin | string | Optional | BTC | — | Base coin symbol (uppercase, e.g. BTC). Example: BTC |
| type | string | Optional | account | account, position, taker | Long/short ratio flavour. Example: account |
| days | integer | Optional | 7 | ≤ 30 | Look-back window in days. Example: 7 |
Example request
curl -s "https://www.coinboss.com/api/exchanges/ls-history?ex=binance&coin=BTC&type=account&days=7"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). |
| type | string | — | Type. |
| data | array | — | Payload. |
| data[] | object | — | Payload. |
| data[].t | number | ms | Timestamp. |
| data[].long | number | — | Long share. |
| data[].short | number | — | Short share. |
Generated 2026-11-11 23:00 UTC from 4 real responses.
Example response
/api/exchanges/ls-history?ex=binance&coin=BTC&type=account&days=7 · Real response captured 2026-11-13 03:57:49 UTC. Long arrays and maps are shortened for display: data had 168 items.
- "success"true
- "coin""BTC"
- "type""account"
- "data"
Verified samples
Besides the example above, the probe calls this endpoint with these parameters and checks the schema each time.
| Parameters | HTTP | Latency | Result |
|---|---|---|---|
| ex=binance&coin=ETH&days=7&type=account | 200 | 7 ms | Pass |
| ex=binance&coin=SOL&days=7&type=account | 200 | 7 ms | Pass |
| ex=binance&coin=ARKM&days=7&type=account | 200 | 6 ms | Pass |
| — | 400 | 1 ms | Pass returns the expected error |
Checked 2026-11-13 03:57:49 UTC
Details
- Authentication
- None. Public endpoint.
- Rate limit
- 1200 requests per minute per IP
- Server cache
- 2m
- Edge micro-cache
- 10s
- Update frequency
- hourly archive; in-memory cache 120 s
- Window
- days (default 7, max 30), hourly points
- Data sources
- Hourly long/short ratio history for one exchange and coin, archived from the exchange's public ratio endpoint.
- Exchange coverage
- Venues that publish long/short ratios; coin defaults to BTC
- Pagination
- none
- Units
- ratio
- Timestamps
- Unix epoch milliseconds (UTC) unless the field description says otherwise
- Response format
- json
- Stability
- Stable
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/exchanges/ls-historyAvailablestring — Exchange id (lower-cased, a-z0-9. only); 400 when missing.
string · default BTC — Base coin symbol (uppercase, e.g. BTC).
string · default account — Long/short ratio flavour.
integer · default 7 · max 30 — Look-back window in days.
https://www.coinboss.com/api/exchanges/ls-history?ex=binance&coin=BTC&type=account&days=7More 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