FIX order entry

Place, cancel and check secondary-market orders over FIX 4.4

FIX order entry

The same FIX 4.4 session that serves market data accepts secondary-market limit orders: you place an order with a NewOrderSingle, cancel it with an OrderCancelRequest, follow its life through ExecutionReport messages, ask for its status with an OrderStatusRequest or an OrderMassStatusRequest, and list its fills with a TradeCaptureReportRequest.

Orders sent over FIX are the same orders as the ones created through the GraphQL createSecondaryMarketOrder and cancelSecondaryMarketOrder mutations: same balances, same fees, same order book.

What is available today

CapabilityStatus
Place a limit order (NewOrderSingle, 35=D)Supported
Cancel an open order (OrderCancelRequest, 35=F)Supported
Order acknowledgement, fills and cancels (ExecutionReport, 35=8)Supported
Rejected cancels (OrderCancelReject, 35=9)Supported
Place an order for a user (Account, tag 1, required)Supported, for users your API key has the permission to trade for
Market orders, IOC / FOK / day ordersNot supported
Amend an order (OrderCancelReplaceRequest, 35=G)Not supported: cancel and place a new order
Order status request (OrderStatusRequest, 35=H)Supported, see Order status
Status of open orders (OrderMassStatusRequest, 35=AF)Supported, see Order status
Fills of your orders (TradeCaptureReportRequest, 35=AD)Supported, see Fills
Replay of reports missed while logged outNot supported: ask for the status and fills of your orders instead

Before you start

Connection, CompIDs and API-key logon are the same as for market data; see FIX market data. A few points matter for orders:

  • The Logon opens an account session. Your orders run in it, with the same permissions as the GraphQL order mutations for that API key. It lasts as long as the API key's session duration. When it expires Lise logs the FIX session out (Logout with Text(58)=Session expired); log on again to keep trading.
  • One session per user. Execution reports are delivered to the session your user is logged on, so a user can only be logged on one FIX session at a time.
  • Every order is placed for a user. Account(1) is required on orders and cancel requests and carries the id of that user (the id of the GraphQL User). It can be the user your API key acts as, or another user such as one of your clients; see Place an order for a user.
  • Prices and quantities. Prices are in EUR with at most 2 decimal places. Quantities are a whole number of tokens.

Messages

Inbound (you → Lise)

MsgTypeNameNotes
DNewOrderSingleLimit orders only
FOrderCancelRequestCancels an open order
HOrderStatusRequestStatus of one order
AFOrderMassStatusRequestStatus of your open orders
ADTradeCaptureReportRequestFills of your orders over a period

Outbound (Lise → you)

MsgTypeNameNotes
8ExecutionReportAcknowledgement, new, fills, cancel and rejection of an order; order status (150=I)
9OrderCancelRejectA cancel request that was refused
jBusinessMessageRejectAn OrderMassStatusRequest that was refused
AQTradeCaptureReportRequestAckAccepts or refuses a TradeCaptureReportRequest
AETradeCaptureReportOne fill of one of your orders

Place an order

Send a NewOrderSingle (35=D):

TagNameValue
11ClOrdIDRequired. Your order id; see ClOrdID rules
1AccountRequired. Id of the user the order is placed for; see Place an order for a user
55SymbolToken ticker. Symbol and/or SecurityID is required
48SecurityIDISIN, as returned by the SecurityList
54SideRequired. 1 = Buy, 2 = Sell
60TransactTimeRequired by the FIX dictionary (UTC)
40OrdTypeRequired. 2 = Limit; no other type is supported
38OrderQtyRequired. Whole number of tokens, greater than zero
44PriceRequired. Limit price in EUR, at most 2 decimals, greater than zero
59TimeInForce1 = GTC (also when absent), 6 = GTD
126ExpireTimeRequired with 59=6; a UTC timestamp in the future

Both Symbol and SecurityID can be sent; Lise resolves the instrument from either.

Place an order for a user

Account(1) names the user the order is placed for, whether that is the user your API key acts as or another one. That user's balances back the order, its fills settle on their account, and the order shows in their orders. Your API key stays the one that places the order: you receive its reports on your FIX session, and you cancel it by sending the same Account on the cancel request.

Your API key can only do this for users it holds the permission to trade for, with the same rules as the GraphQL createSecondaryMarketOrder mutation. An Account that is missing, does not exist, or that your API key may not trade for, is rejected with OrdRejReason(103)=15 (Unknown account); Lise does not tell the last two apart.

