REST APIAccount
Get PnL history by address
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.
ApiKeyAuthx-api-key<token>API key authentication via the x-api-key header.
address*stringThe wallet's address. For a Predict account, use the account's address.
period?stringWindow of history to return. Defaults to all.
"1d""7d""30d""all"application/json; charset=utf-8- response
Response for GET /v1/account/{address}/pnl
success*booleandata*A wallet's PnL history
curl -X GET 'https://api.predict.fun/v1/account/string/pnl'{ "success": true, "data": { "period": "1d", "points": [ { "x": 0, "y": 0.1 } ] }}Get account activity by address GET
Get a paginated list of the conversions, merges, splits, redemptions and refunds of any wallet address. Order events are not included. The fills of an address are available from GET /v1/orders/matches with signerAddress. An address with no account returns an empty list. The occurredAfter and occurredBefore filters are unix timestamps in milliseconds and both bounds are exclusive: only events that occurred strictly after occurredAfter and strictly before occurredBefore are returned.
Set a referral POST
Set a referral code if not already set. Requires JWT or project authentication. Project auth requires an EIP-712 signature in the x-signature header.