Publish daily BTC price in public remoteStorage #581

已合併
greg 將 2 次提交從 feature/btc-rate-tracker 合併至 master 2025-01-23 13:28:34 +00:00
擁有者

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.

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.
raucao 加入了
feature
標籤 2025-01-17 17:39:57 +00:00
raucao 加入了 1 個提交 2025-01-17 17:39:57 +00:00
raucao 加入了 1 個提交 2025-01-17 19:38:36 +00:00
raucao 強制推送了 feature/btc-rate-tracker 自 5da11394d4d45f782a5e 2025-01-17 19:48:54 +00:00 比較
raucao 強制推送了 feature/btc-rate-tracker 自 d45f782a5e0fa61a585e 2025-01-17 19:52:37 +00:00 比較
作者
擁有者
Works just fine: https://storage.kosmos.org/kosmos/public/btc-price/2025-01-17
raucao 請求了 Core 來審核 2025-01-18 13:47:56 +00:00
raucao 加入了
kredits-2
標籤 2025-01-18 13:48:22 +00:00
作者
擁有者

FYI, I accidentally slipped an lndhub-go credentials update in here, which is just updating the Sentry DSN.

FYI, I accidentally slipped an lndhub-go credentials update in here, which is just updating the Sentry DSN.
greg 核可了這些變更 2025-01-23 13:28:16 +00:00
greg 留下了回應
擁有者

👍

👍
greg merged commit f34c7ecd9b into master 2025-01-23 13:28:34 +00:00
greg 刪除分支 feature/btc-rate-tracker 2025-01-23 13:28:34 +00:00
登入 才能加入這對話。
No Reviewers
2 參與者
通知
截止日期
未設定截止日期。
先決條件

未設定先決條件。

參考: kosmos/chef#581
No description provided.