{"openapi":"3.1.0","info":{"title":"Monte Carlo API","version":"1.0.0","description":"Live Monte-Carlo simulation for price and portfolio forecasting that quants, traders and planners run to model uncertainty — computed on demand and reproducibly, no key, nothing cached. Run a geometric-Brownian-motion simulation of an asset and get the terminal-price distribution (percentiles, mean, probability of a gain); get the modelled chance of reaching a target price; project wealth over many years with periodic contributions (a retirement / savings projection); and return one sample price path for charting. Every run is seeded, so the same inputs always give the same numbers. A forward-looking simulation engine, distinct from historical-statistics and option-pricing tools — it turns a drift and volatility into a distribution of outcomes.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/montecarlo-api","description":"oanor gateway"}],"tags":[{"name":"Monte Carlo"}],"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/meta":{"get":{"operationId":"get_v1_meta","tags":["Monte Carlo"],"summary":"Service metadata and endpoint list","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Drift/volatility/expected_return are annual decimals (0.07 = 7%). horizon in years. Runs are deterministic per seed (default 12345).","source":"Computed in-process (seeded mulberry32 PRNG + Box-Muller normals)","service":"montecarlo-api","endpoints":{"GET /v1/meta":"This document.","GET /v1/path":"One sample price path (spot=100, drift=0.07, volatility=0.2, horizon=1, steps=50).","GET /v1/simulate":"Terminal-price distribution of an asset (spot=100, drift=0.07, volatility=0.2, horizon=1, paths=10000).","GET /v1/portfolio":"Wealth projection with contributions (initial=10000, annual_contribution=6000, years=30, expected_return=0.07, volatility=0.15, goal=1000000).","GET /v1/probability":"Modelled chance of reaching a target price (spot=100, target=120, drift=0.07, volatility=0.2, horizon=1)."},"description":"Live Monte-Carlo simulation for price and portfolio forecasting, computed on demand and reproducibly. The simulate endpoint runs a geometric-Brownian-motion simulation of an asset and returns the terminal-price distribution (percentiles, mean, probability of a gain); the probability endpoint returns the modelled chance of reaching a target price; the portfolio endpoint projects wealth over many years with periodic contributions (a retirement/savings projection); the path endpoint returns one sample price path. Every run is seeded, so the same inputs always give the same numbers. A forward-looking simulation engine, distinct from historical-statistics and option-pricing tools — it turns a drift and volatility into a distribution of outcomes.","upstream_status":"ok"},"meta":{"timestamp":"2026-06-10T22:56:13.477Z","request_id":"d30456f3-9b61-4085-a0ed-e90d248f7c4c"},"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/path":{"get":{"operationId":"get_v1_path","tags":["Monte Carlo"],"summary":"One sample price path","description":"","parameters":[{"name":"spot","in":"query","required":true,"description":"Current price","schema":{"type":"string"},"example":"100"},{"name":"volatility","in":"query","required":true,"description":"Annual volatility (decimal)","schema":{"type":"string"},"example":"0.2"},{"name":"horizon","in":"query","required":false,"description":"Years (default 1)","schema":{"type":"string"},"example":"1"},{"name":"drift","in":"query","required":false,"description":"Annual drift (default 0.05)","schema":{"type":"string"},"example":"0.07"},{"name":"steps","in":"query","required":false,"description":"Steps 2-1000 (default 50)","schema":{"type":"string"},"example":"50"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"path":[{"t":0,"step":0,"price":100},{"t":0.02,"step":1,"price":99.900227},{"t":0.04,"step":2,"price":101.420445},{"t":0.06,"step":3,"price":99.622727},{"t":0.08,"step":4,"price":100.386947},{"t":0.1,"step":5,"price":100.590347},{"t":0.12,"step":6,"price":104.093203},{"t":0.14,"step":7,"price":105.598976},{"t":0.16,"step":8,"price":105.725921},{"t":0.18,"step":9,"price":104.597829},{"t":0.2,"step":10,"price":106.121182},{"t":0.22,"step":11,"price":106.757136},{"t":0.24,"step":12,"price":105.673193},{"t":0.26,"step":13,"price":109.205162},{"t":0.28,"step":14,"price":110.596488},{"t":0.3,"step":15,"price":112.62543},{"t":0.32,"step":16,"price":117.5054},{"t":0.34,"step":17,"price":120.53256},{"t":0.36,"step":18,"price":121.832235},{"t":0.38,"step":19,"price":116.914847},{"t":0.4,"step":20,"price":119.105282},{"t":0.42,"step":21,"price":118.222487},{"t":0.44,"step":22,"price":119.522032},{"t":0.46,"step":23,"price":122.632159},{"t":0.48,"step":24,"price":124.725467},{"t":0.5,"step":25,"price":124.549624},{"t":0.52,"step":26,"price":119.079728},{"t":0.54,"step":27,"price":118.267149},{"t":0.56,"step":28,"price":122.957081},{"t":0.58,"step":29,"price":126.641459},{"t":0.6,"step":30,"price":133.978227},{"t":0.62,"step":31,"price":134.428683},{"t":0.64,"step":32,"price":133.977399},{"t":0.66,"step":33,"price":138.501777},{"t":0.68,"step":34,"price":144.266591},{"t":0.7,"step":35,"price":144.514248},{"t":0.72,"step":36,"price":151.153435},{"t":0.74,"step":37,"price":153.794229},{"t":0.76,"step":38,"price":156.49822},{"t":0.78,"step":39,"price":159.037985},{"t":0.8,"step":40,"price":160.025465},{"t":0.82,"step":41,"price":160.772629},{"t":0.84,"step":42,"price":161.642717},{"t":0.86,"step":43,"price":164.109982},{"t":0.88,"step":44,"price":169.477638},{"t":0.9,"step":45,"price":168.256006},{"t":0.92,"step":46,"price":164.991799},{"t":0.94,"step":47,"price":165.742826},{"t":0.96,"step":48,"price":166.710253},{"t":0.98,"step":49,"price":162.327916},{"t":1,"step":50,"price":162.467777}],"seed":12345,"spot":100,"drift":0.07,"model":"GBM","steps":50,"source":"MONTECARLO","volatility":0.2,"horizon_years":1,"terminal_price":162.467777},"meta":{"timestamp":"2026-06-10T22:56:13.576Z","request_id":"34031270-7093-4799-b1aa-71eb269bc9c5"},"status":"ok","message":"Path 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/portfolio":{"get":{"operationId":"get_v1_portfolio","tags":["Monte Carlo"],"summary":"Wealth projection with periodic contributions","description":"","parameters":[{"name":"volatility","in":"query","required":true,"description":"Annual volatility (decimal)","schema":{"type":"string"},"example":"0.15"},{"name":"initial","in":"query","required":false,"description":"Initial balance","schema":{"type":"string"},"example":"10000"},{"name":"annual_contribution","in":"query","required":false,"description":"Yearly contribution","schema":{"type":"string"},"example":"6000"},{"name":"years","in":"query","required":false,"description":"Years (default 30)","schema":{"type":"string"},"example":"30"},{"name":"expected_return","in":"query","required":false,"description":"Annual return (default 0.07)","schema":{"type":"string"},"example":"0.07"},{"name":"goal","in":"query","required":false,"description":"Optional target wealth","schema":{"type":"string"},"example":"1000000"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"goal":1000000,"seed":12345,"paths":10000,"years":30,"source":"MONTECARLO","initial":10000,"volatility":0.15,"expected_return":0.07,"prob_reach_goal":0.1376,"terminal_wealth":{"mean":640695.34,"median":547051.42,"percentiles":{"p5":225605.59785,"p10":274677.065911,"p25":374954.09741,"p50":547051.419783,"p75":791395.252508,"p90":1103548.851129,"p95":1361315.679122}},"total_contributed":190000,"annual_contribution":6000},"meta":{"timestamp":"2026-06-10T22:56:13.698Z","request_id":"cf57734a-58bd-47f2-8c83-7742e79d1835"},"status":"ok","message":"Portfolio projection 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/probability":{"get":{"operationId":"get_v1_probability","tags":["Monte Carlo"],"summary":"Modelled chance of reaching a target price","description":"","parameters":[{"name":"spot","in":"query","required":true,"description":"Current price","schema":{"type":"string"},"example":"100"},{"name":"target","in":"query","required":true,"description":"Target price","schema":{"type":"string"},"example":"120"},{"name":"volatility","in":"query","required":true,"description":"Annual volatility (decimal)","schema":{"type":"string"},"example":"0.2"},{"name":"horizon","in":"query","required":false,"description":"Years (default 1)","schema":{"type":"string"},"example":"1"},{"name":"drift","in":"query","required":false,"description":"Annual drift (default 0.05)","schema":{"type":"string"},"example":"0.07"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"seed":12345,"spot":100,"drift":0.07,"model":"GBM","paths":10000,"source":"MONTECARLO","target":120,"prob_below":0.7447,"volatility":0.2,"horizon_years":1,"prob_at_or_above":0.2553,"expected_terminal":107.42775,"expected_if_above_target":136.156639},"meta":{"timestamp":"2026-06-10T22:56:13.802Z","request_id":"6c1af5a6-5719-4c69-8595-5d9e3ee1dac7"},"status":"ok","message":"Probability 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":["Monte Carlo"],"summary":"Terminal-price distribution of an asset (GBM)","description":"","parameters":[{"name":"spot","in":"query","required":true,"description":"Current price","schema":{"type":"string"},"example":"100"},{"name":"volatility","in":"query","required":true,"description":"Annual volatility (decimal)","schema":{"type":"string"},"example":"0.2"},{"name":"horizon","in":"query","required":false,"description":"Years (default 1)","schema":{"type":"string"},"example":"1"},{"name":"drift","in":"query","required":false,"description":"Annual drift (decimal, default 0.05)","schema":{"type":"string"},"example":"0.07"},{"name":"paths","in":"query","required":false,"description":"Simulations 100-200000 (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":{"seed":12345,"spot":100,"drift":0.07,"model":"GBM","paths":10000,"source":"MONTECARLO","terminal":{"max":212.854518,"min":52.286649,"mean":107.42775,"stdev":21.652227,"median":105.211517,"percentiles":{"p5":76.178028,"p10":81.864015,"p25":91.700115,"p50":105.211517,"p75":120.332733,"p90":136.098108,"p95":145.833838}},"volatility":0.2,"horizon_years":1,"probability_gain":0.5981,"expected_return_pct":7.4277},"meta":{"timestamp":"2026-06-10T22:56:13.916Z","request_id":"baf179a2-538f-4934-a640-b1dfbcc8f92b"},"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":4650,"rps_limit":3,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":725,"monthly_call_quota":106000,"rps_limit":10,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1875,"monthly_call_quota":520000,"rps_limit":25,"hard_limit":true},{"slug":"business","name":"Business","price_cents_month":4500,"monthly_call_quota":3180000,"rps_limit":55,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/montecarlo-api"}