{"components":{"securitySchemes":{"ApiKey":{"in":"header","name":"X-API-Key","type":"apiKey"}}},"info":{"description":"Aggregated crypto derivatives data across exchanges. Human docs: https://aggpro.xyz/docs/api. Limits: https://aggpro.xyz/api/v1","title":"AggPro API","version":"1.0"},"openapi":"3.1.0","paths":{"/api/v1/book":{"get":{"description":"Weight: 1 unit(s). 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}","parameters":[{"description":"Instrument: BASE:perp or BASE:spot, e.g. BTC:perp","in":"query","name":"asset","required":true,"schema":{"type":"string"}},{"description":"Price-level grouping as a multiple of the base tick (default 10)","in":"query","name":"multiplier","required":false,"schema":{"type":"string"}},{"description":"Levels per side, 1–500 (default 100)","in":"query","name":"depth","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"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"}}},"description":"OK"},"401":{"description":"Invalid key"},"402":{"description":"Plan without API"},"429":{"description":"Rate or daily limit — see Retry-After"},"503":{"description":"Server busy — retry"}},"security":[{"ApiKey":[]}],"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)."}},"/api/v1/chart":{"get":{"description":"Weight: 1 (2 if limit > 1000) unit(s). 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.","parameters":[{"description":"Instrument, e.g. ETH:perp","in":"query","name":"asset","required":true,"schema":{"type":"string"}},{"description":"1m | 5m | 15m | 1h | 4h | 1d (default 15m)","in":"query","name":"interval","required":false,"schema":{"type":"string"}},{"description":"Candles, up to 1000 (Pro) / 1500 (Elite); default 500","in":"query","name":"limit","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"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"}}},"description":"OK"},"401":{"description":"Invalid key"},"402":{"description":"Plan without API"},"429":{"description":"Rate or daily limit — see Retry-After"},"503":{"description":"Server busy — retry"}},"security":[{"ApiKey":[]}],"summary":"OHLCV candles aggregated across exchanges (VWAP open/close, max high, min low, summed volume) with aggressive buy/sell volume split."}},"/api/v1/liqmap":{"get":{"description":"Weight: 3 unit(s). Returns: asset, price, bucket (price step), longs[] / shorts[] — [price, estimated USD], venues[], updated (ms)","parameters":[{"description":"Instrument, e.g. BTC:perp","in":"query","name":"asset","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"asset":"BTC","bucket":82.7,"longs":[[82394.7,1520000.0]],"price":82725.6,"shorts":[[82891.0,980000.0]],"updated":1792391822480}}},"description":"OK"},"401":{"description":"Invalid key"},"402":{"description":"Plan without API"},"429":{"description":"Rate or daily limit — see Retry-After"},"503":{"description":"Server busy — retry"}},"security":[{"ApiKey":[]}],"summary":"Estimated liquidation levels (heatmap) for longs and shorts around the current price."}},"/api/v1/liquidations":{"get":{"description":"Weight: 1 unit(s). Returns: liquidations[] — {ts, exchange, p: price, side: 1 long liquidated / −1 short liquidated, usd}, by_exchange{exchange: [long_usd, short_usd]}","parameters":[{"description":"Coin or instrument, e.g. BTC","in":"query","name":"asset","required":true,"schema":{"type":"string"}},{"description":"Unix ms (default 24 h ago)","in":"query","name":"since","required":false,"schema":{"type":"string"}},{"description":"Up to 5000 events (default 1000)","in":"query","name":"limit","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"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}]}}},"description":"OK"},"401":{"description":"Invalid key"},"402":{"description":"Plan without API"},"429":{"description":"Rate or daily limit — see Retry-After"},"503":{"description":"Server busy — retry"}},"security":[{"ApiKey":[]}],"summary":"Recent liquidations of a coin on all exchanges (last 30 days kept)."}},"/api/v1/longshort":{"get":{"description":"Weight: 2 unit(s). Returns: t[] (ms), top[] (% of top traders' positions that are long), all[] (% of all accounts that are long)","parameters":[{"description":"Coin, e.g. SOL","in":"query","name":"asset","required":true,"schema":{"type":"string"}},{"description":"5m | 15m | 1h | 4h | 1d (default 1h)","in":"query","name":"tf","required":false,"schema":{"type":"string"}},{"description":"Start, unix ms (default 7 days ago)","in":"query","name":"from","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"all":[57.75],"ok":true,"t":[1790593200000],"top":[61.59]}}},"description":"OK"},"401":{"description":"Invalid key"},"402":{"description":"Plan without API"},"429":{"description":"Rate or daily limit — see Retry-After"},"503":{"description":"Server busy — retry"}},"security":[{"ApiKey":[]}],"summary":"Long/short ratio: top traders and all accounts (share of longs, %)."}},"/api/v1/market":{"get":{"description":"Weight: 2 unit(s). 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.","parameters":[{"description":"Coin, e.g. BTC","in":"query","name":"asset","required":true,"schema":{"type":"string"}},{"description":"5m | 15m | 1h | 4h | 1d (default 1h)","in":"query","name":"tf","required":false,"schema":{"type":"string"}},{"description":"Start, unix ms (default 7 days ago; max 5000 points; limited by your plan's history depth)","in":"query","name":"from","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"doi":[4980736.0],"funding":[0.0000694],"oi":[34772451808.3],"ok":true,"premium":[-0.00052],"step":3600000,"t":[1761289200000],"venues":["binance","bybit","okx"]}}},"description":"OK"},"401":{"description":"Invalid key"},"402":{"description":"Plan without API"},"429":{"description":"Rate or daily limit — see Retry-After"},"503":{"description":"Server busy — retry"}},"security":[{"ApiKey":[]}],"summary":"Derivatives time series of a coin, aggregated over exchanges: open interest, OI change, volume-weighted funding, premium."}},"/api/v1/screener":{"get":{"description":"Weight: 2 unit(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, …}","parameters":[],"responses":{"200":{"content":{"application/json":{"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}}},"description":"OK"},"401":{"description":"Invalid key"},"402":{"description":"Plan without API"},"429":{"description":"Rate or daily limit — see Retry-After"},"503":{"description":"Server busy — retry"}},"security":[{"ApiKey":[]}],"summary":"Whole-market overview: every perpetual coin across all exchanges (price, changes, volume, OI, funding, long/short, liquidations, CVD). Refreshed every 30 s."}},"/api/v1/signals":{"get":{"description":"Weight: 1 unit(s). 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.","parameters":[{"description":"Up to 500 (default 50)","in":"query","name":"limit","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"signals":[{"asset":"OP:spot","horizon":"15m","id":"sig_1792136115904523916","mid":0.1386,"rank":65.1,"ts":1792136115903}]}}},"description":"OK"},"401":{"description":"Invalid key"},"402":{"description":"Plan without API"},"429":{"description":"Rate or daily limit — see Retry-After"},"503":{"description":"Server busy — retry"}},"security":[{"ApiKey":[]}],"summary":"Latest order-book signals produced by the engine."}},"/api/v1/signals/stats":{"get":{"description":"Weight: 1 unit(s). Returns: total, by_tf, by_dir, by_month, curve[], trades[], open[] — see https://aggpro.xyz/stats","parameters":[],"responses":{"200":{"content":{"application/json":{"example":{"ok":true,"total":{"n":49,"sum_pct":-14.1,"win_pct":26.5}}}},"description":"OK"},"401":{"description":"Invalid key"},"402":{"description":"Plan without API"},"429":{"description":"Rate or daily limit — see Retry-After"},"503":{"description":"Server busy — retry"}},"security":[{"ApiKey":[]}],"summary":"Open statistics of the Telegram bot's strategy signals: every closed trade after fees (outcomes only)."}},"/api/v1/usage":{"get":{"description":"Weight: 0 unit(s). Returns: tier, quota {keys, rps, burst, daily, max_candles, ws_streams}, used_today, history_days, webhooks","parameters":[],"responses":{"200":{"content":{"application/json":{"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}}},"description":"OK"},"401":{"description":"Invalid key"},"402":{"description":"Plan without API"},"429":{"description":"Rate or daily limit — see Retry-After"},"503":{"description":"Server busy — retry"}},"security":[{"ApiKey":[]}],"summary":"Your plan, quota and how many units you have used today (does not consume quota)."}}},"servers":[{"url":"https://aggpro.xyz"}]}