Skip to content

fix: WTO API indicator codes, disable giving panel, update README#371

Merged
koala73 merged 2 commits intomainfrom
fix/wto-api-indicator-codes
Feb 25, 2026
Merged

fix: WTO API indicator codes, disable giving panel, update README#371
koala73 merged 2 commits intomainfrom
fix/wto-api-indicator-codes

Conversation

@koala73
Copy link
Owner

@koala73 koala73 commented Feb 25, 2026

Summary

What was wrong

Handler Bug Fix
Tariffs HS_M_0010 doesn't exist; p= partner param caused 400 (tariffs lack partner dimension) Use TP_A_0010, remove partner param
Trade Flows Comma-separated i=ITS_MTV_AX,ITS_MTV_AM gets truncated by WTO API Parallel separate requests
Restrictions QR is a separate API product (/qrs/), not a Timeseries indicator Rewrite using tariff overview across 15 major economies
Barriers SPS/TBT are ePing API (separate subscription), not Timeseries indicators Rewrite using agricultural vs non-agricultural tariff gap
All 204 No Content treated as error Handle as valid empty response

Test plan

  • Verify WTO Trade Policy panel loads data on worldmonitor.app after deploy
  • Confirm Global Giving panel is hidden by default on full variant
  • Check all 4 tabs (Restrictions, Tariffs, Flows, Barriers) show data

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).
@vercel
Copy link

vercel bot commented Feb 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
worldmonitor Building Building Preview, Comment Feb 25, 2026 11:10am
worldmonitor-finance Building Building Preview, Comment Feb 25, 2026 11:10am
worldmonitor-happy Ready Ready Preview, Comment Feb 25, 2026 11:10am
worldmonitor-startup Building Building Preview, Comment Feb 25, 2026 11:10am

Request Review

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant