curl --request GET \
--url https://api.zerion.io/v1/wallets/{address}/positions/ \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.zerion.io/v1/wallets/{address}/positions/"
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/wallets/{address}/positions/', 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/wallets/{address}/positions/"
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/wallets/0x42b9df65b219b3dd36ff330a4dd8f327a6ada990/positions/"
},
"data": [
{
"type": "positions",
"id": "0x111c47865ade3b172a928df8f990bc7f2a3b9aaa-polygon-asset-none-",
"attributes": {
"name": "Asset",
"quantity": {
"int": "12345678",
"decimals": 5,
"float": 123.45678,
"numeric": "123.45678"
},
"encrypted_quantity": {
"handle": "<string>"
},
"parent": "0x111c47865ade3b172a928df8f990bc7f2a3b9aaa-polygon-asset-none-",
"protocol": "<string>",
"protocol_module": "lending",
"pool_address": "0x109830a1aaad605bbf02a9dfa7b0b92ec2fb7daa",
"group_id": "0a771a0064dad468045899032c7fb01a971f973f7dff0a5cdc3ce199f45e94d7",
"position_type": "deposit",
"value": 5.384656557642683,
"price": 0.043615722,
"changes": {
"absolute_1d": 0.272309794,
"percent_1d": 5.326512552079021
},
"fungible_info": {
"name": "Bankless BED Index",
"symbol": "BED",
"icon": {
"url": "https://token-icons.s3.amazonaws.com/0x0391d2021f89dc339f60fff84546ea23e337750f.png"
},
"flags": {
"verified": true
},
"implementations": [
{
"chain_id": "ethereum",
"decimals": 18,
"address": "0x2af1df3ab0ab157e1e2ad8f88a7d04fbea0c7dc6"
}
],
"id": "0230395c-2b01-46d8-b2d6-ce8121d51f9e",
"asset_class": "commodity",
"description": "The BED index is meant to track crypto’s top 3 investab.",
"market_data": {
"price": 106.87952669793131,
"total_supply": 29905.762448515918,
"circulating_supply": 29905.762448515918,
"fully_diluted_valuation": 3196313.736038149,
"market_cap": 3196313.736038149,
"changes": {
"percent_1d": -0.7379066649086338,
"percent_30d": -2.499465618806962,
"percent_90d": 11.316340269371775,
"percent_365d": null
},
"trading_volumes": {
"volume_1d": 40096375.69294812
}
}
},
"flags": {
"displayable": true,
"is_trash": true
},
"updated_at": "2023-11-10T23:00:00Z",
"updated_at_block": 123,
"application_metadata": {
"name": "AAVE",
"icon": {
"url": "https://token-icons.s3.amazonaws.com/0x0391d2021f89dc339f60fff84546ea23e337750f.png"
},
"url": "https://app.aave.com/"
},
"receipt": {
"fungible_info": {
"name": "Bankless BED Index",
"symbol": "BED",
"icon": {
"url": "https://token-icons.s3.amazonaws.com/0x0391d2021f89dc339f60fff84546ea23e337750f.png"
},
"flags": {
"verified": true
},
"implementations": [
{
"chain_id": "ethereum",
"decimals": 18,
"address": "0x2af1df3ab0ab157e1e2ad8f88a7d04fbea0c7dc6"
}
],
"id": "0230395c-2b01-46d8-b2d6-ce8121d51f9e",
"asset_class": "commodity",
"description": "The BED index is meant to track crypto’s top 3 investab.",
"market_data": {
"price": 106.87952669793131,
"total_supply": 29905.762448515918,
"circulating_supply": 29905.762448515918,
"fully_diluted_valuation": 3196313.736038149,
"market_cap": 3196313.736038149,
"changes": {
"percent_1d": -0.7379066649086338,
"percent_30d": -2.499465618806962,
"percent_90d": 11.316340269371775,
"percent_365d": null
},
"trading_volumes": {
"volume_1d": 40096375.69294812
}
}
},
"nft_info": {
"chain_id": "ethereum",
"contract_address": "0xc36442b4a4522e871399cd717abdd847ab11fe88",
"token_id": "1303743"
}
}
},
"relationships": {
"chain": {
"links": {
"related": "https://api.zerion.io/v1/chains/polygon"
},
"data": {
"type": "chains",
"id": "polygon"
}
},
"fungible": {
"links": {
"related": "https://api.zerion.io/v1/fungibles/0x111c47865ade3b172a928df8f990bc7f2a3b9aaa"
},
"data": {
"type": "fungibles",
"id": "0x111c47865ade3b172a928df8f990bc7f2a3b9aaa"
}
},
"dapp": {
"data": {
"type": "dapps",
"id": "aave-v3"
}
}
}
}
]
}{
"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"
}
]
}{
"errors": [
{
"title": "Service is temporarily unavailable",
"detail": "Please, retry later (check the Retry-After header)"
}
]
}Get wallet fungible positions
A wallet’s token balances and DeFi positions across every supported chain, priced and ready to render.
curl --request GET \
--url https://api.zerion.io/v1/wallets/{address}/positions/ \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.zerion.io/v1/wallets/{address}/positions/"
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/wallets/{address}/positions/', 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/wallets/{address}/positions/"
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/wallets/0x42b9df65b219b3dd36ff330a4dd8f327a6ada990/positions/"
},
"data": [
{
"type": "positions",
"id": "0x111c47865ade3b172a928df8f990bc7f2a3b9aaa-polygon-asset-none-",
"attributes": {
"name": "Asset",
"quantity": {
"int": "12345678",
"decimals": 5,
"float": 123.45678,
"numeric": "123.45678"
},
"encrypted_quantity": {
"handle": "<string>"
},
"parent": "0x111c47865ade3b172a928df8f990bc7f2a3b9aaa-polygon-asset-none-",
"protocol": "<string>",
"protocol_module": "lending",
"pool_address": "0x109830a1aaad605bbf02a9dfa7b0b92ec2fb7daa",
"group_id": "0a771a0064dad468045899032c7fb01a971f973f7dff0a5cdc3ce199f45e94d7",
"position_type": "deposit",
"value": 5.384656557642683,
"price": 0.043615722,
"changes": {
"absolute_1d": 0.272309794,
"percent_1d": 5.326512552079021
},
"fungible_info": {
"name": "Bankless BED Index",
"symbol": "BED",
"icon": {
"url": "https://token-icons.s3.amazonaws.com/0x0391d2021f89dc339f60fff84546ea23e337750f.png"
},
"flags": {
"verified": true
},
"implementations": [
{
"chain_id": "ethereum",
"decimals": 18,
"address": "0x2af1df3ab0ab157e1e2ad8f88a7d04fbea0c7dc6"
}
],
"id": "0230395c-2b01-46d8-b2d6-ce8121d51f9e",
"asset_class": "commodity",
"description": "The BED index is meant to track crypto’s top 3 investab.",
"market_data": {
"price": 106.87952669793131,
"total_supply": 29905.762448515918,
"circulating_supply": 29905.762448515918,
"fully_diluted_valuation": 3196313.736038149,
"market_cap": 3196313.736038149,
"changes": {
"percent_1d": -0.7379066649086338,
"percent_30d": -2.499465618806962,
"percent_90d": 11.316340269371775,
"percent_365d": null
},
"trading_volumes": {
"volume_1d": 40096375.69294812
}
}
},
"flags": {
"displayable": true,
"is_trash": true
},
"updated_at": "2023-11-10T23:00:00Z",
"updated_at_block": 123,
"application_metadata": {
"name": "AAVE",
"icon": {
"url": "https://token-icons.s3.amazonaws.com/0x0391d2021f89dc339f60fff84546ea23e337750f.png"
},
"url": "https://app.aave.com/"
},
"receipt": {
"fungible_info": {
"name": "Bankless BED Index",
"symbol": "BED",
"icon": {
"url": "https://token-icons.s3.amazonaws.com/0x0391d2021f89dc339f60fff84546ea23e337750f.png"
},
"flags": {
"verified": true
},
"implementations": [
{
"chain_id": "ethereum",
"decimals": 18,
"address": "0x2af1df3ab0ab157e1e2ad8f88a7d04fbea0c7dc6"
}
],
"id": "0230395c-2b01-46d8-b2d6-ce8121d51f9e",
"asset_class": "commodity",
"description": "The BED index is meant to track crypto’s top 3 investab.",
"market_data": {
"price": 106.87952669793131,
"total_supply": 29905.762448515918,
"circulating_supply": 29905.762448515918,
"fully_diluted_valuation": 3196313.736038149,
"market_cap": 3196313.736038149,
"changes": {
"percent_1d": -0.7379066649086338,
"percent_30d": -2.499465618806962,
"percent_90d": 11.316340269371775,
"percent_365d": null
},
"trading_volumes": {
"volume_1d": 40096375.69294812
}
}
},
"nft_info": {
"chain_id": "ethereum",
"contract_address": "0xc36442b4a4522e871399cd717abdd847ab11fe88",
"token_id": "1303743"
}
}
},
"relationships": {
"chain": {
"links": {
"related": "https://api.zerion.io/v1/chains/polygon"
},
"data": {
"type": "chains",
"id": "polygon"
}
},
"fungible": {
"links": {
"related": "https://api.zerion.io/v1/fungibles/0x111c47865ade3b172a928df8f990bc7f2a3b9aaa"
},
"data": {
"type": "fungibles",
"id": "0x111c47865ade3b172a928df8f990bc7f2a3b9aaa"
}
},
"dapp": {
"data": {
"type": "dapps",
"id": "aave-v3"
}
}
}
}
]
}{
"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"
}
]
}{
"errors": [
{
"title": "Service is temporarily unavailable",
"detail": "Please, retry later (check the Retry-After header)"
}
]
}Authorizations
Headers
Custom header that allows you to get data for testnets.
testnet Path Parameters
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
^0x[a-fA-F0-9]{40}$"0x42b9df65b219b3dd36ff330a4dd8f327a6ada990"
Query Parameters
This parameter allows users to filter DeFi positions based on their types. There are three options:
only_simple: Retrieves exclusively wallet-type positions. These are basic, non-protocol related positions. This option is applied if parameter is not specified.only_complex: Fetches only positions associated with all DeFi protocols (including staked assets, liquidity pools, etc), like Uniswap or Aave. This option excludes simple wallet positions.no_filter: Applies no filtering, thus returning both protocol-related and simple wallet positions.
⚠️ Note: Different pricing models are applied for enterprise usage of this API, depending on the filter type selected. For detailed pricing information, please reach out to us at
api@zerion.io.
only_simple, only_complex, no_filter Denominated currency value of returned prices
eth, btc, usd, eur, krw, rub, gbp, aud, cad, inr, jpy, nzd, try, zar, cny, chf Keep only positions with these types (comma-separated list).
Possible values:
deposit- Assets deposited into a DeFi protocol (e.g., supplied to lending pools, deposited in vaults, or provided as liquidity)loan- Borrowed assets representing a debt position that needs to be repaidlocked- Assets locked for a specific period or purpose (e.g., vote-escrowed tokens, time-locked tokens)staked- Assets staked in a protocol to earn rewards, participate in consensus, or for governance purposesreward- Earned rewards that are claimable or have been distributed but not yet withdrawnwallet- Regular assets held directly in the wallet, not actively deposited in any protocolinvestment- Investment positions such as tokenized funds, indices, or structured products
8Position's type indicating how the assets are being used or their current state.
deposit, loan, locked, staked, reward, wallet, investment Keep only positions from these chains (comma-separated list). Only chains reporting 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 positions (for example chain bob does not support positions). A chain of the wrong network family for the address is rejected the same way, with does not support this wallet address type. When the filter is omitted, chains that fail the gate are left out of data silently, with no error and no meta signal.
25["polygon"]
Keep only positions related to given fungible assets (comma-separated list).
2544Keep only positions related to these decentralized applications (dapps) (comma-separated list).
251 - 32["polygon"]
Filter positions based on the is_trash flag. If no flag is specified, then only_non_trash is applied.
only_trash, only_non_trash, no_filter Choose how the result should be ordered
-value, value Was this page helpful?