Perpetual Contract Snapshot

GET/gateway/v1/exchange/perp

Returns a perpetual futures snapshot for a trading pair: funding rate, open interest, mark/index price.

Available fields (via `fields`): - `funding` — current funding rate, next settlement, mark/index price - `oi` — open interest in contracts and USD

Just pass the base pair (e.g. `pair=BTC/USDT`). The swap settle suffix is added automatically from the quote currency, e.g. `BTC/USDT:USDT` or `BTC/USDC:USDC`.

Query Parameters

pairstringrequired

Trading pair (e.g. BTC/USDT). The swap settle suffix is added automatically from the quote currency, e.g. BTC/USDT:USDT or BTC/USDC:USDC.

Example: BTC/USDT
fieldsstring

Comma-separated fields to include: 'funding' (current funding rate), 'oi' (open interest). Defaults to all fields.

Example: funding,oi
exchangeenum<string>

Exchange identifier. Hyperliquid uses USDC-settled perps (e.g. BTC/USDC:USDC).

Available options:binanceokxbybitbitgethtxbitfinexbitmexhyperliquid
Example: binance
Perpetual Contract Snapshot
const options = {method: 'GET'};

fetch('https://api.asksurf.ai/gateway/v1/exchange/perp?pair=BTC/USDT&fields=funding,oi&exchange=binance', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
OK
{
  "$schema": "https://example.com/schemas/DataObjectResponseExchangePerpResponse.json",
  "data": {
    "exchange": "<string>",
    "funding": {
      "exchange": "<string>",
      "funding_interval_hours": 123,
      "funding_rate": 123,
      "funding_rate_1h": 123,
      "funding_rate_8h": 123,
      "funding_rate_annualized": 123,
      "funding_rate_raw": 123,
      "index_price": 123,
      "interval": "<string>",
      "mark_price": 123,
      "next_funding": "<string>",
      "pair": "<string>"
    },
    "open_interest": {
      "exchange": "<string>",
      "open_interest_amount": 123,
      "open_interest_usd": 123,
      "pair": "<string>",
      "timestamp": 123
    },
    "pair": "<string>"
  },
  "meta": {
    "cached": true,
    "credits_used": 123,
    "empty_reason": "<string>"
  }
}