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/:id

🔹 Get Strategy Details

🌐 Endpoint

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

📝 Overview

Retrieve detailed information about a specific strategy, including current rates, terms, and conditions.

🔑 Authentication

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

x-api-key: YOUR_API_KEY

📋 Path Parameters

Parameter
Type
Description
Example

id

string

Unique identifier for strategy

Aave-USDT-polygon

📦 Response

Returns a JSON object containing:

  • data: Strategy object 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

    • isActive: Boolean indicating if strategy is currently active

    • fee: Strategy fee percentage

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

    • logourl: URL for the token logo image

    • spotPosition: Current market position information

      • apy: Current annual percentage yield

      • inceptionApy: APY at strategy inception

      • avgApy: Average APY since inception

    • marketConditions: Current market metrics

      • maxLTV: Maximum loan-to-value ratio

      • liquidationThreshold: Threshold for liquidation

      • availableLiquidity: Available liquidity in the pool

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,
    "isActive": true,
    "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",
    "spotPosition": {
      "apy": 0.04174561398554853,
      "inceptionApy": 0.13852906926695097,
      "avgApy": 0.06438234415519406
    },
    "marketConditions": {
      "maxLTV": 0.8,
      "liquidationThreshold": 0.825,
      "availableLiquidity": "1000000000000"
    }
  }
}

❌ Error Responses

Status Code
Description

401

Unauthorized - Invalid or missing API key

404

Strategy not found

429

Too many requests - Rate limit exceeded

500

Internal server error

Example Error Response:

{
  "error": {
    "code": "STRATEGY_NOT_FOUND",
    "message": "Strategy with ID 'invalid-id' not found"
  }
}
PreviousGET /strategiesNextGET /strategies/:id/bytecode

Last updated 3 months ago

⚙️