Skip to main content

FIX API

Note: This API can only be used with the SPOT Exchange.

General Information

FIX API order entry sessions

  • Endpoint is: tcp+tls://fix-oe.testnet.binance.vision:9000
  • Supports placing orders, canceling orders, and querying current limit usage.
  • Supports receiving all of the account's ExecutionReport<8> and List Status<N>.
  • Only API keys with FIX_API are allowed to connect.

FIX API Drop Copy sessions

  • Endpoint is: tcp+tls://fix-dc.testnet.binance.vision:9000
  • Supports receiving all of the account's ExecutionReport<8> and List Status<N>.
  • Only API keys with FIX_API or FIX_API_READ_ONLY are allowed to connect.

QuickFix schema file can be found here.

FIX connections require TLS encryption. Please either use native TCP+TLS connection or set up a local proxy such as stunnel to handle TLS encryption.

API Key Permissions

To access the FIX API order entry sessions, your API key must be configured with the FIX_API permission.

To access the FIX Drop Copy sessions, your API key must be configured with either FIX_API_READ_ONLY or FIX_API permission.

FIX API order entry and Drop Copy sessions only support Ed25519 keys.

You can setup and configure your API key permissions on Spot Test Network.

On message processing order

The MessageHandling (25035) field required in the initial Logon<A> message controls whether the messages may get reordered.

  • UNORDERED(1) should offer better performance, but there is a risk that messages may be processed in a different order.
  • SEQUENTIAL(2) guarantees that messages are processed according to their MsgSeqNum(34).

Response Mode

FIX API allows multiple concurrent sessions for a single account (see Connection Limits). By default, all sessions receive all of the account's successful ExecutionReport<8> and ListStatus<N> messages, including those in response to orders placed from other FIX sessions and via non-FIX APIs.

Use the ResponseMode (25036) field in the initial Logon<A> message to change this behavior.

  • EVERYTHING(1): The default mode; the connection receives all ExecutionReport<8> and ListStatus<N> messages, even those initiated from other sources.
  • ONLY_ACKS(2): Receives only ACKs for operations initiated by this connection. This mode reduces bandwidth and may offer a different performance profile.

Note: ExecutionReport<8> push messages may be sent out of order in relation to responses.

How to sign Logon<A> request

The Logon<A> message authenticates your connection to the FIX API. This must be the first message sent by the client.

  • The Username (553) field is required to contain the API key.
  • The RawData (96) field is required to contain a valid signature made with the API key.

The signature payload is a text string constructed by concatenating the values of the following fields in this exact order, separated by the SOH character:

  1. MsgType (35)
  2. SenderCompId (49)
  3. TargetCompId (56)
  4. MsgSeqNum (34)
  5. SendingTime (52)

Sign the payload using your private key. Encode the signature with base64. The resulting text string is the value of the RawData (96) field.

Here is a sample Python code implementing the signature algorithm:

import base64

from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey
from cryptography.hazmat.primitives.serialization import load_pem_private_key

def logon_raw_data(private_key: Ed25519PrivateKey,
sender_comp_id: str,
target_comp_id: str,
msg_seq_num: str,
sending_time: str):
"""
Computes the value of RawData (96) field in Logon<A> message.
"""
payload = chr(1).join([
'A',
sender_comp_id,
target_comp_id,
msg_seq_num,
sending_time,
])
signature = private_key.sign(payload.encode('ASCII'))
return base64.b64encode(signature).decode('ASCII')


with open('private_key.pem', 'rb') as f:
private_key = load_pem_private_key(data=f.read(),
password=None)

raw_data = logon_raw_data(private_key,
sender_comp_id='5JQmUOsm',
target_comp_id='SPOT',
msg_seq_num='1',
sending_time='20240612-08:52:21.613')

The values presented below can be used to validate the correctness of the signature computation implementation:

FieldValue
MsgType (35)A
SenderCompID (49)EXAMPLE
TargetCompID (56)SPOT
MsgSeqNum (34)1
SendingTime (52)20240627-11:17:25.223

The Ed25519 private key used in the example computation is shown below:

[!CAUTION] The following secret key is provided solely for illustrative purposes. Do not use this key in any real-world application as it is not secure and may compromise your cryptographic implementation. Always generate your own unique and secure keys for actual use.

-----BEGIN PRIVATE KEY-----
MC4CAQAwBQYDK2VwBCIEIIJEYWtGBrhACmb9Dvy+qa8WEf0lQOl1s4CLIAB9m89u
-----END PRIVATE KEY-----

Computed signature:

4MHXelVVcpkdwuLbl6n73HQUXUf1dse2PCgT1DYqW9w8AVZ1RACFGM+5UdlGPrQHrgtS3CvsRURC1oj73j8gCA==

Resulting Logon <A> message:

8=FIX.4.4|9=247|35=A|34=1|49=EXAMPLE|52=20240627-11:17:25.223|56=SPOT|95=88|96=4MHXelVVcpkdwuLbl6n73HQUXUf1dse2PCgT1DYqW9w8AVZ1RACFGM+5UdlGPrQHrgtS3CvsRURC1oj73j8gCA==|98=0|108=30|141=Y|553=sBRXrJx2DsOraMXOaUovEhgVRcjOvCtQwnWj8VxkOh1xqboS02SPGfKi2h8spZJb|25035=2|10=227|

Limits

Message Limits

  • Each connection has a limit on how many messages can be sent to the exchange.
  • The message limit does not count the messages sent in response to the client.
  • Breaching the message limit results in immediate Logout <5> and disconnection.
  • To understand current limits and usage, please send a LimitQuery<XLQ> message. A LimitResponse<XLR> message will be sent in response, containing information about Order Rate Limits and Message Limits.

