For the complete documentation index, see llms.txt. This page is also available as Markdown.

Get user PnL

GET /api/v1/market-data/pnl/daily and /pnl/snapshot

Get daily realised PnL series

get

Returns a wallet's per-day realised PnL (net of protocol and integrator fees) and buy/sell volume buckets, newest first. Decimal fields are JSON strings. Optionally bounded to an inclusive UTC calendar-day window.

Query parameters
userstringRequired

Wallet address

fromstringOptional

Window start date YYYY-MM-DD UTC inclusive (requires to)

tostringOptional

Window end date YYYY-MM-DD UTC inclusive (requires from)

limitintegerOptional

Limit (default 100, max 500)

offsetintegerOptional

Offset (default 0, max 10000)

Responses
200

OK

application/json
get/api/v1/market-data/pnl/daily
GET /api/v1/market-data/pnl/daily?user=text HTTP/1.1
Host: rest.ft.42.space/
Accept: */*
{
  "data": [
    {
      "bucket": "text",
      "buyVolume": "text",
      "realizedPnl": "text",
      "sellVolume": "text"
    }
  ],
  "pagination": {
    "hasMore": true,
    "totalResults": 1
  }
}

Get historical PnL snapshot

get

Returns a wallet's unrealised PnL (server-side 4-state fold over positions held at the timestamp: active/resolving use marginal price, resolved winners use payout, resolved losers lose cost), cumulative realised PnL net of protocol and integrator fees (daily buckets strictly before the timestamp), and open position count as of a unix timestamp (default now). Pass expand=positions to include the folded positions.

Query parameters
userstringRequired

Wallet address

as_ofintegerOptional

Snapshot unix timestamp (default now; rounded down to the minute)

expandstringOptional

Set to 'positions' to include the folded positions

Responses
200

OK

application/json
asOfintegerOptional

AsOf echoes the snapshot unix timestamp the fold was computed at.

positionCountintegerOptional
realizedPnlnumberOptional
unrealizedPnlnumberOptional
get/api/v1/market-data/pnl/snapshot
GET /api/v1/market-data/pnl/snapshot?user=text HTTP/1.1
Host: rest.ft.42.space/
Accept: */*
{
  "asOf": 1,
  "positionCount": 1,
  "positions": [
    {
      "avgPrice": 1,
      "marginalPrice": 1,
      "payout": 1,
      "quantity": 1,
      "questionId": "text",
      "tokenId": "text"
    }
  ],
  "realizedPnl": 1,
  "unrealizedPnl": 1
}

Last updated