FIX Order Entry
Use the FIX Order Entry session to submit, manage, and cancel orders.
For assistance or information regarding implementation of the FIX API, please contact [email protected]
sFOX uses FIX 4.4
Before logging onto a FIX session, you must establish a secure connection to the FIX gateway
Environment | Value | SSL Required |
---|---|---|
Production | fix.sfox.com:5001 | Y |
Sandbox | Y |
If your FIX implementation does not support establishing a native TCP SSL connection with SNI support, set up a local proxy such as stunnel to establish a secure connection to the FIX gateway. Refer to our QuickFIX Integration Guide for details and examples
A standard header is required at the start of each message
SenderCompID
s must be provided by sFOX. Contact [email protected] to be provided with a SenderCompID
for your session.Tag | Name | Description |
---|---|---|
108 | HeartBtInt | Must be <= 30 (seconds) |
8 | BeginString | Must be FIX.4.4 |
49 | SenderCompID | Value provided by sFOX. Must be unique per session |
56 | TargetCompID | Must be SFOX |
| StartDay | Sunday |
| EndDay | Sunday |
| StartTime | 00:00:01 |
| EndTime | 00:00:00 |
| TimeZone | Must be ETC or UTC |
Sent by the client to initiate a session and by the server as an acknowledgement.
Only one session may exist per SenderCompId. Attempting to logon using a SenderCompId of an active session will result in an error.
Tag | Name | Required | Description |
---|---|---|---|
554 | Password | Y | |
20040 | CancelOnDisconnect | N | String Field: Optionally cancel all orders on disconnect (logout or otherwise). Note: this cancels orders on the entire account.
Y - Cancel on Disconnect |
QuickFIX: If you are implementing the FIX protocol using QuickFIX please refer to our QuickFIX Integration Guide
Tag | Name | Required | Description | Default |
---|---|---|---|---|
11 | ClOrdID | Y | Client provided order ID, must be unique per-account | |
55 | Symbol | Y | Trading pair in lowercase basequote format i.e. btcusd | |
54 | Side | Y | 1 : Buy2 : Sell | |
40 | OrdType | Y | 1 : Market2 : Limit3 : Stopor one of our Algorithm IDs | |
44 | Price | Y (excluding Market orders) | Limit Price | |
38 | OrderQty | Y | For limit orders, this is the quantity to trade in the base currency. For Market Sell orders, this is the amount in the base currency. | |
152 | CashOrderQty | Y (OrdType = 1 AND Side = 1 or OrdType = 3 (stop) AND Side = 1 (buy) | For market buy orders, this is the amount to spend in the quote currency | |
21 | HandleInst (custom usage) | N | How to execute the order:
1 : Smart
2 : NetPrice (default)
3 : Enterprise | 2 |
59 | TimeInForce | N | The lifetime of the order:
1 : good till cancel
3 : immediate or cancel
4 : fill-or-kill (market & limit orders only) | 1 |
20025 | Destination (custom) | N | Specific destination:
ox
darkpool | |
Tag | Name | Algorithm | Required | Description | Default |
---|---|---|---|---|---|
20000 | StopAmount | 308 : Trailing Stop | N | The fixed amount to trail the market price by | |
20001 | StopPercent | 308 : Trailing Stop | N | The percentage to trail the market price by (given as a decimal: 10% = 0.1) | |
20010 | Interval | 307 : TWAP | Y | The frequency at which TWAP trades are executed (in seconds) | |
20011 | TotalTime | 307 : TWAP | Y | The maximimum time a TWAP order will stay active (in seconds). Must be >= 15 minutes (900 seconds) and the interval (tag 20010) | |
20020 | RoutingOption | 301 : Gorilla303 : Hare | Y | How SFOX will trade your order, BestPrice or Fast | |
Tag | Name | Required | Description |
---|---|---|---|
11 | ClOrdID | Y | Original ClOrdID when creating the order |
790 | OrdStatusReqID | N | Optionally provided value that will be echoed in the response |
Tag | Name | Required | Description |
---|---|---|---|
11 | ClOrdID | Y | Unique ID of the cancel request |
41 | OrigClOrdID | Y | Original ClOrdID provided when creating the order |
Tag | Name | Required | Description |
---|---|---|---|
11 | ClOrdID | Y | Client Order ID of this request |
41 | OrigClOrdID | Y | Client Order ID of the original order |
38 | OrderQty | N | |
44 | Price | N | |
152 | CashOrderQty | N | |
20000 | StopAmount | N | |
20001 | StopPercent | N | |
Tag | Name | Required | Description |
---|---|---|---|
11 | ClOrdID | N | Optional client order id, echoed back in the OrderMassCancelReport |
530 | MassCancelRequestType | Y | 7 - Cancel All Orders (this will attempt to cancel all open orders for the account) |
Tag | Name | Description |
---|---|---|
37 | OrderID | OrderID of this report |
11 | ClOrdID | ClOrdID provided in the OrderMassCancelRequest , if provided |
530 | MassCancelRequestType | 7 - Cancel All Orders |
531 | MassCancelResponse | 0 - Request Rejected
7 - Cancel All Orders |
532 | MassCancelRejectReason | 99 - Other (if 531 = 0) |
533 | TotalAffectedOrders | Number of orders that are affected by the request (note: it is not guaranteed all of these orders are canceled, only that a cancel is requested) |
58 | Text | Optional text to describe the error (if 531 = 0) |
Tag | Name | Description |
---|---|---|
37 | OrderID | SFOX Assigned Order ID, when rejected this will be 0. |
17 | ExecID | SFOX Assigned Trade ID, when rejected this will be 0. |
11 | ClOrdID | Client provided order ID |
31 | LastPx | Last fill price |
32 | LastQty | Last fill quantity |
60 | TransactTime | |
55 | Symbol | Trading pair |
54 | Side | 1 : Buy2 : Sell |
40 | OrdType | 1 : Market2 : Limit |
44 | Price | Client provided limit price, only if OrdType = 2 |
150 | ExecType | Execution type: 0 : New4 : Canceled8 : RejectedF : TradeI : Order Status Request |
39 | OrdStatus | Current status of the order:
0 : New1 : Partially Filled2 : Filled3 : Done4 : Canceled8 : Rejected |
151 | LeavesQty | Amount remaining of the order |
14 | CumQty | Amount filled so far of the order |
6 | AvgPx | VWAP |
136 | NoMiscFees | Number of misc fees |
=> 137 | MiscFeeAmt | Amount of fees |
=> 138 | MiscFeeCurr | Fee Currency |
Tag | Name | Description |
---|---|---|
37 | OrderID | SFOX Order ID, unless the order is unknown (CxlRejReason = Unknown Order) |
11 | ClOrdID | Client provided order ID of the cancel request |
41 | OrigClOrdID | Client provided order ID of the original order (echoed back from the request) |
39 | OrdStatus | Existing status of the order that could not be canceled |
102 | CxlRejReason | 0 : Too Late To Cancel
1 : Unknown Order
99 : Other (already canceled) |
Tag | Name | Required | Description |
---|---|---|---|
320 | SecurityReqID | Y | |
559 | SecurityListRequestType | Y | Must be 4 - All Securities |
Tag | Name | Description |
---|---|---|
320 | SecurityReqID | SecurityReqID from the SecurityListRequest |
322 | SecurityResponseID | Unique identifier of the response |
560 | SecurityRequestResult | This will always be 0 - Valid Request |
146 | NoRelatedSym | |
-> 55 | Symbol | Underlying asset symbol in lowercase basequote format i.e. btcusd |
Last modified 2mo ago