Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.sqd.dev/llms.txt

Use this file to discover all available pages before exploring further.

Monitor trades that close positions to analyze realized profits and losses across all traders and assets.

Use Case

Track position closures to:
  • Monitor realized PnL distributions
  • Identify profitable trading patterns
  • Analyze liquidation events
  • Build PnL leaderboards and analytics

Sample Response

{
  "header": {
    "number": 900000004,
    "timestamp": 1771562718537
  },
  "fills": [
    {
      "user": "0x0bb3e7ca6d66021eecbf23fb09e6dabe44bf1b41",
      "coin": "BTC",
      "px": 67261.0,
      "sz": 0.00305,
      "side": "B",
      "dir": "Close Short",
      "closedPnl": 0.061915,
      "startPosition": -3.23188,
      "fee": 0.0,
      "time": 1771562718537
    }
  ]
}

Field Descriptions

  • dir - Trade direction: “Close Long” or “Close Short”
  • closedPnl - Realized profit/loss from closing the position (in USD)
  • startPosition - Position size before this fill (negative = short, positive = long)
  • px - Exit price
  • sz - Size of the position being closed
  • fee - Trading fee charged
  • time - Fill timestamp in milliseconds since Unix epoch

Analysis Tips

  • Net PnL = closedPnl - fee (subtract fees for true profitability)
  • Profitable trades have closedPnl > 0
  • Loss-making trades have closedPnl < 0
  • Positive startPosition indicates closing a long, negative indicates closing a short