ccxt / ccxt

A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading API with support for more than 100 bitcoin/altcoin exchanges
https://docs.ccxt.com
MIT License
33.01k stars 7.54k forks source link

XRB should be rewritten to NANO #2561

Closed gosuto-inzasheru closed 6 years ago

gosuto-inzasheru commented 6 years ago

The manual explains that some symbols get rewritten automatically (e.g. XBT, DSH). I think this should be the case for XRB as wel. RaiBlocks went through a rebranding and are now called NANO. Confusingly enough binance.fetchBalance()['info'] returns NANO results whereas binance.fetchBalance()['total'] returns XRB.

Digging through the code I think this pair is actually just defined the wrong way around: https://github.com/ccxt/ccxt/blob/4c5df8e9b70f2cbd4fb2029066a0336fd2eee804/python/ccxt/binance.py#L264

kroitor commented 6 years ago

Wherever the info is returned inside a response from a CCXT unified method – that is the raw unparsed exchange response, as is. Therefore it contains ids. And the rest of the fetchBalance response around info is the unified and parsed balance info, according to the Manual: https://github.com/ccxt/ccxt/wiki/Manual#querying-account-balance

Hope this answers your post )

kroitor commented 6 years ago

UPD. Added a few more clarifications to this.

kroitor commented 6 years ago

One of the reasons for not using the NANO code is that CoinMarketCap uses XRB, and NANO designates a different token there.

arielorvits commented 6 years ago

@kroitor not sure u're right regarding CMC https://coinmarketcap.com/currencies/nano/ https://coinmarketcap.com/search/?q=xrb

kroitor commented 6 years ago
screen shot 2018-04-13 at 06 02 09

@arielorvits yep, thank you! Looks like CMC actually uses NANO now, and we will probably use NANO as well starting from 1.13. Will fix it soon and will let you know.