Withdraw Network Fee
curl --request POST \
--url https://api.blockradar.co/v1/wallets/{walletId}/rewards/withdraw/network-fee \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"assetId": "WALLET_ASSET_ID",
"amount": "NET_AMOUNT_TO_WITHDRAW",
"type": "defi",
"addressId": "OPTIONAL_SUB_ADDRESS_ID"
}
'import requests
url = "https://api.blockradar.co/v1/wallets/{walletId}/rewards/withdraw/network-fee"
payload = {
"assetId": "WALLET_ASSET_ID",
"amount": "NET_AMOUNT_TO_WITHDRAW",
"type": "defi",
"addressId": "OPTIONAL_SUB_ADDRESS_ID"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
assetId: 'WALLET_ASSET_ID',
amount: 'NET_AMOUNT_TO_WITHDRAW',
type: 'defi',
addressId: 'OPTIONAL_SUB_ADDRESS_ID'
})
};
fetch('https://api.blockradar.co/v1/wallets/{walletId}/rewards/withdraw/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.blockradar.co/v1/wallets/{walletId}/rewards/withdraw/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([
'assetId' => 'WALLET_ASSET_ID',
'amount' => 'NET_AMOUNT_TO_WITHDRAW',
'type' => 'defi',
'addressId' => 'OPTIONAL_SUB_ADDRESS_ID'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.blockradar.co/v1/wallets/{walletId}/rewards/withdraw/network-fee"
payload := strings.NewReader("{\n \"assetId\": \"WALLET_ASSET_ID\",\n \"amount\": \"NET_AMOUNT_TO_WITHDRAW\",\n \"type\": \"defi\",\n \"addressId\": \"OPTIONAL_SUB_ADDRESS_ID\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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.blockradar.co/v1/wallets/{walletId}/rewards/withdraw/network-fee")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"assetId\": \"WALLET_ASSET_ID\",\n \"amount\": \"NET_AMOUNT_TO_WITHDRAW\",\n \"type\": \"defi\",\n \"addressId\": \"OPTIONAL_SUB_ADDRESS_ID\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blockradar.co/v1/wallets/{walletId}/rewards/withdraw/network-fee")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"assetId\": \"WALLET_ASSET_ID\",\n \"amount\": \"NET_AMOUNT_TO_WITHDRAW\",\n \"type\": \"defi\",\n \"addressId\": \"OPTIONAL_SUB_ADDRESS_ID\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Network fee fetched successfully",
"statusCode": 200,
"data": {
"networkFee": "0.00006779052",
"networkFeeInUSD": "0.14371725",
"nativeBalance": "0.000929309612767174",
"nativeBalanceInUSD": "1.97015496",
"estimatedArrivalTime": 30,
"transactionFee": "0"
}
}Withdraw Network Fee
Previews the network fee and balances for a prospective withdrawal. Does not move funds.
Body Parameters
| Key | Required | Type | Description |
|---|---|---|---|
| assetId | true | string (UUID) | The asset to withdraw. |
| amount | true | string | Net amount to withdraw, or "max". |
| type | true | string | Strategy class: regulated (Fija, ERC-4626) or defi (Aave). |
| addressId | false | string (UUID) | Scope the operation to a sub-address. Omit to act on the master wallet. |
POST
/
v1
/
wallets
/
{walletId}
/
rewards
/
withdraw
/
network-fee
Withdraw Network Fee
curl --request POST \
--url https://api.blockradar.co/v1/wallets/{walletId}/rewards/withdraw/network-fee \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"assetId": "WALLET_ASSET_ID",
"amount": "NET_AMOUNT_TO_WITHDRAW",
"type": "defi",
"addressId": "OPTIONAL_SUB_ADDRESS_ID"
}
'import requests
url = "https://api.blockradar.co/v1/wallets/{walletId}/rewards/withdraw/network-fee"
payload = {
"assetId": "WALLET_ASSET_ID",
"amount": "NET_AMOUNT_TO_WITHDRAW",
"type": "defi",
"addressId": "OPTIONAL_SUB_ADDRESS_ID"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
assetId: 'WALLET_ASSET_ID',
amount: 'NET_AMOUNT_TO_WITHDRAW',
type: 'defi',
addressId: 'OPTIONAL_SUB_ADDRESS_ID'
})
};
fetch('https://api.blockradar.co/v1/wallets/{walletId}/rewards/withdraw/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.blockradar.co/v1/wallets/{walletId}/rewards/withdraw/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([
'assetId' => 'WALLET_ASSET_ID',
'amount' => 'NET_AMOUNT_TO_WITHDRAW',
'type' => 'defi',
'addressId' => 'OPTIONAL_SUB_ADDRESS_ID'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.blockradar.co/v1/wallets/{walletId}/rewards/withdraw/network-fee"
payload := strings.NewReader("{\n \"assetId\": \"WALLET_ASSET_ID\",\n \"amount\": \"NET_AMOUNT_TO_WITHDRAW\",\n \"type\": \"defi\",\n \"addressId\": \"OPTIONAL_SUB_ADDRESS_ID\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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.blockradar.co/v1/wallets/{walletId}/rewards/withdraw/network-fee")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"assetId\": \"WALLET_ASSET_ID\",\n \"amount\": \"NET_AMOUNT_TO_WITHDRAW\",\n \"type\": \"defi\",\n \"addressId\": \"OPTIONAL_SUB_ADDRESS_ID\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blockradar.co/v1/wallets/{walletId}/rewards/withdraw/network-fee")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"assetId\": \"WALLET_ASSET_ID\",\n \"amount\": \"NET_AMOUNT_TO_WITHDRAW\",\n \"type\": \"defi\",\n \"addressId\": \"OPTIONAL_SUB_ADDRESS_ID\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Network fee fetched successfully",
"statusCode": 200,
"data": {
"networkFee": "0.00006779052",
"networkFeeInUSD": "0.14371725",
"nativeBalance": "0.000929309612767174",
"nativeBalanceInUSD": "1.97015496",
"estimatedArrivalTime": 30,
"transactionFee": "0"
}
}⌘I

