How to get crypto withdrawal fees
Introductions
Withdrawal fees are charged to facilitate external withdrawals. Developers could calculate the cost of withdrawals using this information.
Making request
You can get the withdrawal fee from the fee endpoint.
URL PARAMS
- currency: Currency. Allowed valued: btc, ltc, xrp, dash, trx, doge, matic, bnb, busd, usdt, usdc, floki.
Request
curl --request GET \
--url 'https://www.quidax.com/api/v1/fee?currency=<currency>' \
--header 'Authorization: Bearer <api_secret_key>' \
--header 'accept: application/json'
const options = {
method: 'GET',
headers: {accept: 'application/json', Authorization: 'Bearer s3cr3tk3y'}
};
fetch('https://www.quidax.com/api/v1/fee?currency=<currency>', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import requests
url = "https://www.quidax.com/api/v1/fee?currency=<currency>"
headers = {
"accept": "application/json",
"Authorization": "Bearer s3cr3tk3y"
}
response = requests.get(url, headers=headers)
print(response.text)
<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://www.quidax.com/api/v1/fee?currency=<currency>', [
'headers' => [
'Authorization' => 'Bearer s3cr3tk3y',
'accept' => 'application/json',
],
]);
echo $response->getBody();
Response
{
"status": "success",
"message": "Successful",
"data": {
"fee": 0.0002,
"type": "flat"
}
}
{
"status": "error",
"message": "currency does not have a valid value",
"data": {
"code": "E0000",
"message": "currency does not have a valid value"
}
}
Updated about 2 years ago