Tools

API Request Builder

Build your risk API request visually and copy the generated JSON or cURL for use in your own application.

Overview

Configure the request parameters below. The JSON payload and cURL command update automatically as you edit the form.

This tool does not execute the request or calculate risk. It only generates a request that you can copy into your own environment.

Request Builder

Configure the request inputs used by the risk calculation API.

$
Portfolio

1–50 assets. Current weight: 100.0%

days

Enter a value between 0.90 and 0.999.

Chart Data

Fixed API fields

Currency and portfolio mode are fixed because v1 currently supports USD and buy-and-hold.

USDbuy_and_hold

Generated JSON

{
  "dataset_id": "ds_sample_001_970079",
  "portfolio_value": 100000,
  "currency": "USD",
  "portfolio": [
    {
      "symbol": "AAPL",
      "weight": 0.6
    },
    {
      "symbol": "BTC-USD",
      "weight": 0.4
    }
  ],
  "degrees_of_freedom": 3,
  "portfolio_mode": "buy_and_hold",
  "confidence_level": 0.99,
  "time_horizon": 1,
  "simulations": 1000,
  "method": "all",
  "method_options": {
    "monte_carlo_normal": {
      "include_chart_data": true
    },
    "monte_carlo_student_t": {
      "include_chart_data": true
    },
    "historical_simulation": {
      "include_chart_data": true
    }
  }
}

Generated cURL

Choose the shell format you use.

curl -X 'POST' \
  'https://quant-risk.scratio.com/api/v1/risk/calculate' \
  -H 'accept: application/json' \
  -H 'X-API-Key: qr_live_xxxxxxxxxx' \
  -H 'Content-Type: application/json' \
  -d '{
  "dataset_id": "ds_sample_001_970079",
  "portfolio_value": 100000,
  "currency": "USD",
  "portfolio": [
    {
      "symbol": "AAPL",
      "weight": 0.6
    },
    {
      "symbol": "BTC-USD",
      "weight": 0.4
    }
  ],
  "degrees_of_freedom": 3,
  "portfolio_mode": "buy_and_hold",
  "confidence_level": 0.99,
  "time_horizon": 1,
  "simulations": 1000,
  "method": "all",
  "method_options": {
    "monte_carlo_normal": {
      "include_chart_data": true
    },
    "monte_carlo_student_t": {
      "include_chart_data": true
    },
    "historical_simulation": {
      "include_chart_data": true
    }
  }
}'

Need the API details?

Review the endpoint, request schema, responses, and authentication requirements in the API documentation.

API Docs →