Connection Limits

  • Each Account has a limit on how many TCP connections can be established at the same time.
  • The limit is reduced when the TCP connection is closed. If the reduction of connections is not immediate, please wait up to twice the value of HeartBtInt (108) for the change to take effect. For example, if the current value of HeartBtInt is 5, please wait up to 10 seconds.
  • Upon breaching the limit a Reject <3> will be sent containing information about the connection limit breach and the current limit.
  • The limit is 5 concurrent TCP connections per account for the order entry sessions.
  • The limit is 10 concurrent TCP connections per account for the Drop Copy sessions.

Unfilled Order Count

  • To understand how many orders you have placed within a certain time interval, please send a LimitQuery<XLQ> message. A LimitResponse<XLR> message will be sent in response, containing information about Unfilled Order Count and Message Limits.
  • Please note that if your orders are consistently filled by trades, you can continuously place orders on the API. For more information, please see Spot Unfilled Order Count Rules.
  • If you exceed the unfilled order count your message will be rejected, and information will be transferred back to you in a reject message specific to that endpoint.
  • The number of unfilled orders is tracked for each account.

Error Handling

Client messages that contain syntax errors, missing required fields, or refer to unknown symbols will be rejected by the server with a Reject <3> message.

If a valid message cannot be processed and is rejected, an appropriate reject response will be sent. Please refer to the individual message documentation for possible responses.

Please refer to the Text (58) and ErrorCode (25016) fields in responses for the reject reason.

The list of error codes can be found on the Error codes page.

Types

Only printable ASCII characters and SOH are supported.

TypeDescription
BOOLEANEnum: Y or N.
CHARSingle character.
INTSigned 64-bit integer.
LENGTHUnsigned 64-bit integer.
NUMINGROUPUnsigned 64-bit integer.
PRICEFixed-point number. Precision depends on the symbol definition.
QTYFixed-point number. Precision depends on the symbol definition.
SEQNUMUnsigned 64-bit integer.
STRINGSequence of printable ASCII characters.
UTCTIMESTAMPString representing datetime in UTC.

Supported UTCTIMESTAMP formats:

  • 20011217-09:30:47 - seconds
  • 20011217-09:30:47.123 - milliseconds
  • 20011217-09:30:47.123456 - microseconds (always used in messages from the exchange)

Client order ID fields must conform to the regex ^[a-zA-Z0-9-_]{1,36}$:

  • ClOrdID (11)
  • OrigClOrdID (41)
  • ClListID (25014)
  • OrigClListID (25015)
  • CancelClOrdID (25034)

Message Components

Note:

In example messages, the | character is used to represent SOH character:

8=FIX.4.4|9=113|35=A|34=1|49=SPOT|52=20240612-08:52:21.636837|56=5JQmUOsm|98=0|108=30|25037=4392a152-3481-4499-921a-6d42c50702e2|10=051|

Appears at the start of every message.

TagNameTypeRequiredDescription
8BeginStringSTRINGYAlways FIX.4.4.

Must be the first field the message.
9BodyLengthLENGTHYMessage length in bytes.

Must be the second field in the message.
35MsgTypeSTRINGYMust be the third field in the message.

Possible values:

0 - HEARTBEAT

1 - TEST_REQUEST

3 - REJECT

5 - LOGOUT

8 - EXECUTION_REPORT

9 - ORDER_CANCEL_REJECT

A - LOGON

D - NEW_ORDER_SINGLE

E - NEW_ORDER_LIST

F - ORDER_CANCEL_REQUEST

N - LIST_STATUS

q - ORDER_MASS_CANCEL_REQUEST

r - ORDER_MASS_CANCEL_REPORT

XCN - ORDER_CANCEL_REQUEST_AND_NEW_ORDER_SINGLE

XLQ - LIMIT_QUERY

XLR - LIMIT_RESPONSE
49SenderCompIDSTRINGYMust be unique across an account's active sessions.

Must obey regex: ^[a-zA-Z0-9-_]{1,8}$
56TargetCompIDSTRINGYA string identifying this TCP connection.

On messages from client required to be set to SPOT.

Must be unique across TCP connections.

Must conform to the regex: ^[a-zA-Z0-9-_]{1,8}$
34MsgSeqNumSEQNUMYInteger message sequence number.

Values that will cause a gap will be rejected.
52SendingTimeUTCTIMESTAMPYTime of message transmission (always expressed in UTC).
25000RecvWindowINTNNumber of milliseconds after SendingTime (52) the request is valid for.

Defaults to 5000 milliseconds in Logon<A> and has a max value of 60000 milliseconds.

Trailer

Appears at the end of every message.

TagNameTypeRequiredDescription
10CheckSumSTRINGYAlways three-character numeric string, calculated by summing the ASCII values of each preceding character in the message, including start-of-header (SOH) characters.

The resultant sum is divided by 256, with the remainder forming the CheckSum value.

To maintain a fixed length, the CheckSum field is right-justified and zero-padded as needed.

Administrative Messages

Heartbeat<0>

Sent by the server if there is no outgoing traffic during the heartbeat interval (HeartBtInt (108) in Logon<A>).

Sent by the client to indicate that the session is healthy.

Sent by the client or the server in response to a TestRequest<1> message.

TagNameTypeRequiredDescription
112TestReqIDSTRINGNWhen Heartbeat<35> is sent in response to TestRequest<1>, must mirror the value in TestRequest<1>.

TestRequest<1>

Sent by the server if there is no incoming traffic during the heartbeat interval (HeartBtInt (108) in Logon<A>).

Sent by the client to request a Heartbeat<0> response.

Note: If the client does not respond to TestRequest<1> with Heartbeat<0> with a correct TestReqID (112) within timeout, the connection will be dropped.

TagNameTypeRequiredDescription
112TestReqIDSTRINGYArbitrary string that must be included in the Heartbeat<0> response.

Reject<3>

Sent by the server in response to an invalid message that cannot be processed.

Sent by the server if a new connection cannot be accepted. Please refer to Connection Limits.

