AggPro API
Aggregated crypto derivatives data from all connected exchanges: order books, candles with buy/sell volume, open interest, funding, long/short ratio, liquidations and the market screener. Machine-readable: /api/v1 · OpenAPI.
🔑 Authentication
Send your key in the X-API-Key header (preferred) or ?key= query parameter. Keys are created in Account → API (https://aggpro.xyz/profile#api) and shown once. API access: Pro and Elite. Webhooks: Elite only.
curl -H "X-API-Key: ak_YOUR_KEY" "https://aggpro.xyz/api/v1/chart?asset=BTC:perp&interval=1h&limit=200"
⚖️ Limits
| Plan | API | Requests / s (burst) | Units / day | Keys | Candles / request | WS streams | History | Webhooks |
|---|---|---|---|---|---|---|---|---|
| free | — | — | — | — | — | — | 60 days | — |
| pro | ✅ | 5 (20) | 50,000 | 3 | 1,000 | 8 | 180 days | — |
| elite | ✅ | 20 (60) | 300,000 | 5 | 1,500 | 16 | unlimited | ✅ |
- Per account — all your keys share one quota.
- Token bucket: `rps` requests per second sustained, `burst` back-to-back. Each request costs its `weight` in units.
- Units per UTC day; resets at 00:00 UTC.
- At most 48 API requests are processed at once for all users; beyond that the server answers 503 — retry after a short pause.
- Every successful response carries X-RateLimit-Limit (daily units), X-RateLimit-Remaining, X-RateLimit-Reset (unix seconds).
- History depth follows your plan (Pro 180 days, Elite unlimited).
Errors
| 400 | bad parameters |
| 401 | missing or invalid key |
| 402 | plan does not include the API (or webhooks) |
| 404 | no data for this instrument |
| 429 | rate or daily quota exceeded — wait Retry-After seconds |
| 503 | server busy — retry in a few seconds |
📡 Endpoints
/api/v1/bookweight: 1Aggregated order book of one instrument across all connected exchanges (USD per price level, which exchanges stand behind each level, recent trade flow and anomalous volume clusters).
| asset * | Instrument: BASE:perp or BASE:spot, e.g. BTC:perp |
| multiplier | Price-level grouping as a multiple of the base tick (default 10) |
| depth | Levels per side, 1–500 (default 100) |
Returns: type, asset, market, mid, spread, base_tick, multiplier, max_usd, ts (ms), exchanges[], bids[] / asks[] — {p: price, usd: size in USD, age: ms the level has stood, d: USD change since previous snapshot, ex: [[exchange, usd], …]}, flow[] — {p, buy, sell} executed aggressive volume in USD, clusters[] — {p, buy, sell, dir, strength 0..1, ex}
{
"asks": [],
"asset": "BTC:perp",
"base_tick": 0.1,
"bids": [
{
"age": 12345,
"d": -5000,
"ex": [
[
"binance",
800000
],
[
"bybit",
450000
]
],
"p": 82727,
"usd": 1250000
}
],
"clusters": [],
"exchanges": [
"binance",
"bybit",
"okx"
],
"flow": [
{
"buy": 120000,
"p": 82730,
"sell": 95000
}
],
"market": "perp",
"mid": 82727.8,
"multiplier": 10,
"spread": 0.1,
"ts": 1792391819873,
"type": "book"
}/api/v1/chartweight: 1 (2 if limit > 1000)OHLCV candles aggregated across exchanges (VWAP open/close, max high, min low, summed volume) with aggressive buy/sell volume split.
| asset * | Instrument, e.g. ETH:perp |
| interval | 1m | 5m | 15m | 1h | 4h | 1d (default 15m) |
| limit | Candles, up to 1000 (Pro) / 1500 (Elite); default 500 |
Returns: asset, interval, source, klines[] — {t: open time ms, o, h, l, c, v: volume USD, bv: aggressive buy USD, sv: aggressive sell USD}. History depth follows your plan.
{
"asset": "BTC:perp",
"interval": "1h",
"klines": [
{
"bv": 192437275.9,
"c": 81180.3,
"h": 81214,
"l": 80872,
"o": 80932.6,
"sv": 207489656.3,
"t": 1792357200000,
"v": 399926932.2
}
],
"source": "multi_exchange"
}/api/v1/marketweight: 2Derivatives time series of a coin, aggregated over exchanges: open interest, OI change, volume-weighted funding, premium.
| asset * | Coin, e.g. BTC |
| tf | 5m | 15m | 1h | 4h | 1d (default 1h) |
| from | Start, unix ms (default 7 days ago; max 5000 points; limited by your plan's history depth) |
Returns: step (ms), t[] (bucket start ms), oi[] (USD), doi[] (USD change per bucket), funding[] (rate per 8h, fraction: 0.0001 = 0.01%), premium[] (perp vs index, fraction), venues[]. Arrays are aligned by index; null = no data.
{
"doi": [
4980736
],
"funding": [
0.0000694
],
"oi": [
34772451808.3
],
"ok": true,
"premium": [
-0.00052
],
"step": 3600000,
"t": [
1761289200000
],
"venues": [
"binance",
"bybit",
"okx"
]
}/api/v1/longshortweight: 2Long/short ratio: top traders and all accounts (share of longs, %).
| asset * | Coin, e.g. SOL |
| tf | 5m | 15m | 1h | 4h | 1d (default 1h) |
| from | Start, unix ms (default 7 days ago) |
Returns: t[] (ms), top[] (% of top traders' positions that are long), all[] (% of all accounts that are long)
{
"all": [
57.75
],
"ok": true,
"t": [
1790593200000
],
"top": [
61.59
]
}/api/v1/liquidationsweight: 1Recent liquidations of a coin on all exchanges (last 30 days kept).
| asset * | Coin or instrument, e.g. BTC |
| since | Unix ms (default 24 h ago) |
| limit | Up to 5000 events (default 1000) |
Returns: liquidations[] — {ts, exchange, p: price, side: 1 long liquidated / −1 short liquidated, usd}, by_exchange{exchange: [long_usd, short_usd]}
{
"asset": "BTC",
"by_exchange": {
"binance-futures": [
20359203.9,
0
]
},
"liquidations": [
{
"exchange": "okx-swap",
"p": 82869.9,
"side": -1,
"ts": 1792391810261,
"usd": 754.1
}
]
}/api/v1/liqmapweight: 3Estimated liquidation levels (heatmap) for longs and shorts around the current price.
| asset * | Instrument, e.g. BTC:perp |
Returns: asset, price, bucket (price step), longs[] / shorts[] — [price, estimated USD], venues[], updated (ms)
{
"asset": "BTC",
"bucket": 82.7,
"longs": [
[
82394.7,
1520000
]
],
"price": 82725.6,
"shorts": [
[
82891,
980000
]
],
"updated": 1792391822480
}/api/v1/screenerweight: 2Whole-market overview: every perpetual coin across all exchanges (price, changes, volume, OI, funding, long/short, liquidations, CVD). Refreshed every 30 s.
Returns: updated (ms), rows[] — {base, price, chg1h, chg4h, chg24 (%), vol24 (USD), rvol, oi (USD), doi1h, doi24h (%), funding (per 8h, fraction), fspread, premium, ls_all, ls_top, liq1h/liq24h [long, short], cvd1h, …}
{
"rows": [
{
"base": "BTC",
"chg24": 1.3,
"doi24h": 0.5,
"funding": 0.0000659,
"liq24h": [
25192228.2,
0
],
"ls_all": 60.7,
"oi": 31762146368,
"price": 82727.8,
"vol24": 8848586032.9
}
],
"updated": 1792391819873
}/api/v1/signalsweight: 1Latest order-book signals produced by the engine.
| limit | Up to 500 (default 50) |
Returns: signals[] — {id, ts, asset, market, horizon, mid, bias_score (direction & strength: + long / − short), rank, depth_usd, flow_usd, natr_pct, exchanges[]}. Model internals are not exposed.
{
"signals": [
{
"asset": "OP:spot",
"horizon": "15m",
"id": "sig_1792136115904523916",
"mid": 0.1386,
"rank": 65.1,
"ts": 1792136115903
}
]
}/api/v1/signals/statsweight: 1Open statistics of the Telegram bot's strategy signals: every closed trade after fees (outcomes only).
Returns: total, by_tf, by_dir, by_month, curve[], trades[], open[] — see https://aggpro.xyz/stats
{
"ok": true,
"total": {
"n": 49,
"sum_pct": -14.1,
"win_pct": 26.5
}
}/api/v1/usageweight: 0Your plan, quota and how many units you have used today (does not consume quota).
Returns: tier, quota {keys, rps, burst, daily, max_candles, ws_streams}, used_today, history_days, webhooks
{
"history_days": 180,
"quota": {
"burst": 20,
"daily": 50000,
"keys": 3,
"max_candles": 1000,
"rps": 5,
"ws_streams": 8
},
"tier": "pro",
"used_today": 154,
"webhooks": false
}⚡ WebSocket — live order book
Live aggregated order book stream. Up to `ws_streams` instruments at once per connection (Pro 8, Elite 16).
wss://aggpro.xyz/ws/dom?key=YOUR_KEY
→ {"asset":"BTC:perp","id":"p1","multiplier":10,"op":"subscribe"}
→ {"id":"p1","op":"unsubscribe"}First {"type":"hello","assets":[…]}; then {"id":"p1","book":{…}} with the same book format as /api/v1/book, several times per second.
🔔 Webhooks (Elite)
Account → API → Webhooks (https://aggpro.xyz/profile#api), up to 5 HTTPS endpoints.
Events: signal, price_alert, liq_pool_alert
POST JSON {event, ts, data}. Headers: X-AggPro-Event, X-AggPro-Timestamp, X-AggPro-Signature = hex(HMAC-SHA256(secret, "{timestamp}.{body}")). 3 attempts; disabled after 20 failures in a row.
Questions: support · Keys: Account → API