> For the complete documentation index, see [llms.txt](https://docs.42.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.42.space/for-developers/rest-api-alpha/users/get-user-pnl.md).

# Get user PnL

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

## Get daily realised PnL series

> 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.

```json
{"openapi":"3.1.1","info":{"title":"FortyTwo Read API","version":"1.0"},"tags":[{"description":"GET /api/v1/market-data/pnl/daily and /pnl/snapshot","name":"get-user-pnl"}],"servers":[{"url":"https://rest.ft.42.space/"}],"paths":{"/api/v1/market-data/pnl/daily":{"get":{"description":"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.","tags":["get-user-pnl"],"summary":"Get daily realised PnL series","parameters":[{"schema":{"type":"string"},"description":"Wallet address","name":"user","in":"query","required":true},{"schema":{"type":"string"},"description":"Window start date YYYY-MM-DD UTC inclusive (requires to)","name":"from","in":"query"},{"schema":{"type":"string"},"description":"Window end date YYYY-MM-DD UTC inclusive (requires from)","name":"to","in":"query"},{"schema":{"type":"integer"},"description":"Limit (default 100, max 500)","name":"limit","in":"query"},{"schema":{"type":"integer"},"description":"Offset (default 0, max 10000)","name":"offset","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ft_market-service-v2_pkg_api.PaginatedResponse-internal_handler_DailyPnlEntry"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ft_market-service-v2_pkg_api.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ft_market-service-v2_pkg_api.ErrorResponse"}}}}}}}},"components":{"schemas":{"ft_market-service-v2_pkg_api.PaginatedResponse-internal_handler_DailyPnlEntry":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/internal_handler.DailyPnlEntry"}},"pagination":{"$ref":"#/components/schemas/ft_market-service-v2_pkg_api.Pagination"}}},"internal_handler.DailyPnlEntry":{"type":"object","properties":{"bucket":{"description":"Bucket is the UTC day bucket start, RFC3339.","type":"string"},"buyVolume":{"type":"string"},"realizedPnl":{"type":"string"},"sellVolume":{"type":"string"}}},"ft_market-service-v2_pkg_api.Pagination":{"type":"object","properties":{"hasMore":{"type":"boolean"},"totalResults":{"type":"integer"}}},"ft_market-service-v2_pkg_api.ErrorResponse":{"type":"object","properties":{"code":{"type":"integer"},"error":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Get historical PnL snapshot

> 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.

```json
{"openapi":"3.1.1","info":{"title":"FortyTwo Read API","version":"1.0"},"tags":[{"description":"GET /api/v1/market-data/pnl/daily and /pnl/snapshot","name":"get-user-pnl"}],"servers":[{"url":"https://rest.ft.42.space/"}],"paths":{"/api/v1/market-data/pnl/snapshot":{"get":{"description":"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.","tags":["get-user-pnl"],"summary":"Get historical PnL snapshot","parameters":[{"schema":{"type":"string"},"description":"Wallet address","name":"user","in":"query","required":true},{"schema":{"type":"integer"},"description":"Snapshot unix timestamp (default now; rounded down to the minute)","name":"as_of","in":"query"},{"schema":{"type":"string"},"description":"Set to 'positions' to include the folded positions","name":"expand","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_handler.PnlSnapshotResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ft_market-service-v2_pkg_api.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ft_market-service-v2_pkg_api.ErrorResponse"}}}}}}}},"components":{"schemas":{"internal_handler.PnlSnapshotResponse":{"type":"object","properties":{"asOf":{"description":"AsOf echoes the snapshot unix timestamp the fold was computed at.","type":"integer"},"positionCount":{"type":"integer"},"positions":{"description":"Positions is only present with ?expand=positions.","type":"array","items":{"$ref":"#/components/schemas/internal_handler.PnlSnapshotPosition"}},"realizedPnl":{"type":"number"},"unrealizedPnl":{"type":"number"}}},"internal_handler.PnlSnapshotPosition":{"type":"object","properties":{"avgPrice":{"type":"number"},"marginalPrice":{"type":"number"},"payout":{"type":"number"},"quantity":{"type":"number"},"questionId":{"type":"string"},"tokenId":{"type":"string"}}},"ft_market-service-v2_pkg_api.ErrorResponse":{"type":"object","properties":{"code":{"type":"integer"},"error":{"type":"string"},"message":{"type":"string"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.42.space/for-developers/rest-api-alpha/users/get-user-pnl.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
