Fetch swap quote
curl --request GET \
--url https://secureapi.dyrectpay.com/api/v1/swaps/quotes \
--header 'x-api-key: <api-key>' \
--header 'x-signature: <api-key>' \
--header 'x-timestamp: <api-key>'import requests
url = "https://secureapi.dyrectpay.com/api/v1/swaps/quotes"
headers = {
"x-api-key": "<api-key>",
"x-timestamp": "<api-key>",
"x-signature": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'x-api-key': '<api-key>',
'x-timestamp': '<api-key>',
'x-signature': '<api-key>'
}
};
fetch('https://secureapi.dyrectpay.com/api/v1/swaps/quotes', 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://secureapi.dyrectpay.com/api/v1/swaps/quotes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>",
"x-signature: <api-key>",
"x-timestamp: <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"
"net/http"
"io"
)
func main() {
url := "https://secureapi.dyrectpay.com/api/v1/swaps/quotes"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-timestamp", "<api-key>")
req.Header.Add("x-signature", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://secureapi.dyrectpay.com/api/v1/swaps/quotes")
.header("x-api-key", "<api-key>")
.header("x-timestamp", "<api-key>")
.header("x-signature", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://secureapi.dyrectpay.com/api/v1/swaps/quotes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["x-timestamp"] = '<api-key>'
request["x-signature"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Success",
"data": {
"quotedPrice": "0.000013049890285960344",
"originalQuotedPrice": "0.000012946319728135260642112",
"fee": "1.0357055782508209e-7",
"quotedCurrency": "BTC",
"toAmount": "0.00012842432",
"originalToAmount": "0.00012946"
}
}{
"status": "error",
"message": "Invalid request",
"data": null
}{
"status": "error",
"message": "Invalid request",
"data": null
}Swaps
Fetch swap quote
Fetch temporary swap quote.
GET
/
api
/
v1
/
swaps
/
quotes
Fetch swap quote
curl --request GET \
--url https://secureapi.dyrectpay.com/api/v1/swaps/quotes \
--header 'x-api-key: <api-key>' \
--header 'x-signature: <api-key>' \
--header 'x-timestamp: <api-key>'import requests
url = "https://secureapi.dyrectpay.com/api/v1/swaps/quotes"
headers = {
"x-api-key": "<api-key>",
"x-timestamp": "<api-key>",
"x-signature": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'x-api-key': '<api-key>',
'x-timestamp': '<api-key>',
'x-signature': '<api-key>'
}
};
fetch('https://secureapi.dyrectpay.com/api/v1/swaps/quotes', 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://secureapi.dyrectpay.com/api/v1/swaps/quotes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>",
"x-signature: <api-key>",
"x-timestamp: <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"
"net/http"
"io"
)
func main() {
url := "https://secureapi.dyrectpay.com/api/v1/swaps/quotes"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-timestamp", "<api-key>")
req.Header.Add("x-signature", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://secureapi.dyrectpay.com/api/v1/swaps/quotes")
.header("x-api-key", "<api-key>")
.header("x-timestamp", "<api-key>")
.header("x-signature", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://secureapi.dyrectpay.com/api/v1/swaps/quotes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["x-timestamp"] = '<api-key>'
request["x-signature"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Success",
"data": {
"quotedPrice": "0.000013049890285960344",
"originalQuotedPrice": "0.000012946319728135260642112",
"fee": "1.0357055782508209e-7",
"quotedCurrency": "BTC",
"toAmount": "0.00012842432",
"originalToAmount": "0.00012946"
}
}{
"status": "error",
"message": "Invalid request",
"data": null
}{
"status": "error",
"message": "Invalid request",
"data": null
}Authorizations
API key issued to your integration.
Request timestamp used for signature verification.
Request signature generated by your backend.
Query Parameters
Example:
"usdt"
Example:
"bitcoin"
Example:
10
⌘I
