---
title: "Modify a resting order"
method: POST
path: "/api/bot/v1/modify_order"
tags: ["Paper trading"]
---

# Modify a resting order

`POST /api/bot/v1/modify_order`

## Request

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

Change a resting limit or stop order in place: limit_price, sl, tp, margin_usd, leverage, trail_pct. The direction is re-derived from the market now and the candle watermark restarts, so a moved level never fills on a bar printed before the change.

## Request body

- ModifyOrderRequest
  - `order_id` string, required
  - `limit_price` number
  - `sl` number, nullable
  - `tp` number, nullable
  - `margin_usd` number
  - `leverage` number
  - `trail_pct` number, nullable

## Response `200`

ok

## Other responses

- `404`: no such order
- `409`: already filled, cancelled or expired

---

[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)
