NAV Navbar

FIX API

FIX (Financial Information eXchange) is a standard protocol which can be used to enter orders, submit cancel requests, and receive fills. Users of the FIX API will typically have existing software using FIX for order management.

Currently, Uvas Exchange supports FIX versions 4.4 and 5.0.

Credentials management

In order to connect to the Uvas Exchange FIX server, API credential set is needed. The set consists of ApiKey and ApiPassphrase. ApiKey is used as the SenderCompId tag value of every FIX message originating from the client. You can see the Message structure section for details. ApiPassphrase is used to calculate a Password tag value of a Logon message in order to successfully authenticate. You can see a Sessions and Authentication section for details. Make sure to keep both values secret.

API credential sets can be managed via Uvas Exchange UI in a "FIX API" section in Settings. The list with available API credential sets will be displayed. Only ApiKeys displayed as ApiPassphrase are considered strictly secret and must be kept separately and securely. Anyone gaining access to both your ApiKey and ApiPassphrase will be able to trade on your behalf. It's possible to create up to 10 credential sets per user.

Once you click the button "Add New Credentials", the dialog window will appear. Please select the FIX API version and submit. Subsequently a newly created ApiKey and an ApiPassphrase will be displayed. Remember to copy and secretly store the ApiPassphrase, as it will not be accessible afterwards. If ApiPassphrase gets lost, the credential set has to be deleted and a new one created.

In order to delete a credential set, click an "Options" icon in the given set's row and select "Delete". The API credential set will get deleted and an active FIX session will be immediately terminated, if present.

Connection

The Uvas Exchange FIX server uses TCP transport protocol. IP address is fix.uvas.com. Port is 777. TLS 1.3 is used.

Message structure

Every FIX message consists of three parts: header, body and trailer. Body is specific for every message type. Header and trailer must have the same tags for all the messages. The structure as follows:

Tag Name Type Required Description
8 BeginString string Yes Protocol version. It contains FIX.4.4 for FIX version 4.4 and FIXT.1.1 for FIX version 5.0
9 BodyLength int Yes Message length in bytes, not including BeginString, BodyLength and CheckSum
35 MsgType string Yes Message type
34 MsgSeqNum int Yes Message sequence number. It starts with 1 for every session and increases by 1 for every subsequent message within a session.
49 SenderCompId string Yes Identifier of message sender. It equals ApiKey from FIX API credentials, if the client is a sender. It is UVASFIXSERVER, if the server is a sender
52 SendingTime datetime Yes Date and time when the message is sent. Example 20190702-05:11:35.123
56 TargetCompID string Yes Identifier of a message receiver. It will be ApiKey from FIX API credential set, if client is receiver. It must equal UVASFIXSERVER, if server is receiver
10 CheckSum string Yes Message checksum consists of 3 symbols. See FIX specification for checksum calculation details.

All tags from the table except CheckSum represent a message header. The CheckSum tag represents a message trailer. The message starts with BeginString, BodyLength and MsgType in this exact order. The message ends with CheckSum.

The description of specific messages below does not include header and trailer tags.

Sessions and Authentication

FIX is a session-based protocol. In order to establish a session the client must authenticate himself by sending a Logon message. In order to terminate a session either the FIX server or the client must send a Logout message. Heartbeat and TestRequest messages are used to keep a session active, if no other activity is performed. See detailed description of every message below.

Logon

MsgType = A

Tag Name Type Required Description
96 RawData string Yes See below
554 Password string Yes See below
98 EncryptMethod int Yes Message encryption method. Currently, only 0 (None) is supported.
108 HeartBtInt int Yes Heartbeats interval

The structure of RawData is timestamp.nonce - timestamp value and nonce value separated by an ASCII period. timestamp must be of a 64-bit integer type. Its value increases in every subsequent Logon message. We recommend using a current timestamp in milliseconds. nonce must be a random byte array encoded in Base64. It is important for nonce bytes to be generated by a cryptographically secure random number generator. The size is from 32 to 512 bytes.

Password is used for authentication. You can calculate it by following the steps below:

In short, Password = Base64(SHA256(RawData+ApiPassphrase)). The FIX server performs the same steps and compares the resulting value with Password provided. If the values match, the user is authenticated and a session established.

Success response

In case of a successful authentication the FIX server responds with a Logon message containing EncryptMethod and HeartBtInt tags.

Error responses

In case of a failed authentication the FIX server responds with a Logout message containing a Text tag that specifies a failure reason. The list of reasons currently includes:

