Message: MatchedTrade

File: WebAPI/trade_routing_2.proto

Description

Specific trade or position that is a part of a purchase and sales group.

Used in

PurchaseAndSalesGroup

Fields

uint32_qty (deprecated)

Type: uint32

Description: Note: Use qty field instead.

qty

Type: cqg.Decimal

Description: Matched size. Zero means matched trade is deleted.

Note: Quantity can be safely compared to zero, because this is an integral number of metadata_2.ContractMetadata.volume_scale units.

is_short

Type: bool

Description: True if this is a short trade (e.g., result of sell operation), long otherwise.

price

Type: double

Description: Trade or position average price.

Note: Since it could be an aggregated position price is sent in correct format directly.

trade_date

Type: sint64

Description: Trade date (date value only).

statement_date

Type: sint64

Description: Statement date (date value only).

trade_utc_time (deprecated)

Type: sint64

Description: Note: Use trade_utc_timestamp field instead.

trade_utc_timestamp

Type: google.protobuf.Timestamp

Description: UTC trade time (including date) if available, it might not be available e.g., for the previous day positions.

is_aggregated

Type: bool

Description: True if the price is an aggregated position price.

is_yesterday

Type: bool

Default: false

Description: Whether the trade is of a yesterday or a today position.

Note: Where available, this attribute is from the exchange trade date perspective. It is used for position tracking and open/close instructions. It is not the same as the previous day (associated with brokerage statement) vs. intraday. It is also not static. For example, an intraday fill with open_close_effect=OPEN_CLOSE_INSTRUCTION_OPEN (see order_2.TransactionStatus.open_close_effect) will appear, when it is received during the trading session in an open position or matched trade with is_yesterday=false. After the exchange trade date rolls over for that contract, and before the brokerage statement arrives reflecting it as a previous day position, the same open position or matched trade will contain is_yesterday=true.

is_close

Type: bool

Description: Whether the trade closed a new position or opened a new one. Applicable only if metadata_2.ContractMetadata.position_tracking is not POSITION_TRACKING_TYPE_NET_POSITION.

speculation_type

Type: uint32

Description: Speculation type of the trade. One of SpeculationType enum.