Please refer to the Text (58) and ErrorCode (25016) fields for the reject reason.

TagNameTypeRequiredDescription
45RefSeqNumINTNThe MsgSeqNum (34) of the rejected message that caused issuance of this Reject<3>.
371RefTagIDINTNWhen present, identifies the field that directly caused the issuance of this Reject<3> message.
372RefMsgTypeSTRINGNThe MsgType (35) of the rejected message that caused issuance of this Reject<3>.
373SessionRejectReasonINTNA reason for the reject, can be one of the values below.

Usually accompanied by additional Text description

Possible values:

0- INVALID_TAG_NUMBER

1 - REQUIRED_TAG_MISSING

2 - TAG_NOT_DEFINED_FOR_THIS_MESSAGE_TYPE

3 - UNDEFINED_TAG

5 - VALUE_IS_INCORRECT

6 - INCORRECT_DATA_FORMAT_FOR_VALUE

8 - SIGNATURE_PROBLEM

10 - SENDINGTIME_ACCURACY_PROBLEM

12 - XML_VALIDATION_ERROR

13 - TAG_APPEARS_MORE_THAN_ONCE

14 - TAG_SPECIFIED_OUT_OF_REQUIRED_ORDER

15 - REPEATING_GROUP_FIELDS_OUT_OF_ORDER

16 - INCORRECT_NUMINGROUP_COUNT_FOR_REPEATING_GROUP

99 - OTHER
25016ErrorCodeINTNAPI error code (see Error Codes).
58TextSTRINGNHuman-readable error message.

Logon<A>

Sent by the client to authenticate the connection. Logon<A> must be the first message sent by the client.

Sent by the server in response to a successful logon.

Note: Logon<A> can only be sent once for the entirety of the session.

Logon Request

TagNameTypeRequiredDescription
98EncryptMethodINTYRequired to be 0.
108HeartBtIntINTYRequired to be within range [5, 60]. Heartbeat interval in seconds.
95RawDataLengthLENGTHYLength of the RawData (96) field that comes strictly after this field.
96RawDataDATAYSignature. How to sign Logon<A> request.
141ResetSeqNumFlagBOOLEANYRequired to be Y.
553UsernameSTRINGYAPI key. Only Ed25519 API keys are supported.
25035MessageHandlingINTYPossible values:

1 - UNORDERED

2 - SEQUENTIAL

Please refer to On message order processing for more information.
25036ResponseModeINTNPlease refer to Response Mode.
9406DropCopyFlagBOOLEANNMust be set to 'Y' when logging into Drop Copy sessions.

Sample Message:

8=FIX.4.4|9=248|35=A|34=1|49=5JQmUOsm|52=20240612-08:52:21.613|56=SPOT|95=88|96=KhJLbZqADWknfTAcp0ZjyNz36Kxa4ffvpNf9nTIc+K5l35h+vA1vzDRvLAEQckyl6VDOwJ53NOBnmmRYxQvQBQ==|98=0|108=30|141=Y|553=W5rcOD30c0gT4jHK8oX5d5NbzWoa0k4SFVoTHIFNJVZ3NuRpYb6ZyJznj8THyx5d|25035=1|10=000|

Logon Response

TagNameTypeRequiredDescription
98EncryptMethodINTYAlways 0.
108HeartBtIntINTYMirrors value from the Logon request.
25037UUIDSTRINGYUUID of the FIX API serving the requests.

Sample Message:

8=FIX.4.4|9=113|35=A|34=1|49=SPOT|52=20240612-08:52:21.636837|56=5JQmUOsm|98=0|108=30|25037=4392a152-3481-4499-921a-6d42c50702e2|10=051|

Logout<5>

Sent to initiate the process of closing the connection, and also when responding to Logout.

TagNameTypeRequiredDescription
58TextSTRINGN

Sample Message

Logout Request

8=FIX.4.4|9=55|35=5|34=3|49=GhQHzrLR|52=20240611-09:44:25.543|56=SPOT|10=249|

Logout Response

8=FIX.4.4|9=84|35=5|34=4|49=SPOT|52=20240611-09:44:25.544001|56=GhQHzrLR|58=Logout acknowledgment.|10=212|

Application Messages

Order Entry Messages

NewOrderSingle<D>

Sent by the client to submit a new order for execution.

Please refer to Supported Order Types for supported field combinations.

Note: Many fields become required based on the order type. Please refer to Supported Order Types.

TagNameTypeRequiredDescription
11ClOrdIDSTRINGYClOrdID to be assigned to the order.
38OrderQtyQTYNQuantity of the order
40OrdTypeCHARYSee the table to understand supported order types and the required fields to use them.

Possible values:

1 - MARKET

2 - LIMIT

3 - STOP

4 - STOP_LIMIT
18ExecInstCHARNPossible values:

6 - PARTICIPATE_DONT_INITIATE
44PricePRICENPrice of the order
54SideCHARYSide of the order.

Possible values:

1 - BUY

2 - SELL
55SymbolSTRINGYSymbol to place the order on.
59TimeInForceCHARNPossible values:

1 - GOOD_TILL_CANCEL

3 - IMMEDIATE_OR_CANCEL

4 - FILL_OR_KILL
111MaxFloorQTYNUsed for iceberg orders, this specifies the visible quantity of the order on the book.
152CashOrderQtyQTYNQuantity of the order specified in the quote asset units, for reverse market orders.
847TargetStrategyINTN
7940StrategyIDINTNThe value cannot be less than 1000000.
25001SelfTradePreventionModeCHARNPossible values:

1 - NONE

2 - EXPIRE_TAKER

3 - EXPIRE_MAKER

4 - EXPIRE_BOTH
1100TriggerTypeCHARNPossible values: 4 - PRICE_MOVEMENT
1101TriggerActionCHARNPossible values:

