RiskState API

RiskState API as documented publicly: 7 operations. Contract generated from the documentation by API Evangelist (2026-11-23); not the provider's own document.

GitHub OpenAPI

Operations 7

POST /v1/risk-state POST /v1/risk-state #
GET /v2/audit/decisions Audit Log — RiskState #
GET /v2/audit/decisions/{id} Audit Log — RiskState #
POST /v2/backtest/shadow POST /v2/backtest/shadow #
POST /v2/portfolio-risk-state Audit Log — RiskState #
POST /v2/risk-distribution Probabilistic loss distributions for a position or portfolio: return quantiles (P01–P99), expected shortfall (ES95/ES99), and P(loss > X), conditioned on market regime × volatility #
POST /v2/stress-scenario Audit Log — RiskState #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/riskstate-ai:riskstate-ai-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

riskstate-ai-openapi-generated.yml Raw ↑
openapi: 3.1.0
info:
  title: RiskState API
  version: '2026-11-23'
  description: 'GENERATED FROM DOCUMENTATION by API Evangelist on 2026-11-23: 7 operation(s) read from 3 public documentation page(s) (each operation
    names its page in x-source). This is not the provider''s published contract; RiskState has published no machine-readable contract that the
    pipeline could find. Engine: local.'
  x-evidence-tiers:
    code-example: 2
    documentation: 5
    pages-with-code: 2
    pages-read: 3
  x-generated-from: documentation
  x-provenance: generated
  x-authored-by: API Evangelist
  x-generated: '2026-11-23'
  x-generator: generate-contract-from-docs.py
  x-engine: local
  x-sources:
  - https://riskstate.ai/docs/api
  - https://riskstate.ai/docs/audit
  - https://riskstate.ai/docs/api-v2
servers:
- url: https://api.riskstate.ai
paths:
  /v1/risk-state:
    post:
      operationId: post_v1_risk_state
      tags:
      - Risk State
      summary: POST /v1/risk-state
      x-source: https://riskstate.ai/docs/api
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostV1RiskStateRequest'
      responses:
        '201':
          description: Success (status as documented)
      x-evidence:
        kind: code-example
        language: curl
        snippet: "curl -X POST https://api.riskstate.ai/v1/risk-state  -H \"Authorization: Bearer $RISKSTATE_API_KEY\"  -H \"Content-Type: application/json\"\
          \  -d '{\"asset\": \"BTC\"}'\n Detailed (with scoring breakdown): "
  /v2/audit/decisions:
    get:
      operationId: get_v2_audit_decisions
      tags:
      - Audit
      summary: Audit Log — RiskState
      x-source: https://riskstate.ai/docs/audit
      parameters:
      - name: from
        in: query
        required: false
        schema:
          type: string
        description: Inclusive lower bound to YYYY-MM-DD
      - name: to
        in: query
        required: false
        schema:
          type: string
        description: Inclusive upper bound to YYYY-MM-DD
      - name: cursor
        in: query
        required: false
        schema:
          type: string
        description: Opaque cursor returned by the previous page
      - name: limit
        in: query
        required: false
        schema:
          type: integer
        description: Max per page (hard cap 5000)
      - name: key_prefix
        in: query
        required: false
        schema:
          type: string
        description: 'Owner-only: narrow to one customer''s decisions'
      responses:
        '200':
          description: Success (status as documented)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetV2AuditDecisionsResponse'
      x-evidence:
        kind: documentation
  /v2/audit/decisions/{id}:
    get:
      operationId: get_v2_audit_decisions_id
      tags:
      - Audit
      summary: Audit Log — RiskState
      x-source: https://riskstate.ai/docs/audit
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: key_prefix
        in: query
        required: false
        schema:
          type: string
        description: Owner key prefix required for owner keys
      responses:
        '200':
          description: Success (status as documented)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetV2AuditDecisionsIdResponse'
      x-evidence:
        kind: documentation
  /v2/backtest/shadow:
    post:
      operationId: post_v2_backtest_shadow
      tags:
      - Backtest
      summary: POST /v2/backtest/shadow
      x-source: https://riskstate.ai/docs/api-v2
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostV2BacktestShadowRequest'
      responses:
        '201':
          description: Success (status as documented)
      x-evidence:
        kind: code-example
        language: curl
        snippet: "curl -X POST https://api.riskstate.ai/v2/backtest/shadow  -H \"Authorization: Bearer $RISKSTATE_API_KEY\"  -H \"Content-Type:\
          \ application/json\"  -d '{\n \"portfolio_path\": [\n {\"date\": \"2026-04-15\", \"positions\": [{\"asset\":\"BTC\",\"size_usd\":250000,\"\
          side\":\"long\"}, {\"asset\":\"ETH\",\"size_usd\":80000,\"side\":\"long\"}]},\n {\"date\": \"2026-04-16\", \"positions\": [{\"asset\"\
          :\"BTC\",\"size_usd\":250000,\"side\":\"long\"}, {\"asset"
  /v2/portfolio-risk-state:
    post:
      operationId: post_v2_portfolio_risk_state
      tags:
      - Portfolio Risk State
      summary: Audit Log — RiskState
      x-source: https://riskstate.ai/docs/audit
      responses:
        '201':
          description: Success (status as documented)
      x-evidence:
        kind: documentation
  /v2/risk-distribution:
    post:
      operationId: post_v2_risk_distribution
      tags:
      - Risk Distribution
      summary: 'Probabilistic loss distributions for a position or portfolio: return quantiles (P01–P99), expected shortfall (ES95/ES99), and
        P(loss > X), conditioned on market regime × volatility bucket.'
      description: All endpoints share the same Bearer auth.
      x-source: https://riskstate.ai/docs/api-v2
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostV2RiskDistributionRequest'
      responses:
        '201':
          description: Success (status as documented)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostV2RiskDistributionResponse'
      x-evidence:
        kind: documentation
  /v2/stress-scenario:
    post:
      operationId: post_v2_stress_scenario
      tags:
      - Stress Scenario
      summary: Audit Log — RiskState
      x-source: https://riskstate.ai/docs/audit
      responses:
        '201':
          description: Success (status as documented)
      x-evidence:
        kind: documentation
