Skip to content

Market tags

Every market has a market_tag - its identifier everywhere in the API:

{ "market_tag": "BINANCE_BTC_USDT", "exchange": "BINANCE", "base": "BTC", "quote": "USDT", }

Get it from GET /v1/markets, pass it wherever a market is referenced.

The tag looks constructible. Don’t. Two real examples of why:

  • Contract names can contain underscores (BITGETUTACOIN_BTC_USD_BTCUSD_CM), so splitting a tag on _ mis-parses real markets.
  • Some futures venues list contracts with empty names, so a “spot-looking” tag can be a futures market. market_type comes from the data, never from the tag’s shape.

Everything you might want from inside a tag is already a field: exchange, base, quote, market_type, and the contract object. Filter on those:

usdt_spot = [m for m in markets
if m["quote"] == "USDT" and m["market_type"] == "spot"]