Deframe
  • 🏠Getting Started
  • 🏗️Architecture Overview
  • Tutorial Guides
    • Loans
      • How to quote for a new loan
      • How to execute a new loan
      • How to get current position of a loan
      • How to repay a loan
    • Yield
      • How to check protocol info
      • How to deposit
      • How to check open positions
      • How to withdraw
    • Swaps
      • EVM
        • How to execute a swap
        • How to get a quote
      • Solana
        • How to execute a swap
        • How to get a quote
  • ⚙️API
    • GET /strategies
    • GET /strategies/:id
    • GET /strategies/:id/bytecode
    • GET /wallets/:address
  • 🔒Protocols
  • 🗳️Widget Integration
Powered by GitBook
On this page
  • Prerequisites
  • How to Check Open Positions
  • Next Steps
  1. Tutorial Guides
  2. Yield

How to check open positions

PreviousHow to depositNextHow to withdraw

Last updated 3 months ago

In this section, we'll learn how to retrieve the current yield positions for an address.

Prerequisites

How to Check Open Positions

  1. Request Current Positions Use the following endpoint to retrieve all the current yield positions of an address:

    GET /wallets/:address/yield

    Required Parameters:\

    Parameter
    Description
    Example

    address

    Wallet address

    0x1234567890123456789012345678901234567890

    Example Request:

    GET /wallets/0x1234567890123456789012345678901234567890/yield

    Response:

    {
      "address": "0x1234567890123456789012345678901234567890",
      "positions": [
        {
          "protocol": "Aave",
          "asset": {
            "address": "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",
            "decimals": "18",
            "symbol": "WETH",
            "name": "Wrapped Ether"
          },
          "balance": {
            "raw": "1000000000000000000",
            "humanized": 1.0,
            "decimals": "18"
          },
          "balanceUSD": "2601.29",
          "apy": "0.0312",
          "rewards": [
            {
              "token": {
                "address": "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9",
                "symbol": "AAVE",
                "decimals": "18"
              },
              "amount": "0.05",
              "amountUSD": "10.50"
            }
          ]
        }
      ]
    }

The response will return an array of yield positions across different protocols, including details about the deposited assets, current balances, APY rates, and any additional reward tokens being earned.

Next Steps

After checking your positions, you can:

How to Check Protocol Info
How to Deposit
Withdraw from a Position
Open a New Position
Active Loans example in the UI