Skip to main content
GET
Get wallet PnL

Authorizations

Authorization
string
header
required

To test endpoints here, paste your API key from the Dashboard into the username field and leave the password empty.

Path Parameters

address
required

The web3 wallet address. Must be a valid EVM or Solana address. The PnL endpoint additionally requires an address Zerion tracks, and returns 400 otherwise; see that endpoint's description for what that excludes. A wallet address, which can be either an EVM or Solana address

Pattern: ^0x[a-fA-F0-9]{40}$
Example:

"0x42b9df65b219b3dd36ff330a4dd8f327a6ada990"

Query Parameters

currency
enum<string>
default:usd

Denominated currency value of returned prices

Available options:
eth,
btc,
usd,
eur,
krw,
rub,
gbp,
aud,
cad,
inr,
jpy,
nzd,
try,
zar,
cny,
chf
filter[chain_ids]
string[]

Calculate PnL only for specified chains (comma-separated list). Only chains reporting both supports_transactions and supports_positions in the flags of GET /v1/chains/ are accepted here. Naming a chain that fails that gate returns 400 rather than an empty result, with detail reading chain <id> does not support PnL (for example chain bob does not support PnL). When the filter is omitted, chains that fail the gate are left out of data silently, with no error and no meta signal.

Maximum array length: 25
Example:
filter[fungible_ids]
string[]

Calculate PnL only for these fungible IDs (comma-separated list, up to 100).

With filter[fungible_ids] or filter[fungible_implementations], assets without a price are left out of the calculation instead of causing an error. The excluded assets are listed in the response metadata.

Maximum array length: 100
Maximum string length: 44
filter[fungible_implementations]
string[]

Calculate PnL only for these token implementations (comma-separated list of chain_id:address pairs, up to 100).

For example: base:0xae16c445d8a4082cecb49a9465e4dd5499df947d,ethereum:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48

With filter[fungible_ids] or filter[fungible_implementations], assets without a price are left out of the calculation instead of causing an error. The excluded assets are listed in the response metadata.

Maximum array length: 100
since
string

Count only sales since this time, as a Unix timestamp in milliseconds.

Note: PnL is pre-computed at standard marks (now, 1 day ago, 1 week ago, 1 month ago, 1 year ago, beginning of the year). Other values are supported only if fewer than 3,000 transactions sit between your timestamp and the nearest mark. Otherwise the request errors out.

Required string length: 13
Example:

"1688842525735"

till
string

Count only sales until this time, as a Unix timestamp in milliseconds.

Note: PnL is pre-computed at standard marks (now, 1 day ago, 1 week ago, 1 month ago, 1 year ago, beginning of the year). Other values are supported only if fewer than 3,000 transactions sit between your timestamp and the nearest mark. Otherwise the request errors out.

Required string length: 13
Example:

"1688842525735"

Response

Response for requested wallet's pnl

data
object
required
meta
object

Metadata about the PnL calculation (only present when assets were excluded from the calculation). The structure matches the filter type used in the request:

  • When filtering by fungible_ids, the meta contains an excluded_fungible_ids array
  • When filtering by fungible_implementations, the meta contains an excluded_fungible_implementations array
  • If both filters are used, both fields may appear in the meta