Open luria opened 5 years ago
Hmm... Let me take a look at that, might be able this weekend or early next week. Not sure if readme is wrong or something might have been removed/changed when I re-wrote this a while back. Thank you for letting me know!
Try Currency::rates() I think I forgot to update the readme.
Sorry, there is no rateSeries anymore. This used to be supported by free Yahoo finance data, that source is not anymore. Only other provider supporting this is 'currencylayer' but only with a paid subscription plan, so I did not include this when I re-wrote this. I also don't want to have to pay for a service just to add this feature that I won't be using myself. I removed this example from the readme.
Hi Daniel!. Thanks for your reply. I totally understand not including that feature if it is a paid option.
But does not the ECB provide this info? https://sdw-wsrest.ecb.europa.eu/help/
startPeriod & endPeriod Defining a date range
It is possible to define a date range for which observations should be returned by using the startPeriod and/or endPeriod parameters. The values should be given according to the syntax defined in ISO 8601 or as SDMX reporting periods. The format will vary depending on the frequency. The supported formats are:
YYYY for annual data (e.g.: 2013). YYYY-S[1-2] for semi-annual data (e.g.: 2013-S1). YYYY-Q[1-4] for quarterly data (e.g.: 2013-Q1). YYYY-MM for monthly data (e.g.: 2013-01). YYYY-W[01-53] for weekly data (e.g.: 2013-W01). YYYY-MM-DD for daily data (e.g.: 2013-01-01).
Ah ok, yeah that sounds like a good idea. Eurobank is the default provider, it's free and don't require any signup/key so I like the idea of enhancing that source. I can't promise any timeline though but shouldn't not be too much work.
Hi, I think the rateSeries is not working,
Even after fixing the minor typo in the date,
//Get historical rate series $rates = Currency::rateSeries('USD', 'NOK', '2016-12-24', ''2016-12-31);
//Get historical rate series $rates = Currency::rateSeries('USD', 'NOK', '2016-12-24', '2016-12-31');
the system says:
Call to undefined method danielme85\CConverter\Currency::rateSeries()