Skip to content

Instantly share code, notes, and snippets.

@kroitor
Created February 25, 2020 22:48
Show Gist options
  • Save kroitor/82c4c07573676647a94a2e0bd646d71b to your computer and use it in GitHub Desktop.
Save kroitor/82c4c07573676647a94a2e0bd646d71b to your computer and use it in GitHub Desktop.
How to fetch a market by symbol from an exchange
mbp:ccxt igorkroitor$ node examples/js/cli binance market ETH/USDC
binance.market (ETH/USDC)
{     limits: { amount: { min: 0.00001, max: 900000 },
                 price: { min: 0.01, max: 100000 },
                  cost: { min: 10, max: undefined }    },
   precision: { base: 8, quote: 8, amount: 5, price: 2 },
   tierBased:    false,
  percentage:    true,
       taker:    0.001,
       maker:    0.001,
          id:   "ETHUSDC",
      symbol:   "ETH/USDC",
        base:   "ETH",
       quote:   "USDC",
      baseId:   "ETH",
     quoteId:   "USDC",
        info: {                     symbol:   "ETHUSDC",
                                    status:   "TRADING",
                                 baseAsset:   "ETH",
                        baseAssetPrecision:    8,
                                quoteAsset:   "USDC",
                            quotePrecision:    8,
                   baseCommissionPrecision:    8,
                  quoteCommissionPrecision:    8,
                                orderTypes: [ "LIMIT",
                                              "LIMIT_MAKER",
                                              "MARKET",
                                              "STOP_LOSS_LIMIT",
                                              "TAKE_PROFIT_LIMIT" ],
                            icebergAllowed:    true,
                                ocoAllowed:    true,
                quoteOrderQtyMarketAllowed:    true,
                      isSpotTradingAllowed:    true,
                    isMarginTradingAllowed:    false,
                                   filters: [ { filterType: "PRICE_FILTER",
                                                  minPrice: "0.01000000",
                                                  maxPrice: "100000.00000000",
                                                  tickSize: "0.01000000"       },
                                              {     filterType: "PERCENT_PRICE",
                                                  multiplierUp: "5",
                                                multiplierDown: "0.2",
                                                  avgPriceMins:  5               },
                                              { filterType: "LOT_SIZE",
                                                    minQty: "0.00001000",
                                                    maxQty: "900000.00000000",
                                                  stepSize: "0.00001000"       },
                                              {    filterType: "MIN_NOTIONAL",
                                                  minNotional: "10.00000000",
                                                applyToMarket:  true,
                                                 avgPriceMins:  5              },
                                              { filterType: "ICEBERG_PARTS", limit: 10 },
                                              { filterType: "MARKET_LOT_SIZE",
                                                    minQty: "0.00000000",
                                                    maxQty: "3254.49984104",
                                                  stepSize: "0.00000000"       },
                                              {       filterType: "MAX_NUM_ALGO_ORDERS",
                                                maxNumAlgoOrders:  5                     } ] },
        type:   "spot",
        spot:    true,
      future:    false,
      active:    true                                                                           }
mbp:ccxt igorkroitor$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment