FIX Trading API

Custom Tags

Saxo's FIX API is using the following custom tags.

TagField NameUsed in messages
12108CancellationIfReductionNew Order Single
12115AdditionalTransactionCostsExecution Report
12109AllocCumQtyAllocation Report
12110CashAllocQtyNew Order Single, Allocation Instruction
12121ExtendedTradingHours(ETH)New Order Single

Use of Component Block ''Parties''

The Parties block is used by Saxo’s FIX API to identify the sender/trader, the client and the account the message/order is intended for.

The Parties block must be sent on all messages of the following types:

  1. New Order Single
  2. Order Cancel Request
  3. Order Cancel Replace Request

The Parties block will be returned by Saxo FIX’s API in the following message types:

  1. Execution Report
  2. Order Cancel Reject
[ Component Block - <Parties> ]
453NoPartyIDsYNumber of parties provided. '3' for Futures, '2' or '3' for all other products.
=>448PartyIDYUsed to specify Client and Account (provided by Saxo Bank) as well as Trader (provided by client) Note that Trader can contain alphanumerical characters only and maximum length is 16.
=>447PartyIDSourceYMust be 'D' (Proprietary/Custom Code),
=>452PartyRoleY'3' Client ID (mandatory for all products) '11' Order Origination Trader (mandatory for Futures, but recommended for all products) '38' Account (mandatory for all products)

Use of Component Block ''ALLOCGRP''

The component block AllocGrp is used only when placing a block order, to be allocated to one or more accounts. The AllocGrp block can be sent as part of the following message types:

  1. New Order Single
  2. Allocation Instruction (mainly used for large allocations)

The AllocGrp block will be returned by Saxo’s FIX API in the Allocation Report message.

[ Component Block - <AllocGrp> ]
78NoAllocsNNo of allocations
=>79AllocAccountNRequired if NoAllocs > 0
=>80AllocQtyNRequired if NoAllocs > 0 and OrderQty is specified, otherwise not allowed
=>12110CashAllocQtyNRequired if NoAllocs > 0 and CashOrderQty
is specified, otherwise not allowed
=>467IndividualAllocIDNUnique identifier of allocation as assigned by the Client. If provided by the client, the same value will be returned in the Allocation Report. If not provided, Saxo FIX API will return a Saxo generated ID in this tag.

Trading Session Status (35=h)

This message will be sent by Saxo's FIX API immediately after Logon is acknowledged.

A subsequent message will be sent if the trading session status changes whilst connected.

If Trading Session Status halted (340=1), new orders will not be accepted on the trading session,  thus, orders should be submitted on the trading session only when Trading Session Status open (340=2).

Saxo FIX API persists execution reports that are generated while the FIX Client is disconnected.

TagField NameRequiredDescription
Standard Header, MsgType 35=h
336TradingSessionIDYSession ID assigned by Saxo Bank
340TradSessStatusY

‘1’ = Halted

‘2’ = Open

Standard Trailer

NewOrderSingle (35=D)

NewOrderSingle messages are used to submit order requests to Saxo Bank.

TagField NameRequired

Description

Standard Header, MsgType 35=D
11ClOrdIDYUnique identifier for Order as assigned by the Client. Uniqueness must be guaranteed across all orders entered through the Trade session. If orders with duration of more than one trading session are used, the sender needs to cater for uniqueness across those. Must not exceed 64 characters.
21HandlInstY1 = Automated execution order, private, no Broker intervention
54SideY1 = BUY
2 = SELL
38OrderQtyYQuantity ordered. Must be zero if CashOrderQty is specified. 
For some instruments, orders can be placed with fractional amounts in Tag 38 and 152. Please consult with Saxo FIX API service team for details of how to use this, and for which instruments it supported.
152CashOrderQtyNQuantity ordered in monetary units, using the Currency of tag 15. Only supported for Mutual Funds instruments (167=MF).
15CurrencyC

Dealt Currency. Required for instruments (with same ISIN), traded in multiple currencies. Also required if CashOrderQty is specified.

FX orders (167 = ‘FOR’) can be placed in 2. currency amounts in several crosses. Tag 15 identifies the currency for the order amount specified in tag 38. If tag 15 is not supplied, the system will assume tag 15 = CCY1. If tag 15 is neither CCY1 nor CCY2 (tag 55) the order will be rejected. Tag 54 (Side) indicates whether the order is to buy or sell the currency stated in tag 15.

