Skip to main content

Don't have an API key yet?

Sign-up to Moralis to get your free API key and start building today.

Get Your Free API Key

Get DeFi positions by wallet

GEThttps://deep-index.moralis.io/api/v2.2/wallets/:address/defi/positions

Get the positions summary of a wallet address.

PATH PARAMS
addressstringrequired
Wallet address
QUERY PARAMS
chainstring
The chain to query
Responses
200Returns all defi positions for the wallet address.
400Bad Request
404Not Found
429Too Many Requests
500Internal Server Error
API KEY
curl --request GET \
--url 'https://deep-index.moralis.io/api/v2.2/wallets/0xd100d8b69c5ae23d6aa30c6c3874bf47539b95fd/defi/positions?chain=eth' \
--header 'accept: application/json' \
--header 'X-API-Key: YOUR_API_KEY'
Response Example
{
"protocol_name": "Uniswap v2",
"protocol_id": "uniswap-v2",
"protocol_url": "https://app.uniswap.org/pools/v2",
"protocol_logo": "https://cdn.moralis.io/defi/uniswap.png",
"total_unclaimed_usd_value": "",
"positions": [
{
"label": "liquidity",
"tokens": [
{
"token_type": "defi-token",
"name": "Wrapped Ether",
"symbol": "WETH",
"contract_address": "0x06012c8cf97bead5deae237070f9587f8e7a266d",
"decimals": 18,
"logo": "https://logos.covalenthq.com/tokens/0x0000000000085d4780b73119b644ae5ecd22b376.png",
"thumbnail": "https://logos.covalenthq.com/tokens/0x0000000000085d4780b73119b644ae5ecd22b376.png",
"balance": "1000000",
"balance_formatted": "1.000000",
"usd_price": 1000000,
"usd_value": 1000000
}
],
"address": "0x06012c8cf97bead5deae237070f9587f8e7a266d",
"balance_usd": 1000000,
"total_unclaimed_usd_value": 1000000,
"position_details": {
"fee_tier": 1,
"range_tnd": 1,
"reserves": [
"string"
],
"current_price": 1,
"is_in_range": true,
"price_upper": 1,
"price_lower": 1,
"price_label": "string",
"liquidity": 1,
"range_start": 1,
"pool_address": "string",
"position_key": "string",
"asset_standard": "string",
"apy": 1,
"is_debt": true,
"is_variable_debt": true,
"is_stable_debt": true,
"shares": "string",
"reserve0": "string",
"reserve1": "string",
"factory": "string",
"pair": "string",
"share_of_pool": 1
}
}
]
}