Calculate withdrawal fee
curl --request GET \
--url https://api.paxoslabs.com/v2/amplify/calculateWithdrawalFee \
--header 'x-api-key: <api-key>'import requests
url = "https://api.paxoslabs.com/v2/amplify/calculateWithdrawalFee"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.paxoslabs.com/v2/amplify/calculateWithdrawalFee', 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.paxoslabs.com/v2/amplify/calculateWithdrawalFee",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.paxoslabs.com/v2/amplify/calculateWithdrawalFee"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.paxoslabs.com/v2/amplify/calculateWithdrawalFee")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paxoslabs.com/v2/amplify/calculateWithdrawalFee")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"feeAmount": "0.05",
"offerFeePercentage": {
"bps": 25,
"percentage": "0.2500"
},
"flatFee": "1.05"
}{
"error": {
"code": 400,
"message": "Invalid filter syntax.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.paxoslabs.dev/errors/BadRequest",
"fieldViolations": [
{
"field": "filter",
"description": "vaultAddress 0x0x is an invalid hex address."
}
]
}
]
}
}{
"error": {
"code": 400,
"message": "Invalid filter syntax.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.paxoslabs.dev/errors/BadRequest",
"fieldViolations": [
{
"field": "filter",
"description": "vaultAddress 0x0x is an invalid hex address."
}
]
}
]
}
}{
"error": {
"code": 400,
"message": "Invalid filter syntax.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.paxoslabs.dev/errors/BadRequest",
"fieldViolations": [
{
"field": "filter",
"description": "vaultAddress 0x0x is an invalid hex address."
}
]
}
]
}
}Withdraw
Calculate withdrawal fee
Calculates the withdrawal fee the user would be charged for a given offer amount and want asset.
GET
/
v2
/
amplify
/
calculateWithdrawalFee
Calculate withdrawal fee
curl --request GET \
--url https://api.paxoslabs.com/v2/amplify/calculateWithdrawalFee \
--header 'x-api-key: <api-key>'import requests
url = "https://api.paxoslabs.com/v2/amplify/calculateWithdrawalFee"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.paxoslabs.com/v2/amplify/calculateWithdrawalFee', 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.paxoslabs.com/v2/amplify/calculateWithdrawalFee",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.paxoslabs.com/v2/amplify/calculateWithdrawalFee"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.paxoslabs.com/v2/amplify/calculateWithdrawalFee")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paxoslabs.com/v2/amplify/calculateWithdrawalFee")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"feeAmount": "0.05",
"offerFeePercentage": {
"bps": 25,
"percentage": "0.2500"
},
"flatFee": "1.05"
}{
"error": {
"code": 400,
"message": "Invalid filter syntax.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.paxoslabs.dev/errors/BadRequest",
"fieldViolations": [
{
"field": "filter",
"description": "vaultAddress 0x0x is an invalid hex address."
}
]
}
]
}
}{
"error": {
"code": 400,
"message": "Invalid filter syntax.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.paxoslabs.dev/errors/BadRequest",
"fieldViolations": [
{
"field": "filter",
"description": "vaultAddress 0x0x is an invalid hex address."
}
]
}
]
}
}{
"error": {
"code": 400,
"message": "Invalid filter syntax.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.paxoslabs.dev/errors/BadRequest",
"fieldViolations": [
{
"field": "filter",
"description": "vaultAddress 0x0x is an invalid hex address."
}
]
}
]
}
}Authorizations
API key in format: pxl_<public_id>_
Query Parameters
Share amount to withdraw (base units decimal string)
Example:
"1000000000000000000"
ERC-20 token address the user wants to receive
Example:
"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
BoringVault contract address (0x + 40 hex chars)
Example:
"0xbbbb000000000000000000000000000000000001"
EVM chain ID
Example:
1
Response
Fee amount charged for the given offer and want asset.
Example:
"0.05"
Offer fee percentage in bps.
Show child attributes
Show child attributes
Flat fee charged on every withdrawal for the given offer and want asset. Denominated in the want asset.
Example:
"1.05"
⌘I