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.
ApprovalStateApprovalStateState of 'Advised' orders. Only relevant for a very small subset of partners.
  • ApprovalRequested: Order not yet approved by client and thus not sent to market.
  • Approved: Order approved by client.
  • Rejected: Order rejected by client.
When order placed as an "advisory order" - only available for very few partners and only through a Saxo platform.
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.
DecisionMakerIdString

The UserId fo the user, who is the decision maker on an "Advised order". The field is set when the order is placed.

When the order is an Advisory order, and when set during order placement..
DirectionDirection

Direction of the structured product (turbo, warrant).

Depending on the type:

  • Long, Short
  • Call, Put
AssetType in <MiniFuture, WarrantOpenEndKnockOut, WarrantKnockOut, Warrant>.
DisplayAndFormat.BarrierDecimalsIntNumber 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.DecimalsInt

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.OrderDecimalsInt

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

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

The decimals value to use when formatting strike price.

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

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.
IsSecondCurrencyOrderBooleanIndicates if FX is traded in opposite currency.When AssetType = FxSpot.
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>.

OptionData.UpperBarrier

Decimal

For options with two barriers, this is the high barrier.

Spread based derivatives.

OptionData.UpperStrike

Decimal

Upper strike price for spread based derivatives.

Spread based derivatives.

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": "1234/567EUR",
      "AccountKey": "sdfsdf=",
      "ActivityTime": "2022-08-18T04:07:13.433333Z",
      "ActivityType": "Orders",
      "Amount": 1600.0,
      "AssetType": "Stock",
      "AveragePrice": 12.25677638,
      "BuySell": "Buy",
      "ClientId": "987",
      "ClientKey": "sdfsdf==",
      "CorrelationKey": "0e133007-be16-4f13-bcfd-b2da40448a26",
      "DisplayAndFormat": {
        "Currency": "AUD",
        "Decimals": 3,
        "Description": "Allkem Limited",
        "OrderDecimals": 3,
        "Symbol": "AKE:xasx"
      },
      "Duration": { "DurationType": "DayOrder" },
      "ExecutionPrice": 12.26,
      "FillAmount": 700.0,
      "FilledAmount": 1033.0,
      "HandledBy": "654",
      "IsSecondCurrencyOrder": false,
      "OptionData": {},
      "OrderId": "5035547790",
      "OrderRelation": "StandAlone",
      "OrderType": "Limit",
      "PositionId": "6211220524",
      "Price": 12.26,
      "SequenceId": "961930807",
      "Status": "Fill",
      "SubStatus": "Confirmed",
      "Symbol": "AKE:xasx",
      "Uic": 26233136,
      "ValueDate": "2022-08-22"
    }
  ]
}


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
FinalFillOrder fill - final fill of an open order.
PlacedNew order placement.
Parked
TrailingStopOrderMoveNew trailing step.

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.
WaitConditionThe order waits for a trigger, before it is sent to the market.


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.