/api/ls/history
GETAvailable

Long/short ratio history for one coin on one exchange

Long/short ratio history for one coin on one exchange

GET/api/ls/history

Request

Query parameters

NameTypeRequiredDefaultAllowed valuesDescription
basestringRequired——Base coin symbol (uppercase, e.g. BTC). Example: BTC
exchangestringOptionalbinance—Exchange id (lowercase, e.g. binance). Example: binance
typestringOptionalaccountaccount, topacc, position, takerLong/short ratio flavour. Example: account
hoursintegerOptional168≥ 1 · ≤ 2160Look-back window in hours. Example: 168

Example request

curl -s "https://www.coinboss.com/api/ls/history?base=BTC&exchange=binance&type=account&hours=168"

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 }`.
basestring—Base asset symbol.
exchangestring—Exchange id, lower case (for example `binance`).
typestring—Type.
hoursnumber—Hourly values or number of hours.
symbolstring—Instrument symbol as normalised by CoinBoss (for example BTCUSDT).
countnumber—Number of items.
dataarray—Payload.
data[]object—Payload.
data[].hour_tsnumbermsStart of the hour bucket.
data[].longnumber—Long share.
data[].shortnumber—Short share.
data[].rationumber—Long share divided by short share (1 = balanced).

Generated 2026-11-11 23:00 UTC from 4 real responses.

Example response

/api/ls/history?base=BTC&exchange=binance&type=account&hours=168 · Real response captured 2026-11-13 03:57:51 UTC. Long arrays and maps are shortened for display: data had 168 items.

  • {
    • "success": true,
    • "base": "BTC",
    • "exchange": "binance",
    • "type": "account",
    • "hours": 168,
    • "symbol": "BTCUSDT",
    • "count": 168,
    • "data": [
      • { … 4 },
      • { … 4 }
      ]
    }

Verified samples

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

ParametersHTTPLatencyResult
base=ETH&type=account&hours=168&exchange=binance2007 msPass
base=SOL&type=account&hours=168&exchange=binance20038 msPass
base=ARKM&type=account&hours=168&exchange=binance20028 msPass

Checked 2026-11-13 03:57:51 UTC

Details

Authentication
None. Public endpoint.
Rate limit
1200 requests per minute per IP
Server cache
5m
Edge micro-cache
10s
Update frequency
hourly archive at each UTC hour change (snapshot of the latest table); ClickHouse copy synced every 5 min
Window
hours param, default 168 h, range 1..2160 h; hourly points
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
one exchange (default binance) and one ratio type per request; symbol spellings BASEUSDT / BASE-USDT-SWAP / BASE_USDT only
Units
long / short as percentages of 100; ratio = long / short; hour_ts in Unix ms
Method
ratio = long / short per hourly point
Timestamps
Unix epoch milliseconds (UTC) unless the field description says otherwise
Response format
json
Stability
Stable

Live status

AvailableChecked 2026-11-13 03:57:51 UTCHTTP 2007 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/ls/historyAvailable
Parameters

string — Base coin symbol (uppercase, e.g. BTC).

string · default binance — Exchange id (lowercase, e.g. binance).

string · default account — Long/short ratio flavour.

integer · default 168 · min 1 · max 2160 — Look-back window in hours.

Request URLhttps://www.coinboss.com/api/ls/history?base=BTC&exchange=binance&type=account&hours=168
Choose an endpoint and press “Send request”. The response, headers and timing will appear here.