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 support@sfox.com

sFOX uses FIX 4.4

Connectivity

Before logging onto a FIX session, you must establish a secure connection to the FIX gateway

Endpoints

EnvironmentValueSSL Required

Production

fix.sfox.com:5001

Y

Sandbox

Y

TCP SSL

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

Standard Header

A standard header is required at the start of each message

SenderCompIDs must be provided by sFOX. Contact support@sfox.com to be provided with a SenderCompID for your session.

TagNameDescription

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

Messages

Logon – A

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.

TagNameRequiredDescription

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

NewOrderSingle – D

TagNameRequiredDescription
11

ClOrdID

Y

55

Symbol

Y

Trading pair in lowercase basequote format i.e. btcusd

54

Side

Y

1: Buy

2: Sell

40

OrdType

Y

1: Market

2: Limit

3: Stop

or 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

59

TimeInForce

N

The lifetime of the order: 1: good till cancel (default) 3: immediate or cancel

20025

Destination (custom)

N

Specific destination: ox darkpool

117

QuoteID

N

TagNameAlgorithmRequiredDescriptionDefault

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: Gorilla

303: Hare

Y

How SFOX will trade your order, BestPrice or Fast

RequestForQuote - R

TagNameRequiredDescription

131

QuoteReqID

Y

Client provided quote request ID. This identifier will also be used in any follow-up order placed on behalf of the returned quote as the ClOrdID

55

Symbol

Y

Trading pair in lowercase basequote format i.e. btcusd

54

Side

Y

1: Buy

2: Sell

38

OrderQty

Y

Quantity of base currency you're interested in quoting a buy/sell order on

OrderStatusRequest – H

TagNameRequiredDescription

11

ClOrdID

Y

Original ClOrdID when creating the order

790

OrdStatusReqID

N

Optionally provided value that will be echoed in the response

OrderCancelRequest – F

TagNameRequiredDescription

11

ClOrdID

Y

Unique ID of the cancel request

41

OrigClOrdID

Y

Original ClOrdID provided when creating the order

OrderCancelReplaceRequest - G

TagNameRequiredDescription

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

OrderMassCancelRequest - q

TagNameRequiredDescription

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)

OrderMassCancelReport - r

TagNameDescription

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)

ExecutionReport – 8

TagNameDescription

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: Buy

2: Sell

40

OrdType

1: Market

2: Limit

44

Price

Client provided limit price, only if OrdType = 2

150

ExecType

Execution type:

0: New

4: Canceled

8: Rejected

F: Trade

I: Order Status Request

39

OrdStatus

Current status of the order: 0: New

1: Partially Filled

2: Filled

3: Done

4: Canceled

8: 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

OrderCancelReject – 9

TagNameDescription

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)

434

CxlRejResponseTo

1: Order Cancel Request 2: Order Cancel Replace Request

Security List Request - x

TagNameRequiredDescription

320

SecurityReqID

Y

559

SecurityListRequestType

Y

Must be 4 - All Securities

Security List - y

TagNameDescription

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 updated