currency icon indicating copy to clipboard operation
currency copied to clipboard

Yahoo API

Open ghost opened this issue 7 years ago • 7 comments

It seems that the Yahoo API that you use has recently stopped working (or very unstable ?), returning error "No definition found for Table yahoo.finance.xchange"

ghost avatar Sep 25 '17 03:09 ghost

@maximee44 Acknowledged. I will consider moving to a different API in the future. Thanks!

nunosans avatar Oct 17 '17 09:10 nunosans

@maximee44 The free.currencyconverterapi.com API has a limit on the free plan. I will consider other options for getting the exchange rates, but thank you for raising this issue!

nunosans avatar Nov 11 '17 16:11 nunosans

any new update ? we can use fee api ?

istorepro avatar Nov 15 '17 13:11 istorepro

@isotepro no updates at this stage.

I need to find an API that offers the same that Yahoo offered:

  • An API to get exchange rates
  • Free
  • Without limit of number of requests per day

That doesn't seem to exist. But free.currencyconverterapi.com that @maximee44 suggested comes close.

I'm considering updating the app to use free.currencyconverterapi.com, or to pull it out from the store until there's a suitable API. I'll update the ticked on how that goes.

nunosans avatar Nov 15 '17 15:11 nunosans

this also have issue

`let url = URL(string: "https://query.yahooapis.com/v1/public/yql?q=" + "select%20*%20from%20yahoo.finance.xchange%20where%20pair%20in%20(" + "%22USD" + self.code + "%22)&diagnostics=true&env=store%3A%2F%2F" + "datatables.org%2Falltableswithkeys")

        let task = URLSession.shared.dataTask(with: url!, completionHandler: {(data, response, error) in
            
            guard data != nil else {
                print("Error performing Yahoo query.")
                hideActivityIndicator()
                return
            }
            
            let xml = SWXMLHash.parse(data!)
            
            guard let rate = xml["query"]["results"]["rate"]["Rate"].element?.text else {
                print("Could not parse XML request.")
                hideActivityIndicator()
                return
            }`

istorepro avatar Nov 15 '17 15:11 istorepro

@istorepro thank you. please open a new issue or a merge request to fix that issue.

nunosans avatar Nov 15 '17 15:11 nunosans

Hi Maybe you can add this free API http://www.mycurrency.net/page/Free+Currency+Converter+API

gbr33 avatar Feb 12 '18 18:02 gbr33