Some instruments, traded on London Stock Exchange (XLON) and Johannesburg Stock Exchange (XJSE), are quoted in pence/cents. When setting order prices in Tag 44 and 99, Saxo’s FIX API expects clients to place orders in such instruments converted to GBP/ZAR. The currency in Tag 15 must be set to GBP/ZAR.

40OrdTypeY

1 = MARKET
2 = LIMIT
3 = STOP 

44PriceCPrice per unit of Quantity. Required for Limit and Stop order
59TimeInForceN0 = DAY
1 = GOOD_TILL_CANCEL
3 = IMMEDIATE_OR_CANCEL
4 = FILL_OR_KILL
6 = GOOD_TILL_DATE
60TransactTimeYTime this order request was initiated/released by the trading system. Format: YYYYMMDD-HH:MM:SS.sss (ms is optional).
99StopPxCPrice per unit of Quantity. Required for Stop
22SecurityIDSourceC

Required if tag 55 is not set (for 167='CS', 'INDEX', 'FUT', 'MF', 'BONDS', 'OPT').
Invalid if tag 55 is set (for 167='INDEX', 'FOR' and 'FUT' with 775=1).

4 = ISIN
8 = Exchange symbol
100 = Saxo UIC (a Saxo Bank specific instrument ID, can be provided upon request).
105 = Option Symbol (identifier for the Saxo Option Root, 167=OPT)

167SecurityTypeC

Optional for:
'BONDS' for Fixed Income / Bonds
'CS' for Stocks and ETFs
'FUT' for Futures
'MF' for Mutual Funds


Required for:
'FOR' for Forex Spot
'INDEX' for CFD on Index
'OPT' for Contract Options
'FUT' for CFD on Futures

775BookingTypeNTo indicate if order is for 'Regular booking', or as a CFD. If tag is not set, it is considered a "Regular booking" (as if 775=0).
0 = Regular booking
1 = CFD (Contract for Difference)
48SecurityIDC

Value of Security Identifier. Required if tag 22 is set. Invalid if tag 22 is not set.

100ExDestinationC

Execution destination. ISO 10383 code for exchange. Required for instruments (with same ISIN), traded on multiple exchanges.

55SymbolCRequired if tag 22 and tag 48 are not set (for 167='INDEX', 'FOR' and 167='FUT' with 775=1). ‘CCY1/CCY2’ convention for 167 = ‘FOR’
12121ExtendedTradingHours(ETH)N

'R' = Regular Trading Hours only

'A' = All Trading Hours including pre-market, regular hours and post-market hours. (Only limit order is supported when 12121=A. Check with Saxo on which markets/instruments/products supports ExtendedTradingHours)

When not present, treat as default value R.

48SecurityIDC

Conditionally required for Exchange Traded Products. ISIN number for CFD, Equities, symbol for futures, Contract Options

200MaturityMonthYearC

Expiry Date of an option.

Required for 167='OPT' (except when placing orders with 22=100) YYYYMM YYYYMMDD (DD is optional for stock options and index options).

201PutOrCallCRequired for 167='OPT' (except when placing orders with 22=100)
0 = Put
1 = Call
202StrikePriceCStrike price of an option. Required for 167='OPT' (except when placing orders with 22=100)
 77 PositionEffectC

Indicates if the position is opening or closing. Required for 167='OPT.
O = Open
C = Close

202StrikePriceCStrike price of an option. Required for 167='OPT' (except when placing orders with 22=100)
1028ManualOrderIndicatorC

Required for 167='FUT' and 775=0.
'Y' if order was sent manually
'N' if order was sent by automated trading logic

