{"auth":{"how":"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.","plans":"API access: Pro and Elite. Webhooks: Elite only."},"base_url":"https://aggpro.xyz","docs":"https://aggpro.xyz/docs/api","endpoints":[{"example":{"asks":[],"asset":"BTC:perp","base_tick":0.1,"bids":[{"age":12345,"d":-5000,"ex":[["binance",800000],["bybit",450000]],"p":82727.0,"usd":1250000}],"clusters":[],"exchanges":["binance","bybit","okx"],"flow":[{"buy":120000,"p":82730.0,"sell":95000}],"market":"perp","mid":82727.8,"multiplier":10,"spread":0.1,"ts":1792391819873,"type":"book"},"method":"GET","params":[{"description":"Instrument: BASE:perp or BASE:spot, e.g. BTC:perp","name":"asset","required":true},{"description":"Price-level grouping as a multiple of the base tick (default 10)","name":"multiplier","required":false},{"description":"Levels per side, 1–500 (default 100)","name":"depth","required":false}],"path":"/api/v1/book","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}","summary":"Aggregated 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).","weight":"1"},{"example":{"asset":"BTC:perp","interval":"1h","klines":[{"bv":192437275.9,"c":81180.3,"h":81214.0,"l":80872.0,"o":80932.6,"sv":207489656.3,"t":1792357200000,"v":399926932.2}],"source":"multi_exchange"},"method":"GET","params":[{"description":"Instrument, e.g. ETH:perp","name":"asset","required":true},{"description":"1m | 5m | 15m | 1h | 4h | 1d (default 15m)","name":"interval","required":false},{"description":"Candles, up to 1000 (Pro) / 1500 (Elite); default 500","name":"limit","required":false}],"path":"/api/v1/chart","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.","summary":"OHLCV candles aggregated across exchanges (VWAP open/close, max high, min low, summed volume) with aggressive buy/sell volume split.","weight":"1 (2 if limit > 1000)"},{"example":{"doi":[4980736.0],"funding":[0.0000694],"oi":[34772451808.3],"ok":true,"premium":[-0.00052],"step":3600000,"t":[1761289200000],"venues":["binance","bybit","okx"]},"method":"GET","params":[{"description":"Coin, e.g. BTC","name":"asset","required":true},{"description":"5m | 15m | 1h | 4h | 1d (default 1h)","name":"tf","required":false},{"description":"Start, unix ms (default 7 days ago; max 5000 points; limited by your plan's history depth)","name":"from","required":false}],"path":"/api/v1/market","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.","summary":"Derivatives time series of a coin, aggregated over exchanges: open interest, OI change, volume-weighted funding, premium.","weight":"2"},{"example":{"all":[57.75],"ok":true,"t":[1790593200000],"top":[61.59]},"method":"GET","params":[{"description":"Coin, e.g. SOL","name":"asset","required":true},{"description":"5m | 15m | 1h | 4h | 1d (default 1h)","name":"tf","required":false},{"description":"Start, unix ms (default 7 days ago)","name":"from","required":false}],"path":"/api/v1/longshort","returns":"t[] (ms), top[] (% of top traders' positions that are long), all[] (% of all accounts that are long)","summary":"Long/short ratio: top traders and all accounts (share of longs, %).","weight":"2"},{"example":{"asset":"BTC","by_exchange":{"binance-futures":[20359203.9,0.0]},"liquidations":[{"exchange":"okx-swap","p":82869.9,"side":-1,"ts":1792391810261,"usd":754.1}]},"method":"GET","params":[{"description":"Coin or instrument, e.g. BTC","name":"asset","required":true},{"description":"Unix ms (default 24 h ago)","name":"since","required":false},{"description":"Up to 5000 events (default 1000)","name":"limit","required":false}],"path":"/api/v1/liquidations","returns":"liquidations[] — {ts, exchange, p: price, side: 1 long liquidated / −1 short liquidated, usd}, by_exchange{exchange: [long_usd, short_usd]}","summary":"Recent liquidations of a coin on all exchanges (last 30 days kept).","weight":"1"},{"example":{"asset":"BTC","bucket":82.7,"longs":[[82394.7,1520000.0]],"price":82725.6,"shorts":[[82891.0,980000.0]],"updated":1792391822480},"method":"GET","params":[{"description":"Instrument, e.g. BTC:perp","name":"asset","required":true}],"path":"/api/v1/liqmap","returns":"asset, price, bucket (price step), longs[] / shorts[] — [price, estimated USD], venues[], updated (ms)","summary":"Estimated liquidation levels (heatmap) for longs and shorts around the current price.","weight":"3"},{"example":{"rows":[{"base":"BTC","chg24":1.3,"doi24h":0.5,"funding":0.0000659,"liq24h":[25192228.2,0.0],"ls_all":60.7,"oi":31762146368.0,"price":82727.8,"vol24":8848586032.9}],"updated":1792391819873},"method":"GET","params":[],"path":"/api/v1/screener","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, …}","summary":"Whole-market overview: every perpetual coin across all exchanges (price, changes, volume, OI, funding, long/short, liquidations, CVD). Refreshed every 30 s.","weight":"2"},{"example":{"signals":[{"asset":"OP:spot","horizon":"15m","id":"sig_1792136115904523916","mid":0.1386,"rank":65.1,"ts":1792136115903}]},"method":"GET","params":[{"description":"Up to 500 (default 50)","name":"limit","required":false}],"path":"/api/v1/signals","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.","summary":"Latest order-book signals produced by the engine.","weight":"1"},{"example":{"ok":true,"total":{"n":49,"sum_pct":-14.1,"win_pct":26.5}},"method":"GET","params":[],"path":"/api/v1/signals/stats","returns":"total, by_tf, by_dir, by_month, curve[], trades[], open[] — see https://aggpro.xyz/stats","summary":"Open statistics of the Telegram bot's strategy signals: every closed trade after fees (outcomes only).","weight":"1"},{"example":{"history_days":180,"quota":{"burst":20.0,"daily":50000,"keys":3,"max_candles":1000,"rps":5.0,"ws_streams":8},"tier":"pro","used_today":154,"webhooks":false},"method":"GET","params":[],"path":"/api/v1/usage","returns":"tier, quota {keys, rps, burst, daily, max_candles, ws_streams}, used_today, history_days, webhooks","summary":"Your plan, quota and how many units you have used today (does not consume quota).","weight":"0"}],"limits":{"daily":"Units per UTC day; resets at 00:00 UTC.","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"},"headers":"Every successful response carries X-RateLimit-Limit (daily units), X-RateLimit-Remaining, X-RateLimit-Reset (unix seconds).","history":"History depth follows your plan (Pro 180 days, Elite unlimited).","plans":[{"api":false,"history_days":60,"plan":"free","quota":null,"webhooks":false},{"api":true,"history_days":180,"plan":"pro","quota":{"burst":20.0,"daily":50000,"keys":3,"max_candles":1000,"rps":5.0,"ws_streams":8},"webhooks":false},{"api":true,"history_days":null,"plan":"elite","quota":{"burst":60.0,"daily":300000,"keys":5,"max_candles":1500,"rps":20.0,"ws_streams":16},"webhooks":true}],"rate":"Token bucket: `rps` requests per second sustained, `burst` back-to-back. Each request costs its `weight` in units.","scope":"Per account — all your keys share one quota.","server_guard":"At most 48 API requests are processed at once for all users; beyond that the server answers 503 — retry after a short pause."},"name":"AggPro API","openapi":"https://aggpro.xyz/api/v1/openapi.json","support":"https://t.me/agg_pro_support_bot","version":"v1","webhooks":{"delivery":"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.","events":["signal","price_alert","liq_pool_alert"],"manage":"Account → API → Webhooks (https://aggpro.xyz/profile#api), up to 5 HTTPS endpoints.","plan":"Elite"},"websocket":{"about":"Live aggregated order book stream. Up to `ws_streams` instruments at once per connection (Pro 8, Elite 16).","messages":"First {\"type\":\"hello\",\"assets\":[…]}; then {\"id\":\"p1\",\"book\":{…}} with the same book format as /api/v1/book, several times per second.","subscribe":{"asset":"BTC:perp","id":"p1","multiplier":10,"op":"subscribe"},"unsubscribe":{"id":"p1","op":"unsubscribe"},"url":"wss://aggpro.xyz/ws/dom?key=YOUR_KEY"}}