from compass_api_sdk import CompassAPI, models
with CompassAPI(
api_key_auth="<YOUR_API_KEY_HERE>",
) as compass_api:
res = compass_api.risk_yield.risk_yield_pools(chain=models.V2RiskYieldPoolsChain.ROBINHOOD, offset=0, limit=20, pair_class=models.PairClass.MEME_STOCK, lp_earns_fees=True, lp_open=True, order_by=models.PoolOrderBy.IL_ADJUSTED_APR_7D)
# 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.riskYield.riskYieldPools({
offset: 0,
limit: 20,
chain: "robinhood",
pairClass: "MEME_STOCK",
lpEarnsFees: true,
lpOpen: true,
orderBy: "il_adjusted_apr_7d",
});
console.log(result);
}
run();curl --request GET \
--url https://api.compasslabs.ai/v2/risk_yield/pools \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.compasslabs.ai/v2/risk_yield/pools', 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/risk_yield/pools",
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/risk_yield/pools"
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/risk_yield/pools")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.compasslabs.ai/v2/risk_yield/pools")
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,
"pools": [
{
"pool_id": 123,
"dex_version": "V3",
"pool_key": "<string>",
"token0": {
"address": "<string>",
"symbol": "<string>",
"name": "<string>",
"decimals": 123,
"kind": "OTHER",
"price_usd": "<string>",
"price_source": "CHAINLINK",
"price_confidence": "<string>",
"stock_ticker": "<string>"
},
"token1": {
"address": "<string>",
"symbol": "<string>",
"name": "<string>",
"decimals": 123,
"kind": "OTHER",
"price_usd": "<string>",
"price_source": "CHAINLINK",
"price_confidence": "<string>",
"stock_ticker": "<string>"
},
"fee_ppm": 123,
"fee_pct": "<string>",
"pair_class": "MEME_STOCK",
"watched": true,
"lp_open": true,
"lp_earns_fees": true,
"address": "<string>",
"tick_spacing": 123,
"hooks": "<string>",
"stock_token": "<string>",
"meme_token": "<string>",
"stock_ticker": "<string>",
"launchpad_origin": "PONS_V1",
"lp_fee_note": "<string>",
"tvl_usd": "<string>",
"tvl_confidence": "<string>",
"volume_24h_usd": "<string>",
"volume_7d_usd": "<string>",
"fees_24h_usd": "<string>",
"fees_7d_usd": "<string>",
"swaps_24h": 123,
"fee_apr_24h": "<string>",
"fee_apr_7d": "<string>",
"fee_apr_full_range_24h": "<string>",
"realized_vol_24h": "<string>",
"realized_vol_7d": "<string>",
"il_adjusted_apr_7d": "<string>",
"price": "<string>",
"price_change_24h_pct": "<string>",
"locked_share": "<string>",
"meme_fdv_usd": "<string>",
"ranked": true,
"created_at": "2023-11-07T05:31:56Z",
"last_swap_at": "2023-11-07T05:31:56Z",
"stats_updated_at": "2023-11-07T05:31:56Z"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}List pools
Pools you could provide liquidity to, ranked by what you would keep.
Read lp_earns_fees first. The launchpad that dominates this chain
graduates tokens into pools whose hook takes the swap fee, so they trade
enormously and pay an external liquidity provider nothing. Those pools are
listed — they carry the memecoin’s price and volume — with a fee APR of
exactly zero and a note saying why. Pass lp_earns_fees=true to hide them.
The default ordering is il_adjusted_apr_7d: the fee APR less the expected
impermanent-loss drag from the pair’s own volatility. A pool paying 200% on
an asset that moves 400% is not a better position than one paying 20% on an
asset that moves 30%, and sorting on the raw APR would say it was.
Pools too thin for a rate to mean anything — under 20 swaps a day, or under
$1,000 of liquidity — are served with ranked: false and always sort last.
from compass_api_sdk import CompassAPI, models
with CompassAPI(
api_key_auth="<YOUR_API_KEY_HERE>",
) as compass_api:
res = compass_api.risk_yield.risk_yield_pools(chain=models.V2RiskYieldPoolsChain.ROBINHOOD, offset=0, limit=20, pair_class=models.PairClass.MEME_STOCK, lp_earns_fees=True, lp_open=True, order_by=models.PoolOrderBy.IL_ADJUSTED_APR_7D)
# 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.riskYield.riskYieldPools({
offset: 0,
limit: 20,
chain: "robinhood",
pairClass: "MEME_STOCK",
lpEarnsFees: true,
lpOpen: true,
orderBy: "il_adjusted_apr_7d",
});
console.log(result);
}
run();curl --request GET \
--url https://api.compasslabs.ai/v2/risk_yield/pools \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.compasslabs.ai/v2/risk_yield/pools', 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/risk_yield/pools",
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/risk_yield/pools"
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/risk_yield/pools")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.compasslabs.ai/v2/risk_yield/pools")
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,
"pools": [
{
"pool_id": 123,
"dex_version": "V3",
"pool_key": "<string>",
"token0": {
"address": "<string>",
"symbol": "<string>",
"name": "<string>",
"decimals": 123,
"kind": "OTHER",
"price_usd": "<string>",
"price_source": "CHAINLINK",
"price_confidence": "<string>",
"stock_ticker": "<string>"
},
"token1": {
"address": "<string>",
"symbol": "<string>",
"name": "<string>",
"decimals": 123,
"kind": "OTHER",
"price_usd": "<string>",
"price_source": "CHAINLINK",
"price_confidence": "<string>",
"stock_ticker": "<string>"
},
"fee_ppm": 123,
"fee_pct": "<string>",
"pair_class": "MEME_STOCK",
"watched": true,
"lp_open": true,
"lp_earns_fees": true,
"address": "<string>",
"tick_spacing": 123,
"hooks": "<string>",
"stock_token": "<string>",
"meme_token": "<string>",
"stock_ticker": "<string>",
"launchpad_origin": "PONS_V1",
"lp_fee_note": "<string>",
"tvl_usd": "<string>",
"tvl_confidence": "<string>",
"volume_24h_usd": "<string>",
"volume_7d_usd": "<string>",
"fees_24h_usd": "<string>",
"fees_7d_usd": "<string>",
"swaps_24h": 123,
"fee_apr_24h": "<string>",
"fee_apr_7d": "<string>",
"fee_apr_full_range_24h": "<string>",
"realized_vol_24h": "<string>",
"realized_vol_7d": "<string>",
"il_adjusted_apr_7d": "<string>",
"price": "<string>",
"price_change_24h_pct": "<string>",
"locked_share": "<string>",
"meme_fdv_usd": "<string>",
"ranked": true,
"created_at": "2023-11-07T05:31:56Z",
"last_swap_at": "2023-11-07T05:31:56Z",
"stats_updated_at": "2023-11-07T05:31:56Z"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Query Parameters
The offset of the first item to return.
The number of items to return.
x <= 1000robinhood What kind of pair a pool is, which is what the product is sorted by.
MEME_STOCK, STOCK_STABLE, STOCK_ETH, STOCK_STOCK, MEME_ETH, MEME_STABLE, ETH_STABLE, OTHER Pools holding this token, on either side.
Which Uniswap deployment a pool belongs to.
v3 pools hold their own tokens and pay LPs the fee tier. v4 pools live in a shared PoolManager and may route the fee through a hook, which is where the launchpad pools' zero LP yield comes from.
V3, V4 PONS_V1, PONS_V2, POOLS_TRADE, BAGS Leave unset to see everything. Set true to hide the pools whose hook keeps the fee — most of this chain's volume, and none of its yield.
Whether liquidity may be added at all.
Only pools the indexer follows closely, which are the only ones with trailing metrics.
x >= 0x >= 0il_adjusted_apr_7d, fee_apr_24h, fee_apr_7d, tvl_usd, volume_24h_usd, volume_7d_usd, realized_vol_24h, realized_vol_7d, created_at asc, desc Was this page helpful?