Field | Description |
orderId | A unique identifier to perform operations on the order. |
serviceId | The name of the market service provider monitor to use, or an empty string to use any market service provider monitor. |
tradeId | The name of the trader. |
traderSubId | Additional identification information for the trader. |
marketId | The name of the market to send the order to. To determine whether you need to specify this field, and obtain more information about the meaning of this field, see the documentation for the adapter you are using. If the documentation does not mention this field, you do not need to specify it. |
marketSubId | Additional identification information about the market to send the order to. To determine whether you need to specify this field, and obtain more information about the meaning of this field, see the documentation for the adapter you are using. If the documentation does not mention this field, you do not need to specify it. |
legId | A unique identifier to perform operations on the leg. |
symbol | The instrument to trade for the leg identified by the current legId. |
price | The price to trade at, or 0 for a market order, for the leg identified by the current legId. |
quantity | The amount to trade for the leg identified by the current legId. For example, the number of shares to buy or sell. |
side | BUY or SELL. Applies to the leg identified by the current legId. Some services also support other values such as BUY MINUS or SELLSHORT. |
type | MARKET or LIMIT. Some services also support other values such as STOPMARKET or STOPLIMIT. If left blank, the order is placed as a LIMIT if a price is specified or a MARKET order if no price is specified (or is 0). This field applies to each leg in the order. |
extraParams(dictionary) | Any extra parameters for the service. Applies to each leg in the order. |
Field | Description |
order_identifier | A unique identifier to perform operations on the order. |
market_order_identifier | An identifier supplied by the market, typically unique across all orders in that market. |
symbol | If all legs in the order are trading the same instrument, this field contains the identifier for the instrument being traded. If all legs are not trading the same instrument, this field is empty. |
price | The volume weighted average price of all legs in the order. Takes into account any changes to any legs. |
quantity | The total number of units, such as shares, to trade for all legs in the order. Includes any changes to any legs. |
state | The order's state indicated by an integer from 0-9. See
Order states and status fields for a description of what each integer signifies. |
money_executed | The sum of price * quantity for all fills of all legs in this order, or 0.0 if no fills have occurred. |
average_price_executed | The volume-weighted average price over all fills for all legs, or 0.0 if no fills have occurred. |
last_price_executed | The price obtained per item for the last fill, or 0.0 if no fills of any legs in this order have occurred. |
quantity_executed | The number of items traded so far, or 0.0 if no fills of any legs in this order have occurred. |
quantity_remaining | The number of items left to trade in the market for all legs in this order, or 0.0 if all items have been traded. |
in_market | Number of legs in the order that are known to the market. |
visible | Number of legs in the order that are visible in the market. Some markets consider orders to be invisible until a certain condition has been met, for example, stop orders are invisible until the trigger price is hit. |
modifiable | Number of legs in the order that can be modified immediately. |
cancelled | Number of legs in the order that have been rejected or cancelled, possibly before being entered into the market. A cancelled leg might have had some quantity traded. |
change_rejected | Number of legs in the order for which the most recent modification or cancellation was rejected by the market. An explanation might be available in the status message field. |
externally_modified | Number of legs in the order that have been modified by anything other than the current sample, for example, the market or a third party. |
final | Number of legs in the order that have entered the final state. This means the leg was completed, cancelled, or rejected. Note that a leg in the final state can still be updated. A leg that is settled can no longer be updated. |
status_message | A message from either the market service provider monitor or the market explaining what has happened. The format and meaning of the message varies from service to service and market to market. |
numLegs | Number of legs in the order. |
numSettled | Number of settled legs in the order. A settled leg cannot be updated. |
last_quantity_executed | The number of items traded in the last fill, or 0.0 if no fills of any legs in this order have occurred. |
type | The type of the order — MARKET, LIMIT, or some other type supported by the market. |
side | The side of the order — BUY, SELL, or some other side supported by the market. |
extraParams | Dictionary that specifies additional parameters in a key,value format. |
Field | Description |
leg_identifier | A unique identifier to perform operations on the order leg. |
market_order_identifier | An identifier supplied by the market, typically unique across all orders in that market. |
symbol | Identifier for the instrument this leg is trading. |
price | The price requested either when the leg was submitted or the latest modification to the leg. A price of 0.0 signifies a market order. |
quantity | The total number of units, such as shares, to trade, or the number the leg has been amended to. |
side | The side of the leg — BUY, SELL, or some other side supported by the market. |
type | The type of the leg — MARKET, LIMIT, or some other type supported by the market. |
state | The order’s state indicated by 0-9. See
Order states and status fields. |
money_executed | The sum of price * quantity for all fills of this leg, or 0.0 if no fills have occurred. |
average_price_executed | The volume-weighted average price over all fills of this leg, or 0.0 if no fills have occurred. For example, suppose you submit a leg to buy 100 shares of IBM at up to $10.00 per share. You bought 20 shares at $9.95 and 20 shares at $9.97. The average price executed is $9.96. |
last_price_executed | The price obtained per item for the last fill for this leg, or 0.0 if no fills have occurred. |
last_quantity_executed | The number of items traded in the last fill for this leg, or 0.0 if no fills of this leg have occurred. |
quantity_executed | The number of items traded so far, or 0.0 if no fills of this leg have occurred. |
quantity_remaining | The number of items left to trade in the market as part of this leg. |
in_market | true if the leg is known to the market. |
visible | true if the leg is visible in the market. Some markets consider legs to be invisible until a certain condition has been met, for example, stop orders are invisible until the trigger price is hit. |
modifiable | true if the leg can be modified immediately. |
cancelled | true if the leg has been rejected or cancelled, possibly before being entered into the market. A cancelled leg might have had some quantity traded. |
change_rejected | true if the most recent modification or cancellation of the leg was rejected by the market. An explanation might be available in the status message field. |
externally_modified | true if the leg has been modified by anything other than the sample, such as the market or a third party. |
final | true if the quantity specified for the leg has been traded, or if the leg was cancelled or rejected. A final leg can still be updated. |
status_message | A message from either the market service provider monitor or the market explaining what has happened. The format and meaning of the message varies from service to service and market to market. |
settled | true if this leg is final and can no longer be updated. |
extraParams | Dictionary that specifies additional parameters, which contain more information about the instrument being traded. |
Action/Operation | Description |
action< OrderParams /*params*/ > StartMultilegOrder | Start submission of a new order. See
Submitting multi-leg orders. |
action< OrderParams /*params*/ > AddLeg | Add a leg to the current order’s set of legs. |
action< OrderParams /*params*/ > SubmitMultilegOrder | Send the order to the market. The order automatically enters state 1, waiting for acknowledgment. |
action <string /*orderId*/ > StartModifyMultilegOrder | Open order for modifications. See
Modifying multi-leg orders. |
action< OrderParams /*params*/ > RemoveLeg | Remove the leg identified by the current legId from the order identified by the current orderId. |
action< OrderParams /*params*/ > AmendLeg | For the leg identified by the current legId, modify the price, quantity, side, type, or extraParams parameter. |
action< OrderParams /*params*/ > ModifyMultilegOrder | Send modified order to the market. The order automatically enters state 5, pending change, unless the order is not modifiable at this time. See
Modifying multi-leg orders. |
action< OrderParams /*params*/ > CancelMultilegOrder | Cancel the order in the market. The order automatically enters state 6, pending cancel, unless the order is not modifiable at this time. The market can reject a cancellation. Consequently, after an order is in the pending cancel state, it can become cancelled, completed, or, if the cancellation is rejected, working. |
action< OrderParams /*params*/ > CancelLeg | Cancel the leg in the market. The leg automatically enters state 6, pending cancel, unless the leg is not modifiable at this time. The market can reject a cancellation. Consequently, after a leg is in the pending cancel state, it can become cancelled, completed, or, if the cancellation is rejected, working. |
action< OrderStatus /*update*/ > onOrderStatusAcknowledgement | This is a callback on order state updates. |
action< OrderLegStatus /*legUpdate*/ > onLegStatusAcknowledgement | This is a callback on leg state updates. |