This endpoint returns the DeFi Protocol name, Liquidity Pool/DeFi Strategy Name, Token Balance staked/lent/used in DeFi activities, and DeFi Position (like LP tokens received). It also returns any Income Accrual earned over the 24 hour period immediately preceding the query. Use this endpoint to track DeFi activities and performance.
-
DeFi Strategy object taxonomy is as follows:
- Strategy Name
- Strategy Activity (Staking, Borrowing, etc)
- Position Type is the type of position within the DeFi strategy:
- Supplied (farming position)
- Claimable (reward)
- LP token (liquid staking token)
-
Income Accrual/Rewards is shown in the native token and is always for the last 24 hour period.
-
Currency - Accounting data can be calculated and shown in the currency of your choice using the currency parameter. Choose from US Dollar, ETH, MATIC, AVAX or xDAI.
-
Multiple Addresses: You may submit one or more wallet addresses in this query. For multiple wallet addresses, the response will return the DeFi datapoints outlined above by protocol and then by DeFi Strategy.
-
Supported Protocols:
- Aave v2
- Abracadabra
- Apecoin
- Aura Finance
- Balancer v1
- Balancer v2
- Bancor v3
- Convex
- Curve
- Hop V1
- Lido
- LooksRare
- Maple
- Sushiswap Bentobox
- Sushiswap Kashi
- Stargate
- Synapse
- Synthetix
- Uniswap v2
- Uniswap v3
- Verse
- YearnNeed a different protocol? Let us know at feedback.openpool.co
-
Unsupported Protocols: If your wallet includes protocol activity with protocols not supported by OpenPool, then these protocol balances and activities will not show up in the call response.
NOTE: There is a known issue with negative accrual amounts sometimes showing up in call responses when there are high numbers of intraday transfers. Please bear with us as we work on patching this 🙏🏻
Successful Query Example
Single Wallet
curl --request GET \
--url 'https://api.openpool.co/wallet/protocol_balance/?wallet=0xC28eAE2FBc8E4ea7393Afb54528649eCeE259F72' \
--header 'X-API-KEY: <insert_api_key>' \
--header 'accept: application/json'
Multiple Wallets
curl --request GET \
--url 'https://api.openpool.co/wallet/protocol_balance/?wallet=0x59a5493513ba2378ed57ae5ecfb8a027e9d80365%2C0xC28eAE2FBc8E4ea7393Afb54528649eCeE259F72' \
--header 'X-API-KEY: <insert_api_key>' \
--header 'accept: application/json'
Successful Response Example
{
"results": [
{
"id": "pbal_D6AMKUQJAL4p82DqyyjFjZ",
"wallet": "0x2588253cc1daac3e7d823b9190ec87e75c67f2c4",
"token": {
"id": "token_KVaoX3GRa5J63PARHrtFez",
"asset": {
"id": "asset_djG9vxLUBJRXdabrFTYVXQ",
"name": "USD Coin",
"symbol": "USDC",
"slug": "usd-coin"
},
"token_id": "0x7f5c764cbc14f9669b88837ca1490cca17c31607_10",
"address": "0x7f5c764cbc14f9669b88837ca1490cca17c31607",
"decimals": null,
"blockchain": "blockchain_Sr4xsurVjmkZMMbH2rpLQ4"
},
"balance": 100.0018,
"price": 1.000004566204189,
"value": 100.00225662863807,
"strategy": {
"name": "S*USDC",
"category": "lp",
"protocol": {
"id": "protocol_RpuvHXZufHM4GcNrvbVqng",
"name": "Stargate",
"slug": "stargate",
"image_url": "https://cdn.openpool.co/static/protocols/stargate.png"
}
},
"accrual": {
"balance": 100.001763,
"accrual": 0.00003700000000605996,
"pct_change": 0.00003699934769674229,
"period": "24h"
},
"blockchain": {
"id": "blockchain_Sr4xsurVjmkZMMbH2rpLQ4",
"chain_id": 10,
"name": "Optimism",
"slug": "optimism",
"symbol": "Optimism",
"image_url": "https://storage.googleapis.com/openpool-assets/static/blockchains/Optimism.png"
},
"timestamp": "2023-09-12T18:45:14Z",
"currency": "USD"
},
{
"id": "pbal_Fo6TMQ582kP4LkJWzgUiGi",
"wallet": "0x2588253cc1daac3e7d823b9190ec87e75c67f2c4",
"token": {
"id": "token_WiBKrQg6mLr9tBvrDAhSYZ",
"asset": {
"id": "asset_kwkR84vq6dTzT3P7TnSBN9",
"name": "sUSD",
"symbol": "SUSD",
"slug": "susd"
},
"token_id": "0x8c6f28f2f1a3c87f0f938b96d27520d9751ec8d9_10",
"address": "0x8c6f28f2f1a3c87f0f938b96d27520d9751ec8d9",
"decimals": null,
"blockchain": "blockchain_Sr4xsurVjmkZMMbH2rpLQ4"
},
"balance": 62.5357,
"price": 0.9958893426148859,
"value": 62.27863716296172,
"strategy": {
"name": "SNX",
"category": "borrow",
"protocol": {
"id": "protocol_YjMHgKdRvPqhrteLJuRZnn",
"name": "Synthetix",
"slug": "synthetix",
"image_url": "https://cdn.openpool.co/static/protocols/synthetix.png"
}
},
"accrual": {
"balance": 62.52790508,
"accrual": 0.007794920000002037,
"pct_change": 0.012466306027736351,
"period": "24h"
},
"blockchain": {
"id": "blockchain_Sr4xsurVjmkZMMbH2rpLQ4",
"chain_id": 10,
"name": "Optimism",
"slug": "optimism",
"symbol": "Optimism",
"image_url": "https://storage.googleapis.com/openpool-assets/static/blockchains/Optimism.png"
},
"timestamp": "2023-09-12T18:45:36Z",
"currency": "USD"
},
{
"id": "pbal_k8hHWQZBusACSnLDABYTfM",
"wallet": "0x2588253cc1daac3e7d823b9190ec87e75c67f2c4",
"token": "STG",
"balance": 49.0464,
"price": 0.4555,
"value": 22.3406352,
"strategy": {
"name": "veSTG",
"category": "lock",
"protocol": {
"id": "protocol_RpuvHXZufHM4GcNrvbVqng",
"name": "Stargate",
"slug": "stargate",
"image_url": "https://cdn.openpool.co/static/protocols/stargate.png"
}
},
"accrual": {
"balance": 49.04639711,
"accrual": 0.000002889999997535142,
"pct_change": 0.000005892379806304859,
"period": "24h"
},
"blockchain": {
"id": "blockchain_Sr4xsurVjmkZMMbH2rpLQ4",
"chain_id": 10,
"name": "Optimism",
"slug": "optimism",
"symbol": "Optimism",
"image_url": "https://storage.googleapis.com/openpool-assets/static/blockchains/Optimism.png"
},
"timestamp": "2023-09-12T18:45:14Z",
"currency": "USD"
},
{
"id": "pbal_LTv2T8JWScMbykWAi26z3E",
"wallet": "0x2588253cc1daac3e7d823b9190ec87e75c67f2c4",
"token": {
"id": "token_EN65U4SgaZJVovU6bVgTZr",
"asset": {
"id": "asset_MRhTJUx6WZ3Rk3JvGtom26",
"name": "Optimism",
"symbol": "OP",
"slug": "optimism-ethereum"
},
"token_id": "0x4200000000000000000000000000000000000042_10",
"address": "0x4200000000000000000000000000000000000042",
"decimals": null,
"blockchain": "blockchain_Sr4xsurVjmkZMMbH2rpLQ4"
},
"balance": 0.0051,
"price": 1.3829741903520814,
"value": 0.007053168370795616,
"strategy": {
"name": "OP",
"category": "reward",
"protocol": {
"id": "protocol_VtgFGsRPU6FUAFMox3haDu",
"name": "Aave V3",
"slug": "aave-v3",
"image_url": "https://cdn.openpool.co/static/protocols/aave-v2.png"
}
},
"accrual": {
"balance": 0.00508694,
"accrual": 0.000013060000000000502,
"pct_change": 0.2567358765780625,
"period": "24h"
},
"blockchain": {
"id": "blockchain_Sr4xsurVjmkZMMbH2rpLQ4",
"chain_id": 10,
"name": "Optimism",
"slug": "optimism",
"symbol": "Optimism",
"image_url": "https://storage.googleapis.com/openpool-assets/static/blockchains/Optimism.png"
},
"timestamp": "2023-09-12T18:45:14Z",
"currency": "USD"
},
{
"id": "pbal_YmgXoQEQpZnkqjpNqfMNoD",
"wallet": "0x2588253cc1daac3e7d823b9190ec87e75c67f2c4",
"token": {
"id": "token_dg48Uh3jZSK2rJVXu4gBkX",
"asset": {
"id": "asset_EaPCLvstn8c5QyTEZuBAPm",
"name": "Synthetix",
"symbol": "SNX",
"slug": "synthetix"
},
"token_id": "0x8700daec35af8ff88c16bdf0418774cb3d7599b4_10",
"address": "0x8700daec35af8ff88c16bdf0418774cb3d7599b4",
"decimals": null,
"blockchain": "blockchain_Sr4xsurVjmkZMMbH2rpLQ4"
},
"balance": 151.3179,
"price": 1.9358066258693962,
"value": 292.9221934326427,
"strategy": {
"name": "SNX",
"category": "lend",
"protocol": {
"id": "protocol_YjMHgKdRvPqhrteLJuRZnn",
"name": "Synthetix",
"slug": "synthetix",
"image_url": "https://cdn.openpool.co/static/protocols/synthetix.png"
}
},
"accrual": {
"balance": 151.31786077,
"accrual": 0.00003922999999872445,
"pct_change": 0.00002592555816693931,
"period": "24h"
},
"blockchain": {
"id": "blockchain_Sr4xsurVjmkZMMbH2rpLQ4",
"chain_id": 10,
"name": "Optimism",
"slug": "optimism",
"symbol": "Optimism",
"image_url": "https://storage.googleapis.com/openpool-assets/static/blockchains/Optimism.png"
},
"timestamp": "2023-09-12T18:49:47.517093Z",
"currency": "USD"
}
]
}