exchange icon indicating copy to clipboard operation
exchange copied to clipboard

MYR/USD returning nil

Open cryptoknight2021 opened this issue 3 years ago • 1 comments

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) }

cryptoknight2021 avatar Jun 14 '21 02:06 cryptoknight2021

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

rehhouari avatar Oct 01 '21 16:10 rehhouari