Trading Risk API
Trading risk-management maths as an API, computed locally and deterministically — the position-sizing and money-management numbers every disciplined trader runs before a trade. The position-size endpoint is instrument-agnostic: from an account balance, the percentage of it you are willing to risk, an entry and a stop-loss it returns the position size in units (shares, contracts, lots or coins), the cash at risk and, with a target, the potential reward and the risk-reward ratio — risk 1 % of a $10,000 account on a 50-pip stop and you trade 0.2 lots, losing exactly $100 if the stop hits. The pip-value endpoint gives the forex pip value for a lot or unit size in the quote currency, with a quote-to-account rate for non-account pairs — a standard lot at a 0.0001 pip is 10 units of the quote currency. The kelly endpoint computes the Kelly criterion optimal bet fraction f* = W − (1−W)/R from a win rate and the win/loss payoff ratio (or average win and loss), plus the half-Kelly many traders prefer and the per-unit expectancy, flagging whether the edge is positive at all. Everything is computed locally and deterministically, so it is instant and private. Ideal for trading-journal, broker, prop-firm, backtesting and fintech app developers, position-sizing and risk-management tools, and trading education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 compute endpoints. This is risk and position-sizing maths; for FX rate conversion use a currency API and for option pricing a Black-Scholes API.
api.oanor.com/trading-api