Every report of the order carries its Account(1).

Order lifetime

An order stays open until it is filled, canceled or expires:

  • GTC (59=1, or no 59) uses Lise's default expiry, currently one year after the order is placed.
  • GTD (59=6) expires at ExpireTime. An ExpireTime that is not in the future is rejected.

Acknowledgement

Lise answers every NewOrderSingle with one ExecutionReport straight away. Matching then runs asynchronously, so the acknowledgement does not mean the order is on the book yet.

Accepted: ExecType(150)=A and OrdStatus(39)=A (Pending New):

TagContent
37 OrderIDLise's order id. It never changes during the life of the order
11 ClOrdIDYour ClOrdID
151 LeavesQtyThe full OrderQty
14 CumQty / 6 AvgPx0
1, 55, 48, 40, 38, 44, 59, 126Echo of the order

Rejected: ExecType(150)=8 and OrdStatus(39)=8 with OrdRejReason(103) and a Text(58). OrderID(37) is NONE, because no order was created. See Rejection reasons.

Order lifecycle

Once Lise has processed an accepted order it reports what happens to it, in order:

EventExecType (150)OrdStatus (39)Notes
Order processed and on the book0 New0 NewSent once per order
Partial fillF Trade1 Partially filledLastQty(32) / LastPx(31) of the fill, CumQty(14), LeavesQty(151), AvgPx(6)
Final fillF Trade2 FilledLeavesQty(151)=0
Canceled4 Canceled4 CanceledSee Cancel an order
Rejected when processed8 Rejected8 RejectedOrderID(37) is the real order id; OrdRejReason(103) and Text(58) give the reason

A Trade report is sent for every fill, including fills that happen later against an order that was resting on the book. AvgPx is the average fill price in EUR. Every report carries the order's current ClOrdID, Symbol, Side, OrderQty and Price, and a unique ExecID(17).

📘

The Pending New acknowledgement and the later reports are produced by separate paths, so do not assume Pending New always arrives before New or Trade. Match every report to your order with OrderID(37) or ClOrdID(11), and use OrdStatus(39) as the order's state.

Cancel an order

Send an OrderCancelRequest (35=F):

TagNameValue
41OrigClOrdIDRequired. The order's current ClOrdID
1AccountRequired. Id of the user the order is for, as sent on the order
11ClOrdIDRequired. A new ClOrdID for this request; see ClOrdID rules
37OrderIDOptional. When set, it must be the id of the order named by 41
54SideRequired by the FIX dictionary
60TransactTimeRequired by the FIX dictionary (UTC)
55SymbolOptional, not used to find the order

The order is found by OrigClOrdID among the orders of the user named by Account(1). The same rules as for placing an order apply: an Account your API key may not trade for is answered like an unknown order. An accepted cancel request gets no immediate answer: Lise processes it in order with the order's matching, then sends one of:

  • ExecutionReport Canceled (150=4, 39=4). ClOrdID(11) is the cancel request's ClOrdID, which the order takes from then on, and OrigClOrdID(41) is the previous one.
  • OrderCancelReject (35=9) when the order could not take the cancel, for example because it was filled in the meantime. OrdStatus(39) is the order's current status, CxlRejResponseTo(434)=1 (Order Cancel Request), CxlRejReason(102) and Text(58) give the reason.

A cancel that Lise refuses right away (unknown order, ClOrdID already used, ended session) is answered immediately with an OrderCancelReject whose OrdStatus(39) is 8 (Rejected): the order was not looked at. OrderID(37) is NONE unless you sent the order id in 37.

An order that is already filled, canceled or expired cannot be canceled (CxlRejReason(102)=0, Too late to cancel).

📘

An order canceled from the Lise app keeps its ClOrdID, and its Canceled report carries no OrigClOrdID.

Order status

You can ask for the current state of your orders at any time, typically right after you log on again (see Delivery of reports). Status requests only read: they can be sent as often as needed and do not use up a ClOrdID.

Both requests cover the orders placed over FIX by your user, including the ones placed for another user with Account(1). These are the orders whose reports your session receives. Orders created through GraphQL or the Lise app are not covered.

The status of an order is an ExecutionReport with ExecType(150)=I (Order Status):

