{"openapi":"3.1.0","info":{"title":"Strategy Simulator API","version":"1.0.0","description":"Live Monte-Carlo simulation of a trading strategy's outcome that traders run to judge an edge — computed on demand and reproducibly, no key, nothing cached. Run a sequence of trades many times from a win rate, reward-to-risk payoff and risk-per-trade, and get the distribution of final equity, the probability of profit, the probability of ruin and the drawdown distribution; get the modelled chance of blowing up the account; or get the analytical edge — expectancy per trade, breakeven win rate and profit factor. Every run is seeded, so the same inputs always give the same numbers. A strategy-outcome engine, distinct from position-sizing tools and price simulators: it turns an edge into the equity, drawdown and ruin a strategy faces.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/strategysim-api","description":"oanor gateway"}],"tags":[{"name":"Strategy Sim"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/expectancy":{"get":{"operationId":"get_v1_expectancy","tags":["Strategy Sim"],"summary":"Analytical edge — expectancy, breakeven, profit factor","description":"","parameters":[{"name":"win_rate","in":"query","required":true,"description":"Win probability 0-1","schema":{"type":"string"},"example":"0.55"},{"name":"payoff","in":"query","required":true,"description":"Reward-to-risk ratio","schema":{"type":"string"},"example":"1.5"},{"name":"risk_pct","in":"query","required":false,"description":"Percent risked per trade (default 2)","schema":{"type":"string"},"example":"2"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Analytical edge per trade. expectancy_R > 0 means a positive edge; breakeven_win_rate is the win rate at which the strategy is flat for this payoff.","inputs":{"payoff":1.5,"risk_pct":2,"win_rate":0.55},"source":"STRATEGYSIM","has_edge":true,"expectancy_R":0.375,"profit_factor":1.8333,"breakeven_win_rate":0.4,"expected_return_per_trade_pct":0.75},"meta":{"timestamp":"2026-06-11T07:49:31.371Z","request_id":"0c518a35-34a1-4126-8d82-5aacba9b27a7"},"status":"ok","message":"Expectancy computed","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Strategy Sim"],"summary":"Service metadata and endpoint list","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"win_rate 0-1, payoff = reward:risk ratio, risk_pct = % of equity risked per trade. Runs are deterministic per seed (default 12345).","source":"Computed in-process (seeded mulberry32 PRNG, fixed-fractional compounding)","service":"strategysim-api","endpoints":{"GET /v1/meta":"This document.","GET /v1/simulate":"Monte-Carlo equity outcome + ruin & drawdown (win_rate=0.55, payoff=1.5, risk_pct=2, trades=100, capital=10000).","GET /v1/expectancy":"Analytical edge — expectancy, breakeven win rate, profit factor (win_rate=0.55, payoff=1.5).","GET /v1/risk-of-ruin":"Modelled probability of ruin (win_rate=0.5, payoff=1, risk_pct=5, trades=100, ruin_drawdown=0.5)."},"description":"Live Monte-Carlo simulation of a trading strategy's outcome, computed on demand and reproducibly. The simulate endpoint runs a sequence of trades many times from a win rate, reward-to-risk payoff and risk-per-trade, and returns the distribution of final equity, the probability of profit, the probability of ruin and the drawdown distribution; the risk-of-ruin endpoint returns the modelled chance of blowing up the account; the expectancy endpoint returns the analytical edge (expectancy per trade, breakeven win rate, profit factor). Every run is seeded, so the same inputs always give the same numbers. A strategy-outcome engine, distinct from position-sizing tools and price simulators.","upstream_status":"ok"},"meta":{"timestamp":"2026-06-11T07:49:31.468Z","request_id":"6bfa4fd0-a366-4a3e-8374-d4c09ddb8981"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/risk-of-ruin":{"get":{"operationId":"get_v1_risk_of_ruin","tags":["Strategy Sim"],"summary":"Modelled probability of ruin","description":"","parameters":[{"name":"win_rate","in":"query","required":true,"description":"Win probability 0-1","schema":{"type":"string"},"example":"0.5"},{"name":"payoff","in":"query","required":true,"description":"Reward-to-risk ratio","schema":{"type":"string"},"example":"1"},{"name":"risk_pct","in":"query","required":false,"description":"Percent risked per trade (default 2)","schema":{"type":"string"},"example":"5"},{"name":"trades","in":"query","required":false,"description":"Trades (default 100)","schema":{"type":"string"},"example":"100"},{"name":"ruin_drawdown","in":"query","required":false,"description":"Drawdown that counts as ruin 0-1 (default 0.5)","schema":{"type":"string"},"example":"0.5"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"edge":{"has_edge":false,"expectancy_R":0,"profit_factor":1,"breakeven_win_rate":0.5,"expected_return_per_trade_pct":0},"note":"Ruin = the equity ever falls to a 50% drawdown from the starting capital, over 100 trades.","inputs":{"runs":10000,"seed":12345,"payoff":1,"trades":100,"risk_pct":5,"win_rate":0.5,"ruin_drawdown":0.5},"source":"STRATEGYSIM","probability_of_ruin":0.2174,"probability_of_profit":0.3732},"meta":{"timestamp":"2026-06-11T07:49:31.600Z","request_id":"fb35d261-1c14-4d6b-a076-eb25eed5d80b"},"status":"ok","message":"Risk of ruin computed","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/simulate":{"get":{"operationId":"get_v1_simulate","tags":["Strategy Sim"],"summary":"Monte-Carlo equity outcome + ruin & drawdown","description":"","parameters":[{"name":"win_rate","in":"query","required":true,"description":"Win probability 0-1","schema":{"type":"string"},"example":"0.55"},{"name":"payoff","in":"query","required":true,"description":"Reward-to-risk ratio","schema":{"type":"string"},"example":"1.5"},{"name":"risk_pct","in":"query","required":false,"description":"Percent of equity risked per trade (default 2)","schema":{"type":"string"},"example":"2"},{"name":"trades","in":"query","required":false,"description":"Trades per run 1-10000 (default 100)","schema":{"type":"string"},"example":"100"},{"name":"capital","in":"query","required":false,"description":"Starting capital (default 10000)","schema":{"type":"string"},"example":"10000"},{"name":"runs","in":"query","required":false,"description":"Simulations 100-100000 (default 10000)","schema":{"type":"string"},"example":"10000"},{"name":"seed","in":"query","required":false,"description":"PRNG seed (default 12345)","schema":{"type":"string"},"example":"12345"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"edge":{"has_edge":true,"expectancy_R":0.375,"profit_factor":1.8333,"breakeven_win_rate":0.4,"expected_return_per_trade_pct":0.75},"inputs":{"runs":10000,"seed":12345,"payoff":1.5,"trades":100,"capital":10000,"risk_pct":2,"win_rate":0.55,"ruin_drawdown":0.5},"source":"STRATEGYSIM","final_equity":{"max":55391.58,"min":8786.81,"mean":21087.54,"median":20474.85,"percentiles":{"p5":13750.91,"p25":17635.48,"p50":20474.85,"p75":23771.37,"p95":30486.67}},"max_drawdown":{"median_pct":11.4158,"percentiles":{"p5":6.8962,"p25":9.6079,"p50":11.4158,"p75":14.124,"p95":19.4148}},"mean_return_pct":110.8754,"probability_of_ruin":0,"probability_of_profit":0.9976},"meta":{"timestamp":"2026-06-11T07:49:31.761Z","request_id":"c5db3217-6bfe-4c4b-8aa2-ece27cce874a"},"status":"ok","message":"Simulation computed","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":4700,"rps_limit":3,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":705,"monthly_call_quota":105000,"rps_limit":10,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1880,"monthly_call_quota":512000,"rps_limit":25,"hard_limit":true},{"slug":"business","name":"Business","price_cents_month":4520,"monthly_call_quota":3140000,"rps_limit":55,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/strategysim-api"}