1 - ACTIVATE
1102TriggerPricePRICENActivation price for contingent orders. See table
1107TriggerPriceTypeCHARNPossible values:

2 - LAST_TRADE
1109TriggerPriceDirectionCHARNUsed to differentiate between StopLoss and TakeProfit orders. See table.

Possible values:

U - TRIGGER_IF_THE_PRICE_OF_THE_SPECIFIED_TYPE_GOES_UP_TO_OR_THROUGH_THE_SPECIFIED_TRIGGER_PRICE

D - TRIGGER_IF_THE_PRICE_OF_THE_SPECIFIED_TYPE_GOES_DOWN_TO_OR_THROUGH_THE_SPECIFIED_TRIGGER_PRICE
25009TriggerTrailingDeltaBipsINTNProvide to create trailing orders.
25032SORBOOLEANNWhether to activate SOR for this order.

Sample Message:

8=FIX.4.4|9=114|35=D|34=2|49=qNXO12fH|52=20240611-09:01:46.228|56=SPOT|11=1718096506197867067|38=5|40=2|44=10|54=1|55=LTCBNB|59=4|10=016|

Response:

Supported Order Types
Order nameBinance OrderTypeSiderequired field valuesrequired fields with user values
Market orderMARKETBUY or SELL40=1|
Limit orderLIMITBUY or SELL40=2|
Limit maker orderLIMIT_MAKERBUY or SELL40=2|18=6|
Buy stop loss orderSTOP_LOSSBUY40=3|1100=4|1101=1|1107=2|1109=U|1102
Buy trailing stop loss orderSTOP_LOSSBUY40=3|1100=4|1101=1|1107=2|1109=U|1102,1109
Buy stop loss limit orderSTOP_LOSS_LIMITBUY40=4|1100=4|1101=1|1107=2|1109=U|1102
Buy trailing stop loss limit orderSTOP_LOSS_LIMITBUY40=4|1100=4|1101=1|1107=2|1109=U|1102,1109
Sell stop loss orderSTOP_LOSSSELL40=3|1100=4|1101=1|1107=2|1109=D|1102
Sell trailing stop loss orderSTOP_LOSSSELL40=3|1100=4|1101=1|1107=2|1109=D|1102,1109
Sell stop loss limit orderSTOP_LOSS_LIMITSELL40=4|1100=4|1101=1|1107=2|1109=D|1102
Sell trailing stop loss limit orderSTOP_LOSS_LIMITSELL40=4|1100=4|1101=1|1107=2|1109=D|1102,1109
Buy take profit orderTAKE_PROFITBUY40=3|1100=4|1101=1|1107=2|1109=D|1102
Buy trailing take profit orderTAKE_PROFITBUY40=3|1100=4|1101=1|1107=2|1109=D|1102,1109
Buy trailing take profit orderTAKE_PROFITBUY40=3|1100=4|1101=1|1107=2|1109
Buy stop take profit orderTAKE_PROFIT_LIMITBUY40=4|1100=4|1101=1|1107=2|1109=D|1102
Buy trailing take profit limit orderTAKE_PROFIT_LIMITBUY40=4|1100=4|1101=1|1107=2|1109=D|1102,1109
Buy trailing take profit limit orderTAKE_PROFIT_LIMITBUY40=4|1100=4|1101=1|1107=2|1109
Sell take profit orderTAKE_PROFITSELL40=3|1100=4|1101=1|1107=2|1109=U|1102
Sell trailing take profit orderTAKE_PROFITSELL40=3|1100=4|1101=1|1107=2|1109=U|1102,1109
Sell trailing take profit orderTAKE_PROFITSELL40=3|1100=4|1101=1|1107=2|1109
Sell take profit limit orderTAKE_PROFIT_LIMITSELL40=4|1100=4|1101=1|1107=2|1109=U|1102
Sell trailing take profit limit orderTAKE_PROFIT_LIMITSELL40=4|1100=4|1101=1|1107=2|1109=U|1102,1109
Sell trailing take profit limit orderTAKE_PROFIT_LIMITSELL40=4|1100=4|1101=1|1107=2|1109

Required fields based on Binance OrderType:

Binance OrderTypeAdditional mandatory parametersAdditional Information
LIMIT38, 44, 59
MARKET38 OR 152MARKET orders using the OrderQty (38) field specifies the amount of the base asset the user wants to buy or sell at the market price.
E.g. MARKET order on BTCUSDT will specify how much BTC the user is buying or selling.

MARKET orders using quoteOrderQty specifies the amount the user wants to spend (when buying) or receive (when selling) the quote asset; the correct quantity will be determined based on the market liquidity and quoteOrderQty.
E.g. Using the symbol BTCUSDT:
BUY side, the order will buy as many BTC as quoteOrderQty USDT can.
SELL side, the order will sell as much BTC needed to receive CashOrderQty (152) USDT.
STOP_LOSS38, 1102 or 25009This will execute a MARKET order when the conditions are met. (e.g. TriggerPrice (1102) is met or TriggerTrailingDeltaBips (25009) is activated)
STOP_LOSS_LIMIT38, 44, 59, 1102 or 25009
TAKE_PROFIT38, 1102 or 25009This will execute a MARKET order when the conditions are met. (e.g. TriggerPrice (1102) is met or TriggerTrailingDeltaBips (25009) is activated)
TAKE_PROFIT_LIMIT38, 44, 59, 1102 or 25009
LIMIT_MAKER38, 44This is a LIMIT order that will be rejected if the order immediately matches and trades as a taker.
This is also known as a POST-ONLY order.

ExecutionReport<8>

Sent by the server whenever an order state changes.

Note: By default, ExecutionReport<8> is sent for all orders of an account, including those submitted in different connections. Please see Response Mode for other behavior options.

