Ticker Price

GET/gateway/v1/exchange/price

Returns the real-time ticker for a trading pair.

Included fields: last price, bid/ask, 24h high/low, 24h volume, 24h price change.

Set `type=swap` to query perpetual contract prices instead of spot. For historical price trends, use `/market/price`.

Query Parameters

pairstringrequired

Trading pair (e.g. BTC/USDT)

Example: BTC/USDT
typeenum<string>

Market type: spot for spot trading, swap/perpetual/perp for perpetual contracts

Available options:spotswapperpetualperp
Example: spot
exchangeenum<string>

Exchange identifier. Note: hyperliquid uses USDC-settled perps (e.g. BTC/USDC:USDC); pass USDC-quoted pairs when querying hyperliquid.

Available options:binanceokxbybitbitgetcoinbasekrakengatehtxkucoinmexcupbitbitfinexbitstampderibitbitmexbithumbhyperliquid
Example: binance
Ticker Price
const options = {method: 'GET'};

fetch('https://api.asksurf.ai/gateway/v1/exchange/price?pair=BTC/USDT&type=spot&exchange=binance', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
OK
{
  "$schema": "https://example.com/schemas/SimpleListResponseExchangePriceItem.json",
  "data": [
    {
      "ask": 123,
      "bid": 123,
      "change_24h_pct": 123,
      "exchange": "<string>",
      "high_24h": 123,
      "last": 123,
      "low_24h": 123,
      "pair": "<string>",
      "timestamp": 123,
      "volume_24h_base": 123
    }
  ],
  "meta": {
    "cached": true,
    "credits_used": 123,
    "empty_reason": "<string>"
  }
}