Get swap quote
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": "<string>",
"outputMint": "<string>",
"amountIn": "<string>",
"amountOut": "<string>",
"minAmountOut": "<string>",
"feeAmount": "<string>",
"priceImpact": 123,
"slippageBps": 123,
"routePlan": [
{
"programId": "<string>",
"dex": "<string>",
"pool": "<string>",
"inputMint": "<string>",
"outputMint": "<string>",
"amountIn": "<string>",
"amountOut": "<string>",
"feeAmount": "<string>",
"priceImpact": 123,
"percent": 123
}
],
"contextSlot": 123,
"timeTaken": 123,
"swapUsdValue": "<string>",
"priorityFee": {
"recommended": 123,
"level": "<string>",
"levels": {
"min": 123,
"low": 123,
"medium": 123,
"high": 123,
"veryHigh": 123,
"unsafeMax": 123
}
},
"platformFee": {
"feeBps": 123,
"feeAccount": "<string>"
}
}{
"error": "<string>",
"code": 123,
"message": "<string>"
}{
"error": "<string>",
"code": 123,
"message": "<string>"
}API Reference
Cotización de swap en Solana con Raptor
Encuentra la mejor ruta de un swap en Solana y el output esperado, sin wallet. Pasa la respuesta a POST /swap en pocos segundos. GET /quote.
GET
/
quote
Get swap quote
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": "<string>",
"outputMint": "<string>",
"amountIn": "<string>",
"amountOut": "<string>",
"minAmountOut": "<string>",
"feeAmount": "<string>",
"priceImpact": 123,
"slippageBps": 123,
"routePlan": [
{
"programId": "<string>",
"dex": "<string>",
"pool": "<string>",
"inputMint": "<string>",
"outputMint": "<string>",
"amountIn": "<string>",
"amountOut": "<string>",
"feeAmount": "<string>",
"priceImpact": 123,
"percent": 123
}
],
"contextSlot": 123,
"timeTaken": 123,
"swapUsdValue": "<string>",
"priorityFee": {
"recommended": 123,
"level": "<string>",
"levels": {
"min": 123,
"low": 123,
"medium": 123,
"high": 123,
"veryHigh": 123,
"unsafeMax": 123
}
},
"platformFee": {
"feeBps": 123,
"feeAccount": "<string>"
}
}{
"error": "<string>",
"code": 123,
"message": "<string>"
}{
"error": "<string>",
"code": 123,
"message": "<string>"
}Parámetros de consulta
Respuesta
Successful quote response
¿Esta página le ayudó?