Claude 314478eb56 Fix price table display by using closest-match dates and API fallback
The price table was not displaying because of two issues:
1. The Bitfinex API was returning 403 errors, causing the entire get10yr() function to fail
2. The code was looking for exact date matches in weekly historical data

Changes:
- Add try-catch around API call with fallback to latest historical data
- Replace exact date matching with closest-date algorithm to handle weekly data
- Table now shows 10 years of historical price data with percent changes
2025-11-09 19:16:52 +00:00
2023-08-14 22:29:42 -07:00
2023-08-14 22:27:08 -07:00
2025-11-09 16:16:31 +01:00
2025-11-09 04:24:22 +00:00
2022-03-21 00:25:28 -07:00
2021-07-23 00:26:35 -07:00

EURSAT Historical Chart

for entertainment and educational purposes only.

For running on Vercel, note that it uses the vercel version of node which won't run anywhere else

bitfinex daily close data: https://www.investing.com/crypto/bitcoin/btc-usd-historical-data

cronjob is on github actions, see action.yml

Install

  • use at least node 22+
git clone <repository-url>
cd <repository-directory>
npm install
node index.js
Description
No description provided
Readme 7.8 MiB
Languages
Handlebars 49.5%
JavaScript 32.6%
CSS 13.8%
Python 4.1%