Replace Grid Order
grid_replaceReplace an existing grid order's entire rule using its order ID. Update any grid parameters by providing the order ID and new rule fields.
Instructions
Replace an existing grid order's rule by order_id. Accepts the same grid rule fields as grid_submit. Overwrites the order's entire rule.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rth | No | Regular-trading-hours flag: 0 / 1 / 2. | |
| order_id | Yes | Grid order ID to replace. | |
| expire_time | No | Expiry time in unix seconds (use with GTD). | |
| time_in_force | No | Time in force: 0 = Day, 1 = GTC, 6 = GTD. | |
| multiple_trigger | No | Whether one grid level may trigger multiple times. | |
| trigger_quantity | No | Quantity per trigger (decimal string). | |
| lower_limit_event | No | Action at lower bound: 1 = ignore (keep running), 2 = close at last price. | |
| lower_limit_price | No | Lower price bound (decimal string). | |
| support_shortsell | No | Whether short selling is allowed. | |
| trigger_buy_depth | No | Buy-side order-book depth (-5..5; 0 = use grid_order_type_down). | |
| trigger_spread_up | No | Upward trigger spread, absolute (decimal string; use with type 1). | |
| upper_limit_event | No | Action at upper bound: 1 = ignore (keep running), 2 = close at last price. | |
| upper_limit_price | No | Upper price bound (decimal string). | |
| grid_order_type_up | No | Sell-side order type when depth is 0: GMO / GLO / GTG. | |
| trigger_percent_up | No | Upward trigger percent (decimal string; use with type 2). | |
| trigger_price_type | No | Trigger price type: 1 = spread (absolute), 2 = percent. | |
| trigger_sell_depth | No | Sell-side order-book depth (-5..5; 0 = use grid_order_type_up). | |
| trigger_spread_down | No | Downward trigger spread, absolute (decimal string; use with type 1). | |
| grid_order_type_down | No | Buy-side order type when depth is 0: GMO / GLO / GTG. | |
| lower_limit_quantity | No | Quantity handled when the lower bound is reached (decimal string). | |
| submitted_base_price | No | Base price the grid is anchored to (decimal string). | |
| trigger_percent_down | No | Downward trigger percent (decimal string; use with type 2). | |
| upper_limit_quantity | No | Quantity handled when the upper bound is reached (decimal string). |