Open Net Worth
Open Net Worth is an open-source personal AI wealth assistant you run yourself: one ledger for your whole financial life, worked by an AI agent you control.
翻訳待ち
No updates detected yet. GitHub releases will appear here.
Official exchange rates from 34 central banks — sample site using one npm SDK per bank (AllRatesToday API)
翻訳待ち
Loading the full README.
Read the full README ↗A sample static site that pulls the official published exchange-rate tables from 34 central banks — one npm package per bank — and renders them as a single self-contained dashboard. Built for developers evaluating the AllRatesToday Central Bank Rates API who want to see the per-bank SDKs actually working before writing any code.
Live site: https://allrates-today.github.io/central-bank-rates-demo/
These are the bank-published reference rates used for tax, customs, audit and compliant invoicing — not market ticks. Each response carries the bank's own publication date (rate_date).
*-exchange-rate package is a thin fetch wrapper over the API, no transitive depsdist/index.html with inline CSS, dark-mode support and a client-side bank filterThe build needs an AllRatesToday API key in ALLRATES_API_KEY: the per-bank SDKs used here require one. (Outside the SDKs, every bank's latest table is also available keyless at https://allratestoday.com/api/open/central-bank/{bank}, e.g. /api/open/central-bank/ecb.)
Get a free key (no credit card) at allratestoday.com/register.
For the deployed site the key lives in a repository secret named ALLRATES_API_KEY, injected into the build step by .github/workflows/deploy.yml. Forks must add their own secret under Settings → Secrets and variables → Actions before the workflow will succeed.
git clone https://github.com/AllRates-Today/central-bank-rates-demo
cd central-bank-rates-demo
npm install
Node.js 18 or newer (the SDKs use global fetch). The repo is private: true — it is a demo, not a published package.
ALLRATES_API_KEY=art_live_your_key npm run build
open dist/index.html
npm run build runs build.mjs, which:
banks.mjs — npm package name, display name, country, home currency, flag and an example pair per bank.import()s each bank's package and calls getLatestRates({ apiKey }) — the bank's full published table for its latest date — six banks at a time.USD, EUR, GBP, JPY, CNY, INR, AUD, CHF).dist/index.html, with a per-bank "Use this SDK" snippet and links to npm, GitHub and the bank's API docs page.Missing the key exits with code 1 and a pointer to the register page. Every fetch failing also exits 1, rather than publishing an empty dashboard.
.github/workflows/deploy.yml has three triggers: push to main, workflow_dispatch, and schedule at cron 30 6 * * * — scheduled daily at 06:30 UTC (GitHub may delay), after most banks publish their morning tables.
| Stage | What happens |
|---|---|
build job | npm ci, then npm run build with ALLRATES_API_KEY from secrets.ALLRATES_API_KEY, then uploads dist/ as a Pages artifact |
deploy job | Publishes that artifact to the github-pages environment via actions/deploy-pages |
| Concurrency | Grouped on pages with cancel-in-progress: true, so a push during a scheduled run supersedes it |
| Permissions | contents: read, pages: write, id-token: write |
Central banks publish once per business day, so building statically once a day costs 34 API calls per build (a deployment that rebuilds daily needs a paid plan). That is the pattern worth copying: cache the daily table, don't call the API per page view.
Every *-exchange-rate package exposes the same four functions. options.apiKey is required on all of them.
| Function | Description | Plan |
|---|---|---|
getLatestRates(options) | The bank's latest published table — rate_date plus every rates[] entry | All plans, including free |
getRate(source, target, options) | Latest rate for one pair | All plans, including free |
getRatesForDate(date, options) | Published table for a YYYY-MM-DD date; weekends and holidays return the most recent published date | Paid |
getHistory(query, options) | Daily time series — { symbol } or { source, target }, optional from/to | Paid |
Errors are thrown as Error with .status and .body attached from the API response.
This is the beginning of the README. Read the rest at the original. Read the full README ↗