Developer API documentation
Everything you need to call the API and use the returned data in your own website or internal tools.
Browser-safe, CORS-enabled, intentionally constrained. No auth.
Stripe checkout + API key provisioning for subscribers.
Risk signals, enterprise feeds, webhooks, and billing — API-key authenticated, tiered by SKU.
The marketing website is static, so API origins are baked at build time:
PUBLIC_API_BASE_URL (defaults to http://localhost:8000)
PUBLIC_CUSTOMER_API_BASE_URL (no default; set in production)
/live-preview/ page also supports a local override query string:
?api=http://localhost:8000.
The most complete schema source-of-truth is each service’s OpenAPI spec. Below we render request/response shapes and
schema descriptions directly from /openapi.json.
https://polymarket-gvf-customer-xc6bbvvisq-uc.a.run.app GET /health Health
/health Health
{
"title": "HealthResponse",
"properties": {
"status": {
"type": "string",
"title": "Status"
},
"timestamp": {
"type": "string",
"format": "date-time",
"title": "Timestamp"
}
},
"type": "object",
"required": [
"status",
"timestamp"
]
}
GET /api/v1/public/live-preview Live Preview
/api/v1/public/live-preview Live Preview
{
"additionalProperties": true,
"type": "object",
"title": "Response Live Preview Api V1 Public Live Preview Get"
}
GET /api/v1/public/stress_index Public Stress Index
/api/v1/public/stress_index Public Stress Index
{
"additionalProperties": true,
"type": "object",
"title": "Response Public Stress Index Api V1 Public Stress Index Get"
}
GET /api/v1/public/alert_ledger Public Alert Ledger
/api/v1/public/alert_ledger Public Alert Ledger
{
"additionalProperties": true,
"type": "object",
"title": "Response Public Alert Ledger Api V1 Public Alert Ledger Get"
}
POST /api/v1/billing/create-checkout-session Create Checkout Session
/api/v1/billing/create-checkout-session Create Checkout Session
{
"title": "CreateCheckoutSessionRequest",
"properties": {
"email": {
"type": "string",
"format": "email",
"title": "Email"
},
"interval": {
"type": "string",
"enum": [
"monthly",
"yearly"
],
"title": "Interval",
"default": "monthly"
},
"sku_code": {
"type": "string",
"enum": [
"starter",
"pro",
"desk",
"enterprise_data"
],
"title": "Sku Code",
"default": "starter"
}
},
"type": "object",
"required": [
"email"
]
}
{
"title": "CreateCheckoutSessionResponse",
"properties": {
"url": {
"type": "string",
"title": "Url"
}
},
"type": "object",
"required": [
"url"
]
}
POST /api/v1/billing/provision-api-key Provision Api Key
/api/v1/billing/provision-api-key Provision Api Key
{
"title": "ProvisionAPIKeyRequest",
"properties": {
"session_id": {
"type": "string",
"title": "Session Id"
}
},
"type": "object",
"required": [
"session_id"
]
}
{
"title": "ProvisionAPIKeyResponse",
"properties": {
"status": {
"type": "string",
"title": "Status"
},
"api_key": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Api Key"
},
"customer_email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Customer Email"
}
},
"type": "object",
"required": [
"status"
]
}
POST /api/v1/billing/stripe/webhook Stripe Webhook
/api/v1/billing/stripe/webhook Stripe Webhook
{
"type": "object",
"additionalProperties": true,
"title": "Response Stripe Webhook Api V1 Billing Stripe Webhook Post"
}
Public API schema glossary (components.schemas)
CreateCheckoutSessionRequest
{
"title": "CreateCheckoutSessionRequest",
"properties": {
"email": {
"type": "string",
"format": "email",
"title": "Email"
},
"interval": {
"type": "string",
"enum": [
"monthly",
"yearly"
],
"title": "Interval",
"default": "monthly"
},
"sku_code": {
"type": "string",
"enum": [
"starter",
"pro",
"desk",
"enterprise_data"
],
"title": "Sku Code",
"default": "starter"
}
},
"type": "object",
"required": [
"email"
]
}
CreateCheckoutSessionResponse
{
"title": "CreateCheckoutSessionResponse",
"properties": {
"url": {
"type": "string",
"title": "Url"
}
},
"type": "object",
"required": [
"url"
]
}
HTTPValidationError
{
"title": "HTTPValidationError",
"properties": {
"detail": {
"items": {
"title": "ValidationError",
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
},
"input": {
"title": "Input"
},
"ctx": {
"type": "object",
"title": "Context"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
]
},
"type": "array",
"title": "Detail"
}
},
"type": "object"
}
HealthResponse
{
"title": "HealthResponse",
"properties": {
"status": {
"type": "string",
"title": "Status"
},
"timestamp": {
"type": "string",
"format": "date-time",
"title": "Timestamp"
}
},
"type": "object",
"required": [
"status",
"timestamp"
]
}
ProvisionAPIKeyRequest
{
"title": "ProvisionAPIKeyRequest",
"properties": {
"session_id": {
"type": "string",
"title": "Session Id"
}
},
"type": "object",
"required": [
"session_id"
]
}
ProvisionAPIKeyResponse
{
"title": "ProvisionAPIKeyResponse",
"properties": {
"status": {
"type": "string",
"title": "Status"
},
"api_key": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Api Key"
},
"customer_email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Customer Email"
}
},
"type": "object",
"required": [
"status"
]
}
ValidationError
{
"title": "ValidationError",
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
},
"input": {
"title": "Input"
},
"ctx": {
"type": "object",
"title": "Context"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
]
}
GET /health Health
/health Health
{
"title": "HealthResponse",
"properties": {
"status": {
"type": "string",
"title": "Status"
},
"timestamp": {
"type": "string",
"format": "date-time",
"title": "Timestamp"
}
},
"type": "object",
"required": [
"status",
"timestamp"
]
}
GET /api/v1/risk/hedge_opportunities Fresh hedge (tail-exit) opportunities
/api/v1/risk/hedge_opportunities Fresh hedge (tail-exit) opportunities
{
"title": "HedgeOpportunitiesResponse",
"properties": {
"schema_version": {
"type": "string",
"title": "Schema Version"
},
"as_of": {
"type": "string",
"title": "As Of"
},
"methodology": {
"type": "string",
"title": "Methodology"
},
"units": {
"additionalProperties": true,
"type": "object",
"title": "Units"
},
"lookback_minutes": {
"type": "integer",
"title": "Lookback Minutes"
},
"horizon_minutes": {
"type": "integer",
"title": "Horizon Minutes"
},
"notional": {
"type": "number",
"title": "Notional"
},
"onset_thresholds": {
"additionalProperties": true,
"type": "object",
"title": "Onset Thresholds"
},
"base_types": {
"items": {
"type": "string"
},
"type": "array",
"title": "Base Types"
},
"precision_gate": {
"title": "PrecisionGate",
"properties": {
"min_precision": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Min Precision"
},
"precision_days": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Precision Days"
},
"precision_min_scored": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Precision Min Scored"
}
},
"additionalProperties": true,
"type": "object"
},
"backtest_stats_run": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Backtest Stats Run"
},
"evidence_age_days": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Evidence Age Days",
"description": "Trailing window (days) the live precision is measured over"
},
"arms": {
"additionalProperties": {
"$ref": "#/components/schemas/HedgeArm"
},
"type": "object",
"title": "Arms"
},
"count": {
"type": "integer",
"title": "Count"
},
"n_actionable": {
"type": "integer",
"title": "N Actionable",
"default": 0
},
"opportunities": {
"items": {
"title": "HedgeOpportunity",
"properties": {
"market_id": {
"type": "string",
"title": "Market Id"
},
"question": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Question"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Category"
},
"signal_type": {
"type": "string",
"title": "Signal Type",
"description": "Signal arm, e.g. transition_risk_fast"
},
"signal_value": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Signal Value"
},
"onset_ts": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Onset Ts"
},
"age_minutes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Age Minutes"
},
"probability": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Probability"
},
"one_leg_cost": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "One Leg Cost",
"description": "Half-spread + slippage to exit one leg, price units"
},
"expected_avoided": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Expected Avoided",
"description": "0.5 * backtest mean adverse excursion, price units"
},
"expected_edge": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Expected Edge",
"description": "expected_avoided - one_leg_cost, per $1 hedged"
},
"premium_vs_payout": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Premium Vs Payout"
},
"backtest_premium_vs_payout": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Backtest Premium Vs Payout"
},
"backtest_n_trades": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Backtest N Trades"
},
"liquidity": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Liquidity"
},
"fill_at_notional": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Fill At Notional"
},
"stale_quote": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Stale Quote"
},
"alert_precision": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Alert Precision",
"description": "Trailing live-alert precision for this arm (0-1)"
},
"precision_n_scored": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Precision N Scored"
},
"precision_gate_pass": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Precision Gate Pass"
},
"actionable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Actionable",
"description": "Positive edge, fresh quote, and an arm clearing the precision gate"
}
},
"additionalProperties": true,
"type": "object",
"required": [
"market_id",
"signal_type"
],
"description": "One market priced as an exit-at-onset hedge window."
},
"type": "array",
"title": "Opportunities"
}
},
"additionalProperties": true,
"type": "object",
"required": [
"schema_version",
"as_of",
"methodology",
"lookback_minutes",
"horizon_minutes",
"notional",
"count"
],
"description": "Contract for ``/api/v1/risk/hedge_opportunities``."
}
GET /api/v1/risk/stress_index Systemic-stress index (breadth of elevated markets)
/api/v1/risk/stress_index Systemic-stress index (breadth of elevated markets)
{
"title": "Response Stress Index Api V1 Risk Stress Index Get"
}
GET /api/v1/risk/signal_clusters Concurrent-signal episodes (possible systemic stress)
/api/v1/risk/signal_clusters Concurrent-signal episodes (possible systemic stress)
{
"type": "object",
"additionalProperties": true,
"title": "Response Signal Clusters Api V1 Risk Signal Clusters Get"
}
GET /api/v1/risk/status Trust / SLA status
/api/v1/risk/status Trust / SLA status
{
"type": "object",
"additionalProperties": true,
"title": "Response Trust Status Api V1 Risk Status Get"
}
GET /api/v1/webhooks/events List Event Types
/api/v1/webhooks/events List Event Types
{
"items": {
"type": "string"
},
"type": "array",
"title": "Response List Event Types Api V1 Webhooks Events Get"
}
POST /api/v1/webhooks Create Webhook
/api/v1/webhooks Create Webhook
{
"title": "WebhookCreate",
"properties": {
"url": {
"type": "string",
"maxLength": 2083,
"minLength": 1,
"format": "uri",
"title": "Url"
},
"events": {
"items": {
"type": "string"
},
"type": "array",
"title": "Events"
},
"secret": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Secret"
}
},
"type": "object",
"required": [
"url",
"events"
]
}
{
"title": "WebhookResponse",
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"url": {
"type": "string",
"title": "Url"
},
"events": {
"items": {
"type": "string"
},
"type": "array",
"title": "Events"
},
"active": {
"type": "boolean",
"title": "Active"
},
"created_at": {
"type": "string",
"format": "date-time",
"title": "Created At"
},
"updated_at": {
"type": "string",
"format": "date-time",
"title": "Updated At"
}
},
"type": "object",
"required": [
"id",
"url",
"events",
"active",
"created_at",
"updated_at"
]
}
GET /api/v1/webhooks List Webhooks
/api/v1/webhooks List Webhooks
{
"type": "array",
"items": {
"title": "WebhookResponse",
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"url": {
"type": "string",
"title": "Url"
},
"events": {
"items": {
"type": "string"
},
"type": "array",
"title": "Events"
},
"active": {
"type": "boolean",
"title": "Active"
},
"created_at": {
"type": "string",
"format": "date-time",
"title": "Created At"
},
"updated_at": {
"type": "string",
"format": "date-time",
"title": "Updated At"
}
},
"type": "object",
"required": [
"id",
"url",
"events",
"active",
"created_at",
"updated_at"
]
},
"title": "Response List Webhooks Api V1 Webhooks Get"
}
DELETE /api/v1/webhooks/{webhook_id} Delete Webhook
/api/v1/webhooks/{webhook_id} Delete Webhook GET /api/v1/enterprise/hedge_ledger Hedge Ledger
/api/v1/enterprise/hedge_ledger Hedge Ledger
{
"type": "object",
"additionalProperties": true,
"title": "Response Hedge Ledger Api V1 Enterprise Hedge Ledger Get"
}
GET /api/v1/enterprise/status Enterprise Status
/api/v1/enterprise/status Enterprise Status
{
"additionalProperties": true,
"type": "object",
"title": "Response Enterprise Status Api V1 Enterprise Status Get"
}
GET /api/v1/enterprise/stress_history Stress History
/api/v1/enterprise/stress_history Stress History
{
"title": "Response Stress History Api V1 Enterprise Stress History Get"
}
GET /api/v1/enterprise/calibration Calibration Export
/api/v1/enterprise/calibration Calibration Export
{
"type": "object",
"additionalProperties": true,
"title": "Response Calibration Export Api V1 Enterprise Calibration Get"
}
GET /api/v1/enterprise/briefing Briefing Export
/api/v1/enterprise/briefing Briefing Export
{
"title": "Response Briefing Export Api V1 Enterprise Briefing Get"
}
POST /api/v1/enterprise/exports Create Export
/api/v1/enterprise/exports Create Export
{
"title": "ExportCreateRequest",
"properties": {
"feed": {
"type": "string",
"title": "Feed",
"description": "hedge_ledger|stress_history|calibration|briefing"
},
"days": {
"anyOf": [
{
"type": "integer",
"maximum": 365,
"minimum": 1
},
{
"type": "null"
}
],
"title": "Days"
},
"hours": {
"anyOf": [
{
"type": "integer",
"maximum": 2160,
"minimum": 24
},
{
"type": "null"
}
],
"title": "Hours"
},
"limit": {
"anyOf": [
{
"type": "integer",
"maximum": 100000,
"minimum": 1
},
{
"type": "null"
}
],
"title": "Limit"
},
"horizon_minutes": {
"anyOf": [
{
"type": "integer",
"maximum": 1440,
"minimum": 15
},
{
"type": "null"
}
],
"title": "Horizon Minutes"
},
"format": {
"anyOf": [
{
"type": "string",
"pattern": "^(json|csv)$"
},
{
"type": "null"
}
],
"title": "Format"
},
"bucket_minutes": {
"anyOf": [
{
"type": "integer",
"maximum": 1440,
"minimum": 15
},
{
"type": "null"
}
],
"title": "Bucket Minutes"
}
},
"type": "object",
"required": [
"feed"
]
}
GET /api/v1/enterprise/exports List Exports
/api/v1/enterprise/exports List Exports
{
"type": "array",
"items": {
"title": "ExportResponse",
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"feed": {
"type": "string",
"title": "Feed"
},
"status": {
"type": "string",
"title": "Status"
},
"params": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Params"
},
"artifact_uri": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Artifact Uri"
},
"download_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Download Url"
},
"row_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Row Count"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Error"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Created At"
},
"completed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Completed At"
}
},
"type": "object",
"required": [
"id",
"feed",
"status",
"params",
"artifact_uri",
"download_url",
"row_count",
"error",
"created_at",
"completed_at"
]
},
"title": "Response List Exports Api V1 Enterprise Exports Get"
}
GET /api/v1/enterprise/exports/{export_id} Get Export
/api/v1/enterprise/exports/{export_id} Get Export
{
"title": "ExportResponse",
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"feed": {
"type": "string",
"title": "Feed"
},
"status": {
"type": "string",
"title": "Status"
},
"params": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Params"
},
"artifact_uri": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Artifact Uri"
},
"download_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Download Url"
},
"row_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Row Count"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Error"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Created At"
},
"completed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Completed At"
}
},
"type": "object",
"required": [
"id",
"feed",
"status",
"params",
"artifact_uri",
"download_url",
"row_count",
"error",
"created_at",
"completed_at"
]
}
GET /api/v1/billing/usage Billing Usage
/api/v1/billing/usage Billing Usage
{
"title": "UsageResponse",
"properties": {
"org_id": {
"type": "integer",
"title": "Org Id"
},
"sku": {
"type": "string",
"title": "Sku"
},
"capabilities": {
"items": {
"type": "string"
},
"type": "array",
"title": "Capabilities"
},
"day": {
"type": "string",
"title": "Day"
},
"requests_today": {
"type": "integer",
"title": "Requests Today"
},
"daily_limit": {
"type": "integer",
"title": "Daily Limit"
},
"routes_today": {
"additionalProperties": {
"type": "integer"
},
"type": "object",
"title": "Routes Today"
}
},
"type": "object",
"required": [
"org_id",
"sku",
"capabilities",
"day",
"requests_today",
"daily_limit",
"routes_today"
]
}
POST /api/v1/billing/rotate-key Rotate Api Key
/api/v1/billing/rotate-key Rotate Api Key
{
"title": "RotateKeyResponse",
"properties": {
"api_key": {
"type": "string",
"title": "Api Key"
},
"key_prefix": {
"type": "string",
"title": "Key Prefix"
}
},
"type": "object",
"required": [
"api_key",
"key_prefix"
]
}
POST /api/v1/billing/portal Stripe Customer Portal
/api/v1/billing/portal Stripe Customer Portal
{
"title": "PortalRequest",
"properties": {
"return_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Return Url"
}
},
"type": "object"
}
{
"title": "PortalResponse",
"properties": {
"url": {
"type": "string",
"title": "Url"
}
},
"type": "object",
"required": [
"url"
]
}
Customer API schema glossary (components.schemas)
ExportCreateRequest
{
"title": "ExportCreateRequest",
"properties": {
"feed": {
"type": "string",
"title": "Feed",
"description": "hedge_ledger|stress_history|calibration|briefing"
},
"days": {
"anyOf": [
{
"type": "integer",
"maximum": 365,
"minimum": 1
},
{
"type": "null"
}
],
"title": "Days"
},
"hours": {
"anyOf": [
{
"type": "integer",
"maximum": 2160,
"minimum": 24
},
{
"type": "null"
}
],
"title": "Hours"
},
"limit": {
"anyOf": [
{
"type": "integer",
"maximum": 100000,
"minimum": 1
},
{
"type": "null"
}
],
"title": "Limit"
},
"horizon_minutes": {
"anyOf": [
{
"type": "integer",
"maximum": 1440,
"minimum": 15
},
{
"type": "null"
}
],
"title": "Horizon Minutes"
},
"format": {
"anyOf": [
{
"type": "string",
"pattern": "^(json|csv)$"
},
{
"type": "null"
}
],
"title": "Format"
},
"bucket_minutes": {
"anyOf": [
{
"type": "integer",
"maximum": 1440,
"minimum": 15
},
{
"type": "null"
}
],
"title": "Bucket Minutes"
}
},
"type": "object",
"required": [
"feed"
]
}
ExportResponse
{
"title": "ExportResponse",
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"feed": {
"type": "string",
"title": "Feed"
},
"status": {
"type": "string",
"title": "Status"
},
"params": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Params"
},
"artifact_uri": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Artifact Uri"
},
"download_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Download Url"
},
"row_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Row Count"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Error"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Created At"
},
"completed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Completed At"
}
},
"type": "object",
"required": [
"id",
"feed",
"status",
"params",
"artifact_uri",
"download_url",
"row_count",
"error",
"created_at",
"completed_at"
]
}
HTTPValidationError
{
"title": "HTTPValidationError",
"properties": {
"detail": {
"items": {
"title": "ValidationError",
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
},
"input": {
"title": "Input"
},
"ctx": {
"type": "object",
"title": "Context"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
]
},
"type": "array",
"title": "Detail"
}
},
"type": "object"
}
HealthResponse
{
"title": "HealthResponse",
"properties": {
"status": {
"type": "string",
"title": "Status"
},
"timestamp": {
"type": "string",
"format": "date-time",
"title": "Timestamp"
}
},
"type": "object",
"required": [
"status",
"timestamp"
]
}
HedgeArm
{
"title": "HedgeArm",
"properties": {
"backtest": {
"title": "HedgeArmBacktest",
"properties": {
"n_trades": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "N Trades"
},
"t_stat": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "T Stat"
},
"edge_vs_naive": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Edge Vs Naive"
},
"avg_net_return": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Avg Net Return"
},
"premium_vs_payout": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Premium Vs Payout"
},
"active_days": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Active Days"
},
"as_of": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "As Of"
}
},
"additionalProperties": true,
"type": "object"
},
"alert_precision": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Alert Precision"
},
"precision_n_scored": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Precision N Scored"
},
"demoted": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Demoted"
}
},
"additionalProperties": true,
"type": "object",
"description": "Per-arm provenance so a customer can audit the headline claim."
}
HedgeArmBacktest
{
"title": "HedgeArmBacktest",
"properties": {
"n_trades": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "N Trades"
},
"t_stat": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "T Stat"
},
"edge_vs_naive": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Edge Vs Naive"
},
"avg_net_return": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Avg Net Return"
},
"premium_vs_payout": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Premium Vs Payout"
},
"active_days": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Active Days"
},
"as_of": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "As Of"
}
},
"additionalProperties": true,
"type": "object"
}
HedgeOpportunitiesResponse
{
"title": "HedgeOpportunitiesResponse",
"properties": {
"schema_version": {
"type": "string",
"title": "Schema Version"
},
"as_of": {
"type": "string",
"title": "As Of"
},
"methodology": {
"type": "string",
"title": "Methodology"
},
"units": {
"additionalProperties": true,
"type": "object",
"title": "Units"
},
"lookback_minutes": {
"type": "integer",
"title": "Lookback Minutes"
},
"horizon_minutes": {
"type": "integer",
"title": "Horizon Minutes"
},
"notional": {
"type": "number",
"title": "Notional"
},
"onset_thresholds": {
"additionalProperties": true,
"type": "object",
"title": "Onset Thresholds"
},
"base_types": {
"items": {
"type": "string"
},
"type": "array",
"title": "Base Types"
},
"precision_gate": {
"title": "PrecisionGate",
"properties": {
"min_precision": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Min Precision"
},
"precision_days": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Precision Days"
},
"precision_min_scored": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Precision Min Scored"
}
},
"additionalProperties": true,
"type": "object"
},
"backtest_stats_run": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Backtest Stats Run"
},
"evidence_age_days": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Evidence Age Days",
"description": "Trailing window (days) the live precision is measured over"
},
"arms": {
"additionalProperties": {
"$ref": "#/components/schemas/HedgeArm"
},
"type": "object",
"title": "Arms"
},
"count": {
"type": "integer",
"title": "Count"
},
"n_actionable": {
"type": "integer",
"title": "N Actionable",
"default": 0
},
"opportunities": {
"items": {
"title": "HedgeOpportunity",
"properties": {
"market_id": {
"type": "string",
"title": "Market Id"
},
"question": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Question"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Category"
},
"signal_type": {
"type": "string",
"title": "Signal Type",
"description": "Signal arm, e.g. transition_risk_fast"
},
"signal_value": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Signal Value"
},
"onset_ts": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Onset Ts"
},
"age_minutes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Age Minutes"
},
"probability": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Probability"
},
"one_leg_cost": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "One Leg Cost",
"description": "Half-spread + slippage to exit one leg, price units"
},
"expected_avoided": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Expected Avoided",
"description": "0.5 * backtest mean adverse excursion, price units"
},
"expected_edge": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Expected Edge",
"description": "expected_avoided - one_leg_cost, per $1 hedged"
},
"premium_vs_payout": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Premium Vs Payout"
},
"backtest_premium_vs_payout": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Backtest Premium Vs Payout"
},
"backtest_n_trades": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Backtest N Trades"
},
"liquidity": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Liquidity"
},
"fill_at_notional": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Fill At Notional"
},
"stale_quote": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Stale Quote"
},
"alert_precision": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Alert Precision",
"description": "Trailing live-alert precision for this arm (0-1)"
},
"precision_n_scored": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Precision N Scored"
},
"precision_gate_pass": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Precision Gate Pass"
},
"actionable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Actionable",
"description": "Positive edge, fresh quote, and an arm clearing the precision gate"
}
},
"additionalProperties": true,
"type": "object",
"required": [
"market_id",
"signal_type"
],
"description": "One market priced as an exit-at-onset hedge window."
},
"type": "array",
"title": "Opportunities"
}
},
"additionalProperties": true,
"type": "object",
"required": [
"schema_version",
"as_of",
"methodology",
"lookback_minutes",
"horizon_minutes",
"notional",
"count"
],
"description": "Contract for ``/api/v1/risk/hedge_opportunities``."
}
HedgeOpportunity
{
"title": "HedgeOpportunity",
"properties": {
"market_id": {
"type": "string",
"title": "Market Id"
},
"question": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Question"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Category"
},
"signal_type": {
"type": "string",
"title": "Signal Type",
"description": "Signal arm, e.g. transition_risk_fast"
},
"signal_value": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Signal Value"
},
"onset_ts": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Onset Ts"
},
"age_minutes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Age Minutes"
},
"probability": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Probability"
},
"one_leg_cost": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "One Leg Cost",
"description": "Half-spread + slippage to exit one leg, price units"
},
"expected_avoided": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Expected Avoided",
"description": "0.5 * backtest mean adverse excursion, price units"
},
"expected_edge": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Expected Edge",
"description": "expected_avoided - one_leg_cost, per $1 hedged"
},
"premium_vs_payout": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Premium Vs Payout"
},
"backtest_premium_vs_payout": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Backtest Premium Vs Payout"
},
"backtest_n_trades": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Backtest N Trades"
},
"liquidity": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Liquidity"
},
"fill_at_notional": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Fill At Notional"
},
"stale_quote": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Stale Quote"
},
"alert_precision": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Alert Precision",
"description": "Trailing live-alert precision for this arm (0-1)"
},
"precision_n_scored": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Precision N Scored"
},
"precision_gate_pass": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Precision Gate Pass"
},
"actionable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Actionable",
"description": "Positive edge, fresh quote, and an arm clearing the precision gate"
}
},
"additionalProperties": true,
"type": "object",
"required": [
"market_id",
"signal_type"
],
"description": "One market priced as an exit-at-onset hedge window."
}
PortalRequest
{
"title": "PortalRequest",
"properties": {
"return_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Return Url"
}
},
"type": "object"
}
PortalResponse
{
"title": "PortalResponse",
"properties": {
"url": {
"type": "string",
"title": "Url"
}
},
"type": "object",
"required": [
"url"
]
}
PrecisionGate
{
"title": "PrecisionGate",
"properties": {
"min_precision": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Min Precision"
},
"precision_days": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Precision Days"
},
"precision_min_scored": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Precision Min Scored"
}
},
"additionalProperties": true,
"type": "object"
}
RotateKeyResponse
{
"title": "RotateKeyResponse",
"properties": {
"api_key": {
"type": "string",
"title": "Api Key"
},
"key_prefix": {
"type": "string",
"title": "Key Prefix"
}
},
"type": "object",
"required": [
"api_key",
"key_prefix"
]
}
UsageResponse
{
"title": "UsageResponse",
"properties": {
"org_id": {
"type": "integer",
"title": "Org Id"
},
"sku": {
"type": "string",
"title": "Sku"
},
"capabilities": {
"items": {
"type": "string"
},
"type": "array",
"title": "Capabilities"
},
"day": {
"type": "string",
"title": "Day"
},
"requests_today": {
"type": "integer",
"title": "Requests Today"
},
"daily_limit": {
"type": "integer",
"title": "Daily Limit"
},
"routes_today": {
"additionalProperties": {
"type": "integer"
},
"type": "object",
"title": "Routes Today"
}
},
"type": "object",
"required": [
"org_id",
"sku",
"capabilities",
"day",
"requests_today",
"daily_limit",
"routes_today"
]
}
ValidationError
{
"title": "ValidationError",
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
},
"input": {
"title": "Input"
},
"ctx": {
"type": "object",
"title": "Context"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
]
}
WebhookCreate
{
"title": "WebhookCreate",
"properties": {
"url": {
"type": "string",
"maxLength": 2083,
"minLength": 1,
"format": "uri",
"title": "Url"
},
"events": {
"items": {
"type": "string"
},
"type": "array",
"title": "Events"
},
"secret": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Secret"
}
},
"type": "object",
"required": [
"url",
"events"
]
}
WebhookResponse
{
"title": "WebhookResponse",
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"url": {
"type": "string",
"title": "Url"
},
"events": {
"items": {
"type": "string"
},
"type": "array",
"title": "Events"
},
"active": {
"type": "boolean",
"title": "Active"
},
"created_at": {
"type": "string",
"format": "date-time",
"title": "Created At"
},
"updated_at": {
"type": "string",
"format": "date-time",
"title": "Updated At"
}
},
"type": "object",
"required": [
"id",
"url",
"events",
"active",
"created_at",
"updated_at"
]
}
Only the Customer API requires auth.
Authorization: Bearer <YOUR_API_KEY>
X-API-Key: <YOUR_API_KEY>
GET /api/v1/public/live-preview
ETag and cache headers to encourage reuse.
{
"kind": "live_signal_preview_v1",
"generated_at": "2025-01-01T00:00:00+00:00",
"window": { "since": "...", "hours": 72, "points": 96 },
"markets": [
{
"market_id": "...",
"question": "...",
"category": "...",
"status": "ok | cold_start | no_data",
"asof": { "compression_z": 0.4, "surprise_risk": 0.12, "surprise_confidence": 0.8 },
"series": { "compression": [{ "ts": "...", "compression_z": 0.1 }], "surprise": [{ "ts": "...", "surprise_risk": 0.2, "surprise_confidence": 0.7 }] }
}
]
} const API_BASE = "https://YOUR_PUBLIC_API";
const resp = await fetch(`${API_BASE}/api/v1/public/live-preview`);
if (!resp.ok) throw new Error(await resp.text());
const data = await resp.json();
// Example: build a simple list of titles + latest values
const rows = (data.markets || []).map((m) => ({
id: m.market_id,
question: m.question,
compressionZ: m.asof?.compression_z,
surpriseRisk: m.asof?.surprise_risk,
}));
console.log(rows); Used by the website’s subscription flow. These endpoints live on the Public API service.
POST /api/v1/billing/create-checkout-session
{
"email": "you@company.com"
} {"url":"https://checkout.stripe.com/..."} for the browser to redirect to.POST /api/v1/billing/provision-api-key
{
"session_id": "cs_test_..."
} status="ok" with api_key, or status="already_provisioned".
POST /api/v1/billing/stripe/webhook (server-to-server).
Curated, API-key-authenticated risk analytics. The customer service exposes only
/api/v1/risk/*, /api/v1/enterprise/*,
/api/v1/webhooks, and /api/v1/billing/*
— not internal GVF, mutation, or dashboard routes.
Authorization: Bearer <YOUR_API_KEY> X-API-Key: <YOUR_API_KEY>
Retry-After.GET /api/v1/risk/hedge_opportunities GET /api/v1/risk/stress_index GET /api/v1/risk/signal_clusters GET /api/v1/risk/status
GET /api/v1/enterprise/hedge_ledger GET /api/v1/enterprise/status POST /api/v1/enterprise/exports
GET /api/v1/webhooks
POST /api/v1/webhooks
DELETE /api/v1/webhooks/{id} webhook_admin role on the API key.GET /api/v1/billing/usage POST /api/v1/billing/rotate-key POST /api/v1/billing/portal
asof values and a small sparkline
from series.
/docs and a spec at /openapi.json.