API Reference
- Aave V3
- Aerodrome Slipstream
- Morpho
- Sky
- Token
- Uniswap V3
- Universal
- Pendle
- Transaction Bundler
- Smart Account
Morpho
Check User Position
Check user’s overall position across the entire Morpho ecosystem.
Inlcuding all vault and market position metrics and relavant metadata of said vaults and markets.
GET
/
v0
/
morpho
/
user_position
Copy
Ask AI
from compass_api_sdk import CompassAPI, models
with CompassAPI(
api_key_auth="<YOUR_API_KEY_HERE>",
) as compass_api:
res = compass_api.morpho.user_position(chain=models.MorphoUserPositionChain.ETHEREUM_MAINNET, user_address="0xa829B388A3DF7f581cE957a95edbe419dd146d1B")
# Handle response
print(res)
Copy
Ask AI
{
"state": {
"vaultsPnlUsd": "<string>",
"vaultsAssetsUsd": "<string>",
"marketsPnlUsd": "<string>",
"marketsBorrowAssetsUsd": "<string>",
"marketsCollateralUsd": "<string>",
"marketsSupplyAssetsUsd": "<string>"
},
"vaultPositions": [
{
"id": "<string>",
"state": {
"pnlUsd": "<string>",
"assets": "<string>",
"assetsUsd": "<string>",
"shares": "<string>"
},
"vault": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"whitelisted": true,
"asset": {
"name": "<string>",
"symbol": "<string>",
"address": "<string>",
"decimals": 123,
"priceUsd": "<string>",
"logoURI": "<string>"
},
"dailyApys": {
"apy": "<string>",
"netApy": "<string>"
},
"weeklyApys": {
"apy": "<string>",
"netApy": "<string>"
},
"monthlyApys": {
"apy": "<string>",
"netApy": "<string>"
}
}
}
],
"marketPositions": [
{
"market": {
"uniqueKey": "<string>"
},
"healthFactor": "<string>",
"priceVariationToLiquidationPrice": "<string>",
"state": {
"pnlUsd": "<string>",
"borrowAssets": "<string>",
"borrowShares": "<string>",
"borrowAssetsUsd": "<string>",
"collateral": "<string>",
"collateralUsd": "<string>",
"supplyAssets": "<string>",
"supplyShares": "<string>",
"supplyAssetsUsd": "<string>"
}
}
]
}
Query Parameters
Available options:
ethereum:mainnet
, base:mainnet
The user wallet address of the desired user position.
Response
200
application/json
Successful Response
The response is of type object
.
Was this page helpful?
Copy
Ask AI
from compass_api_sdk import CompassAPI, models
with CompassAPI(
api_key_auth="<YOUR_API_KEY_HERE>",
) as compass_api:
res = compass_api.morpho.user_position(chain=models.MorphoUserPositionChain.ETHEREUM_MAINNET, user_address="0xa829B388A3DF7f581cE957a95edbe419dd146d1B")
# Handle response
print(res)
Copy
Ask AI
{
"state": {
"vaultsPnlUsd": "<string>",
"vaultsAssetsUsd": "<string>",
"marketsPnlUsd": "<string>",
"marketsBorrowAssetsUsd": "<string>",
"marketsCollateralUsd": "<string>",
"marketsSupplyAssetsUsd": "<string>"
},
"vaultPositions": [
{
"id": "<string>",
"state": {
"pnlUsd": "<string>",
"assets": "<string>",
"assetsUsd": "<string>",
"shares": "<string>"
},
"vault": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"whitelisted": true,
"asset": {
"name": "<string>",
"symbol": "<string>",
"address": "<string>",
"decimals": 123,
"priceUsd": "<string>",
"logoURI": "<string>"
},
"dailyApys": {
"apy": "<string>",
"netApy": "<string>"
},
"weeklyApys": {
"apy": "<string>",
"netApy": "<string>"
},
"monthlyApys": {
"apy": "<string>",
"netApy": "<string>"
}
}
}
],
"marketPositions": [
{
"market": {
"uniqueKey": "<string>"
},
"healthFactor": "<string>",
"priceVariationToLiquidationPrice": "<string>",
"state": {
"pnlUsd": "<string>",
"borrowAssets": "<string>",
"borrowShares": "<string>",
"borrowAssetsUsd": "<string>",
"collateral": "<string>",
"collateralUsd": "<string>",
"supplyAssets": "<string>",
"supplyShares": "<string>",
"supplyAssetsUsd": "<string>"
}
}
]
}
Assistant
Responses are generated using AI and may contain mistakes.