MarketSchema Research Evidence API v1
Authentication
Send your per-customer key in the X-API-Key header. Keys carry scopes; the server stores only a hash. Configured key records must include a stable id and 64-character key_sha256; malformed records and duplicate key IDs are ignored fail-closed so rate and quota buckets never share an anonymous identity.
any valid keyGET /api/customer/usagepublic, no keyGET /api/research/public/hub-pit-identity-cohort/v1retired before authTicker/run DCO, Evidence Delta, and dig enqueue/status mounts return typed 410; no API key, body, storage, billing, provider, or model path is entered.Endpoints
GET /api/customer/usage
-> { contract_version: "customer_usage.v1", generated_at, customer, scopes, usage, limits, remaining, billing }
GET /api/research/public/hub-pit-identity-cohort/v1
-> { schema: "marketschema.research.hub_pit_identity_cohort.v1", status, as_of, as_known_at, source_inputs, coverage, baskets, bindings, typed_pending_bindings, prospective_hypothesis_bindings, consumer_views, boundary }
RETIRED DCO READS — 410 + Cache-Control: no-store
GET /api/research/v1/dossiers/{ticker}
GET /api/research/v1/ticker/{ticker}/latest
GET /api/research/v1/dossier/{run_id}
GET /api/research/v1/ticker/{ticker}/history
GET /api/research/v1/evidence-delta?symbols=NVDA,AMD
POST /api/research/v1/digs
GET /api/research/v1/digs/{batch_id}
-> 410 typed retirement before auth/body/query/storage/billing/provider/model work; every response points to /api/research/public/hub-pit-identity-cohort/v1 and exports no score or rankRecord the exact version of the contract you poll. The live Hub identity cohort is a distinct marketschema.research.hub_pit_identity_cohort.v1 packet. It carries exact Asset, Basket, PRIMARY/CONTEXT role, effective/known-at, revision, and typed pending/unavailable identity without a Research score or rank. Ticker/run DCO, Evidence Delta, and dig routes are retired typed 410 endpoints.
Historical schemas and commission helpers remain tracked for decoding old receipts, but they are not mounted as a current packet-return or compute product. A successor must admit an exact Hub Asset, issuer, and PIT Basket revision before any stored evidence or fresh compute can be served.
Retired DCO reads return 410 with Cache-Control: no-store before API-key, limit, query, archive, or serializer work. The public Hub identity cohort is also always no-store. Active customer-specific contract responses use Cache-Control: private, no-store, max-age=0 with Vary: X-API-Key.
Retired DCO reads
The old ticker/run dossier mounts cannot prove exact Hub Asset plus point-in-time Basket identity for stored rows. They fail closed before auth or storage and direct consumers to the governed Hub identity cohort; ticker text is never promoted into an identity join.
| Field | Meaning |
|---|---|
410, status:"retired", typed_unavailable:true | Every former ticker/run DCO mount returns typed unavailable truth. It never serves a stored dossier or history row. |
hub_asset_identity_bound:false, pit_basket_revision_bound:false | Unbound stored rows cannot be re-labeled with ticker-only or synthesized identity. Research waits for exact Hub Asset and point-in-time Basket identity. |
auth_evaluated:false, stored_run_loaded:false, dossier_serialized:false | Retirement happens before authentication, path/query parsing, archive reads, database access, or serialization. |
/api/research/public/hub-pit-identity-cohort/v1 | Consume exact Hub instrument, issuer, Basket, membership role, effective/known-at, revision, and typed pending/unavailable identity from the live public contract. |
score_exported:false, rank_exported:false | Research evidence remains cited context only and does not publish a score, vote, rank, Basket relative-strength value, or trading authority. |
Retired unbound evidence and dig routes
/api/research/v1/evidence-delta, POST /api/research/v1/digs, and GET /api/research/v1/digs/{batch_id} are unavailable until their rows carry exact Hub identity and PIT Basket membership. Historical serializers remain unmounted compatibility code.
| Field | Meaning |
|---|---|
410, status:"retired", typed_unavailable:true | Every former ticker/run DCO mount returns typed unavailable truth. It never serves a stored dossier or history row. |
hub_asset_identity_bound:false, pit_basket_revision_bound:false | Unbound stored rows cannot be re-labeled with ticker-only or synthesized identity. Research waits for exact Hub Asset and point-in-time Basket identity. |
auth_evaluated:false, stored_run_loaded:false, dossier_serialized:false | Retirement happens before authentication, path/query parsing, archive reads, database access, or serialization. |
/api/research/public/hub-pit-identity-cohort/v1 | Consume exact Hub instrument, issuer, Basket, membership role, effective/known-at, revision, and typed pending/unavailable identity from the live public contract. |
score_exported:false, rank_exported:false | Research evidence remains cited context only and does not publish a score, vote, rank, Basket relative-strength value, or trading authority. |
Rate limits
Active API-key endpoints return X-RateLimit-Limit/Remaining/Reset (per minute) and X-Quota-Limit/Remaining (per day). Exceeding either returns 429 with Retry-After. Retired Research evidence/compute routes bypass auth and limits and always return typed 410. /api/customer/usage remains a read-only limiter snapshot.
Production quotas can use shared Supabase api_usage via RESEARCH_RATE_LIMIT_STORE=supabase; if that configured store is unavailable, routes fail closed with 503 rate_limit_unavailable.
Errors
invalid_ticker / invalid_limit / invalid_run_id / idempotency_key_required / billing_invalidunauthorizedinsufficient_tokensinsufficient_scopenot_found / not_publishable / batch_not_foundresearch_unbound_ticker_dossier_read_retired / research_unbound_run_dossier_read_retired / research_unbound_ticker_history_read_retired / research_unbound_digs_status_read_retired / research_fresh_mutation_requires_exact_hub_pit_identityrate_limited / quota_exceededcustomer_api_not_configured / rate_limit_unavailable / archive_unavailable / default_universe_unavailable / billing_unavailable / queue_unavailableExample
curl -H "X-API-Key: $MS_KEY" \ "https://research.marketschema.com/api/customer/usage" curl \ "https://research.marketschema.com/api/research/public/hub-pit-identity-cohort/v1"