Skip to main content

DeFi Holdings

GET /v1/defi-holdings

Retrieve user's DeFi positions with protocol details.

Required Permission: read:defi

Request

curl -X GET "https://connect.kryptos.io/api/v1/defi-holdings?chain=ethereum&limit=10" \
-H "Authorization: Bearer ACCESS_TOKEN" \
-H "X-Client-Id: YOUR_CLIENT_ID" \
-H "X-Client-Secret: YOUR_CLIENT_SECRET"

Query Parameters

ParameterTypeDescription
sourcestringFilter by data sources (comma-separated, max 30)
protocolstringFilter by protocols: aave, compound, uniswap
chainstringFilter by blockchain: ethereum, polygon, arbitrum
limitnumberMax results (1-1000, default: 100)
offsetnumberPagination offset (default: 0)

Response

{
"holdings": [
{
"holdingId": "defi_123",
"owner": {
"provider": "MetaMask",
"walletId": "wallet_123",
"publicAddress": "0x742d35..."
},
"protocolName": "Aave V3",
"chain": "ethereum",
"logoUrl": "https://...",
"siteUrl": "https://aave.com",
"category": "lending",
"portfolio": {
"category": "other",
"positions": [
{
"asset": {
"tokenId": "usd-coin",
"symbol": "USDC",
"publicName": "USD Coin"
},
"amount": "50000",
"value": {
"price": 50000,
"baseCurrency": "USD",
"timestamp": 1640995200000
}
}
],
"rewardPositions": []
},
"totalValue": {
"price": 52000,
"baseCurrency": "USD"
},
"netValue": {
"price": 50000,
"baseCurrency": "USD"
},
"createdAt": 1640995200000,
"updatedAt": 1640995200000,
"isActive": true
}
],
"pagination": {
"limit": 10,
"offset": 0
},
"user_id": "user_123"
}

DeFi Categories

CategoryDescription
lendingLending protocols (Aave, Compound)
stakingStaking positions
farmingYield farming
liquidityLiquidity pools
derivativesDerivatives positions