[ Component Block - <Parties> ]
453NoPartyIDsYNumber of parties provided. '3' for Futures, '2' or '3' for all other products.
=>448PartyIDYUsed to specify Client and Account (provided by Saxo Bank) as well as Trader (provided by client) Note that Trader can contain alphanumerical characters only and maximum length is 16.
=>447PartyIDSourceYMust be 'D' (Proprietary/Custom Code),
=>452PartyRoleY'3' Client ID (mandatory for all products) '11' Order Origination Trader (mandatory for Futures, but recommended for all products) '38' Account (mandatory for all products)
70AllocIDcAllocation ID, mandatory if order is going to be placed with allocations. AllocID must be unique within the same trading day.
12108CancellationIfReductionNIf set to 'Y', cancels order if there is an issue with any of the allocations. If not set or set to 'N', continues ignoring affected allocations. Must only be used together with tag 70.
[ Component Block - <AllocGrp> ] – only to be used if allocations are provided as part of the New Order Single message
78NoAllocsNNo of allocations
=>79AllocAccountNRequired if NoAllocs > 0
=>80AllocQtyNRequired if NoAllocs > 0 and OrderQty is specified, otherwise not allowed
=>12110CashAllocQtyNRequired if NoAllocs > 0 and CashOrderQty
is specified, otherwise not allowed
=>467IndividualAllocIDNUnique identifier of allocation as assigned by the Client. If provided by the client, the same value will be returned in the Allocation Report. If not provided, Saxo FIX API will return a Saxo generated ID in this tag.

ExecutionReport (35=8)

ExecutionReports provide information about the state of an order sent via NewOrderSingle.

TagField NameRequiredDescription
Standard Header, MsgType 35=8
150ExecTypeY

0 = NEW
3 = DONE_FOR_DAY
4 = CANCELED
5 = REPLACE
6 = PENDING_CANCEL
8 = REJECTED
A = PENDING_NEW
C = EXPIRED
D = Restated
E = PENDING_REPLACE
F = TRADE (partial fill or fill)

39OrdStatusY0 = NEW
1 = PARTIALLY_FILLED
2 = FILLED
3 = DONE_FOR_DAY
4 = CANCELED
5 = REPLACED
6 = PENDING_CANCEL
8 = REJECTED
A = PENDING_NEW
C = EXPIRED
E = PENDING_REPLACE
40OrdTypeNFrom original order
37OrderIDYUnique Identifier for Order assigned by Saxo Bank except for OrdStatus: Pending Cancel, Rejected, Pending New, Pending Replace. The OrderID will be either NONE or the value provided by the client for this status.
11ClOrdIDYFrom original order
41OrigClOrdIDCConditionally required for response to a OrderCancelRequest <F> or OrderCancelReplaceRequest <G> request, where 5 Replaced, or 4 Canceled. ClOrdID (11) of the previous accepted order when cancelling or replacing an order.
17ExecIDYUnique identifier of this execution report message
54SideY1 = BUY
2 = SELL
7 = Undisclosed if the side cannot be determined. (Eg. on pending order cancellation message when client doesnot sent tag 54 in the order cancel request)
31LastPxCPrice at
32LastQtyCQuantity filled in specific execution. Required for 150=F
14CumQtyYCumulative Quantity filled (including all fills for the order)
151LeavesQtyYQuantity of order currently unfilled. Set to 0 when CashOrderQty is specified.

6

AvgPxYQuantity weighted average price of all fills for this order. Set to ‘0’ when CumQty=0.
527SecondaryExecIDCContains Saxo Position ID. Required for 150=F. Set to ‘0’ when 167=’FOR’.

38

OrderQtyNFrom original order, if specified and not zero.
152CashOrderQtyNFor 150=F: Obtained quantity in monetary units, using the Currency of tag 15. Otherwise: From original order, if specified and not zero. Can be expressed in decimals.
44PriceNOriginal limit price
99StopPxNOriginal stop loss price
15CurrencyNFrom original order
64FutSettDateYSettlement Date of trade. Required for 150=F
60TransactTimeYTime of trade acceptance, cancel or fill. Format YYYYMMDD-HH:MM:SS.sss.
59TimeInForceNFrom original order
432 ExpiryDateNFrom original order
30LastMktNFor Fill and Partial Fill only. Market of execution for last fill
155SettlCurrFxRateNFor Fill and Partial Fill only, for cash products. Foreign exchange rate used to convert amount from the currency of the instrument, to the currency of the account.
58TextNFree Text
103OrdRejReasonN0 = NACK
1 = Unknown Symbol/Instrument
2 = Trading Closed or Server busy
3 = Order Exceeds Limit
4 = Too late to enter
5 = Unknown Order
6 = Duplicate Order
8 = Stale Order/message
11 = Unsupported order characteristics
13 = Incorrect Qty
15 = Unknown Account(s)
99 = Other

75

TradeDateNTrade Date
22SecurityIDSourceN

From original order

167SecurityTypeN

From original order

