Python (SDK)
from compass_api_sdk import CompassAPI, models
with CompassAPI(
api_key_auth="<YOUR_API_KEY_HERE>",
) as compass_api:
res = compass_api.credit.credit_euler_markets(chain=models.V2CreditEulerMarketsChain.ETHEREUM)
# 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.credit.creditEulerMarkets({
chain: "ethereum",
});
console.log(result);
}
run();curl --request GET \
--url https://api.compasslabs.ai/v2/credit/euler_markets \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.compasslabs.ai/v2/credit/euler_markets', 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/credit/euler_markets",
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/credit/euler_markets"
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/credit/euler_markets")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.compasslabs.ai/v2/credit/euler_markets")
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{
"perspective": "<string>",
"markets": [
{
"asset": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"asset_decimals": 6,
"asset_price_usd": "1.0000000000",
"asset_symbol": "USDT",
"available_liquidity": "500.0000000000",
"borrow_apy": "5.2500000000",
"borrow_cap": "1800.0000000000",
"collaterals": [
{
"asset": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"asset_decimals": 6,
"asset_price_usd": "1.0000000000",
"asset_symbol": "USDC",
"borrow_ltv": "94.0000000000",
"liquidation_ltv": "96.0000000000",
"supply_apy": "4.0100000000",
"vault": "0x797DD80692c3b2dAdabCe8e30C07fDE5307D48a9"
}
],
"supply_apy": "3.4500000000",
"total_borrow_assets": "1500.0000000000",
"total_supply_assets": "2000.0000000000",
"unit_of_account_symbol": "USD",
"utilization": "75.0000000000",
"vault": "0x313603FA690301b0CaeEf8069c065862f9162162",
"vault_symbol": "eUSDT-2"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Credit
List curated Euler markets
List curated Euler V2 credit markets for a chain.
Euler is permissionless, so credit borrow/repay identify a market by EVK vault address. This returns the borrow markets from Euler’s Governed Perspective (the DAO-vetted vault set) — each with the collateral vaults it accepts and their LTVs — so callers know which borrow_vault / collateral_vault to use.
GET
/
v2
/
credit
/
euler_markets
Python (SDK)
from compass_api_sdk import CompassAPI, models
with CompassAPI(
api_key_auth="<YOUR_API_KEY_HERE>",
) as compass_api:
res = compass_api.credit.credit_euler_markets(chain=models.V2CreditEulerMarketsChain.ETHEREUM)
# 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.credit.creditEulerMarkets({
chain: "ethereum",
});
console.log(result);
}
run();curl --request GET \
--url https://api.compasslabs.ai/v2/credit/euler_markets \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.compasslabs.ai/v2/credit/euler_markets', 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/credit/euler_markets",
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/credit/euler_markets"
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/credit/euler_markets")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.compasslabs.ai/v2/credit/euler_markets")
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{
"perspective": "<string>",
"markets": [
{
"asset": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"asset_decimals": 6,
"asset_price_usd": "1.0000000000",
"asset_symbol": "USDT",
"available_liquidity": "500.0000000000",
"borrow_apy": "5.2500000000",
"borrow_cap": "1800.0000000000",
"collaterals": [
{
"asset": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"asset_decimals": 6,
"asset_price_usd": "1.0000000000",
"asset_symbol": "USDC",
"borrow_ltv": "94.0000000000",
"liquidation_ltv": "96.0000000000",
"supply_apy": "4.0100000000",
"vault": "0x797DD80692c3b2dAdabCe8e30C07fDE5307D48a9"
}
],
"supply_apy": "3.4500000000",
"total_borrow_assets": "1500.0000000000",
"total_supply_assets": "2000.0000000000",
"unit_of_account_symbol": "USD",
"utilization": "75.0000000000",
"vault": "0x313603FA690301b0CaeEf8069c065862f9162162",
"vault_symbol": "eUSDT-2"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Query Parameters
Available options:
arbitrum, base, bsc, ethereum, hyperevm, tempo Response
Successful Response
Curated Euler V2 borrow markets, read from Euler's Governed Perspective.
Euler Governed Perspective contract the curated vault set was read from.
Curated borrow markets, each with its accepted collateral vaults and LTVs.
Show child attributes
Show child attributes
Example:
[
{
"asset": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"asset_decimals": 6,
"asset_price_usd": "1.0000000000",
"asset_symbol": "USDT",
"available_liquidity": "500.0000000000",
"borrow_apy": "5.2500000000",
"borrow_cap": "1800.0000000000",
"collaterals": [
{
"asset": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"asset_decimals": 6,
"asset_price_usd": "1.0000000000",
"asset_symbol": "USDC",
"borrow_ltv": "94.0000000000",
"liquidation_ltv": "96.0000000000",
"supply_apy": "4.0100000000",
"vault": "0x797DD80692c3b2dAdabCe8e30C07fDE5307D48a9"
}
],
"supply_apy": "3.4500000000",
"total_borrow_assets": "1500.0000000000",
"total_supply_assets": "2000.0000000000",
"unit_of_account_symbol": "USD",
"utilization": "75.0000000000",
"vault": "0x313603FA690301b0CaeEf8069c065862f9162162",
"vault_symbol": "eUSDT-2"
}
]
Was this page helpful?
⌘I