Skip to main content
GET
/
v2
/
amplify
/
calculateWithdrawalFee
Calculate withdrawal fee
curl --request GET \
  --url https://api.example.com/v2/amplify/calculateWithdrawalFee \
  --header 'x-api-key: <api-key>'
{
  "feeAmount": "0.05",
  "offerFeePercentage": {
    "bps": 25,
    "percentage": "0.2500"
  },
  "flatFee": "1.05"
}

Authorizations

x-api-key
string
header
required

API key in format: pxl_<public_id>_

Query Parameters

offerAmount
string
required

Share amount to withdraw (base units decimal string)

Example:

"1000000000000000000"

wantAsset
string
required

ERC-20 token address the user wants to receive

Example:

"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"

vaultAddress
string
required

BoringVault contract address (0x + 40 hex chars)

Example:

"0xbbbb000000000000000000000000000000000001"

chainId
number
required

EVM chain ID

Example:

1

Response

feeAmount
string
required

Fee amount charged for the given offer and want asset.

Example:

"0.05"

offerFeePercentage
object
required

Offer fee percentage in bps.

flatFee
string
required

Flat fee charged on every withdrawal for the given offer and want asset. Denominated in the want asset.

Example:

"1.05"