replay_orders
Replay a backtest’s market orders against historical trades to generate fills and slippage statistics from supplied CSV and trade files.
Instructions
Replay a backtest's market orders against the trades that followed them.
orders_csv: CSV with columns time (ISO or epoch), side (+1/-1 or buy/sell), qty (base units). trades_file: Binance archive aggTrades file (.zip or .csv) or Tardis.dev trades file (.csv or .csv.gz) covering the orders' period. Writes one row per filled order (side, qty, price, ref_price, slippage_bps) to fills_csv (default: next to the orders, .fills.csv) and returns a summary. Slippage is in bps against the last trade before each order; positive = cost.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"orders_csv": "<orders_csv>",
"trades_file": "<trades_file>"
},
"name": "replay_orders"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fills_csv | No | ||
| orders_csv | Yes | ||
| trades_file | Yes |