Text Description
Rejected Logon Attempt: ApiKey not found The server has no ApiKey corresponding to the value sent in SenderCompId tag. Check the value or generate new FIX API credentials
Rejected Logon Attempt: Wrong format of RawData RawData value has an incorrect format. Make sure it has structure of timestamp.nonce
Rejected Logon Attempt: Timestamp in RawData must be numeric timestamp is not numeric
Rejected Logon Attempt: Timestamp is less or equal to the last one used timestamp has not increased since the last Logon message. Make sure it is an always-increasing value
Rejected Logon Attempt: Nonce is in invalid format nonce is not a Base64-encoded string. Check the algorithm used to generate nonce
Rejected Logon Attempt: Nonce is less than 32 bytes nonce is less than 32 bytes. Check the algorithm used to generate nonce
Rejected Logon Attempt: Nonce is greater than 512 bytes nonce is greater than 512 bytes. Check the algorithm used to generate nonce
Rejected Logon Attempt: Wrong password Password calculated by the server based on RawData and ApiPassphrase does not match Password value in the Logon message. Check if the correct ApiPassphrase is used

Logout

MsgType = 5

If either the client or the server decides to terminate a session, it sends a Logout message with no body. The other party acknowledges the session termination by sending a Logout message with no body.

Heartbeat

MsgType = 0

If any FIX party has not received or sent any data for the interval specified in HeartBtInt tag of Logon message it must send a Heartbeat message with no body.

Success response

When other party receives a Heartbeat message it sends back another Heartbeat message as a confirmation.

TestRequest

MsgType = 1

If any FIX party has not received any data for the interval specified in the HeartBtInt tag of the Logon message it must send a TestRequest message.

Tag Name Type Required Description
112 TestReqId string Yes Test request identifier

Success response

When other party receives the TestRequest message it sends the Heartbeat message with a TestReqId tag mirroring the received value.

Accounts

UserRequest

It is used to request the user account balance information.

MsgType = BE

Tag Name Type Required Description
923 UserRequestID string Yes Request identifier
924 UserRequestType int Yes RequestType. Currently only 4 (RequestIndividualUserStatus) is supported
15 Currency string Yes Currency to get balance of, e.g. BTC

Success response

The server responds with a UserResponse message containing user account balances.

MsgType = BF

Tag Name Type Required Description
923 UserRequestID string Yes UserRequestID from UserRequest message
926 UserStatus int Yes User status. 1 (LoggedIn) is returned
15 Currency string Yes Balance currency
100002 UserBalance decimal Yes User account balance

Error response

If the user request was rejected the server responds with a UserResponse message.

MsgType = BF

Tag Name Type Required Description
923 UserRequestID string Yes UserRequestID from UserRequest message
926 UserStatus int Yes Reject reason
927 UserStatusText string Yes Reject reason description

Possible errors:

UserStatus UserStatus Name UserStatusText Description
3 USER_NOT_RECOGNISED ACCOUNT_NOT_FOUND User account not found
6 OTHER UNSUPPORTED_USER_REQUEST_TYPE Unsupported UserRequestType
6 OTHER CURRENCY_NOT_FOUND Currency not found
6 OTHER UNKNOWN_ERROR Unknown error encountered. Contact the support

Instruments

SecurityListRequest

Requests a list of instruments.

MsgType = x

Tag Name Type Required Description
320 SecurityReqID string Yes Unique request identifier assigned by the client
559 SecurityListRequestType int Yes Request type. Currently only 4 (AllSecurities) is supported

Success response

The server responds with a SecurityList message containing the list of instruments.

MsgType = y

Tag Name Type Required Description
320 SecurityReqID string Yes SecurityReqID value from SecurityListRequest message
322 SecurityResponseID string Yes Unique identifier of response
560 SecurityRequestResult int Yes Request result. 0 (ValidRequest) is returned
146 NoRelatedSym int No Number of instruments following
-> 55 Symbol string Yes Instrument symbol

Orders

NewOrderSingle

Used to submit a single order to the exchange.

MsgType = D

Tag Name Type Required Description
11 ClOrdID string Yes Unique client order identifier assigned by the client
55 Symbol string Yes Instrument symbol, e.g. BTC_USD
40 OrdType char Yes Order type. Supported values: 1 (Market), 2 (Limit)
54 Side char Yes Order side. Supported values: 1 (Buy), 2 (Sell)
44 Price decimal Yes Order price, ignored for market orders
38 OrderQty decimal Conditional Order quantity in base currency
152 CashOrderQty decimal Conditional Order quantity in quote currency

OrderQty specifies the amount of base currency to buy/sell. CashOrderQty specifies the amount of quote currency to spend/receive to buy/sell base currency. For a limit order OrderQty must be set and CashOrderQty must not be set. For a market order one of these values must be set. If none or both values are set, an error is reported.

Success response

The server responds with an ExecutionReport message containing information about the submitted order.

MsgType = 8

Tag Name Type Required Description
11 ClOrdID string Yes ClOrdId value from NewOrderSingle message
17 ExecID string Yes Unique identifier of the execution report
150 ExecType char Yes Order execution type. 0 (New) is returned
37 OrderID string Yes Server-generated permanent order identifier
39 OrdStatus char Yes Order status. 0 (New) is returned
40 OrdType char Yes Order type
54 Side char Yes Order side
55 Symbol string Yes Instrument symbol
38 OrdQty decimal Yes Total quantity
14 CumQty decimal Yes Executed quantity
151 LeavesQty decimal Yes Quantity open for further execution
44 Price decimal Yes Price
6 AvgPx decimal Yes Average execution price. 0 if no quantity executed yet
60 TransactTime datetime Yes Date and time of the transaction

