exchange
exchange copied to clipboard
MYR/USD returning nil
MYR/USD returning nil for now. This has been working for the past week.
func checkForex() (fr *big.Float) { // Create a new Exchange instance and set USD as the base currency for the exchange rates and conversion ex := exchange.New("USD") // convert 1 USD to MYR // fmt.Println(ex.ConvertTo("MYR", 1)) fr, err := ex.ConvertTo("MYR", 1) if err != nil { fmt.Println(err) return } return (fr) }
Hey, this repository is not maintained I forked it and made little changes I tried this code snippet and it worked
https://github.com/rehhouari/exchange