775BookingTypeNFrom original order
55SymbolCFrom original order. Required for 167='INDEX', 'FOR' and 'FUT' with 775=1
48SecurityIDNFrom original order
77PositionEffectCFrom original order. Required for 167='OPT'
[ Component Block - <Parties> ]
453NoPartyIDsNFrom original order
=>448PartyIDNFrom original order
=>447PartyIDSourceNFrom original order
=>452PartyRoleNFrom original order
12115AdditionalTransactionCostsCItalian Financial Transaction Tax (IFTT), if applicable
Standard Trailer

OrderCancelReplaceRequest (35=G)

OrderCancelReplaceRequests are used to change valid attributes of an open order, such as reduce/increase the quantity, change limit price, stop price or duration. Change of ExtendedTradingHours(ETH) tag 12121 value is not supported.

The request will only be accepted if the order can successfully be replaced (which may not be possible if it is in the process of being filled or cancelled).

Client should not send a new Order Cancel/Replace Request (or an Order Cancel Request) until receiving a response to a previous Order Cancel/Replace Request for the same order.

This message type is not supported for orders with allocations. To modify an order with allocations, the block order should be cancelled (using the Order Cancel Request message) and a new order should be submitted, with new allocation instructions.

TagField NameRequiredDescription
Standard Header, MsgType = G
11ClOrdIDYUnique ID of the OrderCancelReplaceRequest. Must not exceed 64 characters
41OrigClOrdIDY

ClOrdID <11> from the order to being amended.

Clients can submit modification requests by using the OrigClOrdID as unique identifier, i.e. the value of the ClOrdID as submitted previously with the original order. In case of duplicates, the inbound request is rejected with the associated error code.

If both OrigClOrdID and OrderID <37>  are provided in a modification request, the OrigClOrdID is totally ignored and the request is performed on OrderID only.

37OrderIDN

OrderID of the order being cancelled. Use tag 37 from last Execution Report.

If both OrigClOrdID and OrderID <37>  are provided in a modification request, the OrigClOrdID is totally ignored and the request is performed on OrderID only.

54SideY1 = BUY
2 = SELL
Must be same as that on original order
38OrderQtyYQuantity ordered. Must be zero if CashOrderQty is specified.
152CashOrderQtyNQuantity ordered in monetary units, using the currency specified in tag 15. Only allowed for Mutual Funds (167=MF). Can be expressed in decimals.
15CurrencyCDealt Currency. Mandatory if CashOrderQty is specified.
21HandlInstY'1' Automated execution order, private, no Broker intervention. Optional, value will not be validated against the original order.
40OrdTypeY

1 = MARKET
2 = LIMIT
3 = STOP

Depending on the asset class, different restrictions apply when changing from one order type to another.

44PriceCPrice per unit of Quantity. Required for Limit
59TimeInForceY

0 = DAY
1 = GOOD_TILL_CANCEL
3 = IMMEDIATE_OR_CANCEL
4 = FILL_OR_KILL
6 = GOOD_TILL_DATE

60TransactTimeYTime this order request was initiated/released by the trading system. Format YYYYMMDD-HH:MM:SS.sss (ms optional).
99StopPxCPrice per unit of Quantity. Required for Stop
22SecurityIDSourceN

Optional, value will not be validated against the original order.

167SecurityTypeNOptional, value will not be validated against the original order.
775BookingTypeNOptional, value will not be validated against the original order.
100ExDestinationNConditionally required for Exchange Traded Products
55SymbolNOptional, value will not be validated against the original order.
12121

ExtendedTradingHours(ETH)

NValue will be validated against the original order. 
48SecurityIDNOptional, value will not be validated against the original order.
432 ExpiryDate CRequired if TimeInForce is 'GTD'. i.e. if tag 59=6. Format: YYYYMMDD i.e. 20210824 if Expire date is 24th of August 2021.
200MaturityMonthYearN

Optional, value will not be validated against the original order.

201PutOrCallNOptional, value will not be validated against the original order.
202StrikePriceNOptional, value will not be validated against the original order.
77PositionEffectNOptional, value will not be validated against the original order.
58TextNOptional, value will not be validated against the original order.
1028ManualOrderIndicatorC

Required for 167='FUT' and 775=0. 'Y' if order was sent manually 'N' if order was sent by automated trading logic

[ Component Block - <Parties> ]
453NoPartyIDsYFrom original order
=>448PartyIDYFrom original order
=>447PartyIDSourceYFrom original order
=>452PartyRoleYFrom original order
Standard Trailer

OrderCancelRequest (35=F)

