01a09247 - Add historical CHF, EUR, and PHP to gift stats - #117
Conversation
1a690af to
096a33b
Compare
502150b to
8fdaf55
Compare
GET /gifts/stats and GET /gifts?day= still convert each gift at that UTC day's Coinbase BTC-USD close. CHF/EUR/PHP are that USD amount converted with Frankfurter ECB USD crosses (last business day when the market was closed). Missing fiat is null and does not 503 the page.
Handbook and CONTRIBUTING now mention the USD-fiat book the same way as BTC-USD. The usdCentsToFiatCents e2e title matches the empty-stats skip pattern used for satsToUsdCents.
8fdaf55 to
d0696b3
Compare
|
EN: DE: DetailsHead Review passes: Local-check: typecheck, lint, handbook:check, e2e:check, test:coverage 100% (11808/4354/646), build. |
EN:
Public gift totals now also include historical CHF, EUR, and PHP next to Bitcoin and USD.
Each gift is still valued at that UTC day's Coinbase BTC-USD close; the extra fiats are that USD amount converted with Frankfurter ECB rates (last business day when the market was closed).
Missing CHF/EUR/PHP is null and does not take the page down; a missing BTC-USD close still returns 503.
DE:
Die öffentlichen Gift-Totals enthalten neben Bitcoin und USD jetzt auch historische CHF, EUR und PHP.
Jeder Gift wird weiter am Coinbase-BTC-USD-Schluss des UTC-Tags bewertet; die zusätzlichen Fiats sind dieser USD-Betrag, umgerechnet mit Frankfurter-ECB-Kursen (letzter Werktag, wenn der Markt zu war).
Fehlende CHF/EUR/PHP sind null und legen die Seite nicht um; ein fehlender BTC-USD-Schluss bleibt 503.
Details
GET /gifts/stats and GET /gifts?day= keep fx.quote as BTC-USD so existing clients keep parsing.
Additive fields: totalChf, totalEur, totalPhp (and the same on series, recipients, months, and per-gift amounts).
fx.quotes lists USD always, then CHF/EUR/PHP when at least one selected gift day has that cross.
Rates persist in usd_fiat_daily. FRANKFURTER_RATES_URL is optional.