Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Binance no support for BCC because of ccxt BCH rename #1133

Closed
Haehnchen opened this issue Jan 14, 2018 · 1 comment · Fixed by #1134
Closed

Binance no support for BCC because of ccxt BCH rename #1133

Haehnchen opened this issue Jan 14, 2018 · 1 comment · Fixed by #1134

Comments

@Haehnchen
Copy link
Contributor

In https://github.com/ccxt/ccxt/blob/master/js/binance.js#L737 binance BCC are named to the common name BCH. products.json does not support it. Products generator should respect this rule.

zenbot backfill binance.BCH-USDT --days=5

eg add this to products.json

{
    "id": "BCHUSDT",
    "asset": "BCH",
    "currency": "USDT",
    "min_size": "0.00001000",
    "max_size": "100000",
    "increment": "0.01",
    "label": "BCH/USDT"
},
@abduegal
Copy link
Contributor

Hi, please place this in /extensions/exchanges/binance/update-products.sh:

#!/usr/bin/env node
let ccxt = require('ccxt')
let n = require('numbro')
new ccxt.binance({ 'apiKey': '', 'secret': '' }).fetch_markets().then(function(markets) {
  var products = []
  markets.forEach(function (market) {
    products.push({
      id: market.id,
      asset: market.base,
      currency: market.quote,
      min_size: market.info.filters[1].minQty,
      max_size: market.info.filters[0].maxPrice,
      increment: market.info.filters[1].stepSize,
      label: market.base + '/' + market.quote
    })
  })
  var target = require('path').resolve(__dirname, 'products.json')
  require('fs').writeFileSync(target, JSON.stringify(products, null, 2))
  console.log('wrote', target)
  process.exit()
})

I'm currently unable to do a pull request, so if anyone has time to add this script in it, that would be great.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants