Skip to main content
GET
Get wallet PnL by ecosystem

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

ecosystem
enum<string>
required

The ecosystem of the wallet address: eip155 for EVM chains (evm is an alias of it), or solana. The endpoint serves only chains of this ecosystem. An unknown ecosystem returns 404.

Available options:
eip155,
evm,
solana
address
required

The wallet address, valid for the ecosystem in the path: a 0x EVM address for eip155 or evm, a Solana address for solana. The ecosystem is not inferred from the address, so an address of another ecosystem returns 400, for example wallet address must be a valid Solana address. Under eip155 and evm the zero address returns 400. The transactions, balance chart and PnL endpoints additionally require an address Zerion tracks, as they do on /v1/wallets/{address}/ paths. An EVM address that is not tracked, such as a token contract, router or exchange hot wallet, returns 400, with detail reading untrackable wallet address on transactions and balance charts. Solana addresses always count as tracked. Ethereum-compatible address (EVM).

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). A listed chain is used only when it reports both supports_transactions and supports_positions in the flags of GET /v1/chains/ and belongs to the network family of the wallet address; on /v1/{ecosystem}/wallets/ paths that family is the path's ecosystem. A listed chain that fails either rule is ignored when the list also names a chain that passes both. When no listed chain passes, the request returns 400 rather than an empty result, and detail names the first chain in the list, as chain <id> does not support PnL (for example chain bob does not support PnL), or chain <id> does not support this wallet address type when that chain reports those flags but is of another network family. When the filter is omitted, chains that fail either rule 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

The address must be valid for the chain it is given with: an EVM address on an EVM chain, a Solana address on solana. An address of the other network family (for example an EVM address on solana) returns 400. EVM addresses are accepted in any letter case; Solana addresses are case-sensitive.

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.

On /v1/{ecosystem}/wallets/ paths, an implementation on a chain of another ecosystem returns 400, with detail reading chain <id> does not support this wallet address type.

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