TagNameTypeRequiredDescription
17ExecIDSTRINGNOmitted on rejected orders.
11ClOrdIDSTRINGNClOrdID of the list as assigned on the request.
41OrigClOrdIDSTRINGNOriginal ClOrdID of the order.
37OrderIDINTNAssigned by exchange.
38OrderQtyQTYNQuantity of the order.
40OrdTypeCHARYPossible values:

1 - MARKET

2 - LIMIT

3 - STOP_LOSS

4 - STOP_LIMIT
54SideCHARYPossible values:

1 - BUY

2 - SELL
55SymbolSTRINGYSymbol of the order.
18ExecInstCHARNPossible values:

6 - PARTICIPATE_DONT_INITIATE
44PricePRICENPrice of the order.
59TimeInForceCHARNPossible values:

1 - GOOD_TILL_CANCEL

3 - IMMEDIATE_OR_CANCEL

4 - FILL_OR_KILL
60TransactTimeUTCTIMESTAMPNTimestamp when this event occurred.
25018OrderCreationTimeINTN
111MaxFloorQTYNAppears on iceberg orders.
66ListIDSTRINGNAppears on list orders.
152CashOrderQtyQTYNOrderQty specified in the quote asset units.
847TargetStrategyINTNTargetStrategy (847) from the order placement request.
7940StrategyIDINTNStrategyID (7940) from the order placement request.
25001SelfTradePreventionModeCHARNPossible values:

1 - NONE

2 - EXPIRE_TAKER

3 - EXPIRE_MAKER

4 - EXPIRE_BOTH
150ExecTypeCHARYNote: Field PreventedMatchID(25024) will be present if order has expired due to SelfTradePreventionMode(25013)

Possible values:

0 - NEW

4 - CANCELED

5 - REPLACED

8 - REJECTED

F - TRADE

C - EXPIRED
14CumQtyQTYYTotal number of base asset traded on this order.
151LeavesQtyQTYNQuantity remaining for further execution.
25017CumQuoteQtyQTYNTotal number of quote asset traded on this order.
1057AggressorIndicatorBOOLEANNAppears on trade execution reports.

Indicates whether the order was a taker in the trade.
1003TradeIDSTRINGNAppears on trade execution reports.
31LastPxPRICENThe price of the last execution.
32LastQtyQTYYThe quantity of the last execution.
39OrdStatusCHARYPossible values:

0 - NEW

1 - PARTIALLY_FILLED

2 - FILLED

4 - CANCELED 6 - PENDING_CANCEL

8 - REJECTED

A - PENDING_NEW

C - EXPIRED

Note that FIX does not support EXPIRED_IN_MATCH status, and get converted to EXPIRED in FIX.
70AllocIDINTNAllocation ID as assigned by the exchange.
574MatchTypeINTNPossible values:

1 - ONE_PARTY_TRADE_REPORT

4 - AUTO_MATCH
25021WorkingFloorINTNAppears for orders that potentially have allocations.
25022TrailingTimeUTCTIMESTAMPNAppears only for trailing stop orders.
636WorkingIndicatorBOOLEANNSet to Y when this order enters order book.
25023WorkingTimeUTCTIMESTAMPNWhen this order appeared on the order book.
25024PreventedMatchIDINTNAppears only for orders that expired due to STP.
25025PreventedExecutionPricePRICENAppears only for orders that expired due to STP.
25026PreventedExecutionQtyQTYNAppears only for orders that expired due to STP.
25027TradeGroupIDINTNAppears only for orders that expired due to STP.
25028CounterSymbolSTRINGNAppears only for orders that expired due to STP.
25029CounterOrderIDINTNAppears only for orders that expired due to STP.
25030PreventedQtyQTYNAppears only for orders that expired due to STP.
25031LastPreventedQtyQTYNAppears only for orders that expired due to STP.
25032SORBOOLEANNAppears for orders that used SOR.
25016ErrorCodeINTNAPI error code (see Error Codes).
58TextSTRINGNHuman-readable error message.
136NoMiscFeesNUMINGROUPNNumber of repeating groups of miscellaneous fees.
=>137MiscFeeAmtQTYYAmount of fees denominated in MiscFeeCurr(138) asset
=>138MiscFeeCurrSTRINGYCurrency of miscellaneous fee.
=>139MiscFeeTypeINTYPossible values:

4 - EXCHANGE_FEES
1100TriggerTypeCHARNPossible values:

4 - PRICE_MOVEMENT
1101TriggerActionCHARNPossible values:

1 - ACTIVATE
1102TriggerPricePRICENActivation price for contingent orders. See table
1107TriggerPriceTypeCHARNPossible values:

2 - LAST_TRADE
1109TriggerPriceDirectionCHARNUsed to differentiate between StopLoss and TakeProfit orders. See table.

Possible values:

U - TRIGGER_IF_THE_PRICE_OF_THE_SPECIFIED_TYPE_GOES_UP_TO_OR_THROUGH_THE_SPECIFIED_TRIGGER_PRICE

D - TRIGGER_IF_THE_PRICE_OF_THE_SPECIFIED_TYPE_GOES_DOWN_TO_OR_THROUGH_THE_SPECIFIED_TRIGGER_PRICE
25009TriggerTrailingDeltaBipsINTNAppears only for trailing stop orders.

Sample Message:

8=FIX.4.4|9=330|35=8|34=2|49=SPOT|52=20240611-09:01:46.228950|56=qNXO12fH|11=1718096506197867067|14=0.00000000|17=144|32=0.00000000|37=76|38=5.00000000|39=0|40=2|44=10.00000000|54=1|55=LTCBNB|59=4|60=20240611-09:01:46.228000|150=0|151=5.00000000|636=Y|1057=Y|25001=1|25017=0.00000000|25018=20240611-09:01:46.228000|25023=20240611-09:01:46.228000|10=095|

OrderCancelRequest<F>

