Skip to content

Adjustable stop (SubmitAdjustableStop) ships without parent_id/oca_group and forces DAY -- bracket child is naked #240

Description

@deepentropy

Summary

build_order_request now reads adjusted_order_type and routes to
SubmitAdjustableStop (good). But that arm bypasses the SubmitEx extended-attrs
path, so an adjustable stop used as a bracket child ships naked, unlinked, and
DAY
-- the same class as #224, for the adjustable path.

Detail

client_core.rs:1456 returns early into SubmitAdjustableStop:

if !order.adjusted_order_type.is_empty() {
    ...
    return Ok(ControlCommand::Order(OrderRequest::SubmitAdjustableStop { ... }));
}
// the SubmitEx path below (parent_id 6107, oca_group 583, tif 59) is never reached

and the FIX encoder (order_builder.rs:1042-1084) emits neither tag 6107
(parent_id) nor tag 583 (oca_group), and hard-codes tag 59 = "0" (DAY):

let mut fields: Vec<(u32, &str)> = vec![
    ..., (54, side_str), (38, &qty_str),
    (40, "3"), (99, &stop_str),
    (59, "0"),                 // tif = DAY, hard-coded
    ...                        // no 6107, no 583
    (6257, "1"), (6261, adjusted_order_type.fix_code()),
    (6258, &trigger_str), (6259, &adj_stop_str),
];

context.insert_order(Order::new(order_id, instrument, side, qty, 0, ...)) also sets
the tracked parent_id to 0.

Impact

A move-stop-to-breakeven bracket child (parent + adjustable STP child + target)
ships with the child unlinked from the parent, no OCA with the target, and DAY tif.
It rests/triggers as a standalone order rather than as a bracket leg. This is the
exact failure #224 fixed for ordinary bracket children, still present for the
adjustable-stop encode path.

Request

Route SubmitAdjustableStop through the same extended-attrs handling as SubmitEx:
carry parent_id (6107), oca_group (583), and the tif (59). Then a bracket can use an
adjustable stop child safely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions