Skip to main content

Market Data

Public, no-auth endpoints for the order book, recent trades, candles, ticker, and engine health.

Order Book Snapshot

Returns a price-aggregated snapshot of the live in-memory book. Use last_update_id to sequence diffs from a future WebSocket feed.

GET /spot/depth?symbol=DFUSDT&limit=50

Query Parameters

ParamTypeDefaultNotes
symbolstringrequiredMarket id.
limitnumber501–1000; clamped server-side.

Response — 200 OK

{
"symbol": "DFUSDT",
"last_update_id": 12345,
"bids": [["0.5000", "100"], ["0.4999", "200"]],
"asks": [["0.5001", "150"], ["0.5002", "180"]]
}
FieldNotes
bidsDescending by price (best bid first). Each entry is [price, total_qty_at_level].
asksAscending by price (best ask first).
last_update_idMonotonic engine counter; bumped on every book mutation (place / cancel / fill).

Quantity at each level is the sum of all resting orders at that price — individual order ids are intentionally not exposed.

Errors

HTTPerror
503spot trading disabled (engine not started) / ENGINE_BUSY / ENGINE_RESTARTING

Recent Public Trades

GET /spot/trades?symbol=DFUSDT&limit=50

Query Parameters

ParamTypeDefaultNotes
symbolstringrequired
limitnumber501–1000.

Response — 200 OK — newest first.

[
{
"trade_id": "9f2a-...",
"symbol": "DFUSDT",
"side": "buy",
"price": "0.5000",
"quantity": "30",
"ts": 1778400000123
}
]
FieldNotes
sideThe taker side of the fill (always defined; identifies which side initiated the cross).
tsUnix milliseconds.

Klines (Candlesticks)

Pre-aggregated. The kline aggregator updates these incrementally on every fill.

GET /spot/klines?symbol=DFUSDT&interval=1m&limit=500

Query Parameters

ParamTypeDefaultNotes
symbolstringrequired
intervalstringrequired1m / 5m / 15m / 1h / 4h / 1d
limitnumber5001–1000.
start_timenumber (unix seconds)(any)open_time >= start_time
end_timenumber (unix seconds)(any)open_time <= end_time

Response — 200 OK — Binance-style array-of-arrays:

[
[1778313600, "0.48", "0.51", "0.47", "0.50", "10000", 1778313659, "4900", 234]
]

Position-based fields:

IndexMeaning
0open_time (unix seconds)
1open_price
2high_price
3low_price
4close_price
5volume (base)
6close_time (unix seconds; open_time + interval - 1)
7quote_volume
8trade_count

Errors

HTTPerror
400invalid interval

24h Ticker

Rolling 24-hour stats. Updated incrementally on each fill, and recomputed every 60 s by a background task to handle decay (trades falling out of the 24h window).

GET /spot/ticker/24hr # all listed markets → array
GET /spot/ticker/24hr?symbol=DFUSDT # one market → object

Response (single-market)

{
"symbol": "DFUSDT",
"last_price": "0.5",
"open_price": "0.48",
"high": "0.51",
"low": "0.47",
"volume": "10000",
"quote_volume": "5000",
"trade_count": 234,
"open_time": 1778313600,
"close_time": 1778400000
}
FieldNotes
open_priceFirst fill price within the rolling 24h window. If no trades in window, equals last_price.
last_priceMost recent fill ever (not bounded by the window).
volume / quote_volumeSum over the 24h window.
open_time / close_timeUnix seconds; window = [now-86400, now].

Errors

HTTPerror
404TICKER_NOT_FOUND (when querying by symbol that has no row yet)

Engine Health

GET /spot/health
{ "engine": "running", "queue_depth": 0, "books_loaded": 1 }
FieldValues
enginerunning (engine task alive) / disabled (server has SPOT_TRADING_ENABLED=false)
queue_depthNumber of commands waiting in the engine's mpsc backlog. Healthy: 0 or single digits. Sustained high values → load issue.
books_loadedNumber of in-memory books. MVP: 1 when running, 0 when disabled.

LB / dashboard probes can hit this without auth.


Code Example

import requests

BASE = "https://api-sepolia.p99.world/api/v1"

# Snapshot the book + ticker + last 5 trades + 1m kline tail
print(requests.get(f"{BASE}/spot/depth?symbol=DFUSDT&limit=10").json())
print(requests.get(f"{BASE}/spot/ticker/24hr?symbol=DFUSDT").json())
print(requests.get(f"{BASE}/spot/trades?symbol=DFUSDT&limit=5").json())
print(requests.get(f"{BASE}/spot/klines?symbol=DFUSDT&interval=1m&limit=10").json())
print(requests.get(f"{BASE}/spot/health").json())