Sent by the client to cancel an order or an order list.

  • To cancel an order either OrderID (11) or OrigClOrdID (41) are required.
  • To cancel an order list either ListID (66) or OrigClListID (25015) are required.

If the canceled order is part of an order list, the entire list will be canceled.

TagNameTypeRequiredDescription
11ClOrdIDSTRINGYClOrdID of this request.
41OrigClOrdIDSTRINGNClOrdID (11) of the order to cancel.
37OrderIDINTNOrderID (37) of the order to cancel.
25015OrigClListIDSTRINGNClListID (25014) of the order list to cancel.
66ListIDSTRINGNListID (66) of the order list to cancel.
55SymbolSTRINGYSymbol on which to cancel order.
25002CancelRestrictionsINTNRestrictions on the cancel. Possible values:

1 - ONLY_NEW

2 - ONLY_PARTIALLY_FILLED

Sample Message:

8=FIX.4.4|9=93|35=F|34=2|49=ieBwvCKy|52=20240613-01:11:13.784|56=SPOT|11=1718241073695674483|37=2|55=LTCBNB|10=210|

Response:

OrderCancelReject<9>

Sent by the server when OrderCancelRequest<F> has failed.

TagNameTypeRequiredDescription
11ClOrdIDSTRINGYClOrdID (11) of the cancel request.
41OrigClOrdIDSTRINGNOrigClOrdID (41) from the cancel request.
37OrderIDINTNOrderID (37) from the cancel request.
25015OrigClListIDSTRINGNOrigClListID (25015) from the cancel request.
66ListIDSTRINGNListID (66) from the cancel request.
55SymbolSTRINGYSymbol (55) from the cancel request.
25002CancelRestrictionsINTNCancelRestrictions (25002) from the cancel request.
434CxlRejResponseToCHARYType of request that this OrderCancelReject<9> is in response to.

Possible values:

1 - ORDER_CANCEL_REQUEST
25016ErrorCodeINTYAPI error code (see Error Codes).
58TextSTRINGYHuman-readable error message.

Sample Message:

8=FIX.4.4|9=137|35=9|34=2|49=SPOT|52=20240613-01:12:41.320869|56=OlZb8ht8|11=1718241161272843932|37=2|55=LTCBNB|58=Unknown order sent.|434=1|25016=-1013|10=087|

OrderCancelRequestAndNewOrderSingle<XCN>

Sent by the client to cancel an order and submit a new one for execution.

Please refer to Supported Order Types for supported field combinations when describing the new order.

Note: Cancel is always processed first. Then immediately after that the new order is submitted.

TagNameTypeRequiredDescription
25033OrderCancelRequestAndNewOrderSingleModeINTYWhat action should be taken if cancel fails.

Possible values:

1 - STOP_ON_FAILURE

2 - ALLOW_FAILURE
25038OrderRateLimitExceededModeINTNWhat should be done to the cancellation request if you exceed the unfilled order rate limit.

Possible values: 1 - DO_NOTHING

2 - CANCEL_ONLY
37OrderIDINTNOrderID of the order to cancel.
25034CancelClOrdIDSTRINGNClOrdID of the cancel.
41OrigClOrdIDSTRINGNClOrdID of the order to cancel.
11ClOrdIDSTRINGYClOrdID to be assigned to the new order.
25002CancelRestrictionsINTNRestrictions on the cancel. Possible values:

1 - ONLY_NEW

2 - ONLY_PARTIALLY_FILLED
38OrderQtyQTYNQuantity of the new order
40OrdTypeCHARYSee the table to understand supported order types and the required fields to use them.

Possible values:

1 - MARKET

2 - LIMIT

3 - STOP

4 - STOP_LIMIT
18ExecInstCHARNPossible values:

6 - PARTICIPATE_DONT_INITIATE
44PricePRICENPrice of the new order
54SideCHARYSide of the order.

Possible values:

1 - BUY

2 - SELL
55SymbolSTRINGYSymbol to cancel and place the order on.
59TimeInForceCHARNPossible values:

1 - GOOD_TILL_CANCEL

3 - IMMEDIATE_OR_CANCEL

4 - FILL_OR_KILL
111MaxFloorQTYNUsed for iceberg orders, this specifies the visible quantity of the order on the book.
152CashOrderQtyQTYNQuantity of the order specified in the quote asset units, for reverse market orders.
847TargetStrategyINTN
7940StrategyIDINTNThe value cannot be less than 1000000.
25001SelfTradePreventionModeCHARNPossible values:

1 - NONE

2 - EXPIRE_TAKER

3 - EXPIRE_MAKER

4 - EXPIRE_BOTH
1100TriggerTypeCHARNPossible values: 4 - PRICE_MOVEMENT
1101TriggerActionCHARNPossible values:

1 - ACTIVATE
1102TriggerPricePRICENActivation price for contingent orders. See table
1107TriggerPriceTypeCHARNPossible values:

2 - LAST_TRADE
1109TriggerPriceDirectionCHARNUsed to differentiate between StopLoss and TakeProfit orders. See table.

Possible values:

U - TRIGGER_IF_THE_PRICE_OF_THE_SPECIFIED_TYPE_GOES_UP_TO_OR_THROUGH_THE_SPECIFIED_TRIGGER_PRICE

D - TRIGGER_IF_THE_PRICE_OF_THE_SPECIFIED_TYPE_GOES_DOWN_TO_OR_THROUGH_THE_SPECIFIED_TRIGGER_PRICE
25009TriggerTrailingDeltaBipsINTNProvide to create trailing orders.

Sample Message:

8=FIX.4.4|9=160|35=XCN|34=2|49=JS8iiXK6|52=20240613-02:31:53.753|56=SPOT|11=1718245913721036458|37=8|38=5|40=2|44=4|54=1|55=LTCBNB|59=1|111=1|25033=1|25034=1718245913721036819|10=229|

Response:

OrderMassCancelRequest<q>

Sent by the client to cancel all open orders on a symbol.

