How to retrieve a list of all market pairs like ETH/BTC using Binance API?

You are looking for the /exchangeInfo public endpoint.

See more at https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md :

Exchange information

GET /api/v1/exchangeInfo

Current exchange trading rules and symbol information

Resulting symbols array of all coin pairs:

...
"symbols": [{
"symbol": "ETHBTC",
"status": "TRADING",
"baseAsset": "ETH",
"baseAssetPrecision": 8,
"quoteAsset": "BTC",
"quotePrecision": 8,
"orderTypes": [
  // These are defined in the `ENUM definitions` section under `Order types (orderTypes)`.
  // All orderTypes are optional.
],
"icebergAllowed": false,
"filters": [
  // There are defined in the `Filters` section.
  // All filters are optional.
]
}]
...

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)