FIX Trading API

Allocation Instruction Embedded in the NewOrderSingle Message (35=D)

Allocations involving up to 2,500 accounts can be embedded in the New Order Single message (35=D) by simply setting an AllocID and NoAllocs > 0.

The repeating group AllocGrp should contain each AllocAccount (tag 79) and AllocQty (tag 80) or CashAllocQty (tag 12110).

  • The sum of all AllocQty should equal the OrderQty (tag 38); or
  • if using CashOrderQty, the sum of CashAllocQty should equal CashOrderQty.

Saxo FIX API will acknowledge the allocation instruction by returning an Allocation Instruction Ack message (35=P) with AllocStatus ‘Received’ (87=3).

If the allocation instruction in the New Order Single message passes initial validation, another Allocation Instruction Ack message will be sent with AllocStatus ‘Accepted’ (87=0).


If the block order is accepted, an Execution Report ‘NEW’ will be sent.







In case the block order cannot be placed, an Execution Report ‘REJECTED’ is returned.







if the allocation instruction fails initial validation (for example if the sum of the AllocQtys does not match the OrderQty of the block order) an Allocation Instruction Ack message with AllocStatus ‘Block Level Reject’ (87=1) is sent, followed by an Execution Report with OrdStatus ‘REJECTED.

Custom tag 12108 ‘CancellationIfReduction” can be set to ‘N’ (or omitted) in the New Order Single message, to indicate that Accounts failing for example a credit check should automatically be removed from the allocation, and a reduced order should be allocated to the remaining accounts.







An Allocation Instruction Ack, with status ‘Received’ will be sent as per normal. If for example credit check validation reduces the allocation, an Allocation Instruction Ack message with status ‘Account Level Reject’ (87=2) is sent, listing the accounts that failed validation, followed by an Execution Report ‘New’ with a reduced order quantity.







If ‘CancellationIfReduction’ is set to ‘Y’ and one or more accounts fail validation, an Allocation Instruction Ack is sent with status ‘Account Level Reject’ (listing failed accounts) followed by an Execution Report with order status ‘Rejected’.






Use of Allocation Instruction Message(s)

If the number of accounts in an allocation is not more than 2,500, a single Allocation Instruction message can be used.

If the number of accounts in an allocation exceeds 2,500, allocations must be split up into multiple Allocation Instruction messages, with a maximum of 2,500 accounts in each message, with a maximum of 50,000 accounts in total.

  • When using Allocation Instruction message(s), the NoAllocs group (tag 78) should not be set in the New Order Single message, but in the Allocation Instructions message(s) that the component block (tag 78) is used to specify the allocations.
  • The Allocation Instruction message(s) should be sent straight after the New Order Single message, where the AllocID (tag 70) in the Allocation Instruction(s) match the AllocID (tag70) in the New Order Single message. If all allocation fragments are not received within 10 seconds, the associated order will be rejected with appropriate reason. Any associated Allocation fragments already received (if any) should be considered cancelled. 
  • In the Allocation Instruction message(s), TotNoAllocs (892) must have the same value across all fragments. The number of allocations in each fragment should be specified in NoAllocs (78). In case of a single Allocation Instruction message, values in TotNoAllocs (892) and NoAllocs (78) must be the same.
  • The repeating group AllocGrp should contain each AllocAccount (tag 79) and AllocQty (tag 80) or CashAllocQty (tag 12110).
    • The sum of all AllocQty across message fragments should equal the OrderQty (tag 38) from the New Order Single message; or
    • if using CashOrderQty, the sum of CashAllocQty should equal CashOrderQty.
  • For the last Allocation Instruction message, or in case of a single Allocation Instruction message, LastFragment must be set to ‘Y’ (tag 893). SecondaryAllocID (tag 793) should be set to 1 for the first message, 2 for the second etc.



Allocation Instruction Message (35=J)

Tag No.

Tag Name

Required

Description

70

AllocID

Y

Unique ID for this allocation instruction message(s) - same as Tag 70 from NewOrderSingle message

71

AllocTransType

Y

0 = New

626

AllocType

Y

5 = Ready-to-Book single order

