REST APIAccount

Get PnL history by address

GET
/account/{address}/pnl

Cumulative profit and loss in USD for any wallet, the series the predict.fun profile chart shows. period picks the window and with it the spacing: hourly points for 1d, daily for 7d and 30d, and the whole history for all (the default). The latest point is the current PnL.

The whole series comes back in one response, so there is no cursor. Results are cached for up to 30 seconds, so polling faster than that returns the same series. An address with no account returns an empty series.

Authorization

ApiKeyAuth
headerx-api-key<token>

API key authentication via the x-api-key header.

Path Parameters

address*string

The wallet's address. For a Predict account, use the account's address.

Query Parameters

period?string

Window of history to return. Defaults to all.

Value in"1d""7d""30d""all"

Response Body

application/json; charset=utf-8
  1. response

Response for GET /v1/account/{address}/pnl

success*boolean
data*

A wallet's PnL history

Example Request
curl -X GET 'https://api.predict.fun/v1/account/string/pnl'
Example Response
{  "success": true,  "data": {    "period": "1d",    "points": [      {        "x": 0,        "y": 0.1      }    ]  }}