Error response

If the order was rejected due to business related reasons, the server responds with an ExecutionReport message.

MsgType = 8

Tag Name Type Required Description
11 ClOrdID string Yes ClOrdId value from NewOrderSingle message
17 ExecID string Yes Unique identifier of the execution report
150 ExecType char Yes Order execution type. 8 (Rejected) is returned
103 OrdRejReason int Yes Reject reason
58 Text string Conditional Reject text
37 OrderID string Yes Server-generated permanent order identifier. 0 is returned
39 OrdStatus char Yes Order status. 8 (Rejected) is returned
40 OrdType char Yes Order type
54 Side char Yes Order side
55 Symbol string Yes Instrument symbol
38 OrdQty decimal Yes Total quantity. 0 is returned
14 CumQty decimal Yes Executed quantity. 0 is returned
151 LeavesQty decimal Yes Quantity open for further execution. 0 is returned
44 Price decimal Yes Price
6 AvgPx decimal Yes Average execution price. 0 is returned
60 TransactTime datetime Yes Date and time of the transaction

Possible errors:

OrdRejReason OrdRejReason Name Text Description
11 UNSUPPORTED_ORDER_CHARACTERISTIC UNSUPPORTED_ORDER_TYPE Unsupported OrdType
11 UNSUPPORTED_ORDER_CHARACTERISTIC UNSUPPORTED_SIDE Unsupported Side
15 UNKNOWN_ACCOUNT - User account not found
1 UNKNOWN_SYMBOL - Unknown Symbol
2 EXCHANGE_CLOSED - Order book for the instrument is closed
13 INCORRECT_QUANTITY BOTH_QUANTITY_AND_CASH_QUANTITY_SPECIFIED Both OrderQty and CashOrderQty are specified, which is invalid
13 INCORRECT_QUANTITY NO_QUANTITY_SPECIFIED Neither OrderQty not CashOrderQty is specified
13 INCORRECT_QUANTITY CASH_QUANTITY_SPECIFIED_FOR_LIMIT_ORDER CashOrderQty is specified for the limit order
13 INCORRECT_QUANTITY QUANTITY_NOT_SPECIFIED_FOR_LIMIT_ORDER OrderQty is not specified for the limit order
13 INCORRECT_QUANTITY NEGATIVE_OR_ZERO_QUANTITY Negative or zero OrderQty
13 INCORRECT_QUANTITY TOO_LARGE_QUANTITY Too large OrderQty or CashOrderQty
13 INCORRECT_QUANTITY TOO_SMALL_QUANTITY Too small OrderQty or CashOrderQty
6 DUPLICATE_ORDER - Order with the same ClOrdID already submitted
99 OTHER ACCOUNT_SUSPENDED User account is suspended
99 OTHER INVALID_PRICE Invalid Price
99 OTHER INSUFFICIENT_FUNDS User account has insufficient funds
99 OTHER UNKNOWN_ERROR Unknown error encountered. Contact support

OrderCancelRequest

Cancels an active order.

MsgType = F

Tag Name Type Required Description
11 ClOrdID string Yes Unique request identifier assigned by the client
41 OrigClOrdID string Conditional Client order identifier, see below
37 OrderID string Conditional Server order identifier, see below

The order to cancel can be specified in two ways: by OrderID and by OrigClOrdID. OrderID is a server-generated identifier and can be used across sessions. OrigClOrdID is a client-generated identifier and cannot be used across sessions. Use it only in the same session in which NewOrderSingle (or the OrderCancelReplaceRequest) submitting the order was sent. The OrigClOrdID value must be equal to the ClOrdId value sent in an NewOrderSingle message or in an OrderCancelReplaceRequest message if the order was created as a result of another order change.

If both OrderID and OrigClOrdID are specified, OrderID is used. If neither value is specified, an error is reported.

Success response

The server responds with an ExecutionReport message containing information about the cancelled order.

MsgType = 8

Tag Name Type Required Description
11 ClOrdID string Yes ClOrdId value from OrderCancelRequest message
17 ExecID string Yes Unique identifier of execution report
150 ExecType char Yes Order execution type. 4 (Canceled) is returned
41 OrigClOrdID string No OrigClOrdID value from OrderCancelRequest message
37 OrderID string Yes Server-generated permanent order identifier
39 OrdStatus char Yes Order status. 4 (Canceled) is returned
40 OrdType char Yes Order type
54 Side char Yes Order side
55 Symbol string Yes Instrument symbol
38 OrdQty decimal Yes Total quantity
14 CumQty decimal Yes Executed quantity
151 LeavesQty decimal Yes Quantity open for further execution
44 Price decimal Yes Price
6 AvgPx decimal Yes Average execution price. 0 if no quantity was executed yet
60 TransactTime datetime Yes Date and time of the transaction

