API ReferenceWallet APIGet Wallet Defi PositionsGet DeFi positions by walletVersion: 2.2Get DeFi positions by walletGEThttps://deep-index.moralis.io/api/v2.2/wallets/:address/defi/positionsGet the positions summary of a wallet address.PATH PARAMSaddressstringrequiredWallet addressQUERY PARAMSchainstringThe chain to queryeth0x1sepolia0xaa36a7polygon0x89bsc0x38bsc testnet0x61avalanche0xa86afantom0xfapalm0x2a15c308dcronos0x19arbitrum0xa4b1chiliz0x15b38chiliz testnet0x15b32gnosis0x64gnosis testnet0x27d8base0x2105base sepolia0x14a34optimism0xaholesky0x4268polygon amoy0x13882linea0xe708moonbeam0x504moonriver0x505moonbase0x507linea sepolia0xe705Responses200 Returns all defi positions for the wallet address.objectAPI KEYTest Live APINode.jsPythoncURLGoPHPimport Moralis from 'moralis';try { await Moralis.start({ apiKey: "YOUR_API_KEY" }); const response = await Moralis.EvmApi.wallets.getDefiPositionsSummary({ "chain": "0x1", "address": "0xcB1C1FdE09f811B294172696404e88E658659905" }); console.log(response.raw);} catch (e) { console.error(e);}from moralis import evm_apiapi_key = "YOUR_API_KEY"params = { "chain": "eth", "address": "0xcB1C1FdE09f811B294172696404e88E658659905"}result = evm_api.wallets.get_defi_positions_summary( api_key=api_key, params=params,)print(result)curl --request GET \ --url 'https://deep-index.moralis.io/api/v2.2/wallets/0xcB1C1FdE09f811B294172696404e88E658659905/defi/positions?chain=eth' \ --header 'accept: application/json' \ --header 'X-API-Key: YOUR_API_KEY' package mainimport ( "fmt" "net/http" "io/ioutil")func main() { url := "https://deep-index.moralis.io/api/v2.2/wallets/0xcB1C1FdE09f811B294172696404e88E658659905/defi/positions?chain=eth" req, _ := http.NewRequest("GET", url, payload) req.Header.Add("Accept", "application/json") req.Header.Add("X-API-Key", "YOUR_API_KEY") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body))}<?php// Dependencies to install:// $ composer require guzzlehttp/guzzlerequire_once('vendor/autoload.php');$client = new \GuzzleHttp\Client();$response = $client->request('GET', 'https://deep-index.moralis.io/api/v2.2/wallets/0xcB1C1FdE09f811B294172696404e88E658659905/defi/positions?chain=eth', [ 'headers' => [ 'Accept' => 'application/json', 'X-API-Key' => 'YOUR_API_KEY', ],]);echo $response->getBody();Response Example200 Returns all defi positions for the wallet address.{ "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 } } ]}