coingecko / cryptoexchange

[UNMAINTAINED] Ruby library to query market data from cryptocurrency exchanges (https://www.coingecko.com)
https://www.coingecko.com
MIT License
299 stars 240 forks source link

Base/Target is confusing, consider changing to Base/Quote for Ticker Class #30

Open tmlee opened 7 years ago

Merlz commented 7 years ago

In order to provide consistency throughout all the exchange::{name}::service market.rb & pairs.rb so that the @base always refers to the altcoin (or BTC, ETH if trading against a fiat USD/EUR etc) and @target to refer to the main fiat (BTC, ETH, USD, EUR etc), I've modified the following files:

bittrex/services/market.rb & pairs.rb bleutrade/services/market.rb & pairs.rb ether_delta/services/market.rb & pairs.rb poloniex/services/market.rb & pairs.rb

I've gone through all the urls in each exchange to check that the resulting output will be consistent so that if added to a database, it will not cause incorrect pairs or duplications due to reverse order of base/target.

exchanges.zip

tmlee commented 7 years ago

@Merlz thanks for your suggestion, would be great if you can point me to commits made in your repo or a pull request rather than a zip file.

Merlz commented 7 years ago

@tmlee Changes were made as seen above.

I've been working on a histominute API pull from Cryptocompare (for my own project) and have implemented it for Bittrex so far using your base code/module, I'll add it to my fork over the next day or two, let me know if it's something you're interested in adding in your branch?

Here's a sample of API I'm using https://min-api.cryptocompare.com/data/histominute?fsym=BCH&tsym=USD&limit=5&aggregate=1&e=BitTrex

tmlee commented 7 years ago

@Merlz Thanks for your contribution. I believe moving forward it would be better if you use the Pull Request feature to propose a merge and your changes (even if it is incomplete).

I believe some of those issues you fixed have been addressed. The Pull Request makes it easy for us to stay in sync and see what changes you propose and what is it for. We can easily tie loose ends in your Pull Request branch and eventually merge the your proposals in.

As for the Cryptocompare API, I am not sure if you are proposing to integrate with their API; but i think the current scope of this gem is to interface directly with the exchange API.