Trading Pairs

GET/gateway/v1/exchange/markets

Returns trading pairs available on an exchange.

Filters: `type` (`spot`, `swap`, `future`, `option`) or free-text `search`.

Included fields: pair name, base/quote currencies, market type, active status, and default fee rates.

Use the returned `pair` values as the `pair` parameter in other exchange endpoints.

Query Parameters

exchangeenum<string>

Exchange identifier. When omitted, searches across all supported exchanges.

Available options:binanceokxbybitbitgetcoinbasekrakengatehtxkucoinmexcupbitbitfinexbitstampderibitbitmexbithumbhyperliquid
Example: binance
typeenum<string>

Market type filter. Use perpetual or perp for perpetual contracts (alias for swap).

Available options:spotswapfutureoptionperpetualperp
Example: spot
basestring

Filter by base currency

Example: ETH
quotestring

Filter by quote currency

Example: USDT
searchstring

Fuzzy search in pair/base/quote

Example: ETH
limitinteger

Max results

Example: 100
Trading Pairs
const options = {method: 'GET'};

fetch('https://api.asksurf.ai/gateway/v1/exchange/markets?exchange=binance&type=spot&base=ETH&quote=USDT&search=ETH&limit=100', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
OK
{
  "$schema": "https://example.com/schemas/SimpleListResponseExchangeMarketItem.json",
  "data": [
    {
      "active": true,
      "base": "<string>",
      "exchange": "<string>",
      "maker_fee": 123,
      "pair": "<string>",
      "quote": "<string>",
      "taker_fee": 123,
      "type": "<string>"
    }
  ],
  "meta": {
    "cached": true,
    "credits_used": 123,
    "empty_reason": "<string>"
  }
}