Note: All orders of the account will be canceled, including those placed in different connections.

TagNameTypeRequiredDescription
11ClOrdIDSTRINGYClOrdId of this mass cancel request.
55SymbolSTRINGYSymbol on which to cancel orders.
530MassCancelRequestTypeCHARYPossible values:

1 - CANCEL_SYMBOL_ORDERS

Sample Message:

8=FIX.4.4|9=94|35=q|34=2|49=dpYPesqv|52=20240613-01:24:36.948|56=SPOT|11=1718241876901971671|55=ABCDEF|530=1|10=110|

Responses:

OrderMassCancelReport<r>

Sent by the server in response to OrderMassCancelRequest<q>.

TagNameTypeRequiredDescription
55SymbolSTRINGYSymbol (55) from the cancel request.
11ClOrdIDSTRINGYClOrdID (11) of the cancel request.
530MassCancelRequestTypeCHARYMassCancelRequestType (530) from the cancel request.
531MassCancelResponseCHARYPossible values:

0 - CANCEL_REQUEST_REJECTED

1 - CANCEL_SYMBOL_ORDERS
532MassCancelRejectReasonINTNPossible values:

99 - OTHER
533TotalAffectedOrdersINTNHow many orders were canceled.
25016ErrorCodeINTNAPI error code (see Error Codes).
58TextSTRINGNHuman-readable error message.

Sample Message:

8=FIX.4.4|9=109|35=r|34=2|49=SPOT|52=20240613-01:24:36.949763|56=dpYPesqv|11=1718241876901971671|55=LTCBNB|530=1|531=1|533=5|10=083|

NewOrderList<E>

Sent by the client to submit a list of orders for execution.

Orders in an order list are contingent on one another. Please refer to Supported Order List Types for supported order types and triggering instructions.

TagNameTypeRequiredDescription
25014ClListIDSTRINGYClListID to be assigned to the order list.
1385ContingencyTypeINTNPossible values:

1 - ONE_CANCELS_THE_OTHER

2 - ONE_TRIGGERS_THE_OTHER
73NoOrdersNUMINGROUPNThe length of the array for Orders. Only 2 or 3 are allowed.
=>11ClOrdIDSTRINGYClOrdID to be assigned to the order
=>38OrderQtyQTYNQuantity of the order
=>40OrdTypeCHARYSee the table to understand supported order types and the required fields to use them.

Possible values:

1 - MARKET

2 - LIMIT

3 - STOP

4 - STOP_LIMIT
=>18ExecInstCHARNPossible values:

6 - PARTICIPATE_DONT_INITIATE
=>44PricePRICENPrice of the order
=>54SideCHARYSide of the order. Possible values:

1 - BUY

2 - SELL
=>55SymbolSTRINGYSymbol to place the order on.
=>59TimeInForceCHARNPossible values:

1 - GOOD_TILL_CANCEL

3 - IMMEDIATE_OR_CANCEL

4 - FILL_OR_KILL
=>111MaxFloorQTYNUsed for iceberg orders, this specifies the visible quantity of the order on the book.
=>152CashOrderQtyQTYNQuantity of the order specified in the quote asset units, for reverse market orders.
=>847TargetStrategyINTN
=>7940StrategyIDINTNThe value cannot be less than 1000000.
=>25001SelfTradePreventionModeCHARNPossible values:

1 - NONE

2 - EXPIRE_TAKER

3 - EXPIRE_MAKER

4 - EXPIRE_BOTH
=>1100TriggerTypeCHARNPossible values:

4 - PRICE_MOVEMENT
=>1101TriggerActionCHARNPossible values:

1 - ACTIVATE
=>1102TriggerPricePRICENActivation price for contingent orders. See table
=>1107TriggerPriceTypeCHARNPossible values:

2 - LAST_TRADE
=>1109TriggerPriceDirectionCHARNUsed to differentiate between StopLoss and TakeProfit orders. See table.

Possible values:

U - TRIGGER_IF_THE_PRICE_OF_THE_SPECIFIED_TYPE_GOES_UP_TO_OR_THROUGH_THE_SPECIFIED_TRIGGER_PRICE

D - TRIGGER_IF_THE_PRICE_OF_THE_SPECIFIED_TYPE_GOES_DOWN_TO_OR_THROUGH_THE_SPECIFIED_TRIGGER_PRICE
=>25009TriggerTrailingDeltaBipsINTNProvide to create trailing orders.
=>25010NoListTriggeringInstructionsNUMINGROUPNThe length of the array for ListTriggeringInstructions.
==>25011ListTriggerTypeCHARNWhat needs to happen to the order pointed to by ListTriggerTriggerIndex in order for the action to take place.

Possible values:

1 - ACTIVATED

2 - PARTIALLY_FILLED

3 - FILLED
==>25012ListTriggerTriggerIndexINTNIndex of the trigger order: 0-indexed.
==>25013ListTriggerActionCHARNAction to take place on this order after the ListTriggerType has been fulfilled.

Possible values:

1 - RELEASE

2 - CANCEL

Sample Message:

8=FIX.4.4|9=236|35=E|34=2|49=Eg13pOvN|52=20240607-02:19:07.836|56=SPOT|73=2|11=w1717726747805308656|55=LTCBNB|54=2|38=1|40=2|44=0.25|59=1|11=p1717726747805308656|55=LTCBNB|54=2|38=1|40=1|25010=1|25011=3|25012=0|25013=1|1385=2|25014=1717726747805308656|10=171|

Supported Order List Types

Note: Orders must be specified in the sequence indicated in the Order Names column in the table below.

Order list nameContingency Type (1385)Order namesOrder sidesAllowed Binance order typesList Triggering Instructions
OCO11. below order



2. above order
1. below order=SELL



2. above order=SELL
1. below order=STOP_LOSS or STOP_LOSS_LIMIT



