Yield Optimizer API v1

Gets Distribution allocation among the lending protocols, given by the ETHA algorithm.

Distribution Strategy

GET https://ethalend.com/api/strategy/supply?asset=DAI&budget=1000&period=1h

Get Distribution allocation

Query Parameters

Name
Type
Description

asset

string

Requested asset (e.g. dai, usdc, usdt, eth)

budget

string

Requested budget (e.g. 100, 250.23, 300)

period

string

Requested period (e.g. 1h, 6h, 12h, 1d, 1w)

{
    "success": true,
    "ratios": [
        {
            "platform": "compound",
            "ratio": 0,
            "supplyRate": 0.0109960023256704
        },
        {
            "platform": "aave",
            "ratio": 0,
            "supplyRate": 0.0221714659824143
        },
        {
            "platform": "dydx",
            "ratio": 100,
            "supplyRate": 0.032848323427703
        },
        {
            "platform": "return",
            "ratio": 23356,
            "supplyRate": ""
        },
        {
            "platform": "risk",
            "ratio": 100,
            "supplyRate": ""
        },
        {
            "platform": "risk_normalized_return",
            "ratio": 23356,
            "supplyRate": ""
        }
    ]
}

Redeem Strategy

GET https://ethalend.com/api/strategy/redeem?symbol=DAI&amount=1&wallet 0x0ef017411cd16b7652e4F7365E1f2F5e61BdBB3b

Redeem allocation given by the ETHA algorithm

Query Parameters

Name
Type
Description

symbol

string

Requested symbol (e.g. dai, usdc, usdt, eth)

amount

number

Requested amount (e.g. 1, 10, 100, 100.20)

wallet

string

Requested wallet (e.g. 0x111..455)

{
  "success": true,
  "ratios": [
    {
      "supplyRate": 0.04406653458420732,
      "platform": "dYdX",
      "ratio": 50
    },
    {
      "supplyRate": 0.054340366012208936,
      "platform": "AaveVariable",
      "ratio": 30
    },
    {
      "supplyRate": 0.03244079760817143,
      "platform": "CompoundV2",
      "ratio": 20
    }
  ],
  "rates": {
    "CompoundV2": {
      "current": 0.03496240771494,
      "past7Days": 0.03244079760817143,
      "past30Days": 0.033720454555778,
      "past90Days": 0.029508508481274242
    },
    "dYdX": {
      "current": 0.02439052204499,
      "past7Days": 0.028396221626707147,
      "past30Days": 0.04406653458420732,
      "past90Days": 0.04960282094576699
    },
    "AaveVariable": {
      "current": 0.05041439384198464,
      "past7Days": 0.05362877920349093,
      "past30Days": 0.03821618975715144,
      "past90Days": 0.054340366012208936
    }
  }
}

Last updated