You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
iokiwi
changed the title
Store a recent copy exchange rate data in our own database.
Store and fetch recent exchange rates in our own database.
Oct 5, 2023
I would recommend using arq to schedule a CRON job for fetching and updating the rates in the local database. arq is a great library that allows you achieve this. PS. it's built using asyncio.
Calling out to an external API to get exchange rates on every request is suboptimal for several reasons.
We should keep a table in our database with a recent exchange rate and the time it was updated.
We can update the table on a schedule or inflight if the data has become 'stale' according.
The text was updated successfully, but these errors were encountered: