Up to 1,000 trades.
Performance accepts up to 1,000 closed trades and 2,000 equity points per request.
08 / PORTFOLIO API
Turn closed trades, equity history and open positions into performance, drawdown and exposure metrics your users can trust.
| Endpoint | What it returns | Example result |
|---|---|---|
performance | Win rate, profit factor, payoff ratio, expectancy, streaks, average R and return | 5 trades → 40% win rate, profit factor 3, +2% on $10,000 |
drawdown | Maximum and current drawdown, recovery point, longest drawdown; Sharpe, Sortino and volatility when you send periods per year | 100 → 120 → 90 → 130 → 110: 25% max drawdown, recovered at point 3 |
exposure | Gross, net, long and short exposure, leverage, concentration, asset-class totals and forex currency legs | $128,000 gross on $50,000 equity: 2.56× leverage |
WORKED EXAMPLE / EXPOSURE
Long 1 lot of EURUSD at 1.08 and 100 AAPL at $200 on a $50,000 account give $128,000 gross exposure and 2.56× leverage. EURUSD is 84.38% of gross.
Forex positions also report currency legs: +100,000 EUR and −108,000 USD, so you can see what you are really long and short.
{
"account_equity": "50000",
"account_currency": "USD",
"positions": [
{
"symbol": "EURUSD",
"side": "long",
"quantity": "1",
"contract_size": "100000",
"price": "1.08",
"asset_class": "forex"
},
{
"symbol": "AAPL",
"side": "long",
"quantity": "100",
"price": "200",
"asset_class": "stock"
}
]
}Performance accepts up to 1,000 closed trades and 2,000 equity points per request.
No losses means profit factor is null with a warning, not infinity. Fewer than 30 returns flags Sharpe and Sortino.
Send a conversion rate for positions not priced in the account currency.
BUILD WITH FYNX