Get All Open Orders

GET https://api.sfox.com/v1/orders

Retrieve a list of all orders currently open in your account.

Rate Limit: 10 requests per 10 seconds

sFOX recommends using the Orders WebSocket feed instead, which streams order updates in real-time and does not count towards your request limit.

Query Paramaters

Parameter
Type
Description

limit

int

Limit on the number of results to return. Default and maximum = 50. Each response will include no more than 50 results.

before

int

Pagination parameter. Return results that occurred before (older) than the specified ID (id from response body).

after

int

Pagination parameter. Return results that occurred after (newer) than the specified ID (id from response body).

action

string

Filter response to only include orders with the specified action/side. Possible values: buy or sell (case sensitive).

currency_pair

string

Filter response to only include orders on the specified currency pair (pair from response body). Format: <basequote> e.g. btcusd.

algorithm_id

int

Filter response to only include orders with the specified algorithm_id/order type. Possible values: Order Types.

status

string

Filter response to only include orders with the specified order status (status from response body). Possible values: Order Statuses (case sensitive).

Responses

200
[
    {
        "id": 2008562,
        "side_id": 500,
        "action": "Buy",
        "algorithm_id": 201,
        "algorithm": "Limit",
        "type": "Limit",
        "pair": "ethusd",
        "quantity": 2.5,
        "price": 1750,
        "amount": 0,
        "net_market_amount": 0,
        "filled": 0,
        "vwap": 0,
        "filled_amount": 0,
        "fees": 0,
        "net_proceeds": 0,
        "status": "Started",
        "status_code": 100,
        "routing_option": "WeightedExchange",
        "routing_type": "NetPrice",
        "time_in_force": "GTC",
        "expires": null,
        "dateupdated": "2023-11-08T20:12:19.000Z",
        "date_added": "2022-11-07T20:52:40.000Z",
        "client_order_id": "d317e96a-0c26-4dc1-a4eb-b82b0e2a643c",
        "user_tx_id": "d317e96a-0c26-4dc1-a4eb-b82b0e2a643c",
        "o_action": "Buy",
        "algo_id": 201,
        "algorithm_options": null,
        "destination": ""
    },
    {
        "id": 2008561,
        "side_id": 600,
        "action": "Sell",
        "algorithm_id": 201,
        "algorithm": "Limit",
        "type": "Limit",
        "pair": "btcusd",
        "quantity": 1,
        "price": 38000,
        "amount": 0,
        "net_market_amount": 0,
        "filled": 0,
        "vwap": 0,
        "filled_amount": 0,
        "fees": 0,
        "net_proceeds": 0,
        "status": "Started",
        "status_code": 100,
        "routing_option": "WeightedExchange",
        "routing_type": "NetPrice",
        "time_in_force": "GTC",
        "expires": null,
        "dateupdated": "2023-11-08T20:11:58.000Z",
        "date_added": "2022-11-07T20:52:40.000Z",
        "client_order_id": "e6f9b6f3-5f01-444d-a83d-640dd67573ae",
        "user_tx_id": "e6f9b6f3-5f01-444d-a83d-640dd67573ae",
        "o_action": "Sell",
        "algo_id": 201,
        "algorithm_options": null,
        "destination": ""
    }
]

Example Requests

curl -H 'Authorization: Bearer <API_TOKEN>' \
  'https://api.sfox.com/v1/orders'

Last updated