Error response

If an order cancellation was rejected due to business related reasons, the server responds with an OrderCancelReject message.

MsgType = 9

Tag Name Type Required Description
11 ClOrdID string Yes ClOrdId value from OrderCancelRequest message
434 CxlRejResponseTo char Yes Target of response. 1 (OrderCancelRequest) is returned
102 CxlRejReason int Yes Reject reason
58 Text string Conditional Reject text
39 OrdStatus char Yes Order status. 0 (New) is currently returned
41 OrigClOrdID string Yes OrigClOrdID value from OrderCancelRequest message. NONE is returned if not provided
37 OrderID string Yes Server-generated permanent order identifier. NONE is returned if not provided

Possible errors:

CxlRejReason CxlRejReason Name Text Description
1 UNKNOWN_ORDER NO_ORDER_IDS_SPECIFIED Neither OrderID nor OrigClOrdID is specified
1 UNKNOWN_ORDER ORDER_NOT_FOUND Order with given identifiers not found
99 OTHER INVALID_ORDER_ID Invalid OrderID
99 OTHER INVALID_CLIENT_ORDER_ID Invalid OrigClOrdID
99 OTHER ACCOUNT_NOT_FOUND User account not found
99 OTHER ACCOUNT_SUSPENDED User account suspended
99 OTHER UNKNOWN_ERROR Unknown error encountered. Contact support

OrderMassCancelRequest

Used to cancel multiple active orders that match a given set of criteria.

MsgType = q

Tag Name Type Required Description
11 ClOrdID string Yes Unique request identifier assigned by client
530 MassCancelRequestType char Yes Request types, see below
55 Symbol string Conditional Instrument symbol, see below
54 Side char No Order side. Supported values: 1 (Buy), 2 (Sell). See below

Currently two values of MassCancelRequestType are supported: 1 (CancelOrdersForASecurity) and 7 (CancelAllOrders). If MassCancelRequestType equals 1, Symbol must be specified to cancel all orders for a given instrument. If MassCancelRequestType equals 7, Symbol is not required and is ignored if specified. This request type cancels all orders.

Side can be optionally specified for both request types to cancel only buy or sell orders.

Success response

The server responds with an OrderMassCancelReport message to indicate a successful execution of the request.

MsgType = r

Tag Name Type Required Description
11 ClOrdID string Yes ClOrdId value from OrderMassCancelRequest message
530 MassCancelRequestType char Yes MassCancelRequestType value from OrderMassCancelRequest message
531 MassCancelResponse char Yes Response type. Mirrors MassCancelRequestType value from OrderMassCancelRequest message
60 TransactTime datetime Yes Date and time of transaction

Subsequently for every cancelled order the server responds with a ExecutionReport message containing information about the order.

MsgType = 8

Tag Name Type Required Description
11 ClOrdID string Yes ClOrdId value from OrderMassCancelRequest message
17 ExecID string Yes Unique identifier of execution report
150 ExecType char Yes Order execution type. 4 (Canceled) is returned
37 OrderID string Yes Server-generated permanent order identifier
39 OrdStatus char Yes Order status. 4 (Canceled) is returned
40 OrdType char Yes Order type
54 Side char Yes Order side
55 Symbol string Yes Instrument symbol
38 OrdQty decimal Yes Total quantity
14 CumQty decimal Yes Executed quantity
151 LeavesQty decimal Yes Quantity open for further execution
44 Price decimal Yes Price
6 AvgPx decimal Yes Average execution price. 0 if no quantity executed yet
60 TransactTime datetime Yes Date and time of transaction

Error response

If the order mass cancellation was rejected due to business related reasons, the server responds with a OrderMassCancelReport message.

MsgType = r

Tag Name Type Required Description
11 ClOrdID string Yes ClOrdId value from OrderMassCancelRequest message
530 MassCancelRequestType char Yes MassCancelRequestType value from OrderMassCancelRequest message
531 MassCancelResponse char Yes Response type. 0 (CancelRequestRejected) is returned
532 MassCancelRejectReason int Yes Reject reason
58 Text string Conditional Reject text
60 TransactTime datetime Yes Date and time of the transaction

Possible errors:

MassCancelRejectReason MassCancelRejectReason Name Text Description
1 INVALID_OR_UNKNOWN_SECURITY INVALID_SYMBOL Invalid Symbol
1 INVALID_OR_UNKNOWN_SECURITY ORDER_BOOK_NOT_FOUND Order book for instrument not found
99 OTHER UNSUPPORTED_MASS_CANCEL_REQUEST_TYPE Unsupported MassCancelRequestType
99 OTHER CURRENCY_NOT_FOUND Base or quote currency not found
99 OTHER ACCOUNT_NOT_FOUND User account not found
99 OTHER ACCOUNT_SUSPENDED User account is suspended
99 OTHER UNKNOWN_ERROR Unknown error encountered. Contact support

