Get All Done Orders

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

Retrieve a list of completed orders.

Rate Limit: 5 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 Parameters

ParameterTypeDescription

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.

Responses

200
[
    {
        "id": 701968334,
        "side_id": 500,
        "action": "Buy",
        "algorithm_id": 200,
        "algorithm": "Smart",
        "type": "Smart",
        "pair": "btcusd",
        "quantity": 0.001,
        "price": 16900.6,
        "amount": 0,
        "net_market_amount": 0,
        "filled": 0.001,
        "vwap": 16900.6,
        "filled_amount": 16.9006,
        "fees": 0.0338012,
        "net_proceeds": -16.8667988,
        "status": "Done",
        "status_code": 300,
        "routing_option": "BestPrice",
        "routing_type": "NetPrice",
        "time_in_force": "GTC",
        "expires": null,
        "dateupdated": "2022-11-18T01:26:40.000Z",
        "date_added": "2022-11-17T20:52:40.000Z",
        "client_order_id": "94b0e7c4-0fa7-403d-a0d0-6c4ccec76630",
        "user_tx_id": "94b0e7c4-0fa7-403d-a0d0-6c4ccec76630",
        "o_action": "Buy",
        "algo_id": 200,
        "algorithm_options": null,
        "destination": ""
    },
    {
        "id": 701945645,
        "side_id": 500,
        "action": "Buy",
        "algorithm_id": 201,
        "algorithm": "Limit",
        "type": "Limit",
        "pair": "btcusd",
        "quantity": 0.01,
        "price": 16905,
        "amount": 0,
        "net_market_amount": 0,
        "filled": 0.01,
        "vwap": 16643,
        "filled_amount": 166.43,
        "fees": 0.16643,
        "net_proceeds": -166.26357,
        "status": "Done",
        "status_code": 300,
        "routing_option": "BestPrice",
        "routing_type": "NetPrice",
        "time_in_force": "GTC",
        "expires": null,
        "dateupdated": "2022-11-17T19:39:18.000Z",
        "date_added": "2022-11-17T18:52:40.000Z",
        "client_order_id": "",
        "user_tx_id": "",
        "o_action": "Buy",
        "algo_id": 201,
        "algorithm_options": null,
        "destination": ""
   }
]

Example Requests

curl -H 'Authorization: Bearer <API_TOKEN>' \
  'https://api.sfox.com/v1/orders/done?limit=20&after=711876817&currency_pair=btcusd'

Last updated