Yield
Optimize portfolio yield allocation
Yield
Optimize portfolio yield allocation
Optimize yield allocation across DeFi protocols for a given portfolio
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
Map of token addresses to amounts in smallest unit (e.g., wei)
Example:
{
"0x1f9840a85d5af5bf1d1762f925bdaddc4201f984": "1000000000000000000",
"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48": "5000000000"
}
Response
200 - application/json
Optimized yield strategy
Protocol name
Example:
"Aave V3"
Chain ID
Example:
"eth"
Expected APY (%)
Example:
12.5
Total Value Locked in USD
Example:
150000000
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
}
]
}