TagContent
37 OrderIDThe order's id
11 ClOrdIDThe order's current ClOrdID
41 OrigClOrdIDThe previous ClOrdID, when the order was canceled over FIX
39 OrdStatusA Pending New, 0 New, 1 Partially filled, 2 Filled, 4 Canceled, 8 Rejected or C Expired
14 CumQty / 6 AvgPxWhat has been filled, and its average price in EUR
151 LeavesQtyWhat is left of the order while it can still be filled; 0 once it is filled, canceled, rejected or expired
1, 55, 48, 54, 40, 38, 44The order's Account, instrument, side, type, quantity and price

A status report has its own unique ExecID(17) and no LastQty(32) / LastPx(31): it reports no new fill.

One order: OrderStatusRequest (35=H)

TagNameValue
11ClOrdIDRequired. The order's current ClOrdID. After a cancel requested over FIX, that is the cancel request's ClOrdID
1AccountRequired. Id of the user the order is for, as sent on the order
37OrderIDOptional. When set, the order is looked up by its id instead of its ClOrdID
54SideRequired by the FIX dictionary
790OrdStatusReqIDOptional. Echoed on the answer
55 / 48Symbol / SecurityIDOptional, not used to find the order

Lise answers with one ExecutionReport (150=I): the order's status, whatever it is, including filled, canceled and expired orders. When the status cannot be given, the report has OrdStatus(39)=8, OrdRejReason(103) and a Text(58), and echoes your ClOrdID, Account and OrderID (NONE if you did not send one):

103Meaning
5 Unknown orderNo order placed over FIX by your user matches the request, or the order is not for the Account user
99 OtherMissing Account, temporary failure (Text(58)=order entry temporarily unavailable) or ended session

Open orders: OrderMassStatusRequest (35=AF)

TagNameValue
584MassStatusReqIDRequired. Your id for the request, echoed on every answer
585MassStatusReqTypeRequired. 7 = all your open orders, 1 = your open orders for one instrument
55 / 48Symbol / SecurityIDWith 585=1, required: the instrument. Ignored with 585=7
1AccountOptional. Only the orders for this user
54SideOptional. Only the orders on this side: 1 = Buy, 2 = Sell

Lise answers with one ExecutionReport (150=I) per open order, oldest first. An order is open while it can still be filled: Pending New, New or Partially filled, and not expired. Every report carries your MassStatusReqID(584) and TotNumReports(911), the number of reports; the last one has LastRptRequested(912)=Y, the others N.

When no open order matches, Lise sends a single ExecutionReport with OrderID(37)=NONE, 150=I, 39=8, TotNumReports(911)=0, LastRptRequested(912)=Y and Text(58)=No open orders. Its Side(54) is the one you sent, otherwise 7 (Undisclosed).

A request Lise cannot answer is refused with a BusinessMessageReject (35=j) with RefMsgType(372)=AF, BusinessRejectRefID(379) set to your MassStatusReqID, a BusinessRejectReason(380) and a Text(58):

380Meaning
0 OtherUnsupported MassStatusReqType or Side
4 Application not availableTemporary failure: send the request again
5 Conditionally required field missing585=1 without Symbol or SecurityID
6 Not authorizedThe session has ended; Lise then logs it out

An order that is no longer open (filled, canceled or expired while you were away) is not in the answer. To learn how it ended, send an OrderStatusRequest for it.

Fills

A status report gives an order's total: what is filled (CumQty) and at what average price (AvgPx), not each fill. To get the fills one by one, for example the ones made while you were logged out, send a TradeCaptureReportRequest (35=AD). Lise answers with one TradeCaptureReport (35=AE) per fill.

Like status requests, it only reads, and covers the fills of the orders placed over FIX by your user, including the ones placed for another user with Account(1).

Request: TradeCaptureReportRequest (35=AD)

TagNameValue
568TradeRequestIDRequired. Your id for the request, echoed on every answer
569TradeRequestTypeRequired. 0 (all trades) only
263SubscriptionRequestTypeOptional. 0 (snapshot) only: Lise does not stream fills on this request, they come as ExecutionReport messages
580NoDatesOptional, 0, 1 or 2 entries: the period, see below
75TradeDateStarts each NoDates entry: a day, YYYYMMDD, in UTC
60TransactTimeOptional in a NoDates entry: the exact time, in UTC, instead of the start or end of its TradeDate
37OrderIDOptional. Only the fills of this order
11ClOrdIDOptional. Only the fills of the order whose current ClOrdID this is
55 / 48Symbol / SecurityIDOptional. Only the fills on this instrument
54SideOptional. Only the fills of orders on this side: 1 = Buy, 2 = Sell

