Paper trading

Close a paper position

Close a simulated position fully or partially. P&L settles net of the round-trip taker fee and accrued funding.

post/api/bot/v1/close

Request

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

Request body

idstring required
pctnumber

Percent to close. Omit for the whole position.

symbolstring

The position symbol, copied from /positions. Optional but strongly recommended: it lets the server price exactly one feed and skip a lookup round trip, which is worth several hundred milliseconds from Asia. A wrong value costs nothing - the server falls back automatically.

Response

ok

okboolean

Changes

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