Simulation profile
paper_simThe whole paper-trading simulation, configurable. By default this engine is deliberately easy: a market order fills whole at the live price, maintenance margin is a flat 0.5%, the balance is a scorecard that never refuses an open, and there is no latency, no size impact and no partial fill. That is right for learning and optimistic for proving out a bot. This sets any of it: the book size your results are measured against and whether it is a real budget (margin_enforced), what crossing the book costs on entry and exit (slippage, slippage_bps, impact_bps_per_100k), how long your order is in flight (latency_ms), whether orders fill part-way (partial_fills, min_fill_pct), how often the venue refuses (reject_rate_pct), your own fee (taker_bps), funding (funding, funding_mult) and where liquidation sits (margin_venue, margin_tiers, mmr_pct). Easiest route: pass a preset - frictionless, realistic, binance, bybit, okx, hyperliquid, thin_book or brutal. Reading returns every field with its range, its default and what it changes, the presets, and what a fill would look like right now. Out-of-range values are refused, never clamped. Positions keep the simulation they were filled under. Requires an API key.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reset | No | true = back to the engine defaults. | |
| preset | No | frictionless | realistic | binance | bybit | okx | hyperliquid | thin_book | brutal. A preset starts from the defaults, so it is a clean slate plus that configuration. Omit every field to READ. | |
| funding | No | false = never charge funding, which is how you separate an execution edge from a carry edge. | |
| mmr_pct | No | 0.05-10. Your own maintenance margin, beating margin_venue. | |
| slippage | No | Fill against yourself the way a real book does: 0.01% crypto majors, 0.05% other crypto, 0.005% forex, 0.02% stocks/metals/indices. | |
| taker_bps | No | 0-100. Your own per-side fee in basis points. 5.5 = 0.055%. | |
| latency_ms | No | 0-2000. Your order is in flight this long and the price is re-read afterwards. | |
| funding_mult | No | 0-5. Scale the real 8-hourly funding rate. | |
| leverage_max | No | Your own leverage ceiling below the market cap. 0 = the market cap. | |
| margin_tiers | No | Raise maintenance margin with size, as a risk-limit ladder does, so a large position liquidates sooner. | |
| margin_venue | No | binance | bybit | okx | bitget | mexc | kucoin | gate | kraken | hyperliquid | coinbase, or "marginpad". Moves ONLY where liquidation sits. | |
| min_fill_pct | No | 10-100. The worst fill ratio with partial_fills on. | |
| slippage_bps | No | 0-500. Your own crossing cost in basis points instead of that table. 10 = 0.10%. | |
| exit_slippage | No | Pay the crossing cost on the way out too (default true). A stop, take-profit or liquidation still fills at its level. | |
| partial_fills | No | Allow a market order to fill less than it asked for. | |
| margin_enforced | No | true = an open needing more than free margin is refused 402, as a venue refuses it. Free margin is balance minus committed margin; unrealized profit is not collateral, because every position is isolated. | |
| reject_rate_pct | No | 0-50. Share of opens refused 503 venue_rejected on purpose. | |
| max_notional_usd | No | Your own ceiling on one position’s notional. 0 = none. | |
| start_balance_usd | No | 100 to 10,000,000. The book return_pct, the equity curve and max drawdown are measured against. | |
| impact_bps_per_100k | No | 0-500. Extra basis points per $100,000 of notional, because size walks further down the book. |