components:
  schemas:
    PostV1RiskStateRequest:
      type: object
      properties:
        asset:
          type: string
    GetV2AuditDecisionsResponse:
      type: object
      properties:
        decisions:
          type: array
          description: List of decision summary objects
        next_cursor:
          type: string
          description: Cursor for next page
        count:
          type: integer
          description: Number of decisions returned
        range:
          type: object
          description: Date range of the returned decisions
        key_type:
          type: string
          description: Type of key (owner or external)
        retention_days:
          type: integer
          description: Retention period in days
    GetV2AuditDecisionsIdResponse:
      type: object
      properties:
        id:
          type: string
        ts:
          type: string
        ts_epoch:
          type: integer
        key_prefix:
          type: string
        key_type:
          type: string
        api_version:
          type: string
        scoring_version:
          type: string
        policy_hash:
          type: string
        request:
          type: object
        response_summary:
          type: object
        data_sources:
          type: object
        cache_hit:
          type: boolean
        latency_ms:
          type: integer
    PostV2BacktestShadowRequest:
      type: object
      properties:
        portfolio_path:
          type: array
          items:
            type: object
            properties:
              date:
                type: string
                format: date
              positions:
                type: array
                items:
                  type: object
                  properties:
                    asset:
                      type: string
                    size_usd:
                      type: integer
                    side:
                      type: string
        horizons:
          type: array
          items:
            type: integer
        drawdown_threshold_pct:
          type: integer
    PostV2RiskDistributionRequest:
      type: object
      properties:
        positions:
          type: array
          description: Optional list of positions to evaluate; if omitted, returns portfolio‑level distribution.
        stablecoin_holdings_usd:
          type: object
          description: Same format as other endpoints.
        reference_time:
          type: string
          description: Timestamp anchoring the deterministic historical bootstrap.
        distribution_hash:
          type: string
          description: Optional hash to retrieve a pre‑computed distribution for reproducibility.
      required:
      - reference_time
    PostV2RiskDistributionResponse:
      type: object
      properties:
        api_version:
          type: string
          description: '"2.0.0".'
        scoring_version:
          type: string
          description: '"score_v4".'
        distribution:
          type: object
          description: Quantiles (p01…p99), expected shortfall (es95, es99), probability of loss > X.
        regime:
          type: string
          description: Market regime used for conditioning.
        volatility_bucket:
          type: string
          description: Volatility bucket used for conditioning.
        auditability:
          type: object
          description: computed_at, latency_ms, key_type, audit_id.
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
security:
- bearer: []
tags:
- name: Audit
- name: Backtest
- name: Portfolio Risk State
- name: Risk Distribution
- name: Risk State
- name: Stress Scenario