FYNX APISign In ↗︎
DEVELOPER PREVIEW Create an account and try the developer workspace.Access details →
Find a resource

01 / RISK API

A calculation you
can explain.

Bring structured risk calculations to the point where a trader builds a plan. Six focused endpoints are available in the developer beta.

Developer beta. Try these calculations in the workspace. Supply your contract metadata; modeled losses are not guaranteed execution losses.

Six calculations. Explicit inputs.

CalculationInputsExample result
Position sizeBalance, risk budget, entry, stop, instrument and conversion basis0.33 lots · $99 modeled loss
Risk / rewardEntry, stop, target, direction; optional win rate3.0 R:R · 25% break-even win rate
Pip valueLot size, pip size, contract and conversion basis$10 per pip for one standard EURUSD lot in USD
MarginLots, entry, leverage and currency conversion$3,616.67: one 100,000-unit EURUSD lot at 1.0850, USD account, 1:30 leverage
Break-evenEntry basis, spread, round-trip commission and direction1.08519: long entry 1.0850, spread excluded from entry, 1.2-pip spread, $7 round-trip commission per 100,000-unit lot; USD quote/account
ATR stopCaller-supplied ATR, multiplier, entry and direction1.0760 for a 1.0850 long entry and 2 × 0.0045 ATR

WORKED EXAMPLE / EURUSD

A $100 budget.
A $99 modeled loss.

For a $10,000 account risking 1%, the budget is $100. The distance from 1.0850 to 1.0820 is 30 pips. At $10 per pip per standard lot, the raw size is one-third of a lot.

Flooring to a 0.01-lot step gives 0.33 lots, or 33,000 units. The modeled stop loss is $99.

Example assumes 100,000 base units per lot, USD account and quote currency, and no execution costs. This is a fixture, not a broker availability claim.

POST /v1/risk/position-size · beta
{
  "account_balance": "10000.00",
  "risk_percent": "1.0",
  "entry_price": "1.0850",
  "stop_loss_price": "1.0820",
  "symbol": "EURUSD",
  "instrument_type": "forex",
  "contract_size": "100000",
  "quote_to_account_rate": "1",
  "lot_step": "0.01",
  "minimum_lot": "0.01",
  "account_currency": "USD",
  "direction": "long"
}

Decimals in. Decimals out.

Money, prices and quantities use decimal strings so the client does not introduce floating-point rounding.

Round size down.

Quantity steps are explicit. A model must never round a position above the supplied risk budget.

Know the assumptions.

Conversion rates, contract size, fees and entry basis matter. Unknown instrument metadata must not be guessed.

RELEASE BOUNDARY

Focused on Forex first.

Futures, stocks, crypto and broker-specific CFD models are later work. Liquidation estimates and options payoffs are outside the initial release.

Simple margin is a notional/leverage calculation. Actual broker margin, slippage, gaps and fees can differ from these examples.

Read the endpoint reference →

BUILD WITH FYNX

Your next integration
starts with the docs.