from compass_api_sdk import CompassAPI, models
with CompassAPI(
api_key_auth="<YOUR_API_KEY_HERE>",
) as compass_api:
res = compass_api.earn.earn_vaults(order_by="tvl_usd", direction=models.V2EarnVaultsDirection.DESC, offset=0, limit=50)
# Handle response
print(res)import { CompassApiSDK } from "@compass-labs/api-sdk";
const compassApiSDK = new CompassApiSDK({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await compassApiSDK.earn.earnVaults({
orderBy: "tvl_usd",
direction: "desc",
offset: 0,
limit: 50,
});
console.log(result);
}
run();curl --request GET \
--url https://api.compasslabs.ai/v2/earn/vaults \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.compasslabs.ai/v2/earn/vaults', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.compasslabs.ai/v2/earn/vaults",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.compasslabs.ai/v2/earn/vaults"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.compasslabs.ai/v2/earn/vaults")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.compasslabs.ai/v2/earn/vaults")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"total": 123,
"offset": 123,
"limit": 123,
"vaults": [
{
"apy_30d": "5.12",
"apy_7d": "5.25",
"apy_90d": "4.98",
"asset": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"asset_name": "USD Coin",
"asset_symbol": "USDC",
"chain": "ethereum",
"deposit_cap": "50000000.00",
"deposit_cap_usd": "50000000.00",
"liquidity_usd": "3200000.00",
"markets": [
{
"allocation_pct": 68,
"collateral_token": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"collateral_token_symbol": "WETH",
"lltv": "860000000000000000",
"loan_token": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"loan_token_symbol": "USDC",
"market_id": "0xb323495f7e4148be5643a4ea4a8221eef163e4bccfdedc2a6f4696baacbc86cc",
"supply_assets": "8500000000000",
"supply_cap": "50000000000000"
},
{
"allocation_pct": 32,
"collateral_token": "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",
"collateral_token_symbol": "WBTC",
"lltv": "770000000000000000",
"loan_token": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"loan_token_symbol": "USDC",
"market_id": "0xa921ef34e2fc7a27ccc50ae7e4b154e16c9799d3387076c421423ef52ac4df99",
"supply_assets": "4000000000000",
"supply_cap": "30000000000000"
}
],
"name": "Steakhouse USDC",
"owner": "0x1234567890123456789012345678901234567890",
"symbol": "steakUSDC",
"tvl_usd": "12500000.00",
"vault_address": "0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB"
},
{
"apy_30d": "3.28",
"apy_7d": "3.45",
"apy_90d": "3.15",
"asset": "0x4200000000000000000000000000000000000006",
"asset_name": "Wrapped Ether",
"asset_symbol": "WETH",
"chain": "base",
"deposit_cap": "5000.00",
"deposit_cap_usd": "15750000.00",
"liquidity_usd": "1500000.00",
"markets": [
{
"allocation_pct": 100,
"collateral_token": "0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22",
"collateral_token_symbol": "cbETH",
"lltv": "945000000000000000",
"loan_token": "0x4200000000000000000000000000000000000006",
"loan_token_symbol": "WETH",
"market_id": "0xdb760246f6859780f6c1b272d47a8f64710777121118e56e0cdb4b8b744a3094",
"supply_assets": "8750000000000000000000",
"supply_cap": "10000000000000000000000"
}
],
"name": "Morpho Blue WETH",
"owner": "0x1234567890123456789012345678901234567890",
"symbol": "mWETH",
"tvl_usd": "8750000.00",
"vault_address": "0x616a4E1db48e22028f6bbf20444Cd3b8e3273738"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}List vaults
List ERC-4626 yield vaults across DeFi venues.
Returns vault data including APY, TVL, and underlying asset information. Use this endpoint to discover yield opportunities, compare rates across venues, or build vault selection interfaces.
Supports dozens of vaults and markets like Morpho and other ERC-4626 compatible yield venues.
To deposit into a vault, use the manage endpoint with venue_type=VAULTS.
from compass_api_sdk import CompassAPI, models
with CompassAPI(
api_key_auth="<YOUR_API_KEY_HERE>",
) as compass_api:
res = compass_api.earn.earn_vaults(order_by="tvl_usd", direction=models.V2EarnVaultsDirection.DESC, offset=0, limit=50)
# Handle response
print(res)import { CompassApiSDK } from "@compass-labs/api-sdk";
const compassApiSDK = new CompassApiSDK({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await compassApiSDK.earn.earnVaults({
orderBy: "tvl_usd",
direction: "desc",
offset: 0,
limit: 50,
});
console.log(result);
}
run();curl --request GET \
--url https://api.compasslabs.ai/v2/earn/vaults \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.compasslabs.ai/v2/earn/vaults', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.compasslabs.ai/v2/earn/vaults",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.compasslabs.ai/v2/earn/vaults"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.compasslabs.ai/v2/earn/vaults")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.compasslabs.ai/v2/earn/vaults")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"total": 123,
"offset": 123,
"limit": 123,
"vaults": [
{
"apy_30d": "5.12",
"apy_7d": "5.25",
"apy_90d": "4.98",
"asset": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"asset_name": "USD Coin",
"asset_symbol": "USDC",
"chain": "ethereum",
"deposit_cap": "50000000.00",
"deposit_cap_usd": "50000000.00",
"liquidity_usd": "3200000.00",
"markets": [
{
"allocation_pct": 68,
"collateral_token": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"collateral_token_symbol": "WETH",
"lltv": "860000000000000000",
"loan_token": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"loan_token_symbol": "USDC",
"market_id": "0xb323495f7e4148be5643a4ea4a8221eef163e4bccfdedc2a6f4696baacbc86cc",
"supply_assets": "8500000000000",
"supply_cap": "50000000000000"
},
{
"allocation_pct": 32,
"collateral_token": "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",
"collateral_token_symbol": "WBTC",
"lltv": "770000000000000000",
"loan_token": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"loan_token_symbol": "USDC",
"market_id": "0xa921ef34e2fc7a27ccc50ae7e4b154e16c9799d3387076c421423ef52ac4df99",
"supply_assets": "4000000000000",
"supply_cap": "30000000000000"
}
],
"name": "Steakhouse USDC",
"owner": "0x1234567890123456789012345678901234567890",
"symbol": "steakUSDC",
"tvl_usd": "12500000.00",
"vault_address": "0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB"
},
{
"apy_30d": "3.28",
"apy_7d": "3.45",
"apy_90d": "3.15",
"asset": "0x4200000000000000000000000000000000000006",
"asset_name": "Wrapped Ether",
"asset_symbol": "WETH",
"chain": "base",
"deposit_cap": "5000.00",
"deposit_cap_usd": "15750000.00",
"liquidity_usd": "1500000.00",
"markets": [
{
"allocation_pct": 100,
"collateral_token": "0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22",
"collateral_token_symbol": "cbETH",
"lltv": "945000000000000000",
"loan_token": "0x4200000000000000000000000000000000000006",
"loan_token_symbol": "WETH",
"market_id": "0xdb760246f6859780f6c1b272d47a8f64710777121118e56e0cdb4b8b744a3094",
"supply_assets": "8750000000000000000000",
"supply_cap": "10000000000000000000000"
}
],
"name": "Morpho Blue WETH",
"owner": "0x1234567890123456789012345678901234567890",
"symbol": "mWETH",
"tvl_usd": "8750000.00",
"vault_address": "0x616a4E1db48e22028f6bbf20444Cd3b8e3273738"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Query Parameters
The field to order the results by.
The direction to order the results by.
asc, desc The offset of the first item to return.
The number of items to return.
x <= 1000Optional chain filter. If not provided, returns vaults for all chains. The chain to use.
base, ethereum, arbitrum, hyperevm, tempo, bsc, ethereum_sepolia Filter vaults by underlying asset symbol (e.g., 'USDC', 'WETH').
Minimum TVL in USD. Vaults with TVL below this value will be excluded.
Minimum available liquidity in USD. Vaults below this are excluded.
Minimum deposit capacity in USD. Vaults below this are excluded. Set to 0 to exclude paused vaults.
Response
Successful Response
Response model for a paginated list of ERC-4626 vaults.
A list of vault information objects.
Show child attributes
Show child attributes
[
{
"apy_30d": "5.12",
"apy_7d": "5.25",
"apy_90d": "4.98",
"asset": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"asset_name": "USD Coin",
"asset_symbol": "USDC",
"chain": "ethereum",
"deposit_cap": "50000000.00",
"deposit_cap_usd": "50000000.00",
"liquidity_usd": "3200000.00",
"markets": [
{
"allocation_pct": 68,
"collateral_token": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"collateral_token_symbol": "WETH",
"lltv": "860000000000000000",
"loan_token": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"loan_token_symbol": "USDC",
"market_id": "0xb323495f7e4148be5643a4ea4a8221eef163e4bccfdedc2a6f4696baacbc86cc",
"supply_assets": "8500000000000",
"supply_cap": "50000000000000"
},
{
"allocation_pct": 32,
"collateral_token": "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",
"collateral_token_symbol": "WBTC",
"lltv": "770000000000000000",
"loan_token": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"loan_token_symbol": "USDC",
"market_id": "0xa921ef34e2fc7a27ccc50ae7e4b154e16c9799d3387076c421423ef52ac4df99",
"supply_assets": "4000000000000",
"supply_cap": "30000000000000"
}
],
"name": "Steakhouse USDC",
"owner": "0x1234567890123456789012345678901234567890",
"symbol": "steakUSDC",
"tvl_usd": "12500000.00",
"vault_address": "0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB"
},
{
"apy_30d": "3.28",
"apy_7d": "3.45",
"apy_90d": "3.15",
"asset": "0x4200000000000000000000000000000000000006",
"asset_name": "Wrapped Ether",
"asset_symbol": "WETH",
"chain": "base",
"deposit_cap": "5000.00",
"deposit_cap_usd": "15750000.00",
"liquidity_usd": "1500000.00",
"markets": [
{
"allocation_pct": 100,
"collateral_token": "0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22",
"collateral_token_symbol": "cbETH",
"lltv": "945000000000000000",
"loan_token": "0x4200000000000000000000000000000000000006",
"loan_token_symbol": "WETH",
"market_id": "0xdb760246f6859780f6c1b272d47a8f64710777121118e56e0cdb4b8b744a3094",
"supply_assets": "8750000000000000000000",
"supply_cap": "10000000000000000000000"
}
],
"name": "Morpho Blue WETH",
"owner": "0x1234567890123456789012345678901234567890",
"symbol": "mWETH",
"tvl_usd": "8750000.00",
"vault_address": "0x616a4E1db48e22028f6bbf20444Cd3b8e3273738"
}
]
Was this page helpful?