DeFi Protocol Positions

GET/gateway/v1/wallet/protocols

Returns all DeFi protocol positions for a wallet — lending, staking, LP, and farming with token breakdowns and USD values.

Lookup: by `address` (EVM only — 0x-prefixed hex). Solana addresses are not supported.

Query Parameters

addressstringrequired

Wallet address — must be a raw 0x-prefixed hex address, not an ENS name

Example: 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
limitinteger

Results per page

Example: 20
offsetinteger

Pagination offset

Example: 0
DeFi Protocol Positions
const options = {method: 'GET'};

fetch('https://api.asksurf.ai/gateway/v1/wallet/protocols?address=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045&limit=20&offset=0', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
OK
{
  "$schema": "https://example.com/schemas/DataResponseWalletProtocolItem.json",
  "data": [
    {
      "chain": "<string>",
      "logo_url": "<string>",
      "positions": [
        {
          "balance_usd": 123,
          "borrow_tokens": [
            {
              "amount": 123,
              "chain": "<string>",
              "name": "<string>",
              "price": 123,
              "symbol": "<string>",
              "token_address": "<string>"
            }
          ],
          "lp_tokens": [
            {
              "amount": 123,
              "chain": "<string>",
              "name": "<string>",
              "price": 123,
              "symbol": "<string>",
              "token_address": "<string>"
            }
          ],
          "name": "<string>",
          "reward_tokens": [
            {
              "amount": 123,
              "chain": "<string>",
              "name": "<string>",
              "price": 123,
              "symbol": "<string>",
              "token_address": "<string>"
            }
          ],
          "supply_tokens": [
            {
              "amount": 123,
              "chain": "<string>",
              "name": "<string>",
              "price": 123,
              "symbol": "<string>",
              "token_address": "<string>"
            }
          ]
        }
      ],
      "protocol_name": "<string>",
      "site_url": "<string>",
      "total_usd": 123
    }
  ],
  "meta": {
    "cached": true,
    "credits_used": 123,
    "empty_reason": "<string>",
    "has_more": true,
    "limit": 123,
    "offset": 123,
    "total": 123,
    "watermark": 123
  }
}