75

TradeDate

N

Trade Date in YYYYMMDD format. Optional, value will not be validated against the original order.

857

AllocNoOrdersType

Y

Always 1 = Explicit list provided

[ Component Block - <OrdAllocGrp> ]




73

NoOrders

Y

Always '1'

==>11

   ClOrdID

Y

Same as Tag 11 from NewOrderSingle message

54

Side

N

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

22

SecurityIdSource

N

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

48

SecurityId

N

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

55

Symbol

N

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

167

SecurityType

N

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

775

BookingType

N

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

53

Quantity

N

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

892

TotNoAllocs

Y

Indicates total number of allocation groups. Must equal the sum of all NoAllocs values across all message fragments making up this allocation instruction. 
If only one Allocation Instruction is used, this must equal NoAllocs. 

893

LastFragment

Y

Indicates whether this is the last fragment in a sequence of message fragments. If only one Allocation Instruction message is used, set 893=Y.

'Y' Last message
'N' Not last message

793

SecondaryAllocID

Y

SecondaryAllocID must be unique for each fragment associated with the same AllocID. It is recommended to use incremental numbers starting from 1 for the first fragment, 2 for the second etc.

200

MaturityMonthYear

N

Expiry Date of an option. 
Optional, value will not be validated against the original order.

201

PutOrCall

N

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

202

StrikePrice

N

Strike price of an option.
Optional, value will not be validated against the original order.

77

PositionEffect

N

Indicates if the position is opening or closing.
Optional, value will not be validated against the original order.

58

Text

N

Free Text

[ Component Block - <AllocGrp> ]




78

NoAllocs

Y

No of allocation account entries to follow, must be > 0.

=>79

        AllocAccount

Y

Saxo account number

=>80

        AllocQty

C

Required if OrderQty was specified in the NewOrderSingle message, otherwise not allowed

=>12110

        CashAllocQty

C

Required if CashOrderQty was specified in the NewOrderSingle message, otherwise not allowed

=>467

        IndividualAllocID

N

Unique identifier of allocation as assigned by the Client

Allocation Instruction ACK (35=P)

An Allocation Instruction message (as well as a New Order Single with embedded Allocations) will be acknowledged using an Allocation Instruction Ack message with AllocStatus= 'Received' (87=3).

If allocations are sent as fragments across multiple Allocation Instructions, each Allocation Instruction will be acknowledged with an Allocation Instruction Ack message with AllocStatus= 'Received'. All allocation fragments (with same AllocID as that on NewOrderSingle) must be received before they are processed. 

Tag No.

Tag Name

Required

Description

70

AllocID

Y

Unique ID for this allocation instruction message - same as Tag 70 from NewOrderSingle message

60

TransactTime

Y

Date/Time Allocation Instruction Ack generated. Format YYYYMMDD-HH:MM:SS.sss.

87

AllocStatus

Y

0 = Accepted (validated and processed successfully)
1 = Block level reject
2 = Account level reject

3 = Received, not yet processed, will always be followed by a second 35=P message with AllocStatus 0, 1 or 2

88

AllocRejCode

C

Required when AllocStatus (87) = 1
1 = Incorrect or missing block quantity
5 = Unknown OrderID
7 = Other - further in Text (58)
8 = Incorrect or missing allocated quantity
12 = Unknown ClOrdId

58

Text

C

Free Text, required when AllocRejecCode = 7 otherwise optional

167

SecurityType

N

From original order

775

BookingType

N

From original order

793

SecondaryAllocID

C

SecondaryAllocID will be echoed from allocation instruction only. If allocations are placed as a part of NOS message, then this tag will not be present.

[ Component Block - <AllocAckGrp> ] Conditional. Required only if AllocStatus=2, to communicate rejected allocations. If the block is used, both tags in the block are mandatory

78

NoAllocs

C

No of failed Allocations

=>79

       AllocAccount

C

Failed Allocation Account (repeated for each account)

=>467

IndividualAllocID

Y

Unique identifier of allocation if assigned by the Client, otherwise generated by Saxo Bank

Examples of Using Instruction Message(s)

