OpenAPI

Message to indicate some change of order status. 

Additional Fields

NameTypeDescriptionAvailable
AdviceNoteStringField for adviser to include relevant information.When the order is an Advisory order. But only when used by advisor.
AlgoOrderTradingStrategyStringName of the algo order strategy.When OrderType is Algorithmic and some limit orders.
AllocationKeyIdStringAllocationKey if order was placed as block trade on an IB account.When it is a block order.
AmountDecimalOrder amount in number of instruments (alternative is the CashAmount).When the AmountType is the number of instruments.
AssetTypeAssetTypeAssetType of instrument traded.Always.
AveragePriceDecimalThe average price of the FilledAmount.As soon as a (partial) fill has taken place. AveragePrice might be different than ExecutionPrice for single fills, due to accrued interest for Bonds.
BuySellBuySellIdentifies the side of the transaction. 
Buy: Buy the security. 
Sell: Sell the security.
Always.
CashAmountDecimalOrder amount in cash (alternative is the Amount).When the AmountType is cash.
ClientNoteStringThe specific text instructions for the Trading Desk to better understand IAM users intentions for staging the order.
  • When block order.
  • When supplied when placing the order.
CorrelationKeyStringThis unique id relates order and position events.Always.
DirectionDirection

Direction of the leveraged product (turbo, warrant).

Depending on the type of leveraged product:

  • Long, Short
  • Call, Put
AssetType in <MiniFuture, WarrantOpenEndKnockOut, WarrantKnockOut, Warrant>.
DisplayAndFormat.BarrierDecimalsDecimalNumber of display decimals for barrier price.
  • When field group "DisplayAndFormat" is requested.
  • When AssetType in <FxOneTouchOption, FxNoTouchOption>
DisplayAndFormat.CurrencyStringCurrency of the instrument.When field group "DisplayAndFormat" is requested.
DisplayAndFormat.DecimalsDecimal

The resolution in which e.g. a price must be displayed.

Positive numbers are represents digits, and negative numbers represent fractions using this formula: 1/(2^x).

When field group "DisplayAndFormat" is requested.
DisplayAndFormat.DescriptionString

Description of instrument (DAX Index - Nov 2023), in English.

When field group "DisplayAndFormat" is requested.
DisplayAndFormat.DisplayHintDisplayHintType

Hint to the client application about how it should display the instrument.

  • When field group "DisplayAndFormat" is requested.
  • When a DisplayHint is applicable.
DisplayAndFormat.FormatPriceDisplayFormatType

Price formatting information.

When field group "DisplayAndFormat" is requested.
DisplayAndFormat.OrderDecimalsDecimal

The number of decimals limit price for orders should be formatted with.

When field group "DisplayAndFormat" is requested.
DisplayAndFormat.StrikeDecimalsDecimal

The decimals value to use when formatting strike price. Only relevant for options.

  • When field group "DisplayAndFormat" is requested.
  • AssetType in <StockOption, StockIndexOption>.
DisplayAndFormat.SymbolString

Symbol - A combination of letters used to uniquely identify a traded instrument. e.g. ALFEN:xams.

When field group "DisplayAndFormat" is requested.
Duration.DurationTypeStringOrder duration type (DayOrder, GoodTillCancel, GoodTillDate).Always.
Duration.ExpirationDateTimeDateTimeSpecifies when the order expires.When DurationType in <GoodTillDate>.
ExchangeInfo.ExchangeIdStringRefers to the ExchangeId.When field group "ExchangeInfo" is requested.
ExecutionPriceDecimalExecution price of this particular fill (if multiple fills)As soon as a (partial) fill has taken place.

ExpiryDate

Date

Date when the instrument/contract expires.

When AssetType in <StockOption, StockIndexOption, ContractFutures, Bond, Warrant, MiniFuture*>.

ExternalReferenceStringOptional reference supplied when placing the order.When supplied when placing the order.
FillAmountDecimalThe amount of the last fill.As soon as a (partial) fill has taken place.
FilledAmountDecimalAmount filled in total.As soon as a (partial) fill has taken place.
FinancingLevelDecimalPart which is paid for by the buyer.When AssetType = MiniFuture.
HandledByStringThe UserId, if the order wasn't placed by a system.When the order is not placed by a system.
IsSecondCurrencyOrderBoolean

MultiLegOrderDetails.AmountDecimalAmount for the multi-leg order. Each leg may have independent amounts.
  • When order is part of a MultilegOrder.
  • AssetType = <StockOption, StockIndexOption>.
MultiLegOrderDetails.BuySellBuySellBuy/sell direction for the multi-leg order. Each leg may point in independent directions.
  • When order is part of a MultilegOrder.
  • AssetType = <StockOption, StockIndexOption>.