The period covers at most 31 days and is set by NoDates:

NoDatesPeriod
noneThe current day (UTC)
1 entryFrom the start of its TradeDate (or its TransactTime) until now
2 entriesFrom the start of the first TradeDate to the end of the second one (or their TransactTime)

A request returns at most 10,000 fills. When more match, it is rejected: ask for a shorter period, or filter by order or instrument.

Answer

Lise first sends a TradeCaptureReportRequestAck (35=AQ) with your TradeRequestID(568), TradeRequestResult(749)=0 and TotNumTradeReports(748), the number of fills. TradeRequestStatus(750) is 0 (Accepted) when fills follow, 1 (Completed) when there is none.

Then one TradeCaptureReport (35=AE) per fill, oldest first:

TagContent
571 TradeReportID / 17 ExecIDThe ExecID of the fill's Trade ExecutionReport (150=F), so you can match both and drop fills you already have
568 TradeRequestIDYour request's id
748 TotNumTradeReports / 912 LastRptRequestedThe number of fills; 912=Y on the last one
570 PreviouslyReportedY: the fill was reported as an ExecutionReport
150 ExecTypeF (Trade)
32 LastQty / 31 LastPxThe fill's quantity and price in EUR
75 TradeDate / 60 TransactTimeWhen the fill was made, in UTC
55, 48The instrument
552 NoSidesOne entry: 54 Side, 37 OrderID, 11 ClOrdID (the order's current one) and 1 Account of your order

When both orders of a fill are yours, you get one report per order, each with its own ExecID.

A request Lise cannot answer gets only a TradeCaptureReportRequestAck with TradeRequestStatus(750)=2 (Rejected), a TradeRequestResult(749) and a Text(58):

749Meaning
8 TradeRequestType not supportedTradeRequestType other than 0
9 Not authorizedThe session has ended; Lise then logs it out
99 OtherUnsupported SubscriptionRequestType or Side, invalid or too long period, more than 10,000 fills, temporary failure (Text(58)=order entry temporarily unavailable)

Rejection reasons

Order rejections: OrdRejReason (103)

103MeaningTypical Text (58)
1 Unknown symbolSymbol / SecurityID missing or not a published instrumentSymbol (55) or SecurityID (48) is required, Resource not found
2 Exchange closedThe market is not published, or trading is halted by the circuit breakerThis secondary market is not published., Trading on this market is temporarily halted due to a circuit breaker. Please try again later.
3 Order exceeds limitNot enough euros (buy, fees included) or tokens (sell)Insufficient balance in euro, Insufficient token balance
6 Duplicate orderThe ClOrdID is already used; see ClOrdID rulesAn order with this client order ID already exists.
11 Unsupported order characteristicOrder type, side or time in force not supportedonly Limit orders (40=2) are supported, TimeInForce (59) must be GTC (1) or GTD (6), GTD orders (59=6) require ExpireTime (126)
13 Incorrect quantityOrderQty is not a positive whole numberOrderQty (38) must be a positive whole number of tokens
15 Unknown accountAccount(1) is missing, or is not a user your API key may trade forAccount (1) is required, Account (1) is unknown, or the API key may not trade for it
99 OtherInvalid price, expired ExpireTime, price too far from the market price, missing permission, temporary failurePrice (44) must be a positive euro amount with at most 2 decimals, The expiration date must be in the future., The order price must be within ±30% of the current market price., order entry temporarily unavailable

A buy order is also checked against your euro balance again when it is processed. If it is rejected then, you receive a second, separate ExecutionReport with ExecType(150)=8, OrdRejReason(103)=3 and the real OrderID(37).

Cancel rejections: CxlRejReason (102)

102Meaning
0 Too late to cancelThe order is filled, canceled or expired
1 Unknown orderNo order of the Account user has this OrigClOrdID, 37 does not match it, or Account is not a user your API key may trade for
6 Duplicate ClOrdIDThe cancel's ClOrdID is already used; see ClOrdID rules
99 OtherInvalid request (including a missing Account), missing permission, temporary failure

Session errors

When an order or cancel arrives after your account session has ended, or your API key was revoked, Lise rejects it and logs the FIX session out with a Text(58) explaining why. Log on again with a valid API key to continue.

If order entry is temporarily unavailable, the request is rejected with reason 99 and Text(58)=order entry temporarily unavailable. In that case the outcome of the request is unknown: check the order with an OrderStatusRequest before sending it again, and use a new ClOrdID.

ClOrdID rules

ClOrdID identifies your requests. It is yours to generate, up to the rules below:

  • A ClOrdID is rejected as a duplicate when it is the current ClOrdID of one of the orders of the same Account user, or was already used by a request of yours for that user on the same UTC day. This applies to orders and cancel requests alike. Two different Account users can therefore use the same ClOrdID.
  • A cancel request's ClOrdID must be new too: once the cancel succeeds it becomes the order's ClOrdID.
  • The same ClOrdID can be used again from the next UTC day, as long as no order of that user still has it as its current ClOrdID.
  • Do not resend a request with the same ClOrdID because you got no answer: it would be refused as a duplicate. Find out what happened first with an OrderStatusRequest, then use a new ClOrdID.

Delivery of reports

Reports are pushed to the FIX session of the user who placed the order, also after a new logon. For an order placed for another user, that is your session, not theirs. Reports produced while no session of your user is logged on are not replayed when you log on again. After a disconnection, reconcile your orders before sending new requests:

  1. Send an OrderMassStatusRequest (585=7) to get the status of every open order.
  2. For each order you considered open that is not in the answer, send an OrderStatusRequest to learn whether it was filled, canceled or expired.
  3. To get each fill made while you were away, send a TradeCaptureReportRequest covering the period, and drop the fills whose ExecID you already have.

See Order status and Fills. The OrderID(37) of a report is also the id of the matching SecondaryMarketOrder in the GraphQL API.

Reports cover orders placed over FIX. Orders created through GraphQL do not produce execution reports on the FIX session.

Example

Message bodies only: the standard header and trailer are left out, and | stands for the SOH delimiter.

Buy 10 tokens of DEMO at EUR 12.50, good till canceled:

35=D|11=ord-1|1=<UserID>|55=DEMO|54=1|60=20261023-09:30:00.000|40=2|38=10|44=12.50|59=1

Acknowledgement, straight away:

35=8|37=<OrderID>|11=ord-1|17=<ExecID>|150=A|39=A|1=<UserID>|55=DEMO|54=1|40=2|38=10|44=12.50|59=1|151=10|14=0|6=0

Once processed, then the fill of the whole order:

35=8|37=<OrderID>|11=ord-1|150=0|39=0|151=10|14=0|6=0|...
35=8|37=<OrderID>|11=ord-1|150=F|39=2|32=10|31=12.50|151=0|14=10|6=12.50|...

Cancel an order that is still open:

35=F|41=ord-2|11=cancel-2|1=<UserID>|54=1|60=20261023-09:35:00.000|55=DEMO

Lise confirms with a Canceled report that carries both ClOrdIDs:

35=8|37=<OrderID>|11=cancel-2|41=ord-2|150=4|39=4|151=<remaining>|...

Ask for the status of every open order after logging on again:

35=AF|584=mass-1|585=7

One report per open order, the last one with 912=Y:

35=8|37=<OrderID>|11=ord-1|150=I|39=1|584=mass-1|911=2|912=N|151=6|14=4|6=12.50|...
35=8|37=<OrderID>|11=ord-3|150=I|39=0|584=mass-1|911=2|912=Y|151=5|14=0|6=0|...

Ask how an order that is no longer open ended:

35=H|11=cancel-2|1=<UserID>|54=1|55=DEMO|790=status-1
35=8|37=<OrderID>|11=cancel-2|41=ord-2|150=I|39=4|790=status-1|151=0|14=0|6=0|...

List the fills of one order since 10 November:

35=AD|568=trades-1|569=0|580=1|75=20261110|37=<OrderID>
35=AQ|568=trades-1|569=0|749=0|750=0|748=2
35=AE|571=<ExecID>|17=<ExecID>|568=trades-1|748=2|912=N|570=Y|150=F|55=DEMO|32=6|31=12.50|75=20261110|60=20261110-09:31:02.120|552=1|54=1|37=<OrderID>|11=ord-1|1=<UserID>
35=AE|571=<ExecID>|17=<ExecID>|568=trades-1|748=2|912=Y|570=Y|150=F|55=DEMO|32=4|31=12.50|75=20261111|60=20261111-14:02:45.008|552=1|54=1|37=<OrderID>|11=ord-1|1=<UserID>

Next steps


Did this page help you?