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
  1. API

GET /strategies

🔹 Get All Strategies

🌐 Endpoint

GET https://client.deframe.io/v1/strategies

📝 Overview

Retrieve a list of all available lending strategies across different protocols and networks.

🔑 Authentication

This API requires authentication using an API key. Include your API key in the request headers:

x-api-key: YOUR_API_KEY

📦 Response

Returns a JSON object containing:

  • data: Array of strategy objects with the following properties:

    • protocol: The lending protocol (e.g. "Aave")

    • asset: Contract address of the strategy asset

    • assetName: Token symbol (e.g. "USDT", "DAI")

    • network: Network name (e.g. "polygon", "gnosis")

    • networkId: Network chain ID

    • implementationSelector: Protocol implementation identifier

    • startDate: Strategy launch date

    • underlyingAsset: Contract address of the underlying token

    • assetDecimals: Number of decimals for the strategy asset

    • underlyingDecimals: Number of decimals for the underlying token

    • id: Unique strategy identifier

    • fee: Strategy fee percentage

    • metadata: Object containing localized risk, volatility and description information

    • logourl: URL for the token logo image

  • pagination: Object containing pagination details:

    • totalRecords: Total number of records

    • offset: Current offset

    • limit: Records per page

    • totalPages: Total number of pages

    • page: Current page number

    • hasPrevPage: Whether previous page exists

    • hasNextPage: Whether next page exists

    • prevPage: Previous page number

    • nextPage: Next page number

Example Response:

{
  "data": [
    {
      "protocol": "Aave",
      "asset": "0x6ab707Aca953eDAeFBc4fD23bA73294241490620", 
      "assetName": "USDT",
      "network": "polygon",
      "networkId": "137",
      "implementationSelector": "AavePolygon",
      "startDate": "2022-03-11T13:42:00.000Z",
      "underlyingAsset": "0xc2132D05D31c914a87C6611C10748AEb04B58e8F",
      "assetDecimals": 6,
      "underlyingDecimals": 6,
      "id": "Aave-USDT-polygon",
      "fee": "10",
      "metadata": {
        "PT": {
          "risk": "baixo",
          "volatility": "baixo", 
          "description": "Protocol Description"
        },
        "EN": {
          "risk": "low",
          "volatility": "low",
          "description": "Protocol Description"
        }
      },
      "logourl": "logourl.png"
    }
  ],
  "pagination": {
    "totalRecords": 5,
    "offset": 0,
    "limit": 10,
    "totalPages": 1,
    "page": 1,
    "hasPrevPage": false,
    "hasNextPage": false,
    "prevPage": null,
    "nextPage": null
  }
}
PreviousAPINextGET /strategies/:id

Last updated 3 months ago

⚙️