OrderCancelRequests are used to cancel the remaining quantity of an existing order.

Tag 41 must contain the ClOrderID from the original order, and tag 37 optional.

The request will only be accepted if the order can successfully be cancelled (which may not be possible if it is in the process of being filled). A cancel request is assigned a ClOrdID (11) and is treated as a separate entity. If rejected, the ClOrdID of the cancel request will be sent in the Cancel Reject (9) message, as well as the ClOrdID of the actual order in the OrigClOrdID (41) tag.

Cancelling an order will automatically cancel any allocations associated with the order.

TagField NameRequiredDescription
Standard Header, MsgType 35=F
41OrigClOrdID

Y

ClOrdID <11> of the order requested to be cancelled.

Clients can submit cancellation requests by using the OrigClOrdID as unique identifier, i.e. the value of the ClOrdID as submitted previously with the original order. In case of duplicates, the inbound request is rejected with the associated error code.

If both OrigClOrdID and OrderID <37> are provided in a cancellation request, the OrigClOrdID is totally ignored and the request is performed on OrderID only.

37OrderIDN

OrderID of the order being cancelled. Use tag 37 from last Execution Report.

If both OrigClOrdID and OrderID are provided in a cancellation request, the OrigClOrdID is totally ignored and the request is performed on OrderID only.

11ClOrdIDYUnique ID of the OrderCancelRequest. Must not exceed 64 characters
54SideNOptional, value will not be validated against the original order.
If not provided, order pending execution report will be with value 54=7
38OrderQtyNOptional, value will not be validated against the original order.
152CashOrderQtyNOptional, value will not be validated against the original order.
60TransactTimeYTime this order cancel request was initiated/released by the trading system. Format YYYYMMDD-HH:MM:SS.sss (ms optiona
22SecurityIDSourceNOptional, value will not be validated against the original order.
167SecurityTypeNOptional, value will not be validated against the original order.
775BookingTypeNOptional, value will not be validated against the original order.
55SymbolNOptional, value will not be validated against the original order.
12121ExtendedTradingHours(ETH)NValue will not be validated against the original order if present
48SecurityIDNOptional, value will not be validated against the original order.
200MaturityMonthYearN

Optional, value will not be validated against the original order.

201PutOrCallNOptional, value will not be validated against the original order.
202StrikePriceNOptional, value will not be validated against the original order.
77PositionEffectNOptional, value will not be validated against the original order.
58TextNOptional, value will not be validated against the original order.
1028ManualOrderIndicatorC

Required for 167='FUT' and 775=0. 'Y' if order was sent manually 'N' if order was sent by automated trading logic

[ Component Block - <Parties> ]
453NoPartyIDsYFrom original order
=>448PartyIDYFrom original order
=>447PartyIDSourceYFrom original order
=>452PartyRoleYFrom original order
Standard Trailer

OrderCancelReplacementReject (35=9)

OrderCancelRejects are returned when an order cancellation via OrderCancelRequest or amendment via OrderCancelReplaceRequest fails.

Note that the PartyID block is a part of this message, even though it is not in the standard FIX protocol.

TagField NameRequiredDescription
Standard Header, MsgType = 9
37OrderIDYOrderID of the order
11ClOrdIDYFrom cancel or replace request
41OrigClOrdIDYOriginal ClOrdID of the initial request
39OrdStatusNOrdStatus value after this cancel reject is applied. Until further notice, if present, this tag will always be set to 8 'Rejected', no matter what the actual order state is.
60TransactTimeNTime this order cancel request was initiated/released by the trading system. YYYYMMDD-HH:MM:SS.sss (ms is optional).
434CxlRejResponseToY1 = ORDER_CANCEL_REQUEST
2 = ORDER_CANCEL_REPLACE_REQUEST
102CxlRejReasonN0 = Too late to cancel
1 = Unknown order
2 = Broker / Exchange Option
3 = Order already in Pending Cancel or Pending Replace status
4 = Unable to process Order Mass Cancel Request <q>
5 = OrigOrdModTime <586> (586) did not match last TransactTime <60> (60) of order
6 = Duplicate ClOrdID <11> received
99 = Other
58TextNFree text
[ Component Block - <Parties> ]
453NoPartyIDsYFrom original order
=>448PartyIDYFrom original order
=>447PartyIDSourceYFrom original order
=>452PartyRoleYFrom original order
Standard Trailer