Get All Trades

GET https://api.sfox.com/v1/account/trades

Retrieve a list of completed trades (fills).

Path Parameters

Parameter
Type
Description

page_size

number

The maximum number of trades to include in the response.

e.g. page_size=20 will return a maximum of 20 trades in the response

Default page_size = 100

last_seen_id

number

The cursor of trade to paginate from. The response will contain trades completed after the cursor.

e.g. last_seen_id=NjM1MjQ20c= will return trades completed after the trade associated with this cursor

Responses

200
{
    "data": [
        {
            "cursor": "NjM1MzUwNzY=",
            "trade_id": 829106821,
            "order_id": 758399024,
            "date_updated": "2024-02-22T01:08:18.000Z",
            "action": "Sell",
            "currency_pair": "btcusd",
            "quantity": "0.01000000",
            "amount": "515.83628237",
            "price": "51583.62823740",
            "fees": "0.00000000",
            "net_amount": "515.83628237"
        },
        {
            "cursor": "NjM1MzUwNzQ=",
            "trade_id": 829106818,
            "order_id": 758319036,
            "date_updated": "2024-02-22T01:08:18.000Z",
            "action": "Buy",
            "currency_pair": "btcusd",
            "quantity": "0.01000000",
            "amount": "515.24440000",
            "price": "51524.44000000",
            "fees": "0.00000000",
            "net_amount": "515.24440000"
        },
        {
            "cursor": "NjM1MzUwNzI=",
            "trade_id": 829106817,
            "order_id": 758399024,
            "date_updated": "2024-02-22T01:08:18.000Z",
            "action": "Sell",
            "currency_pair": "btcusd",
            "quantity": "0.01000000",
            "amount": "515.79383311",
            "price": "51579.38331110",
            "fees": "0.00000000",
            "net_amount": "515.79383311"
        },
        {
            "cursor": "NjM1MzUwNjc=",
            "trade_id": 829105211,
            "order_id": 758399602,
            "date_updated": "2024-02-22T01:05:44.000Z",
            "action": "Sell",
            "currency_pair": "ltcusd",
            "quantity": "7.91515120",
            "amount": "542.39983445",
            "price": "68.52678120",
            "fees": "0.00000000",
            "net_amount": "542.39983445"
        },
        {
            "cursor": "NjM1MzUwNjU=",
            "trade_id": 829105212,
            "order_id": 758399603,
            "date_updated": "2024-02-22T01:05:44.000Z",
            "action": "Buy",
            "currency_pair": "ltcusd",
            "quantity": "7.91515120",
            "amount": "542.41023812",
            "price": "68.52809560",
            "fees": "0.00000000",
            "net_amount": "542.41023812"
        }
    ]
}

Example Requests

curl -H 'Authorization: Bearer <API_TOKEN>' \
  'https://api.sfox.com/v1/account/trades?page_size=<PAGE SIZE>&last_seen_id=
<CURSOR>'

Last updated