/api/exchanges/ls-history
GETAvailable

Long/short ratio history for a coin on one exchange

Long/short ratio history for a coin on one exchange

GET/api/exchanges/ls-history

Request

Query parameters

NameTypeRequiredDefaultAllowed valuesDescription
exstringRequired——Exchange id (lower-cased, a-z0-9. only); 400 when missing. Example: binance
coinstringOptionalBTC—Base coin symbol (uppercase, e.g. BTC). Example: BTC
typestringOptionalaccountaccount, position, takerLong/short ratio flavour. Example: account
daysintegerOptional7≤ 30Look-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.

FieldTypeUnitDescription
successboolean—true when the request succeeded. On failure the body is `{ success: false, code, error, request_id }`.
coinstring—Coin symbol, upper case (for example BTC).
typestring—Type.
dataarray—Payload.
data[]object—Payload.
data[].tnumbermsTimestamp.
data[].longnumber—Long share.
data[].shortnumber—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": [
      • { … 3 },
      • { … 3 }
      ]
    }

Verified samples

Besides the example above, the probe calls this endpoint with these parameters and checks the schema each time.

ParametersHTTPLatencyResult
ex=binance&coin=ETH&days=7&type=account2007 msPass
ex=binance&coin=SOL&days=7&type=account2007 msPass
ex=binance&coin=ARKM&days=7&type=account2006 msPass
—4001 msPass 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

AvailableChecked 2026-11-13 03:57:49 UTCHTTP 2008 msSchema matchesNewest data point 58m old

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 →

CodeHTTPMeaningWhat to do
INVALID_PARAM400A 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.
UNAUTHORIZED401The `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.
FORBIDDEN403The route is not part of the public API (internal or account-only).Do not retry.
NOT_FOUND404Unknown route, or the requested coin / exchange / fund does not exist.Do not retry; check the path and identifiers against the catalog.
RATE_LIMITED429More requests than the per-minute limit. `Retry-After` gives the seconds to wait.Wait for `Retry-After`, then retry with backoff.
INTERNAL500Unexpected 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_FAILED503The 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.
UNAVAILABLE501 / 503The 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_FAILED200Some 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

GET/api/exchanges/ls-historyAvailable
Parameters

string — 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.

Request URLhttps://www.coinboss.com/api/exchanges/ls-history?ex=binance&coin=BTC&type=account&days=7
Choose an endpoint and press “Send request”. The response, headers and timing will appear here.