TradePortfolio
DocsPrice Impact

Price Impact

Dev

GET /orderbook/impact


Returns impact for a requested USD size on the latest snapshot, or on the nearest stored snapshot around a timestamp when at is provided. If the requested size exactly matches a stored precomputed tier, the endpoint returns that metric. Otherwise it walks the stored raw book levels for the selected snapshot.

Authentication

Requires Dev tier or higher. Dev keys can query live impact and point-in-time impact within the rolling 30-day historical lookback. Pro and Team can query the full stored history. Live requests use the live rate-limit bucket; requests with at use the historical bucket.

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.
sizenumberPositive USD notional to evaluate. Exact matches to stored active tiers use precomputed metrics.
atstring (ISO 8601)Timestamp for point-in-time impact. The nearest stored snapshot before or after this timestamp is used. Dev is limited to rolling 30 days; Pro and Team receive full stored history.

Tier behavior

  • Dev: Latest snapshot impact plus rolling 30-day point-in-time impact. Older at values are clamped and returned with notices.
  • Pro: Latest impact plus point-in-time impact across full stored history.

Example request

bash
curl -H "X-Api-Key: lk_live_your_key_here" \
  "https://api.loris.tools/orderbook/impact?exchange=binance&symbol=BTC&side=buy&size=25000"

Example response

json
{
  "exchange": "binance",
  "symbol": "BTC",
  "side": "buy",
  "size": 25000.0,
  "at": null,
  "ts_snapshot": "2026-07-30T12:00:00.123Z",
  "mid": 67249.75,
  "vwap": 67252.5745,
  "slippage_bps": 0.42,
  "fee_bps": 5.0,
  "total_bps": 5.42,
  "levels_consumed": 3,
  "filled": true,
  "insufficient_depth": false,
  "precomputed": true
}

Errors

  • 400 Missing required parameter, invalid side, invalid timestamp, or non-positive size.
  • 404 No snapshot found for the requested exchange and symbol.
  • 500 ClickHouse is unavailable or the impact query failed.

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

Related