com.apama.mlom
Event LegUpdate


A snapshot of the state of an order leg.

This gives the complete state of the leg. These may be sent at the service's discretion, but it should report information including acknowledgements as soon as possible, once sufficient information about the state of the leg has been received to fill this event in a consistent manner.

Note that the update event will indicate the values of price, quantity, etc. that are actually active in the market. These will not necessarily be the same as the submitted values. For example, the market may apply rounding or quantisation rules to the submitted price and quantity.

As noted above, a service may choose not to send LegUpdate events.
Member Summary
 stringlegId

As given in the OrderLeg event.
 stringorderId

As given in the NewMultiLegOrder event.
 stringserviceId

As given in the NewMultiLegOrder event.
 stringsymbol

As given in the NewMultiLegOrder event, unless the market has modified it.
 floatprice

The requested price active in the market for this leg. This is only changed if an amendment has been accepted by the market. Does not necessarily reflect the actual price traded.
 stringside

The side active in the market for this leg.
 stringtype

The type of order active in the market for this leg.
 floatquantity

Total amount of the leg, including any already traded (either as a fill of the current order or previous orders if the service monitor manages chained orders).
 booleaninMarket

Whether the leg is known to the market and is valid. Successfully cancelling an order will make this false.
 booleanisVisible

Whether the leg is visible to other market participants (e.g. stop orders are "hidden" until triggered).
 booleanmodifiable

Whether the leg may be modified. It is assumed that a service only allows one outstanding modification.
 booleancancelled

Whether the leg has been cancelled, either by being rejected before entering the market, cancelled by the user, an administrator or the market systems (e.g. reached expiry time).
 booleanorderChangeRejected

Whether the most recent cancel or amendment of this leg was rejected.
 booleanexternallyModified

Whether the leg was modified or cancelled by an entity other than the one who placed the order.
 booleanunknownState

Whether the leg is in an unknown state - this is an error condition.
 booleancorrected

Whether this update represents a correction to a previous update (e.g. a bust or price correction for this leg).
 booleanfinal

Whether this leg is in a "final" state, i.e. has the leg order fully traded? Note that the final flag may move from true to false if the order is corrected after becoming final.
 booleansettled

Whether this leg is in a "settled" state. A settled order is both final and guaranteed to remain final - that is, the service guarantees not to send any more updates for a settled leg.
 stringmarketLegId

The order identifier supplied by the market for this leg, typically unique across the market - may be required if another system is to control the order.
 floatqtyExecuted

The total quantity executed on this leg.
 floatqtyRemaining

The quantity remaining for this leg. Typically, but not necessarily, qtyRemaining = quantity - qtyExecuted.
 floatlastQtyExecuted

The quantity traded in the last execution on this leg.
 floatlastPriceExecuted

The price of the last execution on this leg.
 floatavgPrice

The volume-weighted average price across all executions on this leg. undefined if qtyExecuted is 0.
 stringstatus

A free-form string describing what has happened to the leg - may contain an error message (e.g. "User is not allowed to place orders").
 dictionary<string, string >extraParams

Extra parameters that do not map into any of the above.
 
Member Detail

avgPrice

float avgPrice
The volume-weighted average price across all executions on this leg. undefined if qtyExecuted is 0.

cancelled

boolean cancelled
Whether the leg has been cancelled, either by being rejected before entering the market, cancelled by the user, an administrator or the market systems (e.g. reached expiry time).

corrected

boolean corrected
Whether this update represents a correction to a previous update (e.g. a bust or price correction for this leg).

externallyModified

boolean externallyModified
Whether the leg was modified or cancelled by an entity other than the one who placed the order.

extraParams

dictionary<string, string > extraParams
Extra parameters that do not map into any of the above.

Convention is that keys are in TitleCase, e.g. "StopPrice", "Account", etc. although other conventions may apply, particularly where extraParams keys are mapped directly to identifiers used by the underlying exchange.

final

boolean final
Whether this leg is in a "final" state, i.e. has the leg order fully traded? Note that the final flag may move from true to false if the order is corrected after becoming final.

inMarket

boolean inMarket
Whether the leg is known to the market and is valid. Successfully cancelling an order will make this false.

isVisible

boolean isVisible
Whether the leg is visible to other market participants (e.g. stop orders are "hidden" until triggered).

lastPriceExecuted

float lastPriceExecuted
The price of the last execution on this leg.

lastQtyExecuted

float lastQtyExecuted
The quantity traded in the last execution on this leg.

legId

string legId
As given in the OrderLeg event.

marketLegId

string marketLegId
The order identifier supplied by the market for this leg, typically unique across the market - may be required if another system is to control the order.

modifiable

boolean modifiable
Whether the leg may be modified. It is assumed that a service only allows one outstanding modification.

If a market allows more than one modification, the service monitor should route a LegUpdate with modifiable=true as soon as a modification is received.

orderChangeRejected

boolean orderChangeRejected
Whether the most recent cancel or amendment of this leg was rejected.

orderId

string orderId
As given in the NewMultiLegOrder event.

price

float price
The requested price active in the market for this leg. This is only changed if an amendment has been accepted by the market. Does not necessarily reflect the actual price traded.

qtyExecuted

float qtyExecuted
The total quantity executed on this leg.

qtyRemaining

float qtyRemaining
The quantity remaining for this leg. Typically, but not necessarily, qtyRemaining = quantity - qtyExecuted.

quantity

float quantity
Total amount of the leg, including any already traded (either as a fill of the current order or previous orders if the service monitor manages chained orders).

serviceId

string serviceId
As given in the NewMultiLegOrder event.

settled

boolean settled
Whether this leg is in a "settled" state. A settled order is both final and guaranteed to remain final - that is, the service guarantees not to send any more updates for a settled leg.

side

string side
The side active in the market for this leg.

status

string status
A free-form string describing what has happened to the leg - may contain an error message (e.g. "User is not allowed to place orders").

symbol

string symbol
As given in the NewMultiLegOrder event, unless the market has modified it.

type

string type
The type of order active in the market for this leg.

unknownState

boolean unknownState
Whether the leg is in an unknown state - this is an error condition.