OrderCancelReplaceRequest

Changes the parameters of an active order.

MsgType = G

Tag Name Type Required Description
11 ClOrdID string Yes Unique request identifier assigned by client
41 OrigClOrdID string Conditional Client order identifier, see below
37 OrderID string Conditional Server order identifier, see below
40 OrdType char Yes Order type to set
44 Price decimal No Price to set
38 OrderQty decimal Yes Total quantity to set
9619 CancelOrigOnReject char No Set Y to indicate whether original order should be cancelled if request is rejected

The order to change can be specified in two ways: by OrderID and by OrigClOrdID. OrderID is a server-generated identifier and can be used across sessions. OrigClOrdID is a client-generated identifier and cannot be used across sessions. Use it only in the same session in which NewOrderSingle (or OrderCancelReplaceRequest) submitting the order was sent. The OrigClOrdID value must be equal to the ClOrdId value sent in a the NewOrderSingle message or in the OrderCancelReplaceRequest message if the order was created as a result of another order change.

If both OrderID and OrigClOrdID are specified, OrderID is used. If neither value is specified, an error is reported.

Success response

The server responds with an ExecutionReport message for every order affected by the change.

MsgType = 8

Tag Name Type Required Description
11 ClOrdID string Yes ClOrdId value from OrderCancelReplaceRequest message
17 ExecID string Yes Unique identifier of execution report
150 ExecType char Yes Order execution type. 5 (Replaced) is returned
41 OrigClOrdID string No OrigClOrdID value from OrderCancelReplaceRequest message
37 OrderID string Yes Server-generated permanent order identifier
39 OrdStatus char Yes Order current status
40 OrdType char Yes Order type
54 Side char Yes Order side
55 Symbol string Yes Instrument symbol
38 OrdQty decimal Yes Total quantity
14 CumQty decimal Yes Executed quantity
151 LeavesQty decimal Yes Quantity open for further execution
44 Price decimal Yes Price
6 AvgPx decimal Yes Average execution price. 0 if no quantity executed yet
60 TransactTime datetime Yes Date and time of the transaction

Possible request outcomes include:

  1. The original order was changed and no new order was created

The ExecutionReport for the changed original order is sent.

  1. The original order was cancelled and a new order created

Only ExecutionReport for the new order is sent. OrigClOrdID is omitted.

  1. The original order was cancelled and no new order created

ExecutionReport for the cancelled original order is sent.

Error response

If the order change was rejected due to business related reasons, the server responds with an OrderCancelReject message. If CancelOrigOnReject was specified in the request, ExecutionReport for the cancelled order will also be sent as described above.

MsgType = 9

Tag Name Type Required Description
11 ClOrdID string Yes ClOrdId value from OrderCancelRequest message
434 CxlRejResponseTo char Yes Target of the response. 2 (OrderCancelReplaceRequest) is returned
102 CxlRejReason int Yes Reject reason
58 Text string Conditional Reject text
39 OrdStatus char Yes Order status. 0 (New) is currently returned
41 OrigClOrdID string Yes OrigClOrdID value from OrderCancelRequest message. NONE is returned if not provided
37 OrderID string Yes Server-generated permanent order identifier. NONE is returned if not provided

Possible errors:

CxlRejReason CxlRejReason Name Text Description
1 UNKNOWN_ORDER NO_ORDER_IDS_SPECIFIED Neither OrderID nor OrigClOrdID is specified
1 UNKNOWN_ORDER ORDER_NOT_FOUND Order with given identifiers not found
99 OTHER UNSUPPORTED_ORDER_TYPE Unsupported OrdType
99 OTHER INVALID_ORDER_ID Invalid OrderID
99 OTHER INVALID_CLIENT_ORDER_ID Invalid OrigClOrdID
99 OTHER ACCOUNT_NOT_FOUND User account not found
99 OTHER ACCOUNT_SUSPENDED User account suspended
99 OTHER INVALID_PRICE Invalid Price
99 OTHER INSUFFICIENT_FUNDS User account has insufficient funds
99 OTHER NEGATIVE_OR_ZERO_QUANTITY Negative or zero OrderQty
99 OTHER TOO_LARGE_QUANTITY Too large OrderQty
99 OTHER TOO_SMALL_QUANTITY Too small OrderQty
99 OTHER EXCHANGE_CLOSED Order book for the instrument is closed
99 OTHER UNKNOWN_ERROR Unknown error encountered. Contact support

OrderStatusRequest

Used to request an order status.

MsgType = H

Tag Name Type Required Description
11 ClOrdID string Yes Unique request identifier assigned by client
41 OrigClOrdID string Conditional Client order identifier, see below
37 OrderID string Conditional Server order identifier, see below