Use of a single Allocation Instruction message







Use of multiple Allocation Instruction Messages







Allocation instructions are accepted, but order cannot be placed







Allocation instruction fails validation, blockLevelReject is returned and order is rejected. Each Allocation Instruction message is validated. If a validation fails, the whole order is rejected. In the example below, SecondaryAllocID 3 fails validation since the sum of NoAllocs exceeds TotNoAllocs. A BlockLevelReject Ack is returned for the SecondaryAllocID = 3, and the order placement is rejected.







If CancellationIfReduction is set to ‘N’ (or omitted) in New Order Single, and one or more accounts fail validation, the Allocaction Instruction Ack message will be sent with ‘AccountLevelReject’. For example, some accounts in SecondaryAllocID 1 and 2 might be excluded, while all accounts from SecondaryAllocID 3 are accepted. In that case, the Allocation Instruction Ack for SecondaryAllocID 1 and 2 will state ‘AccountLevelReject’, and for SecondaryAllocID 3 ‘Accepted’. The Acks with ‘AccountLevelReject’ will list the accounts that are removed from the allocation. An Execution Report ‘NEW’ with reduced OrdQty is sent.







For New Order Single messages with CancellationIfReduction set to ‘Y’, the Execution Report will state ‘Rejected’.

Allocation Report (35=AS)

The Allocation Report message provides account level breakdown of an allocated order fill. Allocation Reports are sent from Saxo FIX API to FIX Client when:

  • The block order has received a full fill; or
  • The remaining part of a partially filled block order is cancelled

Tag No.

Tag Name

Required

Description

755

AllocReportID

Y

Unique identifier for Allocation Report message

70

AllocID

Y

ID for this allocation message - assigned by Saxo Bank. If allocation reports are split into multiple messages, they will share the same AllocID.

71

AllocTransType

Y

'0' New (will always be 0)

794

AllocReportType

Y

Always '0'

87

AllocStatus

Y

Always '0' - Accepted; validated and processed successfully

857

AllocNoOrdersType

Y

Always '1' - Explicit list provided

73

NoOrders

Y

Always '1'

=> 11

ClOrdID

Y

From original order

=> 37

OrderID

Y

Unique Identifier for Order assigned by Saxo Bank

54

Side

Y

1 = for Buy
2 = for Sell
From original order

167

SecurityType

N

From original order

53

Quantity

Y

Overall/total quantity allocated to all accounts for this allocation

6

AvgPx

Y

Average price of the block order

75

TradeDate

Y

Trade date of the trade/fill in this message in YYYYMMDD format

60

TransactTime

Y

Time of trade/order execution. Format YYYYMMDD-HH:MM:SS.sss

775

BookingType

N

0 = Regular booking
1 = CFD (Contract for Difference)

892

TotNoAllocs

Y

Indicates total number of execution allocation groups. Must equal the sum of all NoAlloc values across all message fragments making up this Allocation Report.
If only one Allocation Report is used, this must equal NoAlloc.

893

LastFragment

Y

Indicates whether this is the last fragment in a sequence of message fragments. If only one Allocation Report message is used, tag 893=Y.

'Y' Last message
'N' Not last message

793

SecondaryAllocID

Y

SecondaryAllocID. Unique for each fragment associated with the same AllocID. The fragments will have incremental numbers starting from 1 for the first fragment, 2 for the second etc.

[ Component Block - <AllocGrp> ]

78

NoAllocs

Y

No of allocation account entries to follow

=>79

AllocAccount

Y

Saxo Account number

=>366

AllocPrice

Y

Executed price for an AllocAccount (79)

=>80

AllocQty

Y

Quantity allocated for an AllocAccount (79)

=>467

IndividualAllocID

Y

Unique identifier of allocation if assigned by the Client, otherwise generated by Saxo Bank

=>153

AllocAvgPx

Y

Average price for a an AllocAccount (79)

=>155

SettlCurrFxRate

N

Foreign exchange rate used to convert amount from the currency of the instrument, to the currency of the account. For cash products only. 

=>12109

AllocCumQty

Y

Accumulated quantity for an AllocAccount (79)