{"openapi":"3.1.0","info":{"title":"Forex Calculator API","version":"1.0.0","description":"Live foreign-exchange trading calculators computed from live ECB reference rates. The pip-value endpoint returns what one pip of a currency pair is worth, in the trader's account currency, for a given lot size. The position-size endpoint returns how many lots to trade to risk a fixed percentage of the account on a given stop-loss. The profit-loss endpoint returns the P&L of a trade from its entry, exit and direction. The margin endpoint returns the margin a position requires at a given leverage. All conversion to the account currency uses live exchange rates. Computed live, nothing stored. Distinct from raw FX-rate feeds — this turns rates into the pip values, position sizes, margins and P&L a trader acts on.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/fxcalculator-api","description":"oanor gateway"}],"tags":[{"name":"Pip Value"},{"name":"Position Size"},{"name":"Profit Loss"},{"name":"Margin"},{"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/pip-value":{"get":{"operationId":"get_v1_pip_value","tags":["Pip Value"],"summary":"Pip value in the account currency","description":"","parameters":[{"name":"pair","in":"query","required":true,"description":"Currency pair","schema":{"type":"string"},"example":"EURUSD"},{"name":"lot","in":"query","required":false,"description":"Lot size (1 = standard)","schema":{"type":"string"},"example":"1"},{"name":"account","in":"query","required":false,"description":"Account currency","schema":{"type":"string"},"example":"USD"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"pair":"EUR/USD","units":100000,"source":"ECB (Frankfurter)","lot_size":1,"pip_size":0.0001,"pip_value":10,"rates_date":"2026-06-10","account_currency":"USD","pip_value_per_standard_lot":10},"meta":{"timestamp":"2026-06-10T22:56:38.355Z","request_id":"015bd5ed-6d1a-42d8-b846-667f086a3670"},"status":"ok","message":"Pip value 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/position-size":{"get":{"operationId":"get_v1_position_size","tags":["Position Size"],"summary":"Lots to risk a % of the account","description":"","parameters":[{"name":"balance","in":"query","required":true,"description":"Account balance","schema":{"type":"string"},"example":"10000"},{"name":"risk_pct","in":"query","required":true,"description":"Risk percent","schema":{"type":"string"},"example":"1"},{"name":"stop_loss_pips","in":"query","required":true,"description":"Stop-loss in pips","schema":{"type":"string"},"example":"20"},{"name":"pair","in":"query","required":false,"description":"Currency pair","schema":{"type":"string"},"example":"EURUSD"},{"name":"account","in":"query","required":false,"description":"Account currency","schema":{"type":"string"},"example":"USD"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"lots":0.5,"pair":"EUR/USD","units":50000,"source":"ECB (Frankfurter)","balance":10000,"risk_pct":1,"rates_date":"2026-06-10","risk_amount":100,"stop_loss_pips":20,"account_currency":"USD","pip_value_per_standard_lot":10},"meta":{"timestamp":"2026-06-10T22:56:38.453Z","request_id":"f125902c-a05d-468b-ae1c-6e294a2a6cf7"},"status":"ok","message":"Position size 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/profit-loss":{"get":{"operationId":"get_v1_profit_loss","tags":["Profit Loss"],"summary":"Trade profit/loss","description":"","parameters":[{"name":"pair","in":"query","required":true,"description":"Currency pair","schema":{"type":"string"},"example":"EURUSD"},{"name":"entry","in":"query","required":true,"description":"Entry price","schema":{"type":"string"},"example":"1.0850"},{"name":"exit","in":"query","required":true,"description":"Exit price","schema":{"type":"string"},"example":"1.0900"},{"name":"lot","in":"query","required":false,"description":"Lot size","schema":{"type":"string"},"example":"1"},{"name":"direction","in":"query","required":false,"description":"buy or sell","schema":{"type":"string"},"example":"buy"},{"name":"account","in":"query","required":false,"description":"Account currency","schema":{"type":"string"},"example":"USD"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"exit":1.09,"pair":"EUR/USD","pips":50,"entry":1.085,"source":"ECB (Frankfurter)","lot_size":1,"direction":"buy","rates_date":"2026-06-10","profit_loss":500,"account_currency":"USD","profit_loss_quote":500},"meta":{"timestamp":"2026-06-10T22:56:38.571Z","request_id":"30744f47-f893-494c-89ad-eb70176b62ed"},"status":"ok","message":"Profit/loss 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/margin":{"get":{"operationId":"get_v1_margin","tags":["Margin"],"summary":"Required margin at a leverage","description":"","parameters":[{"name":"pair","in":"query","required":true,"description":"Currency pair","schema":{"type":"string"},"example":"EURUSD"},{"name":"lot","in":"query","required":false,"description":"Lot size","schema":{"type":"string"},"example":"1"},{"name":"leverage","in":"query","required":false,"description":"Leverage (e.g. 100)","schema":{"type":"string"},"example":"100"},{"name":"account","in":"query","required":false,"description":"Account currency","schema":{"type":"string"},"example":"USD"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"pair":"EUR/USD","source":"ECB (Frankfurter)","leverage":100,"lot_size":1,"rates_date":"2026-06-10","required_margin":1153.89,"account_currency":"USD","notional_account":115389.5},"meta":{"timestamp":"2026-06-10T22:56:38.681Z","request_id":"1e4f16dc-3a68-4d95-88c5-9a430f3729b0"},"status":"ok","message":"Margin 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":"Service metadata","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Standard lot = 100,000 base units; pip = 0.0001 (0.01 for JPY pairs). Supports ECB major currencies.","source":"ECB rates via Frankfurter (api.frankfurter.dev, live)","service":"fxcalculator-api","endpoints":{"GET /v1/meta":"This document.","GET /v1/margin":"Required margin (pair=EURUSD, lot=1, leverage=100).","GET /v1/pip-value":"Pip value in the account currency (pair=EURUSD, lot=1, account=USD).","GET /v1/profit-loss":"Trade P&L (pair=EURUSD, entry=1.0850, exit=1.0900, lot=1, direction=buy).","GET /v1/position-size":"Lots to risk a % of the account (balance=10000, risk_pct=1, stop_loss_pips=20, pair=EURUSD)."},"rates_date":"2026-06-10","description":"Live foreign-exchange trading calculators computed from live ECB reference rates. The pip-value endpoint returns what one pip of a currency pair is worth, in the trader's account currency, for a given lot size; the position-size endpoint returns how many lots to trade to risk a fixed percentage of the account on a given stop-loss; the profit-loss endpoint returns the P&L of a trade from its entry, exit and direction; the margin endpoint returns the margin a position requires at a given leverage. All conversion to the account currency uses live rates. Computed live, nothing stored. Distinct from raw FX-rate feeds — this turns rates into the pip values, position sizes, margins and P&L a trader acts on.","upstream_status":"ok"},"meta":{"timestamp":"2026-06-10T22:56:38.802Z","request_id":"da87e9db-e3b9-4607-9753-22d90851ceaf"},"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":3,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":500,"monthly_call_quota":95000,"rps_limit":15,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1650,"monthly_call_quota":460000,"rps_limit":40,"hard_limit":true},{"slug":"scale","name":"Scale","price_cents_month":4100,"monthly_call_quota":2800000,"rps_limit":120,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/fxcalculator-api"}