Quote a purchase
curl --request POST \
--url https://merchant.bitliva.com/api/v1/quotes/buy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"currency": "<string>",
"amount": 123
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({currency: '<string>', amount: 123})
};
fetch('https://merchant.bitliva.com/api/v1/quotes/buy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://merchant.bitliva.com/api/v1/quotes/buy"
payload = {
"currency": "<string>",
"amount": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://merchant.bitliva.com/api/v1/quotes/buy",
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([
'currency' => '<string>',
'amount' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"status": "success",
"message": "Quotation retrieved successfully.",
"data": {
"from_amount": "100000.00",
"from_currency": "NGN",
"to_amount": "0.00098019",
"to_currency": "BTC"
}
}{
"status": "error",
"message": "Invalid or missing API key.",
"code": "invalid_api_key"
}{
"status": "error",
"message": "Invalid or missing API key.",
"code": "invalid_api_key"
}{
"status": "error",
"message": "Invalid or missing API key.",
"code": "invalid_api_key"
}{
"status": "error",
"message": "Invalid or missing API key.",
"code": "invalid_api_key"
}{
"status": "error",
"message": "Invalid or missing API key.",
"code": "invalid_api_key"
}Crypto trading
Quote a purchase
Crypto you would get for this much naira.
POST
/
quotes
/
buy
Quote a purchase
curl --request POST \
--url https://merchant.bitliva.com/api/v1/quotes/buy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"currency": "<string>",
"amount": 123
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({currency: '<string>', amount: 123})
};
fetch('https://merchant.bitliva.com/api/v1/quotes/buy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://merchant.bitliva.com/api/v1/quotes/buy"
payload = {
"currency": "<string>",
"amount": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://merchant.bitliva.com/api/v1/quotes/buy",
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([
'currency' => '<string>',
'amount' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"status": "success",
"message": "Quotation retrieved successfully.",
"data": {
"from_amount": "100000.00",
"from_currency": "NGN",
"to_amount": "0.00098019",
"to_currency": "BTC"
}
}{
"status": "error",
"message": "Invalid or missing API key.",
"code": "invalid_api_key"
}{
"status": "error",
"message": "Invalid or missing API key.",
"code": "invalid_api_key"
}{
"status": "error",
"message": "Invalid or missing API key.",
"code": "invalid_api_key"
}{
"status": "error",
"message": "Invalid or missing API key.",
"code": "invalid_api_key"
}{
"status": "error",
"message": "Invalid or missing API key.",
"code": "invalid_api_key"
}Authorizations
Your API key.
Body
application/json

