Skip to main content

Module stop

Module stop 

Source
Expand description

Stop orders: core requests <-> Finam Order (STOP, STOP_LIMIT) and SLTPOrder.

Finam keeps stop orders in OrdersService:

  • stop-loss and stop-limit go through PlaceOrder with type STOP / STOP_LIMIT, a stop_price and an explicit stop_condition (LAST_UP: the trigger price is above the current price, LAST_DOWN: below);
  • take-profit goes through PlaceSLTPOrder (the take-profit leg only).

Quantity is in pieces, as everywhere in Finam. The cid is carried like for plain orders: the lossless form in comment, a 20-hex tag in client_order_id.

Enums§

StopWire
Which Finam call carries the request.

Functions§

build
Checks that need no network, then the wire request.
echo_keys
(client_order_id, comment) an order echo carries: from order, or for an SL/TP order from sltp_order. This is where the cid is read back.
is_stop
A Finam order that is a stop order: type STOP / STOP_LIMIT, or an SL/TP order.
snapshot
Core snapshot of a Finam stop order. cid is resolved by the caller (OrderIndex::lookup).
state_of
Lifecycle of a stop order from the Finam status. The names come from the proto; how Finam really walks through them is not verified against the live API.