MultiLegOrderDetails.LegCountIntNumber of orders that make up the multi-leg order.
  • When order is part of a MultilegOrder.
  • AssetType = <StockOption, StockIndexOption>.
MultiLegOrderDetails.PriceDecimalOverall limit price for the multi-leg order.
  • When order is part of a MultilegOrder.
  • AssetType = <StockOption, StockIndexOption>.
MultilegOrderIdStringThis indicates this order event is related to a leg of multileg (option strategy) order. Same for all legs.
  • When order is part of a MultilegOrder.
  • AssetType = <StockOption, StockIndexOption>.

OptionData.ExpiryDate

Date

Date when the instrument/contract expires.

When AssetType in <StockOption, StockIndexOption, ContractFutures, Bond, Warrant, MiniFuture*>.

OptionData.LowerBarrier

Decimal

Knockout level.

When AssetType = WarrantOpenEndKnockOut.

OptionData.PutCall

PutCall

The Put/Call value of the option.

When AssetType in <StockOption, StockIndexOption>.

OptionData.Strike

Decimal

Strike price.

When AssetType in <StockOption, StockIndexOption, Warrant>.

OptionData.ToOpenClose

ToOpen, ToClose

Indicates is option is written, or not.

When AssetType in <StockOption, StockIndexOption>.

OrderIdStringUnique Id of the order.Always.
OrderRelationOpenOrderRelation

Relation to other open orders.

  • StandAlone
  • IfDoneMaster
  • IfDoneSlave
  • Oco
  • IfDoneSlaveOco
Always.
OrderTypeOpenOrderTypeThe OrderTypeAlways.
PositionIdStringId of position created, if order is (partially) filled.As soon as (partial) fill has taken place.
PriceDecimalOrder price.
  • When OrderType is not <Market, MarketDefault, MarketStopOut, MarketExpiry>.
  • When the order is not a multileg order.
RelatedOrderIdsString []Id's of one or more related open orders.As long as active orders are linked.
RelatedPositionIdStringId of position to which this order is related.When the order relates to a position.
SleepingOrderCondition.AssetTypeAssetTypeAsset type of trigger instrument.SubStatus = WaitCondition.
SleepingOrderCondition.BreakoutTriggerDownPriceDecimalLower boundary of the trigger price.
  • SubStatus = WaitCondition.
  • SleepingOrderCondition.OrderType = TriggerBreakout.
SleepingOrderCondition.BreakoutTriggerUpPriceDecimalUpper boundary of the trigger price.
  • SubStatus = WaitCondition.
  • SleepingOrderCondition.OrderType = TriggerBreakout.
SleepingOrderCondition.BuySellBuySell

Identifies the direction of the trigger.

In case of TriggerStop:

  • Sell: condition.TrailingStopDistanceToMarket below highest
  • Buy: condition.TrailingStopDistanceToMarket above lowest

In case of TriggerLimit:

  • Sell: last traded price is at or above..
  • Buy: last traded price is at or below..

In case of TriggerBreakout:

  • Not applicable
  • SubStatus = WaitCondition.
  • SleepingOrderCondition.OrderType in <TriggerStop, TriggerLimit>.
SleepingOrderCondition.Duration.DurationTypeDurationType

Order duration of the trigger.

SubStatus = WaitCondition.
SleepingOrderCondition.Duration.ExpirationDateTimeDateTime

Specifies then the trigger expires.

  • SubStatus = WaitCondition.
  • DurationType = GoodTillDate.
SleepingOrderCondition.OrderTypeString

The trigger type (TriggerStop, TriggerBreakout, TriggerLimit).

SubStatus = WaitCondition.
SleepingOrderCondition.StatusString

The trigger status:

  • Cancelled when order is cancelled.
  • Placed when order is placed.
  • Changed when the trigger is changed.
  • TrailingStopOrderMove when the stop limit has been updated.
  • Expired when the order is expired.
SubStatus = WaitCondition.
SleepingOrderCondition.SymbolString

Symbol of the trigger - A combination of letters used to uniquely identify a traded instrument. e.g. ODAX/X13C8950:xeur.

SubStatus = WaitCondition.
SleepingOrderCondition.TrailingStopDistanceToMarketDecimal

Trailing distance for the stop trigger.

  • SubStatus = WaitCondition.
  • SleepingOrderCondition.OrderType = TriggerStop.
SleepingOrderCondition.TriggerPriceTypePriceType

Identifies the price type of the trigger.

SubStatus = WaitCondition.
SleepingOrderCondition.UicInt

Uic of trigger instrument.

SubStatus = WaitCondition.
StatusOrderStatus

