Orders

Create, cancel, amend, and manage orders

sFOX recommends using our WebSocket API to receive order and/or trade updates where you can stream real-time order and/or trade updates and will avoid rate limits.

Order Types & Algorithms

sFOX offers a wide range of order types and execution algorithms to optimize your order execution. Short descriptions are available in the page linked below. Further details can be found in the sFOX Support Center. Or contact support to speak with an expert.

pageOrder Types

Order Statuses

Orders may have any of the following statuses.

StatusStatus CodeDescription

Started

100

  • The order is open and active

  • Filled quantity may be >= 0

  • Filled quantity is < the order quantity

Cancel Pending

90

  • The order is in the process of being canceled but cancelation has not been completed

  • The order may still receive fills

Canceled

10

  • The order was successfully canceled

  • Order may have been partially filled prior to cancelation

Filled

210

  • The order has fully filled

  • The order has not yet settled

Done

300

  • The order was is completed, no longer active, and settled successfully

  • Filled quantity = order quantity

  • The order will not receive new fills

Order Object / Updates

Order updates received or retrieved via the sFOX APIs will include the following object per order:

FieldTypeDescription

id

int

sFOX-generated order ID, assigned on order creation.

side_id

int

ID for the order side/action. Possible values: 500 (buy order), 600 (sell order).

action

string

Order side. Possible values: buy (buy order), sell (sell order)

algorithm_id

int

Order type / algorithm ID. Possible values: Order Types & Algorithms.

algorithm

string

Order type / algorithm name. Possible values: Order Types & Algorithms.

type

string

Order type / algorithm name. Possible values: Order Types & Algorithms.

pair

string

Pair or product in the format basequote . e.g. btcusd, ethbtc, ethusdc

quantity

number

Order size in base currency quantity.

price

number

Order limit price.

amount

number

Amount (quote currency) to spend when buying.

net_market_amount

number

amount net fees for Market (100) orders.

filled

number

Unsigned, cumulative base currency quantity filled.

vwap

number

Cumulative volume-weighted average fill price of the order.

filled_amount

number

Unsigned, cumulative quote currency amount filled.

fees

number

Unsigned, cumulative quote currency fee amount accrued to this order.

net_proceeds

number

Signed, cumulative quote currency proceeds amount net fees.

status

string

Status name. Possible values: Order Statuses.

status_code

int

Status ID. Possible values: Order Statuses.

routing_option

string

Special order routing instructions.

routing_type

string

Order routing type.

time_in_force

string

Order time in force specified at order creation.

expires

datetime

Expiration date of the order (for time_in_force = GTD orders)

dateupdated

datetime

Date of the most recent update to this order.

date_added

datetime

Date the order was created.

client_order_id

string

User-specified ID for this order.

user_tx_id

string

Same as above.

o_action

string

Order side. Possible values: Buy (buy order), Sell (sell order)

algo_id

int

Order type / algorithm ID. Possible values: Order Types & Algorithms.

algorithm_options

string[]

Additional object specifying special order parameters.

destination

string

Order destination.

Last updated