Skip to content
Order Modification

Modify Untriggered Conditional Order

Modifies the trigger condition and order parameters of a conditional or trailing order that has not been triggered, and can adjust the attached take-profit and stop-loss orders at the same time. For a triggered conditional order, use POST /v1/tube/replace instead. Pass either limit_depth_level or limit_offset: use limit_depth_level to price at an order book level; otherwise use limit_offset. A successful response means only that the modification request was accepted; check the final state through the order details or order push updates. On success, refresh the order list and assets. On failure, show message; the original order remains unchanged.

When you call this operation through WhaleCore requestService(), set requiresTradeToken to true.

WhaleCore's orderService() wraps this endpoint as the typed method replaceOrder. If you use WhaleCore, prefer that method.

POSThttps://api.lbkrs.com/v1/povs/replace

Request body application/json

order_idstringrequired

ID of the order to modify

order_typestringrequired

Order type, the same as the original order. Order type, for example LO (limit), MO (market), ELO (enhanced limit), ALO (at-auction limit), AO (at-auction market), ODD (odd lot), LIT (limit if touched), MIT (market if touched), TSLPAMT / TSLPPCT (trailing stop limit by amount / percentage), TSMAMT / TSMPCT (trailing stop market by amount / percentage), or MOC (market on close)

pricestring

Order price after triggering; omit it for market-type orders

quantitystring

Order quantity

trigger_pricestring

Trigger price

tailing_amountstring

Trailing amount

tailing_percentstring

Trailing percentage

monitor_pricestring

Monitoring price

trigger_countstring

Number of triggers within one minute

limit_depth_levelinteger

Order book level used for pricing after triggering; takes effect when it is not 0

limit_offsetstring

Offset used to price at the market price plus a spread after triggering

market_pricestring

Current market price; pass it together with trend

trendstring

Trigger direction, derived by comparing the trigger price with the current market price:

  • 1 - Rises to (trigger price above the market price)
  • 2 - Falls to (trigger price not above the market price)
Values
1
2
attached_paramsobject

Parameters for modifying attached take-profit and stop-loss orders

Child attributes
attached_order_typeinteger

Attached order type:

  • 0 - No attached order; if the original order has attached orders, also pass cancel_all_attached=true to cancel them all
  • 1 - Take-profit order
  • 2 - Stop-loss order
  • 3 - Bracket order (both take-profit and stop-loss)
Values
0
1
2
3
profit_taker_pricestring

Take-profit trigger price

profit_taker_idstring

ID of the existing take-profit order; pass it when modifying that order

profit_taker_submit_pricestring

Order price after the take-profit order is activated; pass it when the activated order type is a limit type

stop_loss_pricestring

Stop-loss trigger price

stop_loss_idstring

ID of the existing stop-loss order; pass it when modifying that order

stop_loss_submit_pricestring

Order price after the stop-loss order is activated; pass it when the activated order type is a limit type

activate_order_typestring

Order type after the attached order is activated

activate_rthstring

Trading session after the attached order is activated:

  • 1 - Pre-market and after-hours not allowed
  • 2 - Pre-market and after-hours allowed
time_in_forceinteger

Time in force:

  • 0 - Day
  • 1 - Good till canceled (GTC)
  • 3 - Immediate or cancel (IOC)
  • 5 - Fill or kill (FOK)
  • 6 - Good till date (GTD); an expiry time is also required
Values
0
1
3
5
6
expire_timestring

Expiry time as a Unix timestamp in seconds; required when time_in_force=6

cancel_all_attachedboolean

Whether to cancel all attached orders of the main order

main_idstring

Main order ID; required when you modify only the attached orders

quantitystring

Total quantity of the main order; pass it when you modify only the attached orders

market_pricestring

Current market price, including pre-market and after-hours; pass it when you modify only the attached orders

Responses

HTTP 200The request succeeded. The response body contains the result of the “Modify Untriggered Conditional Order” operation.
Standard response envelopecodemessagedata
dataobjectdata structure

No business fields

No nested fields

Whale Docs