OrderStatusType. Currently we are returning the following status values:

  • Cancelled: Order cancel.
  • Changed: Order change.
  • DoneForDay: Order is 'done for day' in external exchange and pulled back to Saxo.
  • Expired: Order expired.
  • Fill: Order fill (partial fill).
  • FinalFill: Final fill of order.
  • Placed: Order placement.
  • TrailingStopOrderMove: This event indicates a price update for a TrailingStopIfTraded order.

Always.

StopLimitPriceDecimal

Secondary price level for StopLimit orders.

OrderType = StopLimit.

StopLossLevelDecimal

Price where the turbo expires.

AssetType = MiniFuture.

SubStatusSubStatus

One of:

  • Confirmed: The order event has been accepted by other dependant systems, typically the external broker.
  • Rejected: The order event has been rejected by the dependant system.
  • WaitCondition: Identifies a conditional order.

Always.

SwitchInstrumentUicIntWhen set, instructs the order is to switch (transfer) the value of a matching open position into the specified "switch" instrument (UIC).
  • AssetType = MutualFund.
  • OrderType = <Switch, Trapaso>.
SymbolStringSymbol - A combination of letters used to uniquely identify a traded instrument. e.g. ALFEN:xams.Always.

TrailingStopDistanceToMarket

DecimalDistance to market for a trailing stop order.
  • OrderType = TrailingStop.
  • OrderType = TrailingStopIfTraded.
TrailingStopStepDecimalStep size for trailing stop order.When OrderType = TrailingStop.
UicIntIdentifies the instrument, together with the AssetType.Always.
ValueDateDateValue date of last fill.As soon as a (partial) fill has taken place.

* Not applicable for all MiniFutures.

Sample Message

An example of an order event message:

{
  "ReferenceId": "U_939",
  "Timestamp": "2018-07-11T13:39:30.239056Z",
  "Data": [
    {
      "AccountId": "IB-AMA-Cash",
      "ActivityTime": "2018-07-10T06:33:39.081874Z",
      "ActivityType": "Orders",
      "Amount": 10,
      "AssetType": "Stock",
      "AveragePrice": 177.64285714285714,
      "BuySell": "Buy",
      "ClientId": "2147045884",
      "CorrelationKey": "6f04c63d-5868-4b42-9269-cc55915f9fa9",
      "DisplayAndFormat": {
        "BarrierFormat": "Normal",
        "Currency": "USD",
        "Decimals": 2,
        "Description": "Apple Inc.",
        "Format": "Normal",
        "OrderDecimals": 2,
        "StrikeFormat": "Normal",
        "Symbol": "AAPL:xnas"
      },
      "Duration": {
        "DurationType": "GoodTillCancel",
        "ExpirationDateTime": "1/1/1900"
      },
      "ExchangeInfo": {
        "ExchangeId": "NASDAQ"
      },
      "ExecutionPrice": 175.5,
      "FillAmount": 4,
      "FilledAmount": 10,
      "HandledBy": "2147339098",
      "OrderId": "54016921",
      "OrderRelation": "StandAlone",
      "OrderType": "Limit",
      "PositionId": "150733135",
      "Price": 185.5,
      "SequenceId": "35350",
      "Status": "FinalFill",
      "SubStatus": "Confirmed",
      "Symbol": "AAPL:xnas",
      "Uic": 211
    }
  ]
}


Order Status and Sub Status

Order Status are used to indicate the intended new status of the order.

Order Status

The type of order event is provided in the Status field. The following values are possible:

Order Status

Description

CancelledOrder cancel initiated by client or dealer.
ChangedOrder change.
DoneForDayOrder is done for day in external OMS.
ExpiredOrder has expired.
FillOrder fill - (Also used for trade on quote in OrderLog)
FinalFillOrder fill - final fill of an open order.
PlacedNew order placement.

Order SubStatus

In the vast majority of cases an order event will be accepted by the underlying systems in which the Sub status of the event will be set to "Confirmed". If an order event is not accepted the sub status will be "Rejected", and you can effectively disregard the event, as the clients order will either not have been placed, or it will remain unchanged.


Order SubStatusDescription
ConfirmedThe order status provided in the Status field has been confirmed.
RejectedThe attempt to change the order status to the value in the Status field was rejected.


Multileg Orders

A multileg order is a type of order where we can simultaneously buy and sell multiple contract options with different strike price, expiry date and each option becomes leg of the multi leg order.

This type of order is primarily used in multi-legged option strategies such as a straddlestrangle,  butterfly etc. ENS does not provide a separate activity entry for the multileg orders, but if an individual order is part of a multileg order, the multileg order id is available as a field on the individual order.