swapagarwal / JARVIS-on-Messenger

:speech_balloon: A community-driven python bot that aims to be as simple as possible to serve humans with their everyday tasks
https://m.me/J.A.R.V.I.S.on.Messenger
MIT License
1.35k stars 989 forks source link

Add cryptocurrency prices using bittrex api #282

Open shawnjzlee opened 6 years ago

shawnjzlee commented 6 years ago

Hi There,

First timer here! I'd like to add a functionality that would fetch cryptocurrency ticker prices from the public bittrex api.

e.g. ticker BTC-LTC or market BTC-LTC would return the real-time tick values for a market.

Could this be in conflict with the existing currency feature? I'm all ears for suggestions!

edadesd commented 6 years ago

If you could think of a query that unambiguously calls the cryptocurrency module (like "BTC-LTC cryptocurrency") that would make it easier to direct the query to the appropriate module.

shawnjzlee commented 6 years ago

cryptocurrency, crypto, ticker, market should call the cryptocurrency module unambiguously (e.g. cryptocurrency BTC to LTC, get ticker for LTC to BTC)

If I enter the symbols BTC and LTC into the fixer api, the "rates" returns empty. Would it be better to call the bittrex api if the above condition is satisfied?

edadesd commented 6 years ago

I think it would be ideal to only call one API per user query. Since you know Fixer won't give you a value for Rates, I would try to make that query rely entirely on Bittrex without calling Fixer. So you would have to implement some logic to decide which API to call based on the user's query.

shawnjzlee commented 6 years ago

Yep! Feel free to take a look at #283 and make changes as you see fit if you'd like to work on it (:

stwins60 commented 3 years ago

is this issue still open