Publish daily BTC price in public remoteStorage #581
Labels
Clear labels
monitoring
bug
design
dev environment
docs
duplicate
enhancement
feature
good first issue
idea
invalid
kredits-1
kredits-2
kredits-3
on hold
ops
question
security
ui/ux
wontfix
service
discourse
Kosmos Community Forums
Infrastructure metrics, alerts, notifications, etc.
service
accounts
Kosmos Accounts
service
drone-ci
Kosmos Drone CI
service
email
mail.kosmos.org
service
garage
S3-compatible object storage
service
gitea
Kosmos Gitea
service
ipfs
Kosmos IPFS
service
mastodon
kosmos.social
service
nostr
Relays, Blossom server, etc.
service
postgres
Database cluster
service
remotestorage
Portable data storage for the Web
service
wiki
Kosmos Wiki
service
xmpp
Kosmos Chat
Something is not working
Graphic/visual design
Config, builds, CI, deployment, etc.
Documentation
This issue or pull request already exists
Improving existing functionality
New functionality
Dive in, and start contributing
Something to consider
Not a bug
Small contribution
Medium contribution
Large contribution
Currently not actionable
Manual IT ops activities
Looking for an answer
release
major
release
minor
release
patch
All your base are belong to us
User interface, process design, etc.
This won't be fixed
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: kosmos/chef#581
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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.5da11394d4tod45f782a5ed45f782a5eto0fa61a585eWorks 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.
👍