2. above order=LIMIT_MAKER
1. below order:

25010=1|25011=2|25012=1|25013=2|



2. above order:

25010=1|25011=1|25012=0|25013=2|
OCO11. below order



2. above order
1. below order=BUY



2. above order=BUY
1. below order=LIMIT_MAKER



2. above order=STOP_LOSS or STOP_LOSS_LIMIT
1. below order:

25010=1|25011=1|25012=1|25013=2|



2. above order:

25010=1|25011=2|25012=0|25013=2|
OTO11. working order



2. pending order
1. working order=SELL or BUY



2. pending order=SELL or BUY
1. working order=LIMIT or LIMIT_MAKER



2. pending order=ANY
1. working order:

NONE



2. pending order:

25010=1|25011=3|25012=0|25013=1|
OTOCO21. working order



2. pending below order



3. pending above order
1. working order=SELL or BUY



2. pending below order=SELL



3. pending above order=SELL
1. working order=LIMIT or LIMIT_MAKER



2. pending below order=STOP_LOSS or STOP_LOSS_LIMIT



3. pending above order=LIMIT_MAKER
1. working order:

NONE



2. pending below order:

25010=2|25011=2|25012=0|25013=2|25011=2|25012=2|25013=2|



3. pending above order:

25010=2|25011=2|25012=0|25013=2|25011=1|25012=1|25013=2|
OTOCO21. working order



2. pending below order



3. pending above order
1. working order=SELL or BUY



2. pending below order=BUY



3. pending above order=BUY
1. working order=LIMIT or LIMIT_MAKER



2. pending below order=LIMIT_MAKER



3. pending above order=STOP_LOSS or STOP_LOSS_LIMIT
1. working order:

NONE



2. pending below order:

25010=2|25011=2|25012=0|25013=2|25011=1|25012=2|25013=2|



3. pending above order:

25010=2|25011=2|25012=0|25013=2|25011=2|25012=1|25013=2|

ListStatus<N>

Sent by the server whenever an order list state changes.

Note: By default, ListStatus<N> is sent for all order lists of an account, including those submitted in different connections. Please see Response Mode for other behavior options.

TagNameTypeRequiredDescription
55SymbolSTRINGYSymbol of the order list.
66ListIDSTRINGNListID of the list as assigned by the exchange.
25014ClListIDSTRINGNClListID of the list as assigned on the request.
25015OrigClListIDSTRINGN
1385ContingencyTypeINTNPossible values:

1 - ONE_CANCELS_THE_OTHER

2 - ONE_TRIGGERS_THE_OTHER
429ListStatusTypeINTYPossible values:

2 - RESPONSE

4 - EXEC_STARTED

5 - ALL_DONE
431ListOrderStatusINTYPossible values:

3 - EXECUTING

6 - ALL_DONE

7 - REJECT
1386ListRejectReasonINTNPossible values:

99 - OTHER
103OrdRejReasonINTNPossible values:

99 - OTHER
60TransactTimeUTCTIMESTAMPNTimestamp when this event occurred.
25016ErrorCodeINTNAPI error code (see Error Codes).
58TextSTRINGNHuman-readable error message.
73NoOrdersNUMINGROUPNThe length of the array for Orders.
=>55SymbolSTRINGYSymbol of the order.
=>37OrderIDINTYOrderID of the order as assigned by the exchange.
=>11ClOrdIDSTRINGYClOrdID of the order as assigned on the request.
=>25010NoListTriggeringInstructionsNUMINGROUPNThe length of the array for ListTriggeringInstructions.
==>25011ListTriggerTypeCHARNPossible values:

1 - ACTIVATED

2 - PARTIALLY_FILLED

3 - FILLED
==>25012ListTriggerTriggerIndexINTN
==>25013ListTriggerActionCHARNPossible values:

1 - RELEASE

2 - CANCEL

Sample Message:

8=FIX.4.4|9=290|35=N|34=2|49=SPOT|52=20240607-02:19:07.837191|56=Eg13pOvN|55=ABCDEF|60=20240607-02:19:07.836000|66=25|73=2|55=LTCBNB|37=52|11=w1717726747805308656|55=ABCDEF|37=53|11=p1717726747805308656|25010=1|25011=3|25012=0|25013=1|429=4|431=3|1385=2|25014=1717726747805308656|25015=1717726747805308656|10=019|

Limit Messages

LimitQuery<XLQ>

Sent by the client to query current limits.

TagNameTypeRequiredDescription
6136ReqIDSTRINGYID of this request

Sample Message:

8=FIX.4.4|9=82|35=XLQ|34=2|49=7buKHZxZ|52=20240614-05:35:35.357|56=SPOT|6136=1718343335357229749|10=170|

LimitResponse<XLR>

Sent by the server in response to LimitQuery<XLQ>.

TagNameTypeRequiredDescription
6136ReqIDSTRINGYReqID from the request.
25003NoLimitIndicatorsNUMINGROUPYThe length of the array for LimitIndicators.
=>25004LimitTypeCHARYPossible values:

1 - ORDER_LIMIT

2 - MESSAGE_LIMIT
=>25005LimitCountINTYThe current use of this limit.
=>25006LimitMaxINTYThe maximum allowed for this limit.
=>25007LimitResetIntervalINTNHow often the limit resets.
=>25008LimitResetIntervalResolutionCHARNTime unit of LimitResetInterval. Possible values:

s - SECOND

m - MINUTE

h - HOUR

d - DAY

Sample Message:

8=FIX.4.4|9=225|35=XLR|34=2|49=SPOT|52=20240614-05:42:42.724057|56=uGnG0ef8|6136=1718343762723730315|25003=3|25004=2|25005=1|25006=1000|25007=10|25008=s|25004=1|25005=0|25006=200|25007=10|25008=s|25004=1|25005=0|25006=200000|25007=1|25008=d|10=241|