Python (SDK)
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_tokens(chain=models.V2RiskYieldTokensChain.ROBINHOOD, offset=0, limit=20, kind=models.DexTokenKind.STOCK, order_by=models.TokenOrderBy.LIQUIDITY_USD)
# 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.riskYieldTokens({
offset: 0,
limit: 20,
chain: "robinhood",
kind: "STOCK",
orderBy: "liquidity_usd",
});
console.log(result);
}
run();curl --request GET \
--url https://api.compasslabs.ai/v2/risk_yield/tokens \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.compasslabs.ai/v2/risk_yield/tokens', 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/tokens",
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/tokens"
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/tokens")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.compasslabs.ai/v2/risk_yield/tokens")
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,
"tokens": [
{
"address": "<string>",
"kind": "STOCK",
"symbol": "<string>",
"name": "<string>",
"decimals": 123,
"price_usd": "<string>",
"price_source": "CHAINLINK",
"price_confidence": "<string>",
"price_updated_at": "2023-11-07T05:31:56Z",
"stock": {
"ticker": "<string>",
"ui_multiplier": "<string>",
"pending_ui_multiplier": "<string>",
"pending_effective_at": "2023-11-07T05:31:56Z",
"chainlink_feed": "<string>",
"token_paused": true,
"status": "<string>",
"logo_url": "<string>"
},
"launchpad": {
"launchpad": "PONS_V1",
"status": "<string>",
"pair_token": "<string>",
"graduation_pool_id": 123,
"launched_at": "2023-11-07T05:31:56Z",
"creator": "<string>"
},
"liquidity_usd": "<string>",
"volume_24h_usd": "<string>",
"market_cap_usd": "<string>",
"fdv_usd": "<string>",
"price_change_24h_pct": "<string>",
"pool_count": 0,
"is_suspicious": false
}
],
"stats_updated_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Risk Yield
List tokens
The assets that trade on Robinhood Chain.
Tokenized stocks carry their issuer metadata, including the corporate-action multiplier — balances do not rebase on a split, so a quote for the underlying only becomes a token price once that is applied.
Memecoins carry the launch they came from. Every price carries the source it was resolved from and a confidence: below 0.6 it came from a pool shallow enough that one trade moves it, and every dollar figure derived from it is indicative.
GET
/
v2
/
risk_yield
/
tokens
Python (SDK)
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_tokens(chain=models.V2RiskYieldTokensChain.ROBINHOOD, offset=0, limit=20, kind=models.DexTokenKind.STOCK, order_by=models.TokenOrderBy.LIQUIDITY_USD)
# 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.riskYieldTokens({
offset: 0,
limit: 20,
chain: "robinhood",
kind: "STOCK",
orderBy: "liquidity_usd",
});
console.log(result);
}
run();curl --request GET \
--url https://api.compasslabs.ai/v2/risk_yield/tokens \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.compasslabs.ai/v2/risk_yield/tokens', 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/tokens",
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/tokens"
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/tokens")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.compasslabs.ai/v2/risk_yield/tokens")
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,
"tokens": [
{
"address": "<string>",
"kind": "STOCK",
"symbol": "<string>",
"name": "<string>",
"decimals": 123,
"price_usd": "<string>",
"price_source": "CHAINLINK",
"price_confidence": "<string>",
"price_updated_at": "2023-11-07T05:31:56Z",
"stock": {
"ticker": "<string>",
"ui_multiplier": "<string>",
"pending_ui_multiplier": "<string>",
"pending_effective_at": "2023-11-07T05:31:56Z",
"chainlink_feed": "<string>",
"token_paused": true,
"status": "<string>",
"logo_url": "<string>"
},
"launchpad": {
"launchpad": "PONS_V1",
"status": "<string>",
"pair_token": "<string>",
"graduation_pool_id": 123,
"launched_at": "2023-11-07T05:31:56Z",
"creator": "<string>"
},
"liquidity_usd": "<string>",
"volume_24h_usd": "<string>",
"market_cap_usd": "<string>",
"fdv_usd": "<string>",
"price_change_24h_pct": "<string>",
"pool_count": 0,
"is_suspicious": false
}
],
"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.
Required range:
x <= 1000Available options:
robinhood Filter to one kind of asset.
Available options:
STOCK, STABLE, NATIVE, WRAPPED_NATIVE, MAJOR, LAUNCHPAD_MEME, OTHER Available options:
PONS_V1, PONS_V2, POOLS_TRADE, BAGS Matches symbol, name or stock ticker.
Minimum string length:
2Only tokens the indexer can currently price.
Required range:
x >= 0Available options:
liquidity_usd, volume_24h_usd, market_cap_usd, price_change_24h_pct, created_at Available options:
asc, desc Was this page helpful?