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
| Param | Type | Default | Notes |
|---|---|---|---|
symbol | string | required | Market id. |
limit | number | 50 | 1–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"]]
}
| Field | Notes |
|---|---|
bids | Descending by price (best bid first). Each entry is [price, total_qty_at_level]. |
asks | Ascending by price (best ask first). |
last_update_id | Monotonic 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
| HTTP | error |
|---|---|
503 | spot trading disabled (engine not started) / ENGINE_BUSY / ENGINE_RESTARTING |
Recent Public Trades
GET /spot/trades?symbol=DFUSDT&limit=50
Query Parameters
| Param | Type | Default | Notes |
|---|---|---|---|
symbol | string | required | |
limit | number | 50 | 1–1000. |
Response — 200 OK — newest first.
[
{
"trade_id": "9f2a-...",
"symbol": "DFUSDT",
"side": "buy",
"price": "0.5000",
"quantity": "30",
"ts": 1778400000123
}
]
| Field | Notes |
|---|---|
side | The taker side of the fill (always defined; identifies which side initiated the cross). |
ts | Unix 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
| Param | Type | Default | Notes |
|---|---|---|---|
symbol | string | required | |
interval | string | required | 1m / 5m / 15m / 1h / 4h / 1d |
limit | number | 500 | 1–1000. |
start_time | number (unix seconds) | (any) | open_time >= start_time |
end_time | number (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:
| Index | Meaning |
|---|---|
| 0 | open_time (unix seconds) |
| 1 | open_price |
| 2 | high_price |
| 3 | low_price |
| 4 | close_price |
| 5 | volume (base) |
| 6 | close_time (unix seconds; open_time + interval - 1) |
| 7 | quote_volume |
| 8 | trade_count |
Errors
| HTTP | error |
|---|---|
400 | invalid 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
}
| Field | Notes |
|---|---|
open_price | First fill price within the rolling 24h window. If no trades in window, equals last_price. |
last_price | Most recent fill ever (not bounded by the window). |
volume / quote_volume | Sum over the 24h window. |
open_time / close_time | Unix seconds; window = [now-86400, now]. |
Errors
| HTTP | error |
|---|---|
404 | TICKER_NOT_FOUND (when querying by symbol that has no row yet) |
Engine Health
GET /spot/health
{ "engine": "running", "queue_depth": 0, "books_loaded": 1 }
| Field | Values |
|---|---|
engine | running (engine task alive) / disabled (server has SPOT_TRADING_ENABLED=false) |
queue_depth | Number of commands waiting in the engine's mpsc backlog. Healthy: 0 or single digits. Sustained high values → load issue. |
books_loaded | Number 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())