REST APIAccount
Set a referral
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.
ApiKeyAuthBearerAuthx-api-key<token>API key authentication via the x-api-key header.
AuthorizationBearer <JWT>Bearer authentication via the Authorization: Bearer <token> header.
application/json; charset=utf-8- body
Set referral request
data*Set referral data
Created
application/json; charset=utf-8- response
Response for POST /v1/account/referral
success*booleancurl -X POST 'https://api.predict.fun/v1/account/referral' \ -H 'Content-Type: application/json; charset=utf-8' \ -d '{ "data": { "referralCode": "strin" }}'{ "success": true}Get PnL history by address GET
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.
Get maker rebate events GET
Returns paginated on-chain maker rebate earnings for the authenticated wallet, newest first. The occurred_after and occurred_before filters are unix timestamps in milliseconds and both bounds are exclusive: only events that occurred strictly after occurred_after and strictly before occurred_before are returned. Neither bound is carried in the pagination cursor, so send the same filters again when requesting the next page.