Get current exchange rates
curl --request GET \
--url https://api.wizzgift.com/b2b/rates \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.wizzgift.com/b2b/rates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wizzgift.com/b2b/rates"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wizzgift.com/b2b/rates",
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>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"base": "USD",
"rates": {
"BTC": 0.0000153,
"EUR": 0.92,
"GBP": 0.79,
"INR": 83.2,
"USD": 1,
"USDT": 1.0001
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or expired API key"
},
"requestId": "req_8f3k2"
}{
"error": {
"code": "FORBIDDEN",
"message": "Retailer API access is disabled for this account"
},
"requestId": "req_8f3k2"
}{
"error": "Too many requests",
"message": "<string>"
}{
"error": {
"code": "EXTERNAL_SERVICE_ERROR",
"message": "Exchange rates not available"
},
"requestId": "req_8f3k2"
}B2B · Products & rates
Get current exchange rates
Live rates for every currency Wizzgift prices in, quoted as units of
that currency per 1 USD (USD itself is 1). Catalog prices are in
each product’s costCurrency and your balance is in USD, so use these
rates to compare prices or budget orders.
Convert between any two currencies through USD:
amountInTo = amountInFrom / rates[from] * rates[to]
Rates are indicative. Crypto rates refresh about every 10 minutes,
fiat rates about every 30. An order freezes the rates current at its
creation, so the order’s totalAmount is final. Identical payload to
GET /retailer/v1/rates.
GET
/
b2b
/
rates
Get current exchange rates
curl --request GET \
--url https://api.wizzgift.com/b2b/rates \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.wizzgift.com/b2b/rates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wizzgift.com/b2b/rates"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wizzgift.com/b2b/rates",
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>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"base": "USD",
"rates": {
"BTC": 0.0000153,
"EUR": 0.92,
"GBP": 0.79,
"INR": 83.2,
"USD": 1,
"USDT": 1.0001
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or expired API key"
},
"requestId": "req_8f3k2"
}{
"error": {
"code": "FORBIDDEN",
"message": "Retailer API access is disabled for this account"
},
"requestId": "req_8f3k2"
}{
"error": "Too many requests",
"message": "<string>"
}{
"error": {
"code": "EXTERNAL_SERVICE_ERROR",
"message": "Exchange rates not available"
},
"requestId": "req_8f3k2"
}Authorizations
API key (wg_live_…) created in the dashboard (Account → API Keys).
Shown once at creation; only a hash is stored server-side.