curl --request GET \
--url https://api.zerion.io/v1/wallet-sets/portfolio \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.zerion.io/v1/wallet-sets/portfolio"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.zerion.io/v1/wallet-sets/portfolio', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.zerion.io/v1/wallet-sets/portfolio"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"links": {
"self": "https://api.zerion.io/v1/wallet-sets/portfolio?addresses=0x42b9df65b219b3dd36ff330a4dd8f327a6ada990%2C8BH9pjtgyZDC4iAQH5ZiYDZ1MDWC98xki2V8NzqqKW3K¤cy=eth&filter%5Bpositions%5D=no_filter"
},
"data": {
"type": "portfolio",
"id": "0x42b9df65b219b3dd36ff330a4dd8f327a6ada990",
"attributes": {
"positions_distribution_by_type": {
"wallet": 1864.774102420957,
"deposited": 78.04192492782934,
"borrowed": 0.9751475798305564,
"locked": 5.780032725068765,
"staked": 66.13183205505294
},
"positions_distribution_by_chain": {
"arbitrum": 458.3555051522226,
"aurora": 72.01031337463428,
"avalanche": 17.128850607339444,
"base": 55.01550749900544,
"binance-smart-chain": 5.561075880033699,
"celo": 31.293849330045006,
"ethereum": 1214.009900354964,
"fantom": 84.58514074264951,
"linea": 8.258227109505139,
"optimism": 573.032664994399,
"polygon": 64.31407562634853,
"xdai": 113.1679493137936,
"zksync-era": 9.451002156306377
},
"total": {
"positions": 2017.4858230069574
},
"changes": {
"absolute_1d": 102.0271468171374,
"percent_1d": 5.326512552079021
}
}
}
}{
"errors": [
{
"title": "Parameter is malformed",
"detail": "Some validation errors will be described here"
}
]
}{
"errors": [
{
"title": "Unauthorized Error",
"detail": "The API key is invalid, please, make sure that you are using a valid key"
}
]
}{
"errors": [
{
"title": "Too many requests",
"detail": "Your request had been throttled"
}
]
}Get wallet set portfolio
Combined portfolio value for an EVM and Solana address, broken down by chain and position type.
curl --request GET \
--url https://api.zerion.io/v1/wallet-sets/portfolio \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.zerion.io/v1/wallet-sets/portfolio"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.zerion.io/v1/wallet-sets/portfolio', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.zerion.io/v1/wallet-sets/portfolio"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"links": {
"self": "https://api.zerion.io/v1/wallet-sets/portfolio?addresses=0x42b9df65b219b3dd36ff330a4dd8f327a6ada990%2C8BH9pjtgyZDC4iAQH5ZiYDZ1MDWC98xki2V8NzqqKW3K¤cy=eth&filter%5Bpositions%5D=no_filter"
},
"data": {
"type": "portfolio",
"id": "0x42b9df65b219b3dd36ff330a4dd8f327a6ada990",
"attributes": {
"positions_distribution_by_type": {
"wallet": 1864.774102420957,
"deposited": 78.04192492782934,
"borrowed": 0.9751475798305564,
"locked": 5.780032725068765,
"staked": 66.13183205505294
},
"positions_distribution_by_chain": {
"arbitrum": 458.3555051522226,
"aurora": 72.01031337463428,
"avalanche": 17.128850607339444,
"base": 55.01550749900544,
"binance-smart-chain": 5.561075880033699,
"celo": 31.293849330045006,
"ethereum": 1214.009900354964,
"fantom": 84.58514074264951,
"linea": 8.258227109505139,
"optimism": 573.032664994399,
"polygon": 64.31407562634853,
"xdai": 113.1679493137936,
"zksync-era": 9.451002156306377
},
"total": {
"positions": 2017.4858230069574
},
"changes": {
"absolute_1d": 102.0271468171374,
"percent_1d": 5.326512552079021
}
}
}
}{
"errors": [
{
"title": "Parameter is malformed",
"detail": "Some validation errors will be described here"
}
]
}{
"errors": [
{
"title": "Unauthorized Error",
"detail": "The API key is invalid, please, make sure that you are using a valid key"
}
]
}{
"errors": [
{
"title": "Too many requests",
"detail": "Your request had been throttled"
}
]
}Authorizations
To test endpoints here, paste your API key from the Dashboard into the username field and leave the password empty.
Query Parameters
Exclude current positions whose absolute value is strictly below this threshold, in the requested currency. Omit the parameter to keep the existing portfolio calculation. Positions equal to the threshold are retained. Encrypted positions are exempt from this filter.
Send a single finite nonnegative number. Explicit 0 activates the filter with a zero threshold. Empty, repeated, negative, nonnumeric and non-finite values return 400.
Applies to portfolio totals and distributions. With the filter active, the 24-hour change covers retained current positions and excludes transfers and exited positions. It does not filter positions, charts, PnL, approvals, actions or single-asset endpoints.
x >= 0Exclude these token IDs from positions and portfolio calculations (comma-separated list). Defaults to no exclusions. For example, eth,usd-coin excludes ETH and USDC contributions represented in the positions. An opaque receipt token does not identify its underlying assets.
Repeated parameters are combined. The maximum is 500 entries before removing empty entries and duplicates; both count toward the limit. An empty value has no effect. Unknown valid IDs have no effect. Nonempty IDs must contain 3 to 100 letters, digits, dots, underscores or hyphens. Invalid IDs, malformed URL encoding or more than 500 entries return 400.
On positions endpoints, filter[fungible_ids] can be combined with this filter: a token must be included and not excluded to remain. Chart endpoints retain their separate 25-ID limit and reject combining inclusion and exclusion.
500100^([A-Za-z0-9._-]{3,100})?$["eth", "usd-coin"]
A list of wallet addresses forming a wallet set. example: 0x42b9df65b219b3dd36ff330a4dd8f327a6ada990,8BH9pjtgyZDC4iAQH5ZiYDZ1MDWC98xki2V8NzqqKW3K
The set must contain at least one address and may include at most one address per supported chain type (currently EVM and Solana). The order of addresses does not matter.
Returns 400 if an address in the set is not one Zerion tracks, such as a token contract, router or exchange hot wallet.
1 - 2 elementsWhich positions count toward the portfolio totals. Defaults to only_simple.
only_simple- tokens and native coins held directly in the wallet. DeFi protocol positions are left out.only_complex- DeFi protocol positions only, such as staked assets and liquidity pools (for example Uniswap or Aave).no_filter- both simple and protocol positions.
Enterprise pricing can differ depending on the filter value. For details, contact api@zerion.io.
only_simple, only_complex, no_filter Was this page helpful?