The order which status we intend to get can be specified in two ways: by OrderID or by OrigClOrdID. OrderID is a server-generated identifier and can be used across sessions. OrigClOrdID is a client-generated identifier and cannot be used across sessions. Use it only in the same session in which NewOrderSingle (or the OrderCancelReplaceRequest) submitting the order was sent. The OrigClOrdID value must be equal to the ClOrdId value sent in the NewOrderSingle message or in the OrderCancelReplaceRequest message if the order was created as a result of another order change.

If both OrderID and OrigClOrdID are specified, OrderID is used. If neither value is specified, an error is reported.

Success response

The server responds with an ExecutionReport message.

MsgType = 8

Tag Name Type Required Description
11 ClOrdID string Yes ClOrdId value from OrderStatusRequest message
17 ExecID string Yes Unique identifier of execution report
150 ExecType char Yes Order execution type. I (OrderStatus) is returned
41 OrigClOrdID string No OrigClOrdID value from OrderCancelReplaceRequest message
37 OrderID string Yes Server-generated permanent order identifier
39 OrdStatus char Yes Order current status
40 OrdType char Yes Order type
54 Side char Yes Order side
55 Symbol string Yes Instrument symbol
38 OrdQty decimal Yes Total quantity
14 CumQty decimal Yes Executed quantity
151 LeavesQty decimal Yes Quantity open for further execution
44 Price decimal Yes Price
6 AvgPx decimal Yes Average execution price. 0 if no quantity was executed yet
60 TransactTime datetime Yes Date and time of transaction

Error response

If the status request was rejected due to business related reasons, the server responds with an ExecutionReport message.

MsgType = 8

Tag Name Type Required Description
11 ClOrdID string Yes ClOrdId value from OrderStatusRequest message
17 ExecID string Yes Unique identifier of execution report
150 ExecType char Yes Order execution type. 8 (Rejected) is returned
103 OrdRejReason int Yes Reject reason
58 Text string Conditional Reject text
41 OrigClOrdID string No OrigClOrdID value from OrderCancelReplaceRequest message
37 OrderID string Yes Server-generated permanent order identifier. NONE if it is unknown
39 OrdStatus char Yes Order current status. 8 (Rejected) is returned
54 Side char Yes Order side. B (AsDefined) is returned
55 Symbol string Yes Instrument symbol. NONE is returned
38 OrdQty decimal Yes Total quantity. 0 is returned
14 CumQty decimal Yes Executed quantity. 0 is returned
151 LeavesQty decimal Yes Quantity open for further execution. 0 is returned
6 AvgPx decimal Yes Average execution price. 0 is returned
60 TransactTime datetime Yes Date and time of transaction

Possible errors:

OrdRejReason OrdRejReason Name Text Description
5 UNKNOWN_ORDER NO_ORDER_IDS_SPECIFIED Neither OrderID nor OrigClOrdID specified
5 UNKNOWN_ORDER ORDER_NOT_FOUND Order with given identifiers not found
99 OTHER INVALID_ORDER_ID Invalid OrderID
99 OTHER INVALID_CLIENT_ORDER_ID Invalid OrigClOrdID
99 OTHER ACCOUNT_NOT_FOUND User account not found
99 OTHER UNKNOWN_ERROR Unknown error encountered. Contact support

OrderMassStatusRequest

Used to request statuses of multiple orders that match a given set of criteria.

MsgType = AF

Tag Name Type Required Description
584 MassStatusReqID string Yes Unique request identifier assigned by client
585 MassStatusReqType int Yes Request type, see below
55 Symbol string Conditional Instrument symbol, see below
54 Side char No Order side. Supported values: 1 (Buy), 2 (Sell). See below

Currently the two values of MassStatusReqType are supported: 1 (StatusForOrdersForASecurity) and 7 (StatusForAllOrders). If MassStatusReqType equals 1, Symbol must be specified to get the statuses of all the orders for a given instrument. If MassStatusReqType equals 7, Symbol must not be specified. This request type gets the statuses of all the orders.

Side can be optionally specified for both request types to get statuses of only buy or sell orders.

Success response

The server responds with an ExecutionReport message for every order.

MsgType = 8

Tag Name Type Required Description
11 ClOrdID string Yes None is returned
584 MassStatusReqID string Yes MassStatusReqID value from OrderMassStatusRequest
17 ExecID string Yes Unique identifier of execution report
150 ExecType char Yes Order execution type. I (OrderStatus) is returned
37 OrderID string Yes Server-generated permanent order identifier
39 OrdStatus char Yes Order current status
40 OrdType char Yes Order type
54 Side char Yes Order side
55 Symbol string Yes Instrument symbol
38 OrdQty decimal Yes Total quantity
14 CumQty decimal Yes Executed quantity
151 LeavesQty decimal Yes Quantity open for further execution
44 Price decimal Yes Price
6 AvgPx decimal Yes Average execution price. 0 if no quantity was executed yet
60 TransactTime datetime Yes Date and time of transaction

