

/api/v1/montecarloRun a seeded Monte Carlo simulation of a trading strategy. JSON body with the settings (and optional prop-firm phase rules). Returns equity paths and summary stats (win/loss %, mean max drawdown, phase pass rates).
| Name | In | Type | Req. | Description |
|---|---|---|---|---|
| equity | body | number | no | Starting equity (default 100000). |
| riskPct | body | number | no | Risk per trade in percent (default 1). |
| pWin | body | number | no | Win probability 0-1 (default 0.5). |
| rr | body | number | no | Reward:risk ratio (default 2). |
| trades | body | integer | no | Trades per simulation (max 1000). |
| sims | body | integer | no | Number of simulations (max 50000). |
| seed | body | integer | no | PRNG seed for reproducibility. |
| rules | body | array | no | Optional prop-firm phases [{label, ddLimitPct, profitTargetPct}]. |
curl -X POST -H "Authorization: Bearer afx_live_xxx" \
-H "Content-Type: application/json" \
-d '{}' \
"https://www.analytics-fx.com/api/v1/montecarlo"{
"apiVersion": "v1",
"data": {
"winnersPct": 58.4, "losersPct": 41.6, "meanMaxDdPct": 12.3,
"bestIdx": 12, "worstIdx": 480, "medianIdx": 250,
"phaseOutcomes": [], "paths": [[100000, 100200, 99800]]
},
"meta": { "requestId": "req_mc01", "credits": { "cost": 2, "remaining": 978 } }
}POST /api/v1/montecarloCreate a key at /dashboard/api. The key stays in your browser.