POST
/
yield
/
optimize
curl --request POST \
  --url https://api.quantpilot.ai/yield/optimize \
  --header 'Content-Type: application/json' \
  --data '{
  "tokens": {
    "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984": "1000000000000000000",
    "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48": "5000000000"
  },
  "settings": {
    "riskLevel": "medium",
    "chains": [
      "eth",
      "arb",
      "op"
    ],
    "minApy": 3
  }
}'
{
  "strategies": [
    {
      "protocol": "Aave V3",
      "chain": "eth",
      "token": {
        "address": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984",
        "symbol": "UNI",
        "amount": "1000000000000000000"
      },
      "apy": 12.5,
      "tvl": 150000000
    },
    {
      "protocol": "Compound V3",
      "chain": "arb",
      "token": {
        "address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
        "symbol": "USDC",
        "amount": "5000000000"
      },
      "apy": 8.2,
      "tvl": 250000000
    }
  ],
  "summary": {
    "totalValueUsd": 7500,
    "estimatedAnnualYieldUsd": 825,
    "weightedApy": 11,
    "gasEstimateUsd": 25.5
  },
  "steps": [
    {
      "action": "Bridge USDC to Arbitrum",
      "gasEstimateUsd": 12.25
    },
    {
      "action": "Deposit UNI to Aave V3",
      "gasEstimateUsd": 8.15
    },
    {
      "action": "Deposit USDC to Compound V3",
      "gasEstimateUsd": 5.1
    }
  ]
}

Body

application/json
tokens
object
required

Map of token addresses to amounts in smallest unit (e.g., wei)

Example:
{
  "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984": "1000000000000000000",
  "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48": "5000000000"
}
settings
object

Response

200 - application/json
Optimized yield strategy
strategies
object[]
summary
object
steps
object[]

Steps to implement the strategy