---
title: "Set the simulation"
method: POST
path: "/api/bot/v1/sim"
tags: ["Paper trading"]
---

# Set the simulation

`POST /api/bot/v1/sim`

## Request

- Base URL: `https://marginpad.io`
- URL: `https://marginpad.io/api/bot/v1/sim`
- Auth: API key in header `X-API-Key`

Send any subset of the fields, or {"preset":"realistic"} for a ready-made configuration (a preset starts from the defaults, so it is a clean slate plus that venue), or {"reset":true}. Out-of-range values are REFUSED (400 bad_sim_field), never clamped, so a strategy is never measured under a setting you did not choose. Applies to positions opened from now on - a position keeps the maintenance margin, the fee rate and the exit crossing cost it was filled under, for life.

## Request body

- SimProfile: Send any subset. Out-of-range values are refused, not clamped. GET the endpoint for what each field changes.
  - `preset` 'frictionless' | 'realistic' | 'binance' | 'bybit' | 'okx' | 'hyperliquid' | 'thin_book' | 'brutal': A ready-made configuration. Starts from the defaults, so it is a clean slate plus that venue.
  - `reset` boolean: true = back to the engine defaults.
  - `start_balance_usd` number: The book your results are measured against.
  - `margin_enforced` boolean: true = an open over free margin is refused 402 insufficient_margin, as a venue refuses it.
  - `leverage_max` number: Your own leverage ceiling. 0 = the per-market cap.
  - `max_notional_usd` number: Your own ceiling on one position’s notional. 0 = none.
  - `slippage` boolean: Fill against yourself the way walking a real book does.
  - `slippage_bps` number, nullable: Your own crossing cost in basis points instead of our measured table. null = the table.
  - `impact_bps_per_100k` number: Extra basis points per $100,000 of notional, because size walks further down the book.
  - `exit_slippage` boolean: Pay the crossing cost on the way out too. A stop, take-profit or liquidation still fills at its own level.
  - `latency_ms` number: Your order is in flight this long, and the price is re-read afterwards.
  - `partial_fills` boolean: Allow a market order to fill less than it asked for.
  - `min_fill_pct` number: The worst fill ratio with partial_fills on.
  - `reject_rate_pct` number: Share of opens refused 503 venue_rejected on purpose.
  - `taker_bps` number, nullable: Your own per-side fee in basis points. null = the venue from POST /v1/fees, or our class rate.
  - `funding` boolean: false = never charge funding, which is how you separate an execution edge from a carry edge.
  - `funding_mult` number: Scale the real 8-hourly funding rate.
  - `margin_venue` string: Whose published maintenance-margin rate decides where liquidation sits. ’’ = MarginPad’s 0.5%.
  - `margin_tiers` boolean: Raise maintenance margin with size, so a large position liquidates sooner.
  - `mmr_pct` number, nullable: Your own maintenance margin, beating margin_venue.

## Response `200`

{ ok, profile, changed, preset_applied, effective }

## Other responses

- `400`: bad_sim_field / unknown_preset

---

[API](https://skmtc.dev/marginpad/apis/marginpad-free-crypto-api.md) · [All operations](https://skmtc.dev/marginpad/apis/marginpad-free-crypto-api/llms.txt) · [OpenAPI document](https://skmtc.dev/marginpad/apis/marginpad-free-crypto-api/revisions/27d21fcd0bf0?raw)
