Get Swap
curl --request GET \
--url https://api.yativo.com/api/v1/wallet/swap/{reference} \
--header 'X-Api-Key: <api-key>' \
--header 'X-Api-Secret: <api-key>'import requests
url = "https://api.yativo.com/api/v1/wallet/swap/{reference}"
headers = {
"X-Api-Key": "<api-key>",
"X-Api-Secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Api-Key': '<api-key>', 'X-Api-Secret': '<api-key>'}
};
fetch('https://api.yativo.com/api/v1/wallet/swap/{reference}', 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.yativo.com/api/v1/wallet/swap/{reference}",
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-Api-Secret: <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://api.yativo.com/api/v1/wallet/swap/{reference}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("X-Api-Secret", "<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://api.yativo.com/api/v1/wallet/swap/{reference}")
.header("X-Api-Key", "<api-key>")
.header("X-Api-Secret", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yativo.com/api/v1/wallet/swap/{reference}")
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-Api-Secret"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"status_code": 200,
"message": "Request successful",
"data": {
"reference": "9b1f0c52-3a8e-4f4e-b2a1-6f0e5d7c8a91",
"from_currency": "USD",
"to_currency": "USDC",
"from_amount": 1000,
"fee": 5,
"rate": 1,
"to_amount": 995,
"status": "completed",
"created_at": "2026-10-20T10:15:00+00:00"
}
}{
"status": "failed",
"status_code": 123,
"message": "Request failed.",
"data": {
"error": "<string>"
},
"error_details": {
"code": "validation_error",
"message": "The amount field is required.",
"http_status": 422,
"fields": {},
"retryable": false,
"retry_after": 123
}
}Currency Swap
Get Swap
One swap by its reference
GET
/
wallet
/
swap
/
{reference}
Get Swap
curl --request GET \
--url https://api.yativo.com/api/v1/wallet/swap/{reference} \
--header 'X-Api-Key: <api-key>' \
--header 'X-Api-Secret: <api-key>'import requests
url = "https://api.yativo.com/api/v1/wallet/swap/{reference}"
headers = {
"X-Api-Key": "<api-key>",
"X-Api-Secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Api-Key': '<api-key>', 'X-Api-Secret': '<api-key>'}
};
fetch('https://api.yativo.com/api/v1/wallet/swap/{reference}', 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.yativo.com/api/v1/wallet/swap/{reference}",
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-Api-Secret: <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://api.yativo.com/api/v1/wallet/swap/{reference}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("X-Api-Secret", "<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://api.yativo.com/api/v1/wallet/swap/{reference}")
.header("X-Api-Key", "<api-key>")
.header("X-Api-Secret", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yativo.com/api/v1/wallet/swap/{reference}")
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-Api-Secret"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"status_code": 200,
"message": "Request successful",
"data": {
"reference": "9b1f0c52-3a8e-4f4e-b2a1-6f0e5d7c8a91",
"from_currency": "USD",
"to_currency": "USDC",
"from_amount": 1000,
"fee": 5,
"rate": 1,
"to_amount": 995,
"status": "completed",
"created_at": "2026-10-20T10:15:00+00:00"
}
}{
"status": "failed",
"status_code": 123,
"message": "Request failed.",
"data": {
"error": "<string>"
},
"error_details": {
"code": "validation_error",
"message": "The amount field is required.",
"http_status": 422,
"fields": {},
"retryable": false,
"retry_after": 123
}
}Authorizations
Your API key (yativo_pk_...) from Developers → API Keys. Send together with X-Api-Secret.
Your API secret (yativo_sk_...), shown once when the key is created.
Path Parameters
Example:
"9b1f0c52-3a8e-4f4e-b2a1-6f0e5d7c8a91"

