You can request the most recent executed trades (fills) for the authenticated account.

Example Request

{
  "type": "get_user_trades",
  "params": {
    "limit": 10,
    "offset": 0
  }
}
  • limit (optional) — maximum number of trades to return (default 1000)
  • offset (optional) — pagination offset (default 0)

Sample Code

# Python (websocket-client)
import json, websocket

API_KEY = "YOUR_API_KEY"

def send(ws, obj): ws.send(json.dumps(obj))

def on_open(ws):
    # Authenticate
    send(ws, {"type": "auth", "params": {"api_key": API_KEY}})
    # Request user trades
    send(ws, {"type": "get_user_trades", "params": {"limit": 10, "offset": 0}})

ws = websocket.WebSocketApp(
    "wss://trade.qfex.com?api_key=YOUR_API_KEY",
    on_open=on_open,
    on_message=lambda _, m: print("Message:", m)
)
ws.run_forever()

Example Response

{
  "user_trades": [
    {
      "trade_id": "92adf4db-1e48-40cf-9e2a-b0ecf079a16a",
      "symbol": "AAPL-USD",
      "price": 200.0,
      "quantity": 1.0,
      "aggressor_side": "BUY",
      "order_id": "5b309929-206f-40ec-804d-cbe46e81afc1",
      "client_order_id": "my-client-oid",
      "fee": 0.002,
      "timestamp": 1746908400
    }
  ],
  "count": 1
}
Only executed trades (fills) are returned. Open orders that have not filled are excluded.