# Binance Futures — Zapi reference > USD-M perpetual futures market data: funding, premium index, open interest, long/short ratios, candles and depth. **Base URL:** `https://api.zpi.web.id` **Auth:** Send `x-api-key: YOUR_KEY` header on every request. Get a free key at https://zpi.web.id/dashboard/keys. **Response envelope:** `{ content, message, errors }` **Rate limit:** 60 req/min on free tier. **Related:** - Detail page: https://zpi.web.id/api/finance/binance-futures - Endpoint catalog: https://zpi.web.id/category/finance - Concise index: https://zpi.web.id/llms.txt - Full reference: https://zpi.web.id/llms-full.txt --- ## Binance Futures **Category:** finance · **Slug:** `binance-futures` **Detail page:** https://zpi.web.id/api/finance/binance-futures USD-M perpetual futures market data: funding, premium index, open interest, long/short ratios, candles and depth. **Tags:** binance, futures, perpetual, funding, open-interest, crypto ### Agg Trades Compressed trades for one contract: fills at the same price, from the same - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:binance-futures/agg-trades` - **Cache TTL:** 5s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `symbol` | string | query | yes | Futures contract. Accepts BTCUSDT, BTC/USDT, btc_usdt, or a dated contract such as BTCUSDT_260925 | | `count` | number | query | no | Rows to return, newest last. Default 500, max 1000 | | `startTime` | string | query | no | Window start, inclusive. Only the last 2 days exist. ISO timestamp or epoch milliseconds | | `endTime` | string | query | no | Window end, inclusive. ISO timestamp or epoch milliseconds | | `fromId` | string | query | no | Resume from this aggregate trade id instead of a time window | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:binance-futures/agg-trades?symbol=BTCUSDT&count=500&startTime=2026-08-20T00%3A00%3A00Z&endTime=2026-08-20T01%3A00%3A00Z&fromId=3413731512" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:binance-futures/agg-trades?symbol=BTCUSDT&count=500&startTime=2026-08-20T00%3A00%3A00Z&endTime=2026-08-20T01%3A00%3A00Z&fromId=3413731512", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/finance:binance-futures/agg-trades?symbol=BTCUSDT&count=500&startTime=2026-08-20T00%3A00%3A00Z&endTime=2026-08-20T01%3A00%3A00Z&fromId=3413731512", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "count": 200, "items": [ { "side": "buy", "time": 1787184000002, "price": 69310.1, "amount": 0.03, "timeIso": "2026-08-20T00:00:00.002Z", "aggTradeId": 3412496636, "tradeCount": 2, "amountQuote": 2079.303, "lastTradeId": 7983197863, "firstTradeId": 7983197862, "isBuyerMaker": false }, { "side": "sell", "time": 1787184000061, "price": 69310, "amount": 0.004, "timeIso": "2026-08-20T00:00:00.061Z", "aggTradeId": 3412496637, "tradeCount": 1, "amountQuote": 277.24, "lastTradeId": 7983197864, "firstTradeId": 7983197864, "isBuyerMaker": true }, { "side": "buy", "time": 1787184000085, "price": 69310.1, "amount": 0.293, "timeIso": "2026-08-20T00:00:00.085Z", "aggTradeId": 3412496638, "tradeCount": 5, "amountQuote": 20307.8593, "lastTradeId": 7983197869, "firstTradeId": 7983197865, "isBuyerMaker": false }, { "side": "sell", "time": 1787184000138, "price": 69310, "amount": 0.002, "timeIso": "2026-08-20T00:00:00.138Z", "aggTradeId": 3412496639, "tradeCount": 1, "amountQuote": 138.62, "lastTradeId": 7983197870, "firstTradeId": 7983197870, "isBuyerMaker": true }, { "side": "buy", "time": 1787184000145, "price": 69310.1, "amount": 0.247, "timeIso": "2026-08-20T00:00:00.145Z", "aggTradeId": 3412496640, "tradeCount": 5, "amountQuote": 17119.5947, "lastTradeId": 7983197875, "firstTradeId": 7983197871, "isBuyerMaker": false }, { "side": "sell", "time": 1787184000241, "price": 69310, "amount": 0.001, "timeIso": "2026-08-20T00:00:00.241Z", "aggTradeId": 3412496641, "tradeCount": 1, "amountQuote": 69.31, "lastTradeId": 7983197876, "firstTradeId": 7983197876, "isBuyerMaker": true } ], "symbol": "BTCUSDT", "exchange": "binance" } ``` --- ### Basis The gap between a futures contract and its index — the carry a calendar spread - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:binance-futures/basis` - **Cache TTL:** 60s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `pair` | string | query | yes | Underlying pair, not a contract symbol. Accepts BTCUSDT, BTC/USDT or btc_usdt | | `contractType` | enum(PERPETUAL|CURRENT_QUARTER|NEXT_QUARTER) | query | no | Which contract to measure against the index. Default PERPETUAL | | `period` | enum(5m|15m|30m|1h|2h|4h|6h|12h|1d) | query | no | Bucket size. One of 5m, 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d — the upstream refuses 8h. Default 1d | | `count` | number | query | no | Rows to return, oldest first. Default 30, max 1000 | | `startTime` | string | query | no | Window start, inclusive. Only the last 30 days exist. ISO date or epoch milliseconds | | `endTime` | string | query | no | Window end, inclusive. ISO date or epoch milliseconds | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:binance-futures/basis?pair=BTCUSDT&contractType=PERPETUAL&period=1d&count=30&startTime=2026-08-01&endTime=2026-08-20" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:binance-futures/basis?pair=BTCUSDT&contractType=PERPETUAL&period=1d&count=30&startTime=2026-08-01&endTime=2026-08-20", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/finance:binance-futures/basis?pair=BTCUSDT&contractType=PERPETUAL&period=1d&count=30&startTime=2026-08-01&endTime=2026-08-20", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "pair": "BTCUSDT", "count": 20, "items": [ { "pair": "BTCUSDT", "time": 1785542400000, "basis": -27.08956522, "timeIso": "2026-08-01T00:00:00.000Z", "basisRate": -0.0004, "indexPrice": 62886.98956522, "contractType": "PERPETUAL", "futuresPrice": 62859.9, "basisRatePercent": -0.04, "annualizedBasisRate": null }, { "pair": "BTCUSDT", "time": 1785628800000, "basis": -29.0676087, "timeIso": "2026-08-02T00:00:00.000Z", "basisRate": -0.0005, "indexPrice": 62821.3676087, "contractType": "PERPETUAL", "futuresPrice": 62792.3, "basisRatePercent": -0.05, "annualizedBasisRate": null }, { "pair": "BTCUSDT", "time": 1785715200000, "basis": -19.14152174, "timeIso": "2026-08-03T00:00:00.000Z", "basisRate": -0.0003, "indexPrice": 63569.14152174, "contractType": "PERPETUAL", "futuresPrice": 63550, "basisRatePercent": -0.03, "annualizedBasisRate": null }, { "pair": "BTCUSDT", "time": 1785801600000, "basis": -24.77434783, "timeIso": "2026-08-04T00:00:00.000Z", "basisRate": -0.0004, "indexPrice": 63521.87434783, "contractType": "PERPETUAL", "futuresPrice": 63497.1, "basisRatePercent": -0.04, "annualizedBasisRate": null }, { "pair": "BTCUSDT", "time": 1785888000000, "basis": -27.70152174, "timeIso": "2026-08-05T00:00:00.000Z", "basisRate": -0.0004, "indexPrice": 64103.30152174, "contractType": "PERPETUAL", "futuresPrice": 64075.6, "basisRatePercent": -0.04, "annualizedBasisRate": null }, { "pair": "BTCUSDT", "time": 1785974400000, "basis": -28.42391304, "timeIso": "2026-08-06T00:00:00.000Z", "basisRate": -0.0004, "indexPrice": 64662.42391304, "contractType": "PERPETUAL", "futuresPrice": 64634, "basisRatePercent": -0.04, "annualizedBasisRate": null } ], "period": "1d", "exchange": "binance", "contractType": "PERPETUAL" } ``` --- ### Book Ticker Best bid and ask on one contract — the top of the book without the depth. - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:binance-futures/book-ticker` - **Cache TTL:** 5s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `symbol` | string | query | yes | Futures contract. Accepts BTCUSDT, BTC/USDT, btc_usdt, or a dated contract such as BTCUSDT_260925 | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:binance-futures/book-ticker?symbol=BTCUSDT" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:binance-futures/book-ticker?symbol=BTCUSDT", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/finance:binance-futures/book-ticker?symbol=BTCUSDT", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "ask": 72189.3, "bid": 72189.2, "time": 1787238708313, "askQty": 0.021, "bidQty": 5.871, "spread": 0.1, "symbol": "BTCUSDT", "timeIso": "2026-08-20T15:11:48.313Z", "exchange": "binance", "spreadPercent": 0.000139 } ``` --- ### Continuous Klines OHLCV candles for a continuous contract: one unbroken series across successive - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:binance-futures/continuous-klines` - **Cache TTL:** 30s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `pair` | string | query | yes | Underlying pair, not a contract symbol. Accepts BTCUSDT, BTC/USDT or btc_usdt | | `contractType` | enum(PERPETUAL|CURRENT_QUARTER|NEXT_QUARTER|TRADIFI_PERPETUAL) | query | no | Which contract in the series. Default PERPETUAL | | `interval` | enum(1m|3m|5m|15m|30m|1h|2h|4h|6h|8h|12h|1d|3d|1w|1M) | query | no | Candle size. Default 1d. Unlike spot there is no 1s candle | | `count` | number | query | no | Number of candles. Default 500, max 1500 — higher than spot's 1000, and 1501 is refused outright | | `startTime` | string | query | no | Oldest candle to return, matched on its open time and inclusive. ISO date or epoch milliseconds | | `endTime` | string | query | no | Newest candle to return, matched on its open time and inclusive. ISO date or epoch milliseconds | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:binance-futures/continuous-klines?pair=BTCUSDT&contractType=PERPETUAL&interval=1d&count=500&startTime=2026-01-01&endTime=2026-03-01" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:binance-futures/continuous-klines?pair=BTCUSDT&contractType=PERPETUAL&interval=1d&count=500&startTime=2026-01-01&endTime=2026-03-01", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/finance:binance-futures/continuous-klines?pair=BTCUSDT&contractType=PERPETUAL&interval=1d&count=500&startTime=2026-01-01&endTime=2026-03-01", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "pair": "BTCUSDT", "count": 60, "candles": [ { "low": 87508.4, "date": "2026-01-01T00:00:00.000Z", "high": 88881.4, "open": 87608.3, "close": 88800, "openTime": 1767225600000, "closeTime": 1767311999999, "tradeCount": 1056983, "volumeBase": 47941.303, "volumeQuote": 4221684071.5216 }, { "low": 88324.4, "date": "2026-01-02T00:00:00.000Z", "high": 90945.1, "open": 88800, "close": 89951.4, "openTime": 1767312000000, "closeTime": 1767398399999, "tradeCount": 3761821, "volumeBase": 176662.448, "volumeQuote": 15818436364.5132 }, { "low": 89261.2, "date": "2026-01-03T00:00:00.000Z", "high": 90716.9, "open": 89951.5, "close": 90595.8, "openTime": 1767398400000, "closeTime": 1767484799999, "tradeCount": 1281323, "volumeBase": 56891.269, "volumeQuote": 5120704164.6601 }, { "low": 90595.7, "date": "2026-01-04T00:00:00.000Z", "high": 91779.7, "open": 90595.8, "close": 91497.1, "openTime": 1767484800000, "closeTime": 1767571199999, "tradeCount": 1754310, "volumeBase": 73773.029, "volumeQuote": 6733223160.202 }, { "low": 91476.5, "date": "2026-01-05T00:00:00.000Z", "high": 94760.3, "open": 91497.2, "close": 93822.4, "openTime": 1767571200000, "closeTime": 1767657599999, "tradeCount": 4067261, "volumeBase": 189416.312, "volumeQuote": 17646171283.7405 }, { "low": 91209, "date": "2026-01-06T00:00:00.000Z", "high": 94415.4, "open": 93822.3, "close": 93708, "openTime": 1767657600000, "closeTime": 1767743999999, "tradeCount": 3608826, "volumeBase": 187443.05, "volumeQuote": 17445560806.7759 } ], "exchange": "binance", "interval": "1d", "contractType": "PERPETUAL" } ``` --- ### Depth Order book for one contract — the resting bids and asks behind the quote. - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:binance-futures/depth` - **Cache TTL:** 10s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `symbol` | string | query | yes | Futures contract. Accepts BTCUSDT, BTC/USDT, btc_usdt, or a dated contract such as BTCUSDT_260925 | | `limit` | number | query | no | Levels per side. Default 50, max 1000 | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:binance-futures/depth?symbol=BTCUSDT&limit=50" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:binance-futures/depth?symbol=BTCUSDT&limit=50", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/finance:binance-futures/depth?symbol=BTCUSDT&limit=50", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "asks": [ { "price": 72233.8, "amount": 0.113 }, { "price": 72234.4, "amount": 0.001 }, { "price": 72234.5, "amount": 0.001 }, { "price": 72234.7, "amount": 0.002 }, { "price": 72234.8, "amount": 0.001 }, { "price": 72234.9, "amount": 0.003 } ], "bids": [ { "price": 72233.7, "amount": 1.202 }, { "price": 72233.6, "amount": 1.718 }, { "price": 72233.5, "amount": 0.001 }, { "price": 72233.2, "amount": 0.002 }, { "price": 72233.1, "amount": 0.002 }, { "price": 72232.1, "amount": 0.001 } ], "time": 1787238731361, "spread": 0.1, "symbol": "BTCUSDT", "timeIso": "2026-08-20T15:12:11.361Z", "askCount": 50, "bidCount": 50, "exchange": "binance", "transactionTime": 1787238731355 } ``` --- ### Exchange Info Instrument specifications for USD-M futures: tick size, lot size, minimum - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:binance-futures/exchange-info` - **Cache TTL:** 600s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `symbol` | string | query | no | One contract. Accepts BTCUSDT, BTC/USDT or a dated contract such as BTCUSDT_260925 | | `symbols` | string | query | no | Several contracts, comma separated. Max 100 | | `quote` | enum(all|USDT|USDC|BTC|USD1) | query | no | Restrict to contracts margined in this asset when no symbol is given. Default USDT | | `contractType` | enum(all|PERPETUAL|CURRENT_QUARTER|NEXT_QUARTER|TRADIFI_PERPETUAL) | query | no | Keep only one kind of contract. Default all | | `search` | string | query | no | Filter by base asset | | `status` | enum(all|trading) | query | no | Keep only tradable contracts, or every listed one including SETTLING and PENDING_TRADING. Default trading | | `count` | number | query | no | Rows to return. Default 100, max 500 | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:binance-futures/exchange-info?symbol=BTCUSDT&symbols=BTCUSDT%2CETHUSDT"e=USDT&contractType=PERPETUAL&search=btc&status=trading&count=100" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:binance-futures/exchange-info?symbol=BTCUSDT&symbols=BTCUSDT%2CETHUSDT"e=USDT&contractType=PERPETUAL&search=btc&status=trading&count=100", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/finance:binance-futures/exchange-info?symbol=BTCUSDT&symbols=BTCUSDT%2CETHUSDT"e=USDT&contractType=PERPETUAL&search=btc&status=trading&count=100", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "count": 100, "items": [ { "base": "0G", "pair": "0GUSDT", "quote": "USDT", "maxQty": 4000000, "minQty": 1, "status": "TRADING", "symbol": "0GUSDT", "filters": { "lotSize": { "maxQty": 4000000, "minQty": 1, "stepSize": 1 }, "minNotional": { "notional": 5 }, "priceFilter": { "maxPrice": 200, "minPrice": 0.0001, "tickSize": 0.0001 }, "maxNumOrders": { "limit": 200 }, "percentPrice": { "multiplierUp": 1.15, "multiplierDown": 0.85, "multiplierDecimal": 4 }, "marketLotSize": { "maxQty": 400000, "minQty": 1, "stepSize": 1 }, "positionRiskControl": { "positionControlSide": "NONE" } }, "maxPrice": 200, "minPrice": 0.0001, "stepSize": 1, "tickSize": 0.0001, "orderTypes": [ "LIMIT", "MARKET", "STOP", "STOP_MARKET", "TAKE_PROFIT", "TAKE_PROFIT_MARKET" ], "marginAsset": "USDT", "minNotional": 5, "onboardDate": 1758123900000, "permissions": [ "GRID", "COPY", "DCA", "PSB" ], "timeInForce": [ "GTC", "IOC", "FOK", "GTX", "GTD" ], "contractType": "PERPETUAL", "deliveryDate": 4133404800000, "marketMaxQty": 400000, "marketMinQty": 1, "basePrecision": 8, "liquidationFee": 0.02, "onboardDateIso": "2025-09-17T15:45:00.000Z", "pricePrecision": 7, "quotePrecision": 8, "triggerProtect": 0.15, "underlyingType": "COIN", "deliveryDateIso": "2100-12-25T08:00:00.000Z", "marketTakeBound": 0.15, "maxMoveOrderLimit": 10000, "quantityPrecision": 0, "underlyingSubType": [ "Layer-1" ], "maintMarginPercent": 2.5, "requiredMarginPercent": 5 }, { "base": "1000000BOB", "pair": "1000000BOBUSDT", "quote": "USDT", "maxQty": 30000000, "minQty": 1, "status": "TRADING", "symbol": "1000000BOBUSDT", "filters": { "lotSize": { "maxQty": 30000000, "minQty": 1, "stepSize": 1 }, "minNotional": { "notional": 5 }, "priceFilter": { "maxPrice": 200, "minPrice": 0.00001, "tickSize": 0.00001 }, "maxNumOrders": { "limit": 200 }, "percentPrice": { "multiplierUp": 1.15, "multiplierDown": 0.85, "multiplierDecimal": 4 }, "marketLotSize": { "maxQty": 3000000, "minQty": 1, "stepSize": 1 }, "positionRiskControl": { "positionControlSide": "NONE" } }, "maxPrice": 200, "minPrice": 0.00001, "stepSize": 1, "tickSize": 0.00001, "orderTypes": [ "LIMIT", "MARKET", "STOP", "STOP_MARKET", "TAKE_PROFIT", "TAKE_PROFIT_MARKET" ], "marginAsset": "USDT", "minNotional": 5, "onboardDate": 1749112200000, "permissions": [ "GRID", "COPY", "DCA", "PSB" ], "timeInForce": [ "GTC", "IOC", "FOK", "GTX", "GTD" ], "contractType": "PERPETUAL", "deliveryDate": 4133404800000, "marketMaxQty": 3000000, "marketMinQty": 1, "basePrecision": 8, "liquidationFee": 0.02, "onboardDateIso": "2025-06-05T08:30:00.000Z", "pricePrecision": 7, "quotePrecision": 8, "triggerProtect": 0.15, "underlyingType": "COIN", "deliveryDateIso": "2100-12-25T08:00:00.000Z", "marketTakeBound": 0.15, "maxMoveOrderLimit": 10000, "quantityPrecision": 0, "underlyingSubType": [ "Meme" ], "maintMarginPercent": 2.5, "requiredMarginPercent": 5 }, { "base": "1000000MOG", "pair": "1000000MOGUSDT", "quote": "USDT", "maxQty": 6000000, "minQty": 0.1, "status": "TRADING", "symbol": "1000000MOGUSDT", "filters": { "lotSize": { "maxQty": 6000000, "minQty": 0.1, "stepSize": 0.1 }, "minNotional": { "notional": 5 }, "priceFilter": { "maxPrice": 2000, "minPrice": 0.0001, "tickSize": 0.0001 }, "maxNumOrders": { "limit": 200 }, "percentPrice": { "multiplierUp": 1.15, "multiplierDown": 0.85, "multiplierDecimal": 4 }, "marketLotSize": { "maxQty": 600000, "minQty": 0.1, "stepSize": 0.1 }, "positionRiskControl": { "positionControlSide": "NONE" } }, "maxPrice": 2000, "minPrice": 0.0001, "stepSize": 0.1, "tickSize": 0.0001, "orderTypes": [ "LIMIT", "MARKET", "STOP", "STOP_MARKET", "TAKE_PROFIT", "TAKE_PROFIT_MARKET" ], "marginAsset": "USDT", "minNotional": 5, "onboardDate": 1730982600000, "permissions": [ "GRID", "COPY", "DCA", "PSB" ], "timeInForce": [ "GTC", "IOC", "FOK", "GTX", "GTD" ], "contractType": "PERPETUAL", "deliveryDate": 4133404800000, "marketMaxQty": 600000, "marketMinQty": 0.1, "basePrecision": 8, "liquidationFee": 0.02, "onboardDateIso": "2024-11-07T12:30:00.000Z", "pricePrecision": 7, "quotePrecision": 8, "triggerProtect": 0.15, "underlyingType": "COIN", "deliveryDateIso": "2100-12-25T08:00:00.000Z", "marketTakeBound": 0.15, "maxMoveOrderLimit": 10000, "quantityPrecision": 1, "underlyingSubType": [ "Meme" ], "maintMarginPercent": 2.5, "requiredMarginPercent": 5 }, { "base": "1000BONK", "pair": "1000BONKUSDT", "quote": "USDT", "maxQty": 400000000, "minQty": 1, "status": "TRADING", "symbol": "1000BONKUSDT", "filters": { "lotSize": { "maxQty": 400000000, "minQty": 1, "stepSize": 1 }, "minNotional": { "notional": 5 }, "priceFilter": { "maxPrice": 200, "minPrice": 0.000001, "tickSize": 0.000001 }, "maxNumOrders": { "limit": 200 }, "percentPrice": { "multiplierUp": 1.15, "multiplierDown": 0.85, "multiplierDecimal": 4 }, "marketLotSize": { "maxQty": 40000000, "minQty": 1, "stepSize": 1 }, "positionRiskControl": { "positionControlSide": "NONE" } }, "maxPrice": 200, "minPrice": 0.000001, "stepSize": 1, "tickSize": 0.000001, "orderTypes": [ "LIMIT", "MARKET", "STOP", "STOP_MARKET", "TAKE_PROFIT", "TAKE_PROFIT_MARKET" ], "marginAsset": "USDT", "minNotional": 5, "onboardDate": 1700661600000, "permissions": [ "GRID", "COPY", "DCA", "PSB" ], "timeInForce": [ "GTC", "IOC", "FOK", "GTX", "GTD" ], "contractType": "PERPETUAL", "deliveryDate": 4133404800000, "marketMaxQty": 40000000, "marketMinQty": 1, "basePrecision": 8, "liquidationFee": 0.015, "onboardDateIso": "2023-11-22T14:00:00.000Z", "pricePrecision": 7, "quotePrecision": 8, "triggerProtect": 0.15, "underlyingType": "COIN", "deliveryDateIso": "2100-12-25T08:00:00.000Z", "marketTakeBound": 0.15, "maxMoveOrderLimit": 10000, "quantityPrecision": 0, "underlyingSubType": [ "Meme" ], "maintMarginPercent": 2.5, "requiredMarginPercent": 5 }, { "base": "1000CAT", "pair": "1000CATUSDT", "quote": "USDT", "maxQty": 400000000, "minQty": 1, "status": "TRADING", "symbol": "1000CATUSDT", "filters": { "lotSize": { "maxQty": 400000000, "minQty": 1, "stepSize": 1 }, "minNotional": { "notional": 5 }, "priceFilter": { "maxPrice": 200, "minPrice": 0.00001, "tickSize": 0.000001 }, "maxNumOrders": { "limit": 200 }, "percentPrice": { "multiplierUp": 1.15, "multiplierDown": 0.85, "multiplierDecimal": 4 }, "marketLotSize": { "maxQty": 40000000, "minQty": 1, "stepSize": 1 }, "positionRiskControl": { "positionControlSide": "NONE" } }, "maxPrice": 200, "minPrice": 0.00001, "stepSize": 1, "tickSize": 0.000001, "orderTypes": [ "LIMIT", "MARKET", "STOP", "STOP_MARKET", "TAKE_PROFIT", "TAKE_PROFIT_MARKET" ], "marginAsset": "USDT", "minNotional": 5, "onboardDate": 1729513800000, "permissions": [ "GRID", "COPY", "DCA", "PSB" ], "timeInForce": [ "GTC", "IOC", "FOK", "GTX", "GTD" ], "contractType": "PERPETUAL", "deliveryDate": 4133404800000, "marketMaxQty": 40000000, "marketMinQty": 1, "basePrecision": 8, "liquidationFee": 0.015, "onboardDateIso": "2024-10-21T12:30:00.000Z", "pricePrecision": 7, "quotePrecision": 8, "triggerProtect": 0.15, "underlyingType": "COIN", "deliveryDateIso": "2100-12-25T08:00:00.000Z", "marketTakeBound": 0.15, "maxMoveOrderLimit": 10000, "quantityPrecision": 0, "underlyingSubType": [ "Meme" ], "maintMarginPercent": 2.5, "requiredMarginPercent": 5 }, { "base": "1000CHEEMS", "pair": "1000CHEEMSUSDT", "quote": "USDT", "maxQty": 2000000000, "minQty": 1, "status": "TRADING", "symbol": "1000CHEEMSUSDT", "filters": { "lotSize": { "maxQty": 2000000000, "minQty": 1, "stepSize": 1 }, "minNotional": { "notional": 5 }, "priceFilter": { "maxPrice": 200, "minPrice": 0.000001, "tickSize": 1e-7 }, "maxNumOrders": { "limit": 200 }, "percentPrice": { "multiplierUp": 1.15, "multiplierDown": 0.85, "multiplierDecimal": 4 }, "marketLotSize": { "maxQty": 200000000, "minQty": 1, "stepSize": 1 }, "positionRiskControl": { "positionControlSide": "NONE" } }, "maxPrice": 200, "minPrice": 0.000001, "stepSize": 1, "tickSize": 1e-7, "orderTypes": [ "LIMIT", "MARKET", "STOP", "STOP_MARKET", "TAKE_PROFIT", "TAKE_PROFIT_MARKET" ], "marginAsset": "USDT", "minNotional": 5, "onboardDate": 1732535100000, "permissions": [ "GRID", "COPY", "DCA", "PSB" ], "timeInForce": [ "GTC", "IOC", "FOK", "GTX", "GTD" ], "contractType": "PERPETUAL", "deliveryDate": 4133404800000, "marketMaxQty": 200000000, "marketMinQty": 1, "basePrecision": 8, "liquidationFee": 0.015, "onboardDateIso": "2024-11-25T11:45:00.000Z", "pricePrecision": 7, "quotePrecision": 8, "triggerProtect": 0.15, "underlyingType": "COIN", "deliveryDateIso": "2100-12-25T08:00:00.000Z", "marketTakeBound": 0.15, "maxMoveOrderLimit": 10000, "quantityPrecision": 0, "underlyingSubType": [ "Meme" ], "maintMarginPercent": 2.5, "requiredMarginPercent": 5 } ], "quote": "USDT", "total": 700, "exchange": "binance", "rateLimits": [ { "type": "REQUEST_WEIGHT", "limit": 2400, "interval": "MINUTE", "intervalNum": 1 }, { "type": "ORDERS", "limit": 1200, "interval": "MINUTE", "intervalNum": 1 }, { "type": "ORDERS", "limit": 300, "interval": "SECOND", "intervalNum": 10 } ], "serverTime": 1787234410884, "contractType": "all", "serverTimeIso": "2026-08-20T14:00:10.884Z" } ``` --- ### Funding Info The funding RULES rather than the settled rates: how often each contract - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:binance-futures/funding-info` - **Cache TTL:** 600s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `symbol` | string | query | no | One contract. Leave empty to list every contract with custom funding rules | | `count` | number | query | no | Rows to return. Default 200, max 1000 | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:binance-futures/funding-info?symbol=LPTUSDT&count=200" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:binance-futures/funding-info?symbol=LPTUSDT&count=200", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/finance:binance-futures/funding-info?symbol=LPTUSDT&count=200", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "count": 200, "items": [ { "symbol": "0GUSDT", "disclaimer": false, "updateTime": 1771120860088, "updateTimeIso": "2026-02-15T02:01:00.088Z", "fundingRateCap": 0.02, "fundingRateFloor": -0.02, "fundingIntervalHours": 4 }, { "symbol": "1000000BOBUSDT", "disclaimer": false, "updateTime": 1749112296983, "updateTimeIso": "2025-06-05T08:31:36.983Z", "fundingRateCap": 0.02, "fundingRateFloor": -0.02, "fundingIntervalHours": 4 }, { "symbol": "1000000MOGUSDT", "disclaimer": false, "updateTime": 1730982779981, "updateTimeIso": "2024-11-07T12:32:59.981Z", "fundingRateCap": 0.02, "fundingRateFloor": -0.02, "fundingIntervalHours": 4 }, { "symbol": "1000BONKUSDC", "disclaimer": false, "updateTime": 1714635097391, "updateTimeIso": "2024-05-02T07:31:37.391Z", "fundingRateCap": 0.02, "fundingRateFloor": -0.02, "fundingIntervalHours": 4 }, { "symbol": "1000BONKUSDT", "disclaimer": false, "updateTime": 1700661792896, "updateTimeIso": "2023-11-22T14:03:12.896Z", "fundingRateCap": 0.02, "fundingRateFloor": -0.02, "fundingIntervalHours": 4 }, { "symbol": "1000CATUSDT", "disclaimer": false, "updateTime": 1729513918575, "updateTimeIso": "2024-10-21T12:31:58.575Z", "fundingRateCap": 0.02, "fundingRateFloor": -0.02, "fundingIntervalHours": 4 } ], "total": 760, "symbol": null, "exchange": "binance" } ``` --- ### Funding Rate Settled funding history for one contract — what longs actually paid shorts, or - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:binance-futures/funding-rate` - **Cache TTL:** 60s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `symbol` | string | query | yes | Futures contract. Accepts BTCUSDT, BTC/USDT, btc_usdt, or a dated contract such as BTCUSDT_260925 | | `count` | number | query | no | Settlements to return, oldest first. Default 100, max 1000 — but without startTime the upstream clamps to 500 | | `startTime` | string | query | no | Window start, inclusive. ISO date or epoch milliseconds | | `endTime` | string | query | no | Window end, inclusive. ISO date or epoch milliseconds | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:binance-futures/funding-rate?symbol=BTCUSDT&count=100&startTime=2026-01-01&endTime=2026-08-01" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:binance-futures/funding-rate?symbol=BTCUSDT&count=100&startTime=2026-01-01&endTime=2026-08-01", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/finance:binance-futures/funding-rate?symbol=BTCUSDT&count=100&startTime=2026-01-01&endTime=2026-08-01", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "count": 100, "items": [ { "symbol": "BTCUSDT", "rateType": "Regular", "markPrice": 87608.3, "fundingRate": 0.0001, "fundingTime": 1767225600008, "fundingTimeIso": "2026-01-01T00:00:00.008Z", "fundingRatePercent": 0.01 }, { "symbol": "BTCUSDT", "rateType": "Regular", "markPrice": 87603.80894203, "fundingRate": 0.0001, "fundingTime": 1767254400002, "fundingTimeIso": "2026-01-01T08:00:00.002Z", "fundingRatePercent": 0.01 }, { "symbol": "BTCUSDT", "rateType": "Regular", "markPrice": 87986.8, "fundingRate": 0.00001711, "fundingTime": 1767283200001, "fundingTimeIso": "2026-01-01T16:00:00.001Z", "fundingRatePercent": 0.001711 }, { "symbol": "BTCUSDT", "rateType": "Regular", "markPrice": 88799.9, "fundingRate": 0.00005608, "fundingTime": 1767312000006, "fundingTimeIso": "2026-01-02T00:00:00.006Z", "fundingRatePercent": 0.005608 }, { "symbol": "BTCUSDT", "rateType": "Regular", "markPrice": 88829.2, "fundingRate": 0.00004219, "fundingTime": 1767340800007, "fundingTimeIso": "2026-01-02T08:00:00.007Z", "fundingRatePercent": 0.004219 }, { "symbol": "BTCUSDT", "rateType": "Regular", "markPrice": 89373, "fundingRate": 0.00004813, "fundingTime": 1767369600000, "fundingTimeIso": "2026-01-02T16:00:00.000Z", "fundingRatePercent": 0.004813 } ], "symbol": "BTCUSDT", "exchange": "binance" } ``` --- ### Global Long Short Ratio The share of ALL accounts holding a long against a short on one contract. - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:binance-futures/global-long-short-ratio` - **Cache TTL:** 60s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `symbol` | string | query | yes | Futures contract. Accepts BTCUSDT, BTC/USDT or btc_usdt | | `period` | enum(5m|15m|30m|1h|2h|4h|6h|12h|1d) | query | no | Bucket size. One of 5m, 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d — the upstream refuses 8h. Default 1d | | `count` | number | query | no | Rows to return, oldest first. Default 30, max 1000 | | `startTime` | string | query | no | Window start, inclusive. Only the last 30 days exist. ISO date or epoch milliseconds | | `endTime` | string | query | no | Window end, inclusive. ISO date or epoch milliseconds | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:binance-futures/global-long-short-ratio?symbol=BTCUSDT&period=1d&count=30&startTime=2026-08-01&endTime=2026-08-20" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:binance-futures/global-long-short-ratio?symbol=BTCUSDT&period=1d&count=30&startTime=2026-08-01&endTime=2026-08-20", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/finance:binance-futures/global-long-short-ratio?symbol=BTCUSDT&period=1d&count=30&startTime=2026-08-01&endTime=2026-08-20", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "count": 20, "items": [ { "time": 1785542400000, "symbol": "BTCUSDT", "timeIso": "2026-08-01T00:00:00.000Z", "longAccount": 0.6882, "shortAccount": 0.3118, "longShortRatio": 2.2072 }, { "time": 1785628800000, "symbol": "BTCUSDT", "timeIso": "2026-08-02T00:00:00.000Z", "longAccount": 0.6869, "shortAccount": 0.3131, "longShortRatio": 2.1939 }, { "time": 1785715200000, "symbol": "BTCUSDT", "timeIso": "2026-08-03T00:00:00.000Z", "longAccount": 0.6599, "shortAccount": 0.3401, "longShortRatio": 1.9403 }, { "time": 1785801600000, "symbol": "BTCUSDT", "timeIso": "2026-08-04T00:00:00.000Z", "longAccount": 0.5997, "shortAccount": 0.4003, "longShortRatio": 1.4981 }, { "time": 1785888000000, "symbol": "BTCUSDT", "timeIso": "2026-08-05T00:00:00.000Z", "longAccount": 0.5611, "shortAccount": 0.4389, "longShortRatio": 1.2784 }, { "time": 1785974400000, "symbol": "BTCUSDT", "timeIso": "2026-08-06T00:00:00.000Z", "longAccount": 0.5342, "shortAccount": 0.4658, "longShortRatio": 1.1468 } ], "period": "1d", "symbol": "BTCUSDT", "exchange": "binance" } ``` --- ### Index Price Klines Candles of the INDEX price for a pair — the spot composite the venue computes - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:binance-futures/index-price-klines` - **Cache TTL:** 30s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `pair` | string | query | yes | Underlying pair, not a contract symbol. Accepts BTCUSDT, BTC/USDT or btc_usdt | | `interval` | enum(1m|3m|5m|15m|30m|1h|2h|4h|6h|8h|12h|1d|3d|1w|1M) | query | no | Candle size. Default 1d. Unlike spot there is no 1s candle | | `count` | number | query | no | Number of candles. Default 500, max 1500 — higher than spot's 1000, and 1501 is refused outright | | `startTime` | string | query | no | Oldest candle to return, matched on its open time and inclusive. ISO date or epoch milliseconds | | `endTime` | string | query | no | Newest candle to return, matched on its open time and inclusive. ISO date or epoch milliseconds | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:binance-futures/index-price-klines?pair=BTCUSDT&interval=1d&count=500&startTime=2026-01-01&endTime=2026-03-01" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:binance-futures/index-price-klines?pair=BTCUSDT&interval=1d&count=500&startTime=2026-01-01&endTime=2026-03-01", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/finance:binance-futures/index-price-klines?pair=BTCUSDT&interval=1d&count=500&startTime=2026-01-01&endTime=2026-03-01", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "pair": "BTCUSDT", "count": 60, "candles": [ { "low": 87556.68586957, "date": "2026-01-01T00:00:00.000Z", "high": 88917.7673913, "open": 87646.83543478, "close": 88838.44543478, "openTime": 1767225600000, "closeTime": 1767311999999 }, { "low": 88402.73217391, "date": "2026-01-02T00:00:00.000Z", "high": 90937.43826087, "open": 88838.44543478, "close": 89990.35413043, "openTime": 1767312000000, "closeTime": 1767398399999 }, { "low": 89329.85869565, "date": "2026-01-03T00:00:00.000Z", "high": 90728.18347826, "open": 89990.28652174, "close": 90630.362, "openTime": 1767398400000, "closeTime": 1767484799999 }, { "low": 90630.35875, "date": "2026-01-04T00:00:00.000Z", "high": 91773.96913043, "open": 90630.367, "close": 91540.85326087, "openTime": 1767484800000, "closeTime": 1767571199999 }, { "low": 91521.72304348, "date": "2026-01-05T00:00:00.000Z", "high": 94774.74782609, "open": 91538.57, "close": 93864.59891304, "openTime": 1767571200000, "closeTime": 1767657599999 }, { "low": 91306.89978261, "date": "2026-01-06T00:00:00.000Z", "high": 94433.37, "open": 93863.79804348, "close": 93750.79869565, "openTime": 1767657600000, "closeTime": 1767743999999 } ], "exchange": "binance", "interval": "1d" } ``` --- ### Klines OHLCV candles for one USD-M futures contract — perpetual or dated delivery. - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:binance-futures/klines` - **Cache TTL:** 30s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `symbol` | string | query | yes | Futures contract. Accepts BTCUSDT, BTC/USDT, btc_usdt, or a dated contract such as BTCUSDT_260925 | | `interval` | enum(1m|3m|5m|15m|30m|1h|2h|4h|6h|8h|12h|1d|3d|1w|1M) | query | no | Candle size. Default 1d. Unlike spot there is no 1s candle | | `count` | number | query | no | Number of candles. Default 500, max 1500 — higher than spot's 1000, and 1501 is refused outright | | `startTime` | string | query | no | Oldest candle to return, matched on its open time and inclusive. ISO date or epoch milliseconds | | `endTime` | string | query | no | Newest candle to return, matched on its open time and inclusive. ISO date or epoch milliseconds | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:binance-futures/klines?symbol=BTCUSDT&interval=1d&count=500&startTime=2026-01-01&endTime=2026-03-01" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:binance-futures/klines?symbol=BTCUSDT&interval=1d&count=500&startTime=2026-01-01&endTime=2026-03-01", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/finance:binance-futures/klines?symbol=BTCUSDT&interval=1d&count=500&startTime=2026-01-01&endTime=2026-03-01", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "count": 60, "symbol": "BTCUSDT", "candles": [ { "low": 87508.4, "date": "2026-01-01T00:00:00.000Z", "high": 88881.4, "open": 87608.3, "close": 88800, "openTime": 1767225600000, "closeTime": 1767311999999, "tradeCount": 1056983, "volumeBase": 47941.303, "volumeQuote": 4221684071.5216 }, { "low": 88324.4, "date": "2026-01-02T00:00:00.000Z", "high": 90945.1, "open": 88800, "close": 89951.4, "openTime": 1767312000000, "closeTime": 1767398399999, "tradeCount": 3761821, "volumeBase": 176662.448, "volumeQuote": 15818436364.5132 }, { "low": 89261.2, "date": "2026-01-03T00:00:00.000Z", "high": 90716.9, "open": 89951.5, "close": 90595.8, "openTime": 1767398400000, "closeTime": 1767484799999, "tradeCount": 1281323, "volumeBase": 56891.269, "volumeQuote": 5120704164.6601 }, { "low": 90595.7, "date": "2026-01-04T00:00:00.000Z", "high": 91779.7, "open": 90595.8, "close": 91497.1, "openTime": 1767484800000, "closeTime": 1767571199999, "tradeCount": 1754310, "volumeBase": 73773.029, "volumeQuote": 6733223160.202 }, { "low": 91476.5, "date": "2026-01-05T00:00:00.000Z", "high": 94760.3, "open": 91497.2, "close": 93822.4, "openTime": 1767571200000, "closeTime": 1767657599999, "tradeCount": 4067261, "volumeBase": 189416.312, "volumeQuote": 17646171283.7405 }, { "low": 91209, "date": "2026-01-06T00:00:00.000Z", "high": 94415.4, "open": 93822.3, "close": 93708, "openTime": 1767657600000, "closeTime": 1767743999999, "tradeCount": 3608826, "volumeBase": 187443.05, "volumeQuote": 17445560806.7759 } ], "exchange": "binance", "interval": "1d" } ``` --- ### Mark Price Klines Candles of the MARK price for one contract — the price liquidations and - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:binance-futures/mark-price-klines` - **Cache TTL:** 30s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `symbol` | string | query | yes | Futures contract. Accepts BTCUSDT, BTC/USDT, btc_usdt, or a dated contract such as BTCUSDT_260925 | | `interval` | enum(1m|3m|5m|15m|30m|1h|2h|4h|6h|8h|12h|1d|3d|1w|1M) | query | no | Candle size. Default 1d. Unlike spot there is no 1s candle | | `count` | number | query | no | Number of candles. Default 500, max 1500 — higher than spot's 1000, and 1501 is refused outright | | `startTime` | string | query | no | Oldest candle to return, matched on its open time and inclusive. ISO date or epoch milliseconds | | `endTime` | string | query | no | Newest candle to return, matched on its open time and inclusive. ISO date or epoch milliseconds | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:binance-futures/mark-price-klines?symbol=BTCUSDT&interval=1d&count=500&startTime=2026-01-01&endTime=2026-03-01" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:binance-futures/mark-price-klines?symbol=BTCUSDT&interval=1d&count=500&startTime=2026-01-01&endTime=2026-03-01", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/finance:binance-futures/mark-price-klines?symbol=BTCUSDT&interval=1d&count=500&startTime=2026-01-01&endTime=2026-03-01", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "count": 60, "symbol": "BTCUSDT", "candles": [ { "low": 87528.2, "date": "2026-01-01T00:00:00.000Z", "high": 88885.41797101, "open": 87608.3, "close": 88799.9, "openTime": 1767225600000, "closeTime": 1767311999999 }, { "low": 88360.8, "date": "2026-01-02T00:00:00.000Z", "high": 90924.9, "open": 88799.9, "close": 89951.89852174, "openTime": 1767312000000, "closeTime": 1767398399999 }, { "low": 89271.43899275, "date": "2026-01-03T00:00:00.000Z", "high": 90717.58831884, "open": 89951.89852174, "close": 90595.9, "openTime": 1767398400000, "closeTime": 1767484799999 }, { "low": 90595.85751667, "date": "2026-01-04T00:00:00.000Z", "high": 91756.2, "open": 90595.85826667, "close": 91514.70271739, "openTime": 1767484800000, "closeTime": 1767571199999 }, { "low": 91482.75260145, "date": "2026-01-05T00:00:00.000Z", "high": 94754.7, "open": 91512.43532609, "close": 93822.3, "openTime": 1767571200000, "closeTime": 1767657599999 }, { "low": 91239.88807971, "date": "2026-01-06T00:00:00.000Z", "high": 94415.4, "open": 93822.4, "close": 93708.1, "openTime": 1767657600000, "closeTime": 1767743999999 } ], "exchange": "binance", "interval": "1d" } ``` --- ### Open Interest Hist Open interest sampled on a fixed bucket — the size of the outstanding position - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:binance-futures/open-interest-hist` - **Cache TTL:** 60s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `symbol` | string | query | yes | Futures contract. Accepts BTCUSDT, BTC/USDT or btc_usdt | | `period` | enum(5m|15m|30m|1h|2h|4h|6h|12h|1d) | query | no | Bucket size. One of 5m, 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d — the upstream refuses 8h. Default 1d | | `count` | number | query | no | Rows to return, oldest first. Default 30, max 1000 | | `startTime` | string | query | no | Window start, inclusive. Only the last 30 days exist. ISO date or epoch milliseconds | | `endTime` | string | query | no | Window end, inclusive. ISO date or epoch milliseconds | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:binance-futures/open-interest-hist?symbol=BTCUSDT&period=1d&count=30&startTime=2026-08-01&endTime=2026-08-20" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:binance-futures/open-interest-hist?symbol=BTCUSDT&period=1d&count=30&startTime=2026-08-01&endTime=2026-08-20", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/finance:binance-futures/open-interest-hist?symbol=BTCUSDT&period=1d&count=30&startTime=2026-08-01&endTime=2026-08-20", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "count": 20, "items": [ { "time": 1785542400000, "symbol": "BTCUSDT", "timeIso": "2026-08-01T00:00:00.000Z", "openInterest": 109523.589, "circulatingSupply": 20063506, "openInterestValue": 6884630899.8222 }, { "time": 1785628800000, "symbol": "BTCUSDT", "timeIso": "2026-08-02T00:00:00.000Z", "openInterest": 108516.03, "circulatingSupply": 20063981, "openInterestValue": 6813971110.569 }, { "time": 1785715200000, "symbol": "BTCUSDT", "timeIso": "2026-08-03T00:00:00.000Z", "openInterest": 109126.559, "circulatingSupply": 20064465, "openInterestValue": 6934992824.45 }, { "time": 1785801600000, "symbol": "BTCUSDT", "timeIso": "2026-08-04T00:00:00.000Z", "openInterest": 108556.03, "circulatingSupply": 20064946, "openInterestValue": 6893003948.116 }, { "time": 1785888000000, "symbol": "BTCUSDT", "timeIso": "2026-08-05T00:00:00.000Z", "openInterest": 108225.652, "circulatingSupply": 20065409, "openInterestValue": 6934623587.2912 }, { "time": 1785974400000, "symbol": "BTCUSDT", "timeIso": "2026-08-06T00:00:00.000Z", "openInterest": 107104.832, "circulatingSupply": 20065865, "openInterestValue": 6922603001.0048 } ], "period": "1d", "symbol": "BTCUSDT", "exchange": "binance" } ``` --- ### Open Interest Open interest on one contract right now: how many contracts are outstanding, - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:binance-futures/open-interest` - **Cache TTL:** 5s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `symbol` | string | query | yes | Futures contract. Accepts BTCUSDT, BTC/USDT, btc_usdt, or a dated contract such as BTCUSDT_260925 | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:binance-futures/open-interest?symbol=BTCUSDT" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:binance-futures/open-interest?symbol=BTCUSDT", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/finance:binance-futures/open-interest?symbol=BTCUSDT", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "time": 1787238812537, "symbol": "BTCUSDT", "timeIso": "2026-08-20T15:13:32.537Z", "exchange": "binance", "openInterest": 109142.214 } ``` --- ### Premium Index Mark price and index price for one contract, with the funding rate the next - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:binance-futures/premium-index` - **Cache TTL:** 5s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `symbol` | string | query | yes | Futures contract. Accepts BTCUSDT, BTC/USDT, btc_usdt, or a dated contract such as BTCUSDT_260925 | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:binance-futures/premium-index?symbol=BTCUSDT" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:binance-futures/premium-index?symbol=BTCUSDT", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/finance:binance-futures/premium-index?symbol=BTCUSDT", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "time": 1787238825000, "symbol": "BTCUSDT", "timeIso": "2026-08-20T15:13:45.000Z", "exchange": "binance", "markPrice": 72254.67183333, "indexPrice": 72290.27086957, "interestRate": 0.0001, "lastFundingRate": 0.0001, "nextFundingTime": 1787241600000, "nextFundingTimeIso": "2026-08-20T16:00:00.000Z", "estimatedSettlePrice": 71879.31012319, "lastFundingRatePercent": 0.01 } ``` --- ### Taker Long Short Ratio Taker flow on one contract: how much volume crossed the spread to buy against - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:binance-futures/taker-long-short-ratio` - **Cache TTL:** 60s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `symbol` | string | query | yes | Futures contract. Accepts BTCUSDT, BTC/USDT or btc_usdt | | `period` | enum(5m|15m|30m|1h|2h|4h|6h|12h|1d) | query | no | Bucket size. One of 5m, 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d — the upstream refuses 8h. Default 1d | | `count` | number | query | no | Rows to return, oldest first. Default 30, max 1000 | | `startTime` | string | query | no | Window start, inclusive. Only the last 30 days exist. ISO date or epoch milliseconds | | `endTime` | string | query | no | Window end, inclusive. ISO date or epoch milliseconds | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:binance-futures/taker-long-short-ratio?symbol=BTCUSDT&period=1d&count=30&startTime=2026-08-01&endTime=2026-08-20" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:binance-futures/taker-long-short-ratio?symbol=BTCUSDT&period=1d&count=30&startTime=2026-08-01&endTime=2026-08-20", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/finance:binance-futures/taker-long-short-ratio?symbol=BTCUSDT&period=1d&count=30&startTime=2026-08-01&endTime=2026-08-20", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "count": 20, "items": [ { "time": 1785456000000, "timeIso": "2026-07-31T00:00:00.000Z", "buyVolume": 87864.89, "sellVolume": 87100.045, "buySellRatio": 1.0088 }, { "time": 1785542400000, "timeIso": "2026-08-01T00:00:00.000Z", "buyVolume": 26052.699, "sellVolume": 28685.412, "buySellRatio": 0.9082 }, { "time": 1785628800000, "timeIso": "2026-08-02T00:00:00.000Z", "buyVolume": 42853.182, "sellVolume": 41187.225, "buySellRatio": 1.0404 }, { "time": 1785715200000, "timeIso": "2026-08-03T00:00:00.000Z", "buyVolume": 73781.443, "sellVolume": 78062.419, "buySellRatio": 0.9452 }, { "time": 1785801600000, "timeIso": "2026-08-04T00:00:00.000Z", "buyVolume": 67900.448, "sellVolume": 62124.852, "buySellRatio": 1.093 }, { "time": 1785888000000, "timeIso": "2026-08-05T00:00:00.000Z", "buyVolume": 74933.311, "sellVolume": 70186.934, "buySellRatio": 1.0676 } ], "period": "1d", "symbol": "BTCUSDT", "exchange": "binance" } ``` --- ### Ticker 24hr Rolling 24-hour statistics for one contract. - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:binance-futures/ticker-24hr` - **Cache TTL:** 15s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `symbol` | string | query | yes | Futures contract. Accepts BTCUSDT, BTC/USDT, btc_usdt, or a dated contract such as BTCUSDT_260925 | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:binance-futures/ticker-24hr?symbol=BTCUSDT" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:binance-futures/ticker-24hr?symbol=BTCUSDT", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/finance:binance-futures/ticker-24hr?symbol=BTCUSDT", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "low": 66544.4, "high": 72598, "last": 72248, "open": 66588.2, "change": 5659.8, "symbol": "BTCUSDT", "lastQty": 0.03, "exchange": "binance", "openTime": 1787152440000, "closeTime": 1787238843456, "tradeCount": 8291638, "volumeBase": 416667.919, "lastTradeId": 7987900714, "volumeQuote": 29103083152.07, "firstTradeId": 7979582933, "changePercent": 8.5, "weightedAvgPrice": 69847.19 } ``` --- ### Top Long Short Account Ratio The same headcount as the global series, restricted to the largest accounts - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:binance-futures/top-long-short-account-ratio` - **Cache TTL:** 60s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `symbol` | string | query | yes | Futures contract. Accepts BTCUSDT, BTC/USDT or btc_usdt | | `period` | enum(5m|15m|30m|1h|2h|4h|6h|12h|1d) | query | no | Bucket size. One of 5m, 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d — the upstream refuses 8h. Default 1d | | `count` | number | query | no | Rows to return, oldest first. Default 30, max 1000 | | `startTime` | string | query | no | Window start, inclusive. Only the last 30 days exist. ISO date or epoch milliseconds | | `endTime` | string | query | no | Window end, inclusive. ISO date or epoch milliseconds | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:binance-futures/top-long-short-account-ratio?symbol=BTCUSDT&period=1d&count=30&startTime=2026-08-01&endTime=2026-08-20" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:binance-futures/top-long-short-account-ratio?symbol=BTCUSDT&period=1d&count=30&startTime=2026-08-01&endTime=2026-08-20", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/finance:binance-futures/top-long-short-account-ratio?symbol=BTCUSDT&period=1d&count=30&startTime=2026-08-01&endTime=2026-08-20", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "count": 20, "items": [ { "time": 1785542400000, "symbol": "BTCUSDT", "timeIso": "2026-08-01T00:00:00.000Z", "longAccount": 0.7031, "shortAccount": 0.2969, "longShortRatio": 2.3681 }, { "time": 1785628800000, "symbol": "BTCUSDT", "timeIso": "2026-08-02T00:00:00.000Z", "longAccount": 0.6933, "shortAccount": 0.3067, "longShortRatio": 2.2605 }, { "time": 1785715200000, "symbol": "BTCUSDT", "timeIso": "2026-08-03T00:00:00.000Z", "longAccount": 0.6625, "shortAccount": 0.3375, "longShortRatio": 1.963 }, { "time": 1785801600000, "symbol": "BTCUSDT", "timeIso": "2026-08-04T00:00:00.000Z", "longAccount": 0.614, "shortAccount": 0.386, "longShortRatio": 1.5907 }, { "time": 1785888000000, "symbol": "BTCUSDT", "timeIso": "2026-08-05T00:00:00.000Z", "longAccount": 0.5696, "shortAccount": 0.4304, "longShortRatio": 1.3234 }, { "time": 1785974400000, "symbol": "BTCUSDT", "timeIso": "2026-08-06T00:00:00.000Z", "longAccount": 0.5472, "shortAccount": 0.4528, "longShortRatio": 1.2085 } ], "period": "1d", "symbol": "BTCUSDT", "exchange": "binance" } ``` --- ### Top Long Short Position Ratio The largest accounts' positioning weighted by POSITION rather than by head: - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:binance-futures/top-long-short-position-ratio` - **Cache TTL:** 60s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `symbol` | string | query | yes | Futures contract. Accepts BTCUSDT, BTC/USDT or btc_usdt | | `period` | enum(5m|15m|30m|1h|2h|4h|6h|12h|1d) | query | no | Bucket size. One of 5m, 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d — the upstream refuses 8h. Default 1d | | `count` | number | query | no | Rows to return, oldest first. Default 30, max 1000 | | `startTime` | string | query | no | Window start, inclusive. Only the last 30 days exist. ISO date or epoch milliseconds | | `endTime` | string | query | no | Window end, inclusive. ISO date or epoch milliseconds | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:binance-futures/top-long-short-position-ratio?symbol=BTCUSDT&period=1d&count=30&startTime=2026-08-01&endTime=2026-08-20" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:binance-futures/top-long-short-position-ratio?symbol=BTCUSDT&period=1d&count=30&startTime=2026-08-01&endTime=2026-08-20", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/finance:binance-futures/top-long-short-position-ratio?symbol=BTCUSDT&period=1d&count=30&startTime=2026-08-01&endTime=2026-08-20", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "count": 20, "items": [ { "time": 1785542400000, "symbol": "BTCUSDT", "timeIso": "2026-08-01T00:00:00.000Z", "longAccount": 0.6165, "shortAccount": 0.3835, "longShortRatio": 1.6072 }, { "time": 1785628800000, "symbol": "BTCUSDT", "timeIso": "2026-08-02T00:00:00.000Z", "longAccount": 0.6161, "shortAccount": 0.3839, "longShortRatio": 1.605 }, { "time": 1785715200000, "symbol": "BTCUSDT", "timeIso": "2026-08-03T00:00:00.000Z", "longAccount": 0.6141, "shortAccount": 0.3859, "longShortRatio": 1.5913 }, { "time": 1785801600000, "symbol": "BTCUSDT", "timeIso": "2026-08-04T00:00:00.000Z", "longAccount": 0.6007, "shortAccount": 0.3993, "longShortRatio": 1.5043 }, { "time": 1785888000000, "symbol": "BTCUSDT", "timeIso": "2026-08-05T00:00:00.000Z", "longAccount": 0.606, "shortAccount": 0.394, "longShortRatio": 1.5381 }, { "time": 1785974400000, "symbol": "BTCUSDT", "timeIso": "2026-08-06T00:00:00.000Z", "longAccount": 0.6006, "shortAccount": 0.3994, "longShortRatio": 1.5036 } ], "period": "1d", "symbol": "BTCUSDT", "exchange": "binance" } ``` --- _Generated: 2026-08-20T22:41:52.813Z_