/api/health.
/api/seed-health reports whether the China coverage evaluator itself ran
recently; a fresh evaluator heartbeat does not prove healthy China content.
Coverage inventory
Health projection registry
The China health projection tracks these stable contracts.launched means the
lane is admitted to the China projection; it does not override the lane’s live
freshness or content status.
JODI remains available to existing global energy products. Its China oil and
gas contracts stay blocked because the reviewed upstream country index does not
currently publish substantive
CN rows. A healthy global JODI heartbeat
therefore cannot be presented as China coverage.
Detailed method and source contracts:
- Official macro and policy
- Corporate disclosures
- Logistics corridors
- Cross-domain decision signals
- Activity nowcast methodology
- Shared provenance contract
Status and missingness
Source arrival is not the same as usable content. China health evaluates transport freshness and content freshness separately. A successful request can still publish stale, partial, empty, or timestamp-unknown content. The public contracts use explicit states:availableorhealthymeans the required payload passed its domain validation and freshness rules;partialordegradedmeans some reviewed coverage is missing, stale, or invalid while other evidence remains usable;stalemeans the last valid observation is outside its content budget;unavailablemeans no usable observation can be published; andblockedmeans a source was deliberately not launched, normally because robots, terms, transport, or source-substance review did not pass.
Stock Connect turnover and margin
Four official exchange endpoints composemarket:china:stock-connect:v1. They
sit on the two exchange hosts already covered by the corporate-disclosure terms
review, and all four are admitted as admitted_aggregate_statistics: public
aggregate market statistics only, with no per-investor and no per-order data.
The reviewed terms records are the same ones the disclosure lane uses: SSE
official legal terms, robots.txt not
published (404); SZSE
applicable rules and notices,
robots.txt present but empty (200).
Northbound net flow is not available, because this source does not publish it.
Both exchanges stopped disclosing the northbound buy and sell split on
2024-08-16, so only gross turnover survives. The payload states that directly:
northbound.netFlow is
{ status: 'unavailable', reason: 'EXCHANGE_STOPPED_PUBLISHING_BUY_SELL_SPLIT' },
alongside netFlowDiscontinuedOn: '2024-08-16'. Turnover is two-way trading
activity, buys and sells counted together. It is not capital entering or leaving
the mainland market and must never be read as a flow.
The rest of the contract:
- every published value is normalized to CNY. SSE quotes margin in yuan; every other figure arrives in 亿 (1e8) or 万 (1e4) and is converted;
- a combined SSE and SZSE figure is published only when both exchanges report
the same trade date. Otherwise the combined value degrades with reason
TRADE_DATE_MISMATCH, which doubles as the freeze detector: one exchange that stops advancing is visible immediately instead of after a staleness budget expires; - margin publishes on a T+1 lag, and northbound publishes after each session closes;
- if one margin source has a transport failure, the adapter retains the complete
last-good SSE/SZSE margin pair for less than three hours after verification.
margin.retainedidentifies this fallback.margin.verifiedAtand the common trade date stay unchanged across repeated failures. A current SSE observation is never combined with an older SZSE observation. Verification checks each exchange’s total against financing plus securities lending, allowing only SZSE’s independent rounding to 0.01 亿 (CNY 1 million); - expired or incomplete prior pairs, malformed responses, conflicting trade
dates, and simultaneous margin-source failures do not qualify for retention.
Source errors and
status: 'degraded'remain visible during retention. A successful complete refresh clearsmargin.retainedand updatesverifiedAt; - SZSE endpoints are date-keyed, so the seeder pins the date from the exchange
trading calendar
(
https://www.szse.cn/api/report/exchange/onepersistenthour/monthList) and probes back a bounded number of trading days. Within each run, later sources and dates reuse the successful proxy exit. If that exit fails, the existing bounded fallback skips that already-failed exit for the same request. Request and time budgets are unchanged; and - the lane runs hourly as a member of the
seed-bundle-market-backupRailway bundle.
Bilateral HS4 import baskets
The bilateral store covers one shared HS4 catalogue: the reviewedbilateralHs4Code entries in scripts/shared/comtrade-strategic-products.json
plus the HS4 headings of every commodity in
scripts/shared/supply-vulnerability-commodities.json. The scheduled seeder
and the on-demand public fallback request the same catalogue, in two requests
of at most 20 headings each; the fallback can also request one heading on its
own, described below. Each country shard contains
annual imports by HS4 product and the leading exporter partners. It supports
country exposure, route impact, multi-sector shock, and the PRO
get-country-products route. Detailed bilateral rows are not part of the
anonymous China summary.
The authenticated Comtrade route sends one four-year period window, Y-2
through Y-5, for each of the two HS4 batches. The normalizer keeps the newest
year per product-and-partner pair, so a response cannot silently mix annual
values. When COMTRADE_API_KEYS is absent, the public preview route cannot
accept a period list and instead tries Y-2 followed by Y-3.
The scheduled production contract is deliberately quota-bound:
A run below the 110-shard floor writes
partial seed metadata rather than
claiming full success. Failed reporters preserve an existing shard for at most
two consecutive runs; after that, the shard may expire so the on-demand public
fallback can probe it again. Rate limits, quota exhaustion, and request-budget
exhaustion publish partial coverage and stop the run instead of overwriting
last-good country data with empty payloads.
Aggregate-only rows
Every bilateral request, scheduled or on demand, pins the second partner, the mode of transport and the customs procedure to their aggregate values (partner2Code=0, motCode=0, customsCode=C00). Without them Comtrade
returns one row per partner, second partner, transport mode and customs
procedure — roughly nine rows per partner. That multiplicity, not the heading
count, is what filled the public preview route’s 500-row cap: a single German
heading reached the cap on its own, so a whole-catalogue fallback ended
incomplete for exactly the large importers users ask about. With the filters
the same request returns one row per partner plus the reported World total.
Grouping already kept only the aggregate row per partner, so stored values are
unchanged; what falls is the row count, and the World total is now always
present.
Stored keys
The canonical country shardcomtrade:bilateral-hs4:{ISO2}:v1 keeps the shape
it has always had: per heading, the leading five origins with value and share,
plus the denominator basis. Every derived scorer — import concentration, route
exposure, chokepoint indices — reads that list and sums over all of it, so a
longer list would move published scores with no method change to explain the
movement. Two bulk seeders also read every country shard through a pipeline
batched by key count rather than by bytes, so anything added to the canonical
payload arrives in one response body that nothing bounds. Deeper evidence
therefore cannot ride along on it, and lives in a sibling key instead.
comtrade:bilateral-hs4-partners:{ISO2}:v1 holds, per heading, every origin
whose unrounded share of the denominator reaches 1%, padded up to a minimum of
five origins so a heading with one dominant supplier still carries context, and
capped at 25 whatever their share. The origins the rule leaves out are
published with the list as a count and a combined share, so a reader can state
how much of the trade it is not showing rather than implying the list is
complete. Each origin carries net weight in kilograms and, when the provider
reports one, a quantity with its unit from the pinned registry
scripts/shared/comtrade-quantity-units.json. Comtrade reports an unknown
weight as 0, so a 0 is stored as absent rather than as a confirmed zero. The
sibling key shares the country shard’s 40-day TTL and the same preservation and
TTL-extension rules. Only get-country-products reads it.
comtrade:world-exports-hs4:v1 is one run-level snapshot of every reporter’s
exports of every reviewed heading: per heading, the observation year, the
reporters that filed that year ranked by exported value, each with value in USD
and net weight when reported, and unrankedReporterCount, the reporters whose
newest filing for the heading is older. Those late filers or lapsed exporters
are left out of the ranking, so a rank is a rank among that year’s filers and
can change when they file: the brief prints it as “rank N of M reporters filing
YEAR” and states the unranked count. The run reserves two requests for it against the request budget
before it attempts the first reporter — one per catalogue batch, with the
reporter omitted and the partner pinned to World, so a single request answers
for every reporter at once. Reserving first keeps the per-reporter budget
pre-check honest and stops a budget abort from dropping the snapshot
altogether. It shares the 40-day TTL. Its outcome is recorded in seed metadata
and published through /api/seed-health; any state other than observed is a
coverage gap, because a supplier’s absolute scale and its world rank come from
this key alone. Only get-country-products reads it, and only for a requested
heading. A scale is attached to an origin only when the snapshot’s observation
year for that heading equals the served row’s year, so a late filer’s older row
carries no scale rather than a rank from a year it does not describe.
Single-heading recovery
When a PRO reader asks for a heading a stored shard does not carry, the on-demand public fallback requests that one heading rather than the whole catalogue. That is what makes recovery work for a large importer, whose whole-catalogue fetch fills the preview cap. The outcome is recorded in a per-heading sentinel,comtrade:bilateral-hs4-lazy-heading:{ISO2}:{HS4}:v1, so
one heading’s failure cannot suppress recovery of a different heading for the
same country. Single-heading recovery never writes the canonical shard: one
heading is not a country basket, and a recovered heading is returned with its
own fetch time rather than the shard’s. A recovered heading whose observation
year is older than the stored one is rejected.
Shards written before this evidence existed have no sibling key and no world
exports. They keep serving their leading-five origins, and the surfaces that
read them label the missing volume and scale as not available. No reseed is
forced to obtain the deeper evidence; the next scheduled run writes it.
Access boundaries
- Country summary, corridor conditions, decision-signal summaries, provenance, and aggregate health are available through bounded public surfaces.
- Detailed corridor control towers and activity-nowcast evidence are REST/UI
surfaces. MCP does not expose dedicated tools for either route; Pro MCP
receives their bounded summaries through
get_china_decision_signals. - Pro MCP reads the canonical macro and release-calendar caches through
get_economic_datawith datasetchina-macroorchina-release-calendar. - Detailed bilateral HS4 product rows and route exposure are PRO-only.
- The Pro MCP decision-signal tool receives the same bounded items and provenance as the public composition, not raw exchange documents or unrestricted source expansion.
- Proxy credentials, raw per-attempt request diagnostics, cache names, and detailed freshness thresholds remain operator-only. Public documentation names the configuration keys and selection semantics, not their values.
