Create Conversion
curl --request POST \
--url https://api-sandbox.uqpaytech.com/api/v1/ramp/conversion \
--header 'Content-Type: application/json' \
--header 'x-auth-token: <api-key>' \
--data '
{
"quote_id": "44903b33-40ea-41cd-8e50-a4050e3e37ce",
"sell_currency": "USDT",
"sell_amount": "1",
"buy_currency": "USD",
"buy_amount": "0.99",
"reason": "Sandbox contract regression"
}
'import requests
url = "https://api-sandbox.uqpaytech.com/api/v1/ramp/conversion"
payload = {
"quote_id": "44903b33-40ea-41cd-8e50-a4050e3e37ce",
"sell_currency": "USDT",
"sell_amount": "1",
"buy_currency": "USD",
"buy_amount": "0.99",
"reason": "Sandbox contract regression"
}
headers = {
"x-auth-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-auth-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
quote_id: '44903b33-40ea-41cd-8e50-a4050e3e37ce',
sell_currency: 'USDT',
sell_amount: '1',
buy_currency: 'USD',
buy_amount: '0.99',
reason: 'Sandbox contract regression'
})
};
fetch('https://api-sandbox.uqpaytech.com/api/v1/ramp/conversion', 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-sandbox.uqpaytech.com/api/v1/ramp/conversion",
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([
'quote_id' => '44903b33-40ea-41cd-8e50-a4050e3e37ce',
'sell_currency' => 'USDT',
'sell_amount' => '1',
'buy_currency' => 'USD',
'buy_amount' => '0.99',
'reason' => 'Sandbox contract regression'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-auth-token: <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-sandbox.uqpaytech.com/api/v1/ramp/conversion"
payload := strings.NewReader("{\n \"quote_id\": \"44903b33-40ea-41cd-8e50-a4050e3e37ce\",\n \"sell_currency\": \"USDT\",\n \"sell_amount\": \"1\",\n \"buy_currency\": \"USD\",\n \"buy_amount\": \"0.99\",\n \"reason\": \"Sandbox contract regression\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-auth-token", "<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-sandbox.uqpaytech.com/api/v1/ramp/conversion")
.header("x-auth-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"quote_id\": \"44903b33-40ea-41cd-8e50-a4050e3e37ce\",\n \"sell_currency\": \"USDT\",\n \"sell_amount\": \"1\",\n \"buy_currency\": \"USD\",\n \"buy_amount\": \"0.99\",\n \"reason\": \"Sandbox contract regression\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.uqpaytech.com/api/v1/ramp/conversion")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-auth-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"quote_id\": \"44903b33-40ea-41cd-8e50-a4050e3e37ce\",\n \"sell_currency\": \"USDT\",\n \"sell_amount\": \"1\",\n \"buy_currency\": \"USD\",\n \"buy_amount\": \"0.99\",\n \"reason\": \"Sandbox contract regression\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"message": "Success",
"data": {
"buy_amount": "0.99",
"buy_currency": "USD",
"create_time": "2026-09-10 11:40:08",
"network_fee": "0",
"order_id": "f5e8fbcc-c3e6-4c1a-8689-401768caaff0",
"order_type": "Sell",
"processing_fee": "0",
"quote_price": "0.99956",
"reason": "",
"sell_amount": "1",
"sell_currency": "USDT",
"settled_time": "",
"short_order_id": "ES260910-1M1TB7XE",
"status": "Pending"
}
}Conversions
Create Conversion
发起法币与加密货币兑换。 Stablecoin Account API 发布方免责声明
POST
/
v1
/
ramp
/
conversion
Create Conversion
curl --request POST \
--url https://api-sandbox.uqpaytech.com/api/v1/ramp/conversion \
--header 'Content-Type: application/json' \
--header 'x-auth-token: <api-key>' \
--data '
{
"quote_id": "44903b33-40ea-41cd-8e50-a4050e3e37ce",
"sell_currency": "USDT",
"sell_amount": "1",
"buy_currency": "USD",
"buy_amount": "0.99",
"reason": "Sandbox contract regression"
}
'import requests
url = "https://api-sandbox.uqpaytech.com/api/v1/ramp/conversion"
payload = {
"quote_id": "44903b33-40ea-41cd-8e50-a4050e3e37ce",
"sell_currency": "USDT",
"sell_amount": "1",
"buy_currency": "USD",
"buy_amount": "0.99",
"reason": "Sandbox contract regression"
}
headers = {
"x-auth-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-auth-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
quote_id: '44903b33-40ea-41cd-8e50-a4050e3e37ce',
sell_currency: 'USDT',
sell_amount: '1',
buy_currency: 'USD',
buy_amount: '0.99',
reason: 'Sandbox contract regression'
})
};
fetch('https://api-sandbox.uqpaytech.com/api/v1/ramp/conversion', 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-sandbox.uqpaytech.com/api/v1/ramp/conversion",
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([
'quote_id' => '44903b33-40ea-41cd-8e50-a4050e3e37ce',
'sell_currency' => 'USDT',
'sell_amount' => '1',
'buy_currency' => 'USD',
'buy_amount' => '0.99',
'reason' => 'Sandbox contract regression'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-auth-token: <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-sandbox.uqpaytech.com/api/v1/ramp/conversion"
payload := strings.NewReader("{\n \"quote_id\": \"44903b33-40ea-41cd-8e50-a4050e3e37ce\",\n \"sell_currency\": \"USDT\",\n \"sell_amount\": \"1\",\n \"buy_currency\": \"USD\",\n \"buy_amount\": \"0.99\",\n \"reason\": \"Sandbox contract regression\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-auth-token", "<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-sandbox.uqpaytech.com/api/v1/ramp/conversion")
.header("x-auth-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"quote_id\": \"44903b33-40ea-41cd-8e50-a4050e3e37ce\",\n \"sell_currency\": \"USDT\",\n \"sell_amount\": \"1\",\n \"buy_currency\": \"USD\",\n \"buy_amount\": \"0.99\",\n \"reason\": \"Sandbox contract regression\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.uqpaytech.com/api/v1/ramp/conversion")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-auth-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"quote_id\": \"44903b33-40ea-41cd-8e50-a4050e3e37ce\",\n \"sell_currency\": \"USDT\",\n \"sell_amount\": \"1\",\n \"buy_currency\": \"USD\",\n \"buy_amount\": \"0.99\",\n \"reason\": \"Sandbox contract regression\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"message": "Success",
"data": {
"buy_amount": "0.99",
"buy_currency": "USD",
"create_time": "2026-09-10 11:40:08",
"network_fee": "0",
"order_id": "f5e8fbcc-c3e6-4c1a-8689-401768caaff0",
"order_type": "Sell",
"processing_fee": "0",
"quote_price": "0.99956",
"reason": "",
"sell_amount": "1",
"sell_currency": "USDT",
"settled_time": "",
"short_order_id": "ES260910-1M1TB7XE",
"status": "Pending"
}
}授权
UQPAY 提供的用于登录的 API Token。
请求头
指定代表哪个子账户发起请求。应设置为 account_id,可通过 List Connected Accounts 接口获取。若省略或为空,则请求以主账户身份执行。
更多信息参见 Connected Accounts。
用于保持操作幂等性的唯一标识符(UUID),确保同一操作的重复执行不会产生非预期的影响或重复。在网络错误、重试或失败的情况下,它有助于保持数据一致性。
请求体
application/json
Create Quote 返回的报价 ID。先获取新报价,并在 valid_to 到期前使用其币种和金额;不要重用示例报价 ID。
示例:
"44903b33-40ea-41cd-8e50-a4050e3e37ce"
卖出币种
示例:
"USDT"
卖出金额
示例:
"1"
买入币种
示例:
"USD"
买入金额
示例:
"0.99"
交易备注
示例:
"Sandbox contract regression"

