GET/api/v1/fund/risk/stress/run
Runs a canonical historical stress preset against the fund's live holdings or its latest complete NAV run. SIMULATED what-if, never actual NAV.
Requires an Authorization: Bearer <API key> header (a nyx_dk_… developer key, minted from the developer console at /developers/console). Reflects Nyx's shadow NAV, reconciled against your fund administrator.
| Name | Type | Required | Description |
|---|---|---|---|
| presetKey | "may_2021_crash" | "luna_collapse_2022" | "ftx_week_2022" | "covid_mar_2020" | Required | — |
| includeCapitalImpact | boolean | Optional | — |
| basis | "live" | "latest_nav_run" | Optional | — |
cURL
curl -s -X GET "https://nyxsuite.com/api/v1/fund/risk/stress/run" \
-H "Authorization: Bearer nyx_dk_demo000000000000000000000000000000000000000"JavaScript
const res = await fetch("https://nyxsuite.com/api/v1/fund/risk/stress/run", {
method: "GET",
headers: { Authorization: "Bearer nyx_dk_demo000000000000000000000000000000000000000" },
})
const data = await res.json()Python
# GET https://nyxsuite.com/api/v1/fund/risk/stress/run
import requests
res = requests.get(
"https://nyxsuite.com/api/v1/fund/risk/stress/run",
headers={"Authorization": "Bearer nyx_dk_demo000000000000000000000000000000000000000"},
)
data = res.json()SDK
// TypeScript (@nyxsuite/sdk)
import { NyxClient } from '@nyxsuite/sdk'
const client = new NyxClient({ apiKey: 'nyx_dk_demo000000000000000000000000000000000000000', baseUrl: 'https://nyxsuite.com/api/v1' })
const data = await client.fundRiskStressRun()
# Python (nyxsuite)
from nyxsuite import NyxClient
client = NyxClient(api_key="nyx_dk_demo000000000000000000000000000000000000000", base_url="https://nyxsuite.com/api/v1")
data = client.fund_risk_stress_run()Try It
API Key
nyx_dk_dem••••••••0000
Parameters
Sample response
Object(4)
"simulated": true
"presetLabel": "FTX Week"
"narrative": "Exchange-solvency contagion; SOL hit hardest via Alameda balance-sheet exposure; counterparty risk repricing."
"stress":
Object(9)
"baseNavUsd": "18450210.44"
"shockedNavUsd": "13636260.44"
"pnlUsd": "-4813950.00"
"drawdownPct": -0.26091572319215234
"excludedAssets": []
"baseExposure":
Object(6)
"totalValueUsd": 18450210.44
"grossUsd": 15616400
"netUsd": 15616400
"longUsd": 15616400
"shortUsd": 0
"cashUsd": 2833810.44
"shockedExposure":
Object(6)
"totalValueUsd": 13636260.44
"grossUsd": 10828950
"netUsd": 10828950
"longUsd": 10828950
"shortUsd": 0
"cashUsd": 2807310.44
"truncated": false
"positions":
Array(6)
Object(7)
"asset": "ETH"
"source": "Coinbase"
"baseValueUsd": "6290000.00000000"
"shockedValueUsd": "4403000.00000000"
"pnlUsd": "-1887000.00000000"
"appliedPct": -0.3
"shockPath": "direct"
Object(7)
"asset": "BTC"
"source": "Binance"
"baseValueUsd": "7190400.00000000"
"shockedValueUsd": "5392800.00000000"
"pnlUsd": "-1797600.00000000"
"appliedPct": -0.25
"shockPath": "direct"
Object(7)
"asset": "SOL"
"source": "Solana wallet"
"baseValueUsd": "1421000.00000000"
"shockedValueUsd": "568400.00000000"
"pnlUsd": "-852600.00000000"
"appliedPct": -0.6
"shockPath": "direct"
Object(7)
"asset": "ARB"
"source": "Bybit"
"baseValueUsd": "715000.00000000"
"shockedValueUsd": "464750.00000000"
"pnlUsd": "-250250.00000000"
"appliedPct": -0.35
"shockPath": "class"
Object(7)
"asset": "USDC"
"source": "Ethereum wallet"
"baseValueUsd": "2650000.00000000"
"shockedValueUsd": "2623500.00000000"
"pnlUsd": "-26500.00000000"
"appliedPct": -0.01
"shockPath": "class"
Object(7)
"asset": "USD"
"source": "Manual entry"
"baseValueUsd": "183810.44000000"
"shockedValueUsd": "183810.44000000"
"pnlUsd": "0.00000000"
"appliedPct": 0
"shockPath": "none"