Publish daily BTC price in public remoteStorage #581
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/btc-rate-tracker"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In order to implement conversion from fiat prices to BTC for expense line items in Kredits Web with historic exchange rates, I simply stored the numbers in public RS documents, like so:
https://storage.kosmos.org/kosmos/public/btc-price/2024-12-17
This is automating the semi-manual process of importing the price history that I used before. Same as the API itself, this is keeping it dead simple: there's just a bash script that runs via systemd timer every night at 00:00, which will calculate the average between 24h before and then, and write that to a new document for the day that just ended.
The systemd timer is already started on
bitcoin-2
, but tonight will be the first production run of it. So if you see correct numbers tomorrow, then it's good to go.5da11394d4
tod45f782a5e
d45f782a5e
to0fa61a585e
Works just fine:
https://storage.kosmos.org/kosmos/public/btc-price/2025-01-17
FYI, I accidentally slipped an lndhub-go credentials update in here, which is just updating the Sentry DSN.
👍