Skip to content
Order Modification

Modify Grid Trading Strategy

Modifies the strategy rule of a running grid trading order, such as the base price, price range, trigger conditions, quantity per buy or sell, order placement method, time in force, and trading session. Submit the complete grid_trading_rule; rule items that are omitted are treated as not set. client_request_id identifies the request; generate a new millisecond timestamp for each submission. A successful response means only that the request was sent; check the grid order details to confirm that the new rule is in effect. On failure, show message; the original strategy remains unchanged. The path has no version prefix.

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

POSThttps://api.lbkrs.com/gridtrading/replace

Request body application/json

order_idstringrequired

ID of the grid order to modify

counter_idstringrequired

Security ID (counter_id), for example ST/US/AAPL or ST/HK/700

settlement_currencystring

Settlement currency

grid_trading_ruleobjectrequired

Grid trading rule. Use the spread fields (*_spread_*) or the percentage fields (*_percent_*) according to trigger_price_type.

Child attributes
submitted_base_pricestring

Grid base price

upper_limit_pricestring

Upper bound of the price range

upper_limit_eventinteger

Handling when the price leaves the range:

  • 1 - Do not place orders
  • 2 - Close the position at the latest price
Values
1
2
lower_limit_pricestring

Lower bound of the price range

lower_limit_eventinteger

Handling when the price leaves the range:

  • 1 - Do not place orders
  • 2 - Close the position at the latest price
Values
1
2
trigger_price_typeinteger

Trigger condition type:

  • 1 - By spread
  • 2 - By percentage
Values
1
2
trigger_spread_upstring

Rise spread that triggers a sell

trigger_spread_downstring

Fall spread that triggers a buy

trigger_percent_upstring

Rise percentage that triggers a sell

trigger_percent_downstring

Fall percentage that triggers a buy

pullback_spreadstring

Pullback spread; pass it when pullback tracking is on

rebound_spreadstring

Rebound spread; pass it when rebound tracking is on

pullback_percentstring

Pullback percentage; pass it when pullback tracking is on

rebound_percentstring

Rebound percentage; pass it when rebound tracking is on

grid_order_type_upstring

Sell side. How the order is placed after the grid triggers:

  • GMO - Market order at the market price
  • GLO - Limit order; priced at the market price when trigger_*_depth is 0, otherwise at the specified order book level
  • GTG - Limit order at the trigger price
Values
GMO
GLO
GTG
grid_order_type_downstring

Buy side. How the order is placed after the grid triggers:

  • GMO - Market order at the market price
  • GLO - Limit order; priced at the market price when trigger_*_depth is 0, otherwise at the specified order book level
  • GTG - Limit order at the trigger price
Values
GMO
GLO
GTG
trigger_sell_depthinteger

Sell order. Order book level: -1 to -5 are bid levels 1 to 5, and 1 to 5 are ask levels 1 to 5. Pass 0 when the order uses the market price or the trigger price

trigger_buy_depthinteger

Buy order. Order book level: -1 to -5 are bid levels 1 to 5, and 1 to 5 are ask levels 1 to 5. Pass 0 when the order uses the market price or the trigger price

trigger_sell_quantitystring

Sell quantity per trigger

trigger_buy_quantitystring

Buy quantity per trigger

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
expire_timeinteger

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

rthinteger

Grid trading session, using the same values as force_only_rth when placing orders; pass it when the security supports pre-market and after-hours trading

multiple_triggerboolean

Whether multiple-quantity orders are enabled

support_shortsellboolean

Whether the grid order allows short selling

upper_limit_quantitystring

Maximum position quantity; pass it when the position range is on

lower_limit_quantitystring

Minimum position quantity; pass it when the position range is on

client_request_idstring

Request identifier as a millisecond timestamp

statistics_entrystring

Order entry identifier used to attribute the order source

Responses

HTTP 200The request succeeded. The response body contains the result of the “Modify Grid Trading Strategy” operation.
Standard response envelopecodemessagedata
dataobjectdata structure

No business fields

No nested fields

Whale Docs