curl --request POST \
--url https://api.breet.io/v1/payments/estimate-network-fee \
--header 'Content-Type: application/json' \
--header 'X-Breet-Env: <api-key>' \
--header 'x-app-id: <api-key>' \
--header 'x-app-secret: <api-key>' \
--data '
{
"token": "BTC",
"cryptoAmount": 0.01,
"walletAddress": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq"
}
'import requests
url = "https://api.breet.io/v1/payments/estimate-network-fee"
payload = {
"token": "BTC",
"cryptoAmount": 0.01,
"walletAddress": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq"
}
headers = {
"x-app-id": "<api-key>",
"x-app-secret": "<api-key>",
"X-Breet-Env": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-app-id': '<api-key>',
'x-app-secret': '<api-key>',
'X-Breet-Env': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
token: 'BTC',
cryptoAmount: 0.01,
walletAddress: 'bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq'
})
};
fetch('https://api.breet.io/v1/payments/estimate-network-fee', 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.breet.io/v1/payments/estimate-network-fee",
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([
'token' => 'BTC',
'cryptoAmount' => 0.01,
'walletAddress' => 'bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Breet-Env: <api-key>",
"x-app-id: <api-key>",
"x-app-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.breet.io/v1/payments/estimate-network-fee"
payload := strings.NewReader("{\n \"token\": \"BTC\",\n \"cryptoAmount\": 0.01,\n \"walletAddress\": \"bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-app-id", "<api-key>")
req.Header.Add("x-app-secret", "<api-key>")
req.Header.Add("X-Breet-Env", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.breet.io/v1/payments/estimate-network-fee")
.header("x-app-id", "<api-key>")
.header("x-app-secret", "<api-key>")
.header("X-Breet-Env", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"BTC\",\n \"cryptoAmount\": 0.01,\n \"walletAddress\": \"bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.breet.io/v1/payments/estimate-network-fee")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-app-id"] = '<api-key>'
request["x-app-secret"] = '<api-key>'
request["X-Breet-Env"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"token\": \"BTC\",\n \"cryptoAmount\": 0.01,\n \"walletAddress\": \"bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq\"\n}"
response = http.request(request)
puts response.read_body{
"message": "data fetched",
"success": true,
"data": {
"low": {
"networkFee": 0.00001842,
"networkFeeUsd": 1.21
},
"medium": {
"networkFee": 0.00002765,
"networkFeeUsd": 1.82
},
"high": {
"networkFee": 0.00004212,
"networkFeeUsd": 2.77
}
},
"meta": {},
"summary": {},
"stats": {}
}Estimate Network Fee
Estimate the network fee for a UTXO withdrawal (BTC, LTC, DOGE, BCH) at each fee level. Estimates are cached for 60 seconds and are not a locked quote - the fee is re-estimated when the withdrawal is submitted.
curl --request POST \
--url https://api.breet.io/v1/payments/estimate-network-fee \
--header 'Content-Type: application/json' \
--header 'X-Breet-Env: <api-key>' \
--header 'x-app-id: <api-key>' \
--header 'x-app-secret: <api-key>' \
--data '
{
"token": "BTC",
"cryptoAmount": 0.01,
"walletAddress": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq"
}
'import requests
url = "https://api.breet.io/v1/payments/estimate-network-fee"
payload = {
"token": "BTC",
"cryptoAmount": 0.01,
"walletAddress": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq"
}
headers = {
"x-app-id": "<api-key>",
"x-app-secret": "<api-key>",
"X-Breet-Env": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-app-id': '<api-key>',
'x-app-secret': '<api-key>',
'X-Breet-Env': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
token: 'BTC',
cryptoAmount: 0.01,
walletAddress: 'bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq'
})
};
fetch('https://api.breet.io/v1/payments/estimate-network-fee', 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.breet.io/v1/payments/estimate-network-fee",
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([
'token' => 'BTC',
'cryptoAmount' => 0.01,
'walletAddress' => 'bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Breet-Env: <api-key>",
"x-app-id: <api-key>",
"x-app-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.breet.io/v1/payments/estimate-network-fee"
payload := strings.NewReader("{\n \"token\": \"BTC\",\n \"cryptoAmount\": 0.01,\n \"walletAddress\": \"bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-app-id", "<api-key>")
req.Header.Add("x-app-secret", "<api-key>")
req.Header.Add("X-Breet-Env", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.breet.io/v1/payments/estimate-network-fee")
.header("x-app-id", "<api-key>")
.header("x-app-secret", "<api-key>")
.header("X-Breet-Env", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"BTC\",\n \"cryptoAmount\": 0.01,\n \"walletAddress\": \"bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.breet.io/v1/payments/estimate-network-fee")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-app-id"] = '<api-key>'
request["x-app-secret"] = '<api-key>'
request["X-Breet-Env"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"token\": \"BTC\",\n \"cryptoAmount\": 0.01,\n \"walletAddress\": \"bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq\"\n}"
response = http.request(request)
puts response.read_body{
"message": "data fetched",
"success": true,
"data": {
"low": {
"networkFee": 0.00001842,
"networkFeeUsd": 1.21
},
"medium": {
"networkFee": 0.00002765,
"networkFeeUsd": 1.82
},
"high": {
"networkFee": 0.00004212,
"networkFeeUsd": 2.77
}
},
"meta": {},
"summary": {},
"stats": {}
}Authorizations
Your application ID from the Breet dashboard
Your application secret from the Breet dashboard
Environment selector: sandbox or production
Body
Send amount or cryptoAmount, never both. One of them is required.
UTXO token to withdraw. Stablecoins are not supported here - their fee is flat per network and is returned by GET /payments/supported-assets-info.
BTC, LTC, DOGE, BCH Destination address. The estimate depends on it, so use the address you intend to withdraw to.
USD value, up to 2 decimal places. Send amount or cryptoAmount, never both.
Value in crypto units, up to 8 decimal places. Send amount or cryptoAmount, never both.
Response
Fee estimates returned successfully
Was this page helpful?