curl --request GET \
--url https://raptor.solanatracker.io/quoteimport requests
url = "https://raptor.solanatracker.io/quote"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://raptor.solanatracker.io/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://raptor.solanatracker.io/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://raptor.solanatracker.io/quote"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://raptor.solanatracker.io/quote")
.asString();require 'uri'
require 'net/http'
url = URI("https://raptor.solanatracker.io/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"inputMint": "So11111111111111111111111111111111111111112",
"outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"amountIn": "100000000",
"amountOut": "11703794",
"minAmountOut": "11645275",
"priceImpact": 0,
"slippageBps": 50,
"routePlan": [
{
"programId": "9H6tua7jkLhdm3w8BvgpTn5LZNU7g4ZynDmCiNN3q6Rp",
"dex": "Humidifi",
"pool": "8sKQHfjNhvmAw94PhfvfMcytmqW6jmxvwieYyzXCCPu",
"inputMint": "So11111111111111111111111111111111111111112",
"outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"amountIn": "100000000",
"amountOut": "11703794",
"priceImpact": 0,
"percent": 100
}
],
"swapUsdValue": "11.72",
"platformFee": {
"feeBps": 0,
"feeFromInput": false,
"chargeBps": 0
},
"contextSlot": 454215309,
"timeTaken": 0.026,
"quoteId": "AbvXxjPyBhaxiDuRNB5XM54c_V8e-S0jPyMceNLpJQmU",
"searchMode": "fast"
}{
"error": "Invalid amount: must be greater than 0",
"code": 400
}{
"error": "Failed to get quote: No multi-hop route found",
"code": 422
}{
"error": "Failed to get quote: No multi-hop route found",
"code": 500
}{
"error": "<string>",
"code": 123
}Get swap quote
Find the best route for a swap and return the expected output. No wallet is needed.
Pass the whole response to POST /swap unchanged, and do it within a few seconds: quotes that carry a quoteId point to a short-lived execution plan.
curl --request GET \
--url https://raptor.solanatracker.io/quoteimport requests
url = "https://raptor.solanatracker.io/quote"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://raptor.solanatracker.io/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://raptor.solanatracker.io/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://raptor.solanatracker.io/quote"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://raptor.solanatracker.io/quote")
.asString();require 'uri'
require 'net/http'
url = URI("https://raptor.solanatracker.io/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"inputMint": "So11111111111111111111111111111111111111112",
"outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"amountIn": "100000000",
"amountOut": "11703794",
"minAmountOut": "11645275",
"priceImpact": 0,
"slippageBps": 50,
"routePlan": [
{
"programId": "9H6tua7jkLhdm3w8BvgpTn5LZNU7g4ZynDmCiNN3q6Rp",
"dex": "Humidifi",
"pool": "8sKQHfjNhvmAw94PhfvfMcytmqW6jmxvwieYyzXCCPu",
"inputMint": "So11111111111111111111111111111111111111112",
"outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"amountIn": "100000000",
"amountOut": "11703794",
"priceImpact": 0,
"percent": 100
}
],
"swapUsdValue": "11.72",
"platformFee": {
"feeBps": 0,
"feeFromInput": false,
"chargeBps": 0
},
"contextSlot": 454215309,
"timeTaken": 0.026,
"quoteId": "AbvXxjPyBhaxiDuRNB5XM54c_V8e-S0jPyMceNLpJQmU",
"searchMode": "fast"
}{
"error": "Invalid amount: must be greater than 0",
"code": 400
}{
"error": "Failed to get quote: No multi-hop route found",
"code": 422
}{
"error": "Failed to get quote: No multi-hop route found",
"code": 500
}{
"error": "<string>",
"code": 123
}Query Parameters
Mint address of the token you sell. Use So11111111111111111111111111111111111111112 for SOL.
Mint address of the token you buy.
Amount to sell, in the input token's smallest unit (for SOL, lamports: 1000000000 = 1 SOL).
x >= 1Maximum slippage in basis points (50 = 0.5%), or dynamic to let Raptor choose based on volatility and route.
Only route through these DEXes. Comma-separated, case-insensitive. A family name such as raydium matches all its pool types; use raydium-clmm, meteora-dlmm and so on for one type.
Only route through these pool addresses. Comma-separated.
Maximum number of hops in the route.
1 <= x <= 4Only use single-hop routes. Same as maxHops=1.
Just-in-time routing. auto uses it when it improves execution, true always uses it, false turns it off. See JIT routing.
auto, true, false deep searches more routes and takes longer.
fast, deep Wallet that receives your platform fee. Required when feeBps is set.
Platform fee in basis points (max 1000 = 10%).
0 <= x <= 1000Take the platform fee from the input token instead of the output token.
Extra fee, in basis points, taken only from positive slippage (output above the quote).
x >= 0Quote for native SOL. Use the same value you will send to /swap.
Wallet that will run the swap. Optional; quotes do not check balances.
Response
Quote
Quote returned by GET /quote. Send it back unchanged as quoteResponse.
Mint of the token sold
Mint of the token bought
Amount sold, in the input token's smallest unit
Expected amount received, in the output token's smallest unit
Least amount the swap will accept after slippage. The transaction fails rather than fill below this.
Price impact in percent (0.25 = 0.25%)
Slippage used, in basis points
Steps of the route, in order
Show child attributes
Show child attributes
Slot the quote was computed at
Time to compute the quote, in seconds
Pool fees for the route, when reported
USD value of the input amount
Your platform fee settings, as applied to the quote
Show child attributes
Show child attributes
Present only when the input or output token charges a Token-2022 transfer fee. Amounts are strings in the token's smallest unit.
Show child attributes
Show child attributes
true when the quote uses a just-in-time route
Reference to the stored execution plan. Expires after a few seconds.
Search mode used
fast, deep Was this page helpful?