Error response

If the mass status request was rejected due to business related reasons, the server responds with an ExecutionReport message.

MsgType = 8

Tag Name Type Required Description
11 ClOrdID string Yes MassStatusReqID value from OrderMassStatusRequest
584 MassStatusReqID string Yes MassStatusReqID value from OrderMassStatusRequest
17 ExecID string Yes Unique identifier of execution report
150 ExecType char Yes Order execution type. 8 (Rejected) is returned
103 OrdRejReason int Yes Reject reason
58 Text string Conditional Reject text
37 OrderID string Yes Server-generated permanent order identifier. NONE is returned
39 OrdStatus char Yes Order current status. 8 (Rejected) is returned
54 Side char Yes Side from OrderMassStatusRequest or B (AsDefined) if not specified
55 Symbol string Yes Symbol from OrderMassStatusRequest or NONE if not specified
38 OrdQty decimal Yes Total quantity. 0 is returned
14 CumQty decimal Yes Executed quantity. 0 is returned
151 LeavesQty decimal Yes Quantity open for further execution. 0 is returned
6 AvgPx decimal Yes Average execution price. 0 is returned
60 TransactTime datetime Yes Date and time of the transaction

Possible errors:

OrdRejReason OrdRejReason Name Text Description
11 UNSUPPORTED_ORDER_CHARACTERISTIC UNSUPPORTED_SIDE Unsupported side
15 UNKNOWN_ACCOUNT - User account not found
1 UNKNOWN_SYMBOL - Unknown Symbol
99 OTHER SYMBOL_SPECIFIED Symbol specified for MassStatusReqType == 7 (StatusForAllOrders)
99 OTHER NO_SYMBOL_SPECIFIED Symbol not specified for MassStatusReqType == 1 (StatusForOrdersForASecurity)
99 OTHER INVALID_SYMBOL Invalid Symbol
99 OTHER UNSUPPORTED_MASS_STATUS_REQUEST_TYPE Unsupported MassStatusReqID
99 OTHER UNKNOWN_ERROR Unknown error encountered. Contact support

Fills reporting

The server sends ExecutionReport for every order fill on the exchange.

MsgType = 8

Tag Name Type Required Description
11 ClOrdID string Yes ClOrdId of request that created the order. If request happened in past session NONE is returned
17 ExecID string Yes Unique identifier of execution report
150 ExecType char Yes Order execution type. F (Trade) is returned
37 OrderID string Yes Server-generated permanent order identifier
39 OrdStatus char Yes Order current status
40 OrdType char Yes Order type
54 Side char Yes Order side
55 Symbol string Yes Instrument symbol
38 OrdQty decimal Yes Total quantity
14 CumQty decimal Yes Executed quantity
151 LeavesQty decimal Yes Quantity open for further execution
44 Price decimal Yes Price
6 AvgPx decimal Yes Average execution price. 0 if no quantity executed yet
31 LastPx decimal Yes Last trade price
60 TransactTime datetime Yes Date and time of fill

Market Data

MarketDataRequest

Used to request market data. Market data represents the order book and the trades state and updates.

MsgType = V

Tag Name Type Required Description
262 MDReqID string Yes Unique request identifier assigned by the client
263 SubscriptionRequestType char Yes Request type, see below
264 MarketDepth int No Market depth, see below. 0 is used if not specified
265 MDUpdateType int Conditional Market data update type, see below
266 AggregatedBook boolean No Specifies if order book entries should be aggregated, see below. Supported values: Y, N. Y used if not specified
267 NoMDEntryTypes int Yes Number of subsequent MDEntryType tags
-> 269 MDEntryType char Yes Market data entry type, see below
146 NoRelatedSym int Yes Number of subsequent Symbol tags
-> 55 Symbol string Yes Symbol of instrument to request market data for, see below
100007 TradeCount int No Trade count, see below. 20 used if not specified
100008 TradesSinceTimestamp datetime No Timestamp to get trades since, see below

Request types

SubscriptionRequestType can have 3 values: 0 (Snapshot), 1 (SnapshotPlusUpdates) and 2 (DisablePreviousSnapshotPlusUpdateRequest).

The MDUpdateType is required for this type of request. Two values are supported: 0 (FullRefresh) and 1 (IncrementalRefresh). Specifying 0 will make each update contain full state of market data. Specifying 1 will make each update contain only state changes. 0 (FullRefresh) is not supported for trades.

Order book aggregation

The order book can be aggregated. It means that all the orders on the same price level will be represented by a single order book entry. If the order book is not aggregated, each order will have its own order book entry even if some of them share the same price level. An AggregatedBook tag controls whether the order book should be reported as aggregated. Only the aggregated order books are currently supported.

Market data entry types

