from compass_api_sdk import CompassAPI
with CompassAPI(
api_key_auth="<YOUR_API_KEY_HERE>",
) as compass_api:
res = compass_api.tokenized_assets.tokenized_assets_quote(from_token="<value>", to_token="<value>", amount="98.06", owner="<value>")
# 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.tokenizedAssets.tokenizedAssetsQuote({
fromToken: "<value>",
toToken: "<value>",
amount: "98.06",
owner: "<value>",
});
console.log(result);
}
run();curl --request POST \
--url https://api.compasslabs.ai/v2/tokenized_assets/quote \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"amount": "100",
"from_token": "USDC",
"owner": "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
"to_token": "TSLAon"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: '100',
from_token: 'USDC',
owner: '0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B',
to_token: 'TSLAon'
})
};
fetch('https://api.compasslabs.ai/v2/tokenized_assets/quote', 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/tokenized_assets/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => '100',
'from_token' => 'USDC',
'owner' => '0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B',
'to_token' => 'TSLAon'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.compasslabs.ai/v2/tokenized_assets/quote"
payload := strings.NewReader("{\n \"amount\": \"100\",\n \"from_token\": \"USDC\",\n \"owner\": \"0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B\",\n \"to_token\": \"TSLAon\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.compasslabs.ai/v2/tokenized_assets/quote")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"100\",\n \"from_token\": \"USDC\",\n \"owner\": \"0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B\",\n \"to_token\": \"TSLAon\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.compasslabs.ai/v2/tokenized_assets/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"100\",\n \"from_token\": \"USDC\",\n \"owner\": \"0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B\",\n \"to_token\": \"TSLAon\"\n}"
response = http.request(request)
puts response.read_body{
"auction_range_bps": 50,
"quote": {
"est_fill_seconds": 180,
"fee": {
"amount_usd": "0.06",
"bps": 6
},
"input": {
"amount": "100",
"amount_usd": "100.00",
"contract_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"symbol": "USDC"
},
"output": {
"amount": "0.281678",
"amount_usd": "99.94",
"contract_address": "0xf6b1117ec07684D3958caD8BEb1b302bfD21103f",
"symbol": "TSLAon"
}
},
"recommended_slippage_bps": 100
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Quote an order
Preview a buy/sell quote for a tokenized equity (Ondo, e.g. TSLAon).
Read-only price preview: returns the expected input/output amounts and a
system-recommended slippage tolerance to carry into /order. Equities only —
RWA yield tokens (Midas) have no quote step and are rejected with 422 Wrong trade flow; trade them via /transact/buy and /transact/sell.
from compass_api_sdk import CompassAPI
with CompassAPI(
api_key_auth="<YOUR_API_KEY_HERE>",
) as compass_api:
res = compass_api.tokenized_assets.tokenized_assets_quote(from_token="<value>", to_token="<value>", amount="98.06", owner="<value>")
# 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.tokenizedAssets.tokenizedAssetsQuote({
fromToken: "<value>",
toToken: "<value>",
amount: "98.06",
owner: "<value>",
});
console.log(result);
}
run();curl --request POST \
--url https://api.compasslabs.ai/v2/tokenized_assets/quote \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"amount": "100",
"from_token": "USDC",
"owner": "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
"to_token": "TSLAon"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: '100',
from_token: 'USDC',
owner: '0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B',
to_token: 'TSLAon'
})
};
fetch('https://api.compasslabs.ai/v2/tokenized_assets/quote', 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/tokenized_assets/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => '100',
'from_token' => 'USDC',
'owner' => '0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B',
'to_token' => 'TSLAon'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.compasslabs.ai/v2/tokenized_assets/quote"
payload := strings.NewReader("{\n \"amount\": \"100\",\n \"from_token\": \"USDC\",\n \"owner\": \"0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B\",\n \"to_token\": \"TSLAon\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.compasslabs.ai/v2/tokenized_assets/quote")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"100\",\n \"from_token\": \"USDC\",\n \"owner\": \"0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B\",\n \"to_token\": \"TSLAon\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.compasslabs.ai/v2/tokenized_assets/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"100\",\n \"from_token\": \"USDC\",\n \"owner\": \"0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B\",\n \"to_token\": \"TSLAon\"\n}"
response = http.request(request)
puts response.read_body{
"auction_range_bps": 50,
"quote": {
"est_fill_seconds": 180,
"fee": {
"amount_usd": "0.06",
"bps": 6
},
"input": {
"amount": "100",
"amount_usd": "100.00",
"contract_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"symbol": "USDC"
},
"output": {
"amount": "0.281678",
"amount_usd": "99.94",
"contract_address": "0xf6b1117ec07684D3958caD8BEb1b302bfD21103f",
"symbol": "TSLAon"
}
},
"recommended_slippage_bps": 100
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Body
Preview a buy or sell quote for a tokenized equity.
Read-only: this previews a quote without consuming a quote_id or
committing an order. Use it to surface expected output, fees, and a
thin-liquidity warning before the user confirms; pass
the same body (plus slippage_bps) to POST /tokenized_assets/order
when they do.
Token the sender is paying. Either an on-chain symbol (e.g. TSLAon), the literal USDC, or a 0x-prefixed token address.
"USDC"
"WETH"
"0xA0b86a33E6441ccF30EE5DdEF1E9b652C91ac1c8"
Token the sender is receiving. Same accepted forms as from_token.
"USDC"
"WETH"
"0xA0b86a33E6441ccF30EE5DdEF1E9b652C91ac1c8"
Human-readable amount of from_token to swap (decimal string). Decimals are applied server-side.
Wallet that owns the Tokenized Assets Account. Used to verify the account is deployed before quoting; the account address is derived deterministically from this owner.
Response
Successful Response
Preview of input/output amounts plus auction-derived risk hints.
Preview of input/output amounts and fees. Identical shape to the quote block on POST /tokenized_assets/order.
Show child attributes
Show child attributes
Slippage tolerance in basis points (1 bp = 0.01%) the UI should echo back as slippage_bps on POST /tokenized_assets/order. Derived from the on-chain auction range (auctionEndAmount vs toTokenAmount) plus a small buffer; capped at 5000 bps.
Worst-case basis-points gap between the auction's end amount and the reference quote amount. Surfaces as a thin-liquidity warning before the user signs.
Was this page helpful?