Живая котировка конвертации (preview)
curl --request POST \
--url https://api.example.com/v1/public/conversions/quote \
--header 'Content-Type: application/json' \
--header 'X-Signature: <api-key>' \
--data '
{
"sourceAssetCode": "ETH",
"targetAssetCode": "USDT_ERC20",
"network": "ETHEREUM",
"amountIn": "1.5",
"maxSlippageBps": 123
}
'import requests
url = "https://api.example.com/v1/public/conversions/quote"
payload = {
"sourceAssetCode": "ETH",
"targetAssetCode": "USDT_ERC20",
"network": "ETHEREUM",
"amountIn": "1.5",
"maxSlippageBps": 123
}
headers = {
"X-Signature": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Signature': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sourceAssetCode: 'ETH',
targetAssetCode: 'USDT_ERC20',
network: 'ETHEREUM',
amountIn: '1.5',
maxSlippageBps: 123
})
};
fetch('https://api.example.com/v1/public/conversions/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.example.com/v1/public/conversions/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([
'sourceAssetCode' => 'ETH',
'targetAssetCode' => 'USDT_ERC20',
'network' => 'ETHEREUM',
'amountIn' => '1.5',
'maxSlippageBps' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Signature: <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.example.com/v1/public/conversions/quote"
payload := strings.NewReader("{\n \"sourceAssetCode\": \"ETH\",\n \"targetAssetCode\": \"USDT_ERC20\",\n \"network\": \"ETHEREUM\",\n \"amountIn\": \"1.5\",\n \"maxSlippageBps\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Signature", "<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.example.com/v1/public/conversions/quote")
.header("X-Signature", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"sourceAssetCode\": \"ETH\",\n \"targetAssetCode\": \"USDT_ERC20\",\n \"network\": \"ETHEREUM\",\n \"amountIn\": \"1.5\",\n \"maxSlippageBps\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/public/conversions/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Signature"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sourceAssetCode\": \"ETH\",\n \"targetAssetCode\": \"USDT_ERC20\",\n \"network\": \"ETHEREUM\",\n \"amountIn\": \"1.5\",\n \"maxSlippageBps\": 123\n}"
response = http.request(request)
puts response.read_body{
"sourceAssetCode": "<string>",
"targetAssetCode": "<string>",
"network": "<string>",
"amountIn": "<string>",
"amountOut": "<string>",
"minAmountOut": "<string>",
"rate": "<string>",
"slippageBps": 123,
"ttlSeconds": 123,
"executable": true
}public · conversions
Живая котировка конвертации (preview)
Возвращает ожидаемый выход, minReceived, курс и slippage для пары source→target. Не создаёт заявку. executable=false = провайдер отдал preview-курс без on-chain исполнения (не настроен DEX-backend).
POST
/
v1
/
public
/
conversions
/
quote
Живая котировка конвертации (preview)
curl --request POST \
--url https://api.example.com/v1/public/conversions/quote \
--header 'Content-Type: application/json' \
--header 'X-Signature: <api-key>' \
--data '
{
"sourceAssetCode": "ETH",
"targetAssetCode": "USDT_ERC20",
"network": "ETHEREUM",
"amountIn": "1.5",
"maxSlippageBps": 123
}
'import requests
url = "https://api.example.com/v1/public/conversions/quote"
payload = {
"sourceAssetCode": "ETH",
"targetAssetCode": "USDT_ERC20",
"network": "ETHEREUM",
"amountIn": "1.5",
"maxSlippageBps": 123
}
headers = {
"X-Signature": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Signature': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sourceAssetCode: 'ETH',
targetAssetCode: 'USDT_ERC20',
network: 'ETHEREUM',
amountIn: '1.5',
maxSlippageBps: 123
})
};
fetch('https://api.example.com/v1/public/conversions/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.example.com/v1/public/conversions/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([
'sourceAssetCode' => 'ETH',
'targetAssetCode' => 'USDT_ERC20',
'network' => 'ETHEREUM',
'amountIn' => '1.5',
'maxSlippageBps' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Signature: <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.example.com/v1/public/conversions/quote"
payload := strings.NewReader("{\n \"sourceAssetCode\": \"ETH\",\n \"targetAssetCode\": \"USDT_ERC20\",\n \"network\": \"ETHEREUM\",\n \"amountIn\": \"1.5\",\n \"maxSlippageBps\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Signature", "<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.example.com/v1/public/conversions/quote")
.header("X-Signature", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"sourceAssetCode\": \"ETH\",\n \"targetAssetCode\": \"USDT_ERC20\",\n \"network\": \"ETHEREUM\",\n \"amountIn\": \"1.5\",\n \"maxSlippageBps\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/public/conversions/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Signature"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sourceAssetCode\": \"ETH\",\n \"targetAssetCode\": \"USDT_ERC20\",\n \"network\": \"ETHEREUM\",\n \"amountIn\": \"1.5\",\n \"maxSlippageBps\": 123\n}"
response = http.request(request)
puts response.read_body{
"sourceAssetCode": "<string>",
"targetAssetCode": "<string>",
"network": "<string>",
"amountIn": "<string>",
"amountOut": "<string>",
"minAmountOut": "<string>",
"rate": "<string>",
"slippageBps": 123,
"ttlSeconds": 123,
"executable": true
}Authorizations
HMAC-SHA256-Hex(timestamp + "." + raw_body, api_secret)
Body
application/json
Код актива-источника.
Example:
"ETH"
Код целевого актива (стейбл).
Example:
"USDT_ERC20"
Сеть исполнения.
Available options:
TRON, TON, ETHEREUM, BSC, POLYGON, BITCOIN, LITECOIN, XRP, SOLANA Example:
"ETHEREUM"
Сумма к конвертации (string).
Example:
"1.5"
Допустимое проскальзывание в bps (по умолчанию — из настроек).
Response
200 - application/json
false = preview без on-chain исполнения (нет DEX-backend).
⌘I