File: WebAPI/trade_routing_2.proto
Status of a contract open positions and purchase and sales for a specific account for the current day (contract_id and account_id are used as a key for updates). The contract position is deleted when all open positions and purchase and sales groups are deleted.
Request: TradeSubscription.
Type: uint32
Description: List of trade subscription IDs this status is related to.
Type: bool
Description: True if this is a snapshot related message. Since snapshot might be sent in several messages (including none), client should use TradeSnapshotCompletion message as an indicator of complete snapshot delivery.
Type: sint32
Description: Account this position belongs to.
Type: uint32
Description: Contract ID assigned by server.
is_short_open_position (deprecated)
Type: bool
Description: True if open positions are short (result of sell operations), long otherwise. In case of separated long and short positions the value is true if the cumulative position is short or flat, the value is false if the cumulative position is long. The attribute is deprecated, refer to OpenPosition.is_short instead.
Type: OpenPosition
Description: List of new/ updated or deleted open positions.
Note: Full list is sent only in a snapshot, updates include only added, changed and deleted records.
Type: PurchaseAndSalesGroup
Description: List of purchase and sales groups. This group represents offset trades (usually one sell and one buy).
Note: Full list is sent only in a snapshot, updates include only added, changed and deleted records.
Type: metadata_2.ContractMetadata
Description: Multiple OrderStatus and PositionStatus messages in a single ServerMsg can reference the same contract. If the contract is unknown to the client before this ServerMsg, contract metadata will be added in at least one of them. If in your code, you process orders first and positions second then during processing orders you may encounter order with yet unknown contract_id. In this case, you should look for matching contract metadata in positions. The opposite is also true: contract metadata for positions can be in order status messages.
Type: order_2.Commission
Description: Sum of today fill commissions per currency for the contract. Aggregated value from TransactionStatus.fill_commission for current day orders.