Python (SDK)
from compass_api_sdk import CompassAPI, models
with CompassAPI(
api_key_auth="<YOUR_API_KEY_HERE>",
) as compass_api:
res = compass_api.pendle.pendle_markets(chain=models.V1PendleMarketsChain.ARBITRUM)
# 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.pendle.pendleMarkets({
chain: "arbitrum",
});
console.log(result);
}
run();curl --request GET \
--url https://api.compasslabs.ai/v1/pendle/markets \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.compasslabs.ai/v1/pendle/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/v1/pendle/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/v1/pendle/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/v1/pendle/markets")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.compasslabs.ai/v1/pendle/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{
"markets": [
{
"name": "<string>",
"address": "<string>",
"expiry": "2023-11-07T05:31:56Z",
"pt": "<string>",
"yt": "<string>",
"sy": "<string>",
"underlyingAsset": "<string>",
"details": {
"liquidity": 123,
"pendleApy": 123,
"impliedApy": 123,
"feeRate": 123,
"yieldRange": {
"min": 123,
"max": 123
},
"aggregatedApy": 123,
"maxBoostedApy": 123,
"movement10Percent": {
"ptMovementUpUsd": 123,
"ptMovementDownUsd": 123,
"ytMovementUpUsd": 123,
"ytMovementDownUsd": 123
}
},
"isNew": true,
"isPrime": true,
"timestamp": "2023-11-07T05:31:56Z"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Pendle
List Market Data
Get a list of active markets.
GET
/
v1
/
pendle
/
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.pendle.pendle_markets(chain=models.V1PendleMarketsChain.ARBITRUM)
# 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.pendle.pendleMarkets({
chain: "arbitrum",
});
console.log(result);
}
run();curl --request GET \
--url https://api.compasslabs.ai/v1/pendle/markets \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.compasslabs.ai/v1/pendle/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/v1/pendle/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/v1/pendle/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/v1/pendle/markets")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.compasslabs.ai/v1/pendle/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{
"markets": [
{
"name": "<string>",
"address": "<string>",
"expiry": "2023-11-07T05:31:56Z",
"pt": "<string>",
"yt": "<string>",
"sy": "<string>",
"underlyingAsset": "<string>",
"details": {
"liquidity": 123,
"pendleApy": 123,
"impliedApy": 123,
"feeRate": 123,
"yieldRange": {
"min": 123,
"max": 123
},
"aggregatedApy": 123,
"maxBoostedApy": 123,
"movement10Percent": {
"ptMovementUpUsd": 123,
"ptMovementDownUsd": 123,
"ytMovementUpUsd": 123,
"ytMovementDownUsd": 123
}
},
"isNew": true,
"isPrime": true,
"timestamp": "2023-11-07T05:31:56Z"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Query Parameters
Available options:
arbitrum, base, ethereum Response
Successful Response
A list of active markets on the inputted chain.
Show child attributes
Show child attributes
Was this page helpful?
⌘I