from compass_api_sdk import CompassAPI, models
with CompassAPI(
api_key_auth="<YOUR_API_KEY_HERE>",
) as compass_api:
res = compass_api.aerodrome_slipstream.aerodrome_slipstream_pool_price(chain=models.V1AerodromeSlipstreamPoolPriceChain.BASE, token_in="USDC", token_out="USDC", tick_spacing=100)
# 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.aerodromeSlipstream.aerodromeSlipstreamPoolPrice({
chain: "base",
tokenIn: "USDC",
tokenOut: "USDC",
tickSpacing: 100,
});
console.log(result);
}
run();curl --request GET \
--url https://api.compasslabs.ai/v1/aerodrome_slipstream/pool_price \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.compasslabs.ai/v1/aerodrome_slipstream/pool_price', 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/aerodrome_slipstream/pool_price",
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/aerodrome_slipstream/pool_price"
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/aerodrome_slipstream/pool_price")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.compasslabs.ai/v1/aerodrome_slipstream/pool_price")
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{
"token_in": "<string>",
"token_out": "<string>",
"price": "<string>",
"tick": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Pool Price
This endpoint retrieves the current price of a pool, indicating how many token0 you can purchase for 1 token1.
Note that this is an instantaneous price and may change during any trade. For a more accurate representation of the trade ratios between the two assets, consider using the quote endpoint.
from compass_api_sdk import CompassAPI, models
with CompassAPI(
api_key_auth="<YOUR_API_KEY_HERE>",
) as compass_api:
res = compass_api.aerodrome_slipstream.aerodrome_slipstream_pool_price(chain=models.V1AerodromeSlipstreamPoolPriceChain.BASE, token_in="USDC", token_out="USDC", tick_spacing=100)
# 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.aerodromeSlipstream.aerodromeSlipstreamPoolPrice({
chain: "base",
tokenIn: "USDC",
tokenOut: "USDC",
tickSpacing: 100,
});
console.log(result);
}
run();curl --request GET \
--url https://api.compasslabs.ai/v1/aerodrome_slipstream/pool_price \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.compasslabs.ai/v1/aerodrome_slipstream/pool_price', 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/aerodrome_slipstream/pool_price",
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/aerodrome_slipstream/pool_price"
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/aerodrome_slipstream/pool_price")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.compasslabs.ai/v1/aerodrome_slipstream/pool_price")
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{
"token_in": "<string>",
"token_out": "<string>",
"price": "<string>",
"tick": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Query Parameters
base The symbol or address of a token in the pool. A token identifier - either a supported symbol (e.g., USDC, WETH) or a valid Ethereum address (0x...)
"USDC"
"WETH"
"0xA0b86a33E6441ccF30EE5DdEF1E9b652C91ac1c8"
The symbol or address of a token in the pool. A token identifier - either a supported symbol (e.g., USDC, WETH) or a valid Ethereum address (0x...)
"USDC"
"WETH"
"0xA0b86a33E6441ccF30EE5DdEF1E9b652C91ac1c8"
The tick spacing of the pool
x >= 1Response
Successful Response
The first token in the pool.
The second token in the pool.
The price of the pool. This is expressed as an instantaneous amount of how many token0 you need to buy 1 token1. In any swap this will not change during the trade; use the quote endpoint to get a better idea of how much you will pay!
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$The current tick in the pool. This is a number that represents the price of the pool according to the aerodrome_slipstream v3 concentrated liquidity concept.
Was this page helpful?