Swap teklifi hesapla (sabit giriş)
curl --request GET \
--url https://transaction-v1.raydium.io/compute/swap-base-inimport requests
url = "https://transaction-v1.raydium.io/compute/swap-base-in"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://transaction-v1.raydium.io/compute/swap-base-in', 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://transaction-v1.raydium.io/compute/swap-base-in",
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://transaction-v1.raydium.io/compute/swap-base-in"
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://transaction-v1.raydium.io/compute/swap-base-in")
.asString();require 'uri'
require 'net/http'
url = URI("https://transaction-v1.raydium.io/compute/swap-base-in")
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{
"id": "550e8400-e29b-41d4-a716-446655440000",
"success": true,
"version": "V1",
"data": {
"inputAmount": "<string>",
"outputAmount": "<string>",
"priceImpact": "<string>",
"routes": [
{}
]
}
}{
"id": "<string>",
"success": false,
"version": "V1",
"msg": "<string>"
}Compute
Swap teklifi hesapla (sabit giriş)
Sabit bir giriş miktarı için beklenen çıkış miktarını hesaplar. İşlem oluşturmadan önce önizleme göstermek için kullanışlıdır.
GET
/
compute
/
swap-base-in
Swap teklifi hesapla (sabit giriş)
curl --request GET \
--url https://transaction-v1.raydium.io/compute/swap-base-inimport requests
url = "https://transaction-v1.raydium.io/compute/swap-base-in"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://transaction-v1.raydium.io/compute/swap-base-in', 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://transaction-v1.raydium.io/compute/swap-base-in",
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://transaction-v1.raydium.io/compute/swap-base-in"
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://transaction-v1.raydium.io/compute/swap-base-in")
.asString();require 'uri'
require 'net/http'
url = URI("https://transaction-v1.raydium.io/compute/swap-base-in")
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{
"id": "550e8400-e29b-41d4-a716-446655440000",
"success": true,
"version": "V1",
"data": {
"inputAmount": "<string>",
"outputAmount": "<string>",
"priceImpact": "<string>",
"routes": [
{}
]
}
}{
"id": "<string>",
"success": false,
"version": "V1",
"msg": "<string>"
}Sorgu Parametreleri
Giriş token'ının mint adresi (base58 kodlu public key).
Çıkış token'ının mint adresi (base58 kodlu public key).
Lamport cinsinden giriş miktarı (SPL token'larının en küçük birimi). Negatif olmayan bir tamsayı string'i olmalıdır.
Baz puan cinsinden maksimum slippage toleransı (0–10000). 1 bps = %0,01.
İsteğe bağlı yönlendirici ücreti, baz puan cinsinden (0–10000). Yalnızca bir yönlendirici yetkiliniz varsa kullanılır.
Solana işlem versiyonu. V0, adres arama tablolarını kullanır; LEGACY ise geleneksel formattır.
Mevcut seçenekler:
V0, LEGACY Bu sayfa yararlı mıydı?

