Add BIS central bank data integration (policy rates, exchange rates, credit)#363
Merged
Add BIS central bank data integration (policy rates, exchange rates, credit)#363
Conversation
Add a new "Central Banks" tab to the Economic panel powered by the BIS (Bank for International Settlements) free SDMX REST API. Displays policy rates, effective exchange rates, and credit-to-GDP ratios for 12 major central banks (Fed, ECB, BOE, BOJ, SNB, MAS, RBI, RBA, PBOC, BOC, BOK, BCB). - Proto: 4 new files (bis_data, get_bis_policy_rates, get_bis_exchange_rates, get_bis_credit) + 3 RPCs added to EconomicService - Server: shared CSV fetch/parse helper using papaparse, 3 handlers with Redis caching (6h/12h TTL), batched single-request per dataset - Frontend: 3 separate circuit breakers, fetchBisData() with Promise.all - UI: Central Banks tab with policy rates (sorted by rate, colored by cut/hike/hold), real EER indices, and credit-to-GDP ratios - Integration: 'bis' DataSourceId, BIS in StatusPanel WORLD_APIS, 60min refresh interval, data loader wiring - i18n: BIS keys added to all 17 locale files No API key required — BIS is free/public. All BIS-derived text rendered via escapeHtml() to prevent XSS. https://claude.ai/code/session_01N73WokR4NPuSg8JpPz7nYZ
- Fix double '?' in fetchBisCSV URL construction (format=csv was silently ignored) - Add error logging to all 3 BIS server handlers (previously silent catch blocks) - Fix misleading "BIS data loading..." empty state to "temporarily unavailable - will retry" - Remove unused nominal EER fetch to save bandwidth (only real EER is displayed) - Fix previousRatio rounding inconsistency in credit-to-GDP fallback path https://claude.ai/code/session_01N73WokR4NPuSg8JpPz7nYZ
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
koala73
added a commit
that referenced
this pull request
Feb 25, 2026
The WTO trade handlers used fabricated indicator codes (QR, SPS, TBT, HS_M_0010) that don't exist in the WTO Timeseries API, causing all four RPCs to silently return empty data. Fixes: - Tariffs: HS_M_0010 → TP_A_0010; remove partner param (tariff indicators lack partner dimension, caused 400 error) - Trade flows: split comma-separated indicators into parallel requests (API truncates combined i= values) - Restrictions: rewrite to use tariff overview across 15 major economies (QR API is a separate subscription product) - Barriers: rewrite to use agricultural vs non-agricultural tariff gap analysis (ePing SPS/TBT API is separate subscription) - Handle 204 No Content (valid query, no data) instead of treating as error Also: disable Global Giving panel by default for non-happy variants, update README for BIS + WTO features (PR #363, #364).
3 tasks
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds integration with Bank for International Settlements (BIS) SDMX API to provide three new economic data streams:
Implements three new RPC endpoints, client/server code generation, UI panel with tabbed display, and i18n support across 13 languages.
Type of change
Affected areas
/api/*)Changes
Backend
New RPC handlers (
server/worldmonitor/economic/v1/):get-bis-policy-rates.ts— Fetches central bank policy rates from BIS WS_CBPOL datasetget-bis-exchange-rates.ts— Fetches effective exchange rate indices from BIS WS_EER datasetget-bis-credit.ts— Fetches credit-to-GDP ratios from BIS WS_TC dataset_bis-shared.ts— Shared CSV fetch/parse utilities, country mappings, and BIS API helpersProto definitions (
proto/worldmonitor/economic/v1/):bis_data.proto— Message types for policy rates, exchange rates, and credit dataget_bis_policy_rates.proto,get_bis_exchange_rates.proto,get_bis_credit.proto— RPC request/response messagesservice.prototo register three new RPC methodsGenerated code (client & server):
src/generated/client/andsrc/generated/server/Frontend
EconomicPanel (
src/components/EconomicPanel.ts):updateBis()method to receive and render BIS datarenderCentralBanks()method with three sections: Policy Rates (sorted by rate), Real EER, and Credit-to-GDPEconomic service (
src/services/economic/index.ts):fetchBisData()function that calls all three BIS endpoints in parallelBisDatatype aggregating policy rates, exchange rates, and credit entriesData loader (
src/app/data-loader.ts):loadBisData()method integrated into main data loading pipelinei18n (
src/locales/*.json):centralBanks,noBisData,policyRate,exchangeRate,creditToGdp,realEer,change,cut,hike,holdData Integration
Checklist