Closed dan-tang-ssd closed 7 months ago
Expansion of GetHistoricExchangeRates.php
capabilities
Working on improving the GetHistoricExchangeRates.php
part of the app, several enhancements have been made. Among them, added capabilities that provide us with more data handling services, and making use of advanced functions for better performance. Additionally, instances of errors occurring during an HTTP request now get logged for future reference and debugging.
Updates in AppServiceProvider.php
for Versatile Rate Limiting
Significant modifications have been made to the AppServiceProvider.php
file, primarily in enhancing the system's versatility to handle rate limiting. Now, we'll be able to use different job attributes based on the class name, whether it's GetOneDayExchangeRates
or GetHistoricExchangeRates
. This feature provides better flexibility in performing and managing tasks.
Question - if the GetHistoricExchangeRates no longer works because we cannot retrieve exchanges rates for more than 1 day at a time, why not remove that command and related job, and instead setup a command to push jobs for all days within a given time span?
Question - if the GetHistoricExchangeRates no longer works because we cannot retrieve exchanges rates for more than 1 day at a time, why not remove that command and related job, and instead setup a command to push jobs for all days within a given time span?
Yes. It is probably the simplest way. This is not quite worthy to revise program that will be used only once to get historic exchange rates data. Because we will get daily data everyday afterwards.
I recall that free currency has a monthly limit quota per month.
I sent a request and show headers of HTTP response. Checked that our monthly quota is 5000.
< x-ratelimit-limit-quota-month: 5000
< x-ratelimit-remaining-quota-month: 4298
We need to send 33 requests for 1 day. For 1 year we need to send 12,045 requests (33 * 365). Our monthly quota seems not enough for this approach...
URL: https://freecurrencyapi.com/docs/#authentication-methods
Screen shot:
As per our discussion, we will get historic exchange rate data via Google Finance + Google Sheets.
There is no need to change anything for the existing programs for retrieving exchange rate data in daily basis.
I will close this PR.
This PR is submitted to fix the historic exchange rate retrieval command.
This PR is not completed yet. I fixed issue 1 and I would like to update status first.
Issues found:
Error message returned from Free currency APi: