Expand description
Stop orders: core requests <-> StopOrdersService messages.
Units as for plain orders: the domain request counts in units of the instrument and the wire counts in lots, so the functions here take or read the lot size. Prices are per one instrument.
Functions§
- build_
post - Builds the
PostStopOrderrequest foraccountfrom a domain request.lotsis the quantity in lots (the request is in units, the caller converts with the lot size of the instrument). - same_
as_ request truewhen the broker stop orderois whatreqasks for: the same instrument, side, kind, number of lots (lots), stop price and limit price. Nothing else is compared: the broker does not return thecid, so this is how a stop order whose placement got no clear answer is recognised.- snapshot
- Core snapshot of a broker stop order.
cidcomes from what this connector registered atplace_stop(the broker’sStopOrderdoes not carry the idempotency key).lotis the lot size of the instrument: the quantity of the snapshot is in units. - validate
- Checks that need no network. Run before any quota is spent or anything is registered.