TradePortfolio
DocsHistorical Impact Series

Historical Impact Series

Dev

GET /orderbook/history


Returns a windowed timeseries of precomputed order book impact metrics for one exchange, one symbol, and one side. The endpoint reads the impact arrays stored on each snapshot, so it returns the available USD tiers rather than walking raw book levels at request time.

Authentication

Requires Dev tier or higher. Dev keys receive a rolling 30-day historical lookback with clamp notices when needed. Pro and Team receive full stored history. This endpoint is categorized as historical for rate limiting: Dev receives 30 requests per minute, Pro and Team receive 100 requests per minute.

Parameters

Query parameters

NameTypeRequiredDescription
exchangestringSingle exchange slug. Supported depth venues include binance, bybit, hyperliquid, lighter, coinbase, and kalshi.
symbolstringSingle symbol. Symbols are normalized to uppercase unless they use a HIP-3 prefix such as xyz:BTC.
sidestringbuy or sell.
startstring (ISO 8601)Start timestamp for the requested window.
endstring (ISO 8601)End timestamp for the requested window. Must be after start.
resolutionstringnative, 1m, 5m, 15m, 30m, 1h, 4h, or 1d. Defaults to 1m. native is treated as 1m.
notionalnumberPositive USD notional to filter to one stored tier.

Tier behavior

  • Dev: Rolling 30-day historical lookback for a single exchange, symbol, and side. Older start/end values are clamped and returned with notices.
  • Pro: Full stored history for a single exchange, symbol, and side. No date clamp.
  • Team: Same endpoint behavior and historical rate-limit bucket as Pro.

Example request

bash
curl -H "X-Api-Key: lk_live_your_key_here" \
  "https://api.loris.tools/orderbook/history?exchange=binance&symbol=BTC&side=buy&start=2026-07-30T00:00:00Z&end=2026-07-30T01:00:00Z&resolution=5m&notional=25000"

Example response

json
{
  "exchange": "binance",
  "symbol": "BTC",
  "side": "buy",
  "start": "2026-07-30T00:00:00.000Z",
  "end": "2026-07-30T01:00:00.000Z",
  "resolution": "5m",
  "tiers": [25000.0],
  "series": [
    {
      "notional": 25000.0,
      "points": [
        {
          "ts": "2026-07-30T00:00:00.123Z",
          "slippage_bps": 0.42,
          "fee_bps": 5.0,
          "total_bps": 5.42,
          "levels": 3,
          "filled": true,
          "mid": 67249.75,
          "spread_bps": 0.0743,
          "insufficient_depth": false
        }
      ]
    }
  ]
}

Errors

  • 400 Missing required parameter, invalid side, invalid timestamp, unsupported resolution, end before start, or non-positive notional.
  • 500 ClickHouse is unavailable or the history query failed.

For authentication errors (401) and rate limit responses (429), see Errors.

Related