Request schema
{
"type": "object",
"description": "The body of POST /v1/reconcile, up to 2 MiB. Send trades_csv or trades.",
"properties": {
"trades_csv": {
"type": "string",
"description": "A TradingView Strategy Tester \"List of trades\" CSV export."
},
"trades": {
"type": "array",
"description": "The trades as a JSON list, in place of trades_csv.",
"items": {
"type": "object",
"properties": {
"n": {
"description": "Trade number."
},
"side": {
"type": "string",
"enum": [
"long",
"short"
]
},
"entry_time": {
"type": "string"
},
"exit_time": {
"type": "string"
},
"entry_price": {
"type": "number"
},
"exit_price": {
"type": "number"
},
"qty": {
"type": "number"
},
"commission": {
"type": "number"
},
"reported_pnl": {
"type": "number"
}
}
}
},
"initial_capital": {
"type": "number",
"description": "Starting capital for the percentage figures."
},
"commission": {
"type": "object",
"description": "Commission applied to every trade.",
"properties": {
"type": {
"type": "string",
"enum": [
"percent",
"per_contract",
"cash_per_order"
]
},
"value": {
"type": "number"
}
}
},
"claimed": {
"type": "object",
"description": "The claimed metrics to check, any of net_profit, net_profit_pct, gross_profit, gross_loss, total_trades, win_rate, profit_factor, max_drawdown, max_drawdown_pct, avg_trade, largest_win, largest_loss."
},
"tolerance_pct": {
"type": "number",
"default": 0.5,
"description": "How far a claim may differ, in percent, and still MATCH."
},
"single_position": {
"type": "boolean",
"default": true,
"description": "Flag overlapping trades."
}
}
}
Response schema
{
"type": "object",
"description": "POST /v1/reconcile answers a backtest-reconcile/v1 object: verdict, the recomputed metrics, each claim with claimed, recomputed, diff and status, findings with code and severity, counts, and the assumptions used."
}