Closed RodrigoNFT closed 5 months ago
Yeah I've always known this was the "right" way to do it.
To accomplish this we will first have to add all the currencies to https://github.com/rssnyder/coingecko-cache, and then update the utils/coin_gecko.go
file to take in the target currency.
This would be an easy but time consuming feature, I will get to it some day.
My suggestion is to get the price for cryptocurrencies in other currencies directly via CoinGecko API, instead of converting via Yahoo Finance. I know that a few thousandths of a cent in the price doesn't make a difference, but the members of my Discord always question me that Bot's price is different from Coingecko.
0.3745 -2.12%
https://www.coingecko.com/en/coins/smooth-love-potion/brl
0.379154 -1.2%
https://api.coingecko.com/api/v3/simple/price?ids=smooth-love-potion&vs_currencies=brl&include_24hr_change=true
0.379154 -1.2%
https://api.coingecko.com/api/v3/simple/supported_vs_currencies
["btc","eth","ltc","bch","bnb","eos","xrp","xlm","link","dot","yfi","usd","aed","ars","aud","bdt","bhd","bmd","brl","cad","chf","clp","cny","czk","dkk","eur","gbp","hkd","huf","idr","ils","inr","jpy","krw","kwd","lkr","mmk","mxn","myr","ngn","nok","nzd","php","pkr","pln","rub","sar","sek","sgd","thb","try","twd","uah","vef","vnd","zar","xdr","xag","xau","bits","sats"]