MDEntryType specifies which kind of market data should be reported. Supported values: 0 (Bid) - buy side of order book; 1 (Offer) - sell side of order book; 2 (Trade) - trades. Any combination of types can be specified in a request, though duplicates and empty set are not allowed.

Market data instruments

A set of Symbol tags specifies instruments for which market data should be reported. Several instruments can be specified in the request, though duplicates and empty set are not allowed.

Market depth

A MarketDepth value specifies how many top price levels for both sides of the order book to return in a snapshot or full/incremental refresh update messages.

If SubscriptionRequestType equals 0 (Snapshot) MarketDepth can equal any value.

If SubscriptionRequestType equals 1 (SnapshotPlusUpdates) and MDUpdateType equals 0 (FullRefresh) MarketDepth must equal 1, 10 or 20.

If SubscriptionRequestType equals 1 (SnapshotPlusUpdates) and MDUpdateType equals 1 (IncrementalRefresh) MarketDepth must equal 0.

Trades limit

TradeCount or TradesSinceTimestamp can be used to limit the number of trades returned in a snapshot by count or timestamp, accordingly.

Success response

The server sends MarketDataSnapshotFullRefresh messages to a return market data snapshot or to a report market data full refresh update. One message per instrument is sent.

MsgType = W

Tag Name Type Required Description
262 MDReqID string Yes MDReqID value from MarketDataRequest that initiated this message
55 Symbol string Yes Instrument symbol
268 NoMDEntries int Yes Number of entries following
-> 269 MDEntryType char Yes Market data entry type
-> 270 MDEntryPx decimal Yes Market data entry price
-> 271 MDEntrySize decimal Yes Market data entry quantity
-> 272 MDEntryDate date Conditional Market data entry date. Returned for trades only
-> 273 MDEntryTime time Conditional Market data entry time. Returned for trades only

The server sends MarketDataIncrementalRefresh messages to report a market data incremental update.

MsgType = X

Tag Name Type Required Description
262 MDReqID string Yes MDReqID value from MarketDataRequest that initiated this message
268 NoMDEntries int Yes Number of entries following
-> 279 MDUpdateAction char Yes Market data update type. Possible values: 0 (New), 1 (Change), 2 (Delete). Always equals 0 (New) for trades
-> 269 MDEntryType char Yes Market data entry type
-> 58 Symbol string Conditional Instrument symbol, see below
-> 270 MDEntryPx decimal Yes Market data entry price
-> 271 MDEntrySize decimal Conditional Market data entry quantity. Not present if MDUpdateAction equals 2 (Delete)
-> 272 MDEntryDate date Conditional Market data entry date. Returned for trades only
-> 273 MDEntryTime time Conditional Market data entry time. Returned for trades only

The server does not send a Symbol value in each MDEntry group. It sends Symbol in the first group and then omits it for all the following groups. This means that all the groups have the Symbol value from the first group. If some of the subsequent groups need to have another Symbol value, the server sends it in the first group of given subset and then again omits it for all the following groups.

Error response

If a market data request was rejected due to business related reasons, the server responds with a MarketDataRequestReject message.

MsgType = Y

Tag Name Type Required Description
262 MDReqID string Yes MDReqID value from MarketDataRequest
281 MDReqRejReason char Conditional Reject reason
58 Text string Conditional Reject text

Possible errors:

MDReqRejReason MDReqRejReason Name Text Description
6 UNSUPPORTED_MDUPDATETYPE - Unsupported MDUpdateType
4 UNSUPPORTED_SUBSCRIPTIONREQUESTTYPE - Unsupported SubscriptionRequestType
4 UNSUPPORTED_SUBSCRIPTIONREQUESTTYPE UNSUPPORTED_PARAMETERS Unsupported SubscriptionRequestType for given parameters
5 UNSUPPORTED_MARKETDEPTH - Unsupported MarketDepth
7 UNSUPPORTED_AGGREGATEDBOOK - Unsupported AggregatedBook
8 UNSUPPORTED_MDENTRYTYPE - Unsupported MDEntryType
0 UNKNOWN_SYMBOL - Unknown Symbol
1 DUPLICATE_MDREQID - Duplicate MDReqID
- - DUPLICATE_SYMBOL Duplicate Symbol
- - DUPLICATE_ENTRY_TYPE Duplicate MDEntryType
- - UNSUPPORTED_TRADES_COUNT Unsupported TradeCount
- - UNSUPPORTED_TIMESTAMP_FILTER Unsupported TradesSinceTimestamp
- - UNKNOWN_MDREQID Unknown MDReqID

Errors

BusinessMessageReject

The server responds with BusinessMessageReject if an unexpected internal server error occurs during the processing of any type of message from the client.

MsgType = j

Tag Name Type Required Description
372 RefMsgType string Yes MsgType of message that caused the processing error
45 RefSeqNum int Yes MsgSeqNum of message that caused processing error
380 BusinessRejectReason int Yes Reject reason. 4 (ApplicationNotAvailable) is returned