{"openapi":"3.1.0","info":{"title":"VWAP & Execution Benchmark API","version":"1.0.0","description":"Live VWAP (volume-weighted average price) and execution-benchmark analytics that trading desks and algos run to judge a fill, computed on demand from the OHLCV candles you pass in — no key, no cache, nothing stored. The vwap endpoint returns the session VWAP, its cumulative curve and where the last price sits relative to it (above, below or at VWAP), using the typical price (high+low+close)/3 weighted by volume. The anchored endpoint returns the VWAP measured from a chosen bar — an anchored VWAP from a swing high, a session open or a news event. The benchmark endpoint scores an execution price against both VWAP and TWAP (time-weighted average price): the slippage in basis points and whether the fill beat the benchmark, separately for a buy or a sell. Works for any market — forex, equities, crypto or commodities — because you supply the candles. This is an execution-analytics engine: it turns price and volume into the benchmark a trader's fill is measured against, distinct from indicator and pattern tools. Computed locally and deterministically, so it is instant and private. Ideal for execution-quality (TCA) reporting, algo-trading back-tests, broker fill analysis and trading dashboards. VWAP uses the typical price (H+L+C)/3. Live, nothing stored. 3 compute endpoints. For raw price feeds use an exchange or FX API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/vwap-api","description":"oanor gateway"}],"tags":[{"name":"VWAP"},{"name":"Meta"}],"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/anchored":{"get":{"operationId":"get_v1_anchored","tags":["VWAP"],"summary":"Anchored VWAP from a chosen bar","description":"","parameters":[{"name":"candles","in":"query","required":true,"description":"OHLCV candles open:high:low:close:volume","schema":{"type":"string"},"example":"100:101:99:100:1000,100:103:101:102:2000,102:104:101:103:3000"},{"name":"anchor","in":"query","required":false,"description":"Bar index to anchor from (default 0)","schema":{"type":"string"},"example":"1"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"source":"VWAP","candles":3,"position":"above_vwap","last_price":103,"anchor_index":1,"total_volume":5000,"anchored_vwap":102.4,"deviation_pct":0.5859,"bars_in_anchor":2},"meta":{"timestamp":"2026-06-11T07:49:28.817Z","request_id":"df0af8c0-6995-44b6-ae1f-2c96bca774d1"},"status":"ok","message":"Anchored VWAP 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/benchmark":{"get":{"operationId":"get_v1_benchmark","tags":["VWAP"],"summary":"Score a fill vs VWAP & TWAP","description":"","parameters":[{"name":"candles","in":"query","required":true,"description":"OHLCV candles open:high:low:close:volume","schema":{"type":"string"},"example":"100:101:99:100:1000,100:103:101:102:2000,102:104:101:103:3000"},{"name":"fill_price","in":"query","required":true,"description":"Your execution price","schema":{"type":"string"},"example":"101"},{"name":"side","in":"query","required":false,"description":"buy or sell (default buy)","schema":{"type":"string"},"example":"buy"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Slippage positive = worse than the benchmark; beat_benchmark = the fill was better than the benchmark for this side. bps relative to the benchmark.","side":"buy","twap":101.66666667,"vwap":102,"source":"VWAP","candles":3,"vs_twap":{"slippage":-0.66666667,"slippage_bps":-65.57,"beat_benchmark":true},"vs_vwap":{"slippage":-1,"slippage_bps":-98.04,"beat_benchmark":true},"fill_price":101},"meta":{"timestamp":"2026-06-11T07:49:28.915Z","request_id":"86754eb0-442b-40dc-bc65-46c1e5a0b60e"},"status":"ok","message":"Execution benchmarked","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/vwap":{"get":{"operationId":"get_v1_vwap","tags":["VWAP"],"summary":"Session VWAP + cumulative curve","description":"","parameters":[{"name":"candles","in":"query","required":true,"description":"OHLCV candles open:high:low:close:volume, comma-separated oldest first","schema":{"type":"string"},"example":"100:101:99:100:1000,100:103:101:102:2000,102:104:101:103:3000"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"vwap":102,"source":"VWAP","candles":3,"position":"above_vwap","deviation":1,"last_price":103,"total_volume":6000,"deviation_pct":0.9804,"cumulative_vwap":[100,101.33333333,102]},"meta":{"timestamp":"2026-06-11T07:49:29.008Z","request_id":"bed0b933-4c15-406d-b56d-52387a9fa164"},"status":"ok","message":"VWAP 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":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"candles = open:high:low:close:volume, comma-separated, oldest first. Volume is required for VWAP.","source":"Computed in-process from caller-supplied OHLCV candles (no upstream)","service":"vwap-api","endpoints":{"GET /v1/meta":"This document.","GET /v1/vwap":"Session VWAP + cumulative curve (candles=o:h:l:c:v,...).","GET /v1/anchored":"VWAP measured from a chosen bar (candles=..., anchor=0).","GET /v1/benchmark":"Score a fill vs VWAP & TWAP (candles=..., fill_price=100.5, side=buy)."},"description":"Live VWAP and execution-benchmark analytics computed on demand from OHLCV candles. The vwap endpoint returns the session VWAP, its cumulative curve and where the last price sits relative to it; the anchored endpoint returns the VWAP measured from a chosen bar; the benchmark endpoint scores an execution price against VWAP and TWAP (slippage in basis points and whether the fill beat the benchmark). Computed live from your input, nothing stored — works for forex, stocks, crypto or commodities. An execution-analytics engine, distinct from indicator and pattern tools. VWAP uses the typical price (H+L+C)/3.","upstream_status":"ok"},"meta":{"timestamp":"2026-06-11T07:49:29.105Z","request_id":"4c94268c-d0a4-4465-9e4d-e81a90e1ed2d"},"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"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":4000,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":880,"monthly_call_quota":86000,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2560,"monthly_call_quota":445000,"rps_limit":18,"hard_limit":true},{"slug":"business","name":"Business","price_cents_month":6150,"monthly_call_quota":2700000,"rps_limit":45,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/vwap-api"}