Developer Portal

Amend OrderPATCH

Amends an existing trading order for the authenticated user's account, including support for multi-level take profit and stop loss

View as Markdown
PATCH
/accounts/{account_id}/orders/{order_id}

Authorization

AuthorizationRequiredBearer <token>

JWT token obtained from the login endpoint

In: header

Request Body

application/jsonRequired
order_idstring

The order identifier to amend (required for WebSocket, extracted from URL for HTTP)

volumenumber

Trading volume in lots

Minimum: 0.01Format: "double"
limit_pricenumber

The new limit price of a limit order

Format: "double"
stop_pricenumber

The new stop price of a stop order

Format: "double"
time_in_forcestring

Time in force

Value in: "TIF_UNSPECIFIED" | "TIF_GTC" | "TIF_DAY" | "TIF_IOC" | "TIF_FOK" | "TIF_GTD"
expire_timestring

Order expiration time

Format: "date-time"
good_till_datestring

Expiry datetime for GTD (Good Till Date) orders (ISO 8601 / RFC 3339). Required when time_in_force is TIF_GTD; ignored for all other time_in_force values.

Format: "date-time"
tp_levelsarray<object>

Multi-level take profit configuration. Omit for no changes, empty array [] to cancel all, or provide levels to create/modify

sl_levelsarray<object>

Multi-level stop loss configuration. Omit for no changes, empty array [] to cancel all, or provide levels to create/modify

Path Parameters

account_idRequiredstring

The account ID where order to amend belongs

order_idRequiredstring

Order ID to amend

curl -X PATCH "http://localhost:8081/api/v1/accounts/<string>/orders/order_123456" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "volume": 1.5,
    "limit_price": 1.086
  }'

Order amended successfully

{
  "message": "order was cancelled successfully",
  "operation_id": "orderCancelled"
}