Paper trading

Open a paper position

Open a simulated position at the live price. Auth: header X-API-Key (mint one at POST /api/bot/key while signed in). Send client_order_id so a network retry cannot open a second position.

post/api/bot/v1/open

Request

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

Request body

fee_venuestring nullable

Charge this open at a real venue’s taker schedule less our referral discount (GET /v1/fees). Omit for your account default; null or "marginpad" for the default rate.

symbolstring required
side'long' | 'short' required
margin_usdnumber required
leveragenumber required
type'market' | 'limit'

market fills now at the live price; limit rests until the market reaches limit_price and fills AT that price.

limit_pricenumber

Required for type:"limit". The level may sit on EITHER side of the market: below it the order behaves as a classic limit, above it as a breakout entry. Either way it waits until the market reaches the level and fills AT the level.

slnumber nullable
tpnumber nullable
client_order_idstring

Idempotency key. Retrying with the same value returns the position the first call created (idempotent: true) instead of opening a second one. Strongly recommended.

Example request

{
  "symbol": "BTC"
}

Response

ok

okboolean
idempotentboolean

true when this returned an existing position because client_order_id was reused.

Changes

No recorded changes to this operation across all 1 revision of this API.