The fee Asset defines which Asset is charged for an order fill. It is independent from order side, execution type, and sizing, although those choices determine which combinations are valid.
FeeAsset values
| Value | Behavior |
|---|---|
FEE_ASSET_UNSPECIFIED | Uses the default quote-denominated behavior |
QUOTE | Charges the fee in quote |
BASE | Deducts the fee from base received; valid only for BUY orders |
SELL fees are always quote-denominated. A SELL request with BASE is rejected rather than
rewritten.
BASE is also available only on a Pair that allows it. Check allowBuyFeeFromBase for the Pair in GetSpotConfig (GET /v1/spot/config) before sending a BUY with BASE.
BUY behavior
For an exact-base BUY with QUOTE, the submitted base quantity remains the gross and net base
quantity before any other adjustments. The account must fund trade notional plus the quote fee.
For an exact-base BUY with BASE, the gross base quantity is submitted for execution and the fee
reduces the net base amount received.
For a quote-budget BUY with QUOTE, the fee counts toward the maximum quote debit. For a
quote-budget BUY with BASE, the quote ceiling limits trade debit while the base fee reduces net
base received. See Order sizing.
Decode fee values
A fee amount is always in the Asset named by the fee_asset field next to it. Read that field
rather than inferring the Asset from the order side.
- ConnectRPC carries fee amounts, such as a fill's
fee_amount_e18and an order'sfee_total.amount_e18, in fixed 18-decimal units of that Asset. The scale does not depend on the Pair's quantity scales: divide by 10^18 for either Asset. - REST carries the same amounts as decimal strings in Asset units, such as
feeon a fill andfeeTotal.amounton an order.
A fill that earned a rebate reports feeIsRebate (fee_is_rebate) as true: the amount was
credited to the account rather than charged. Fills appear in GetUserTrades (GET /v1/spot/trades).
Error handling
An unsupported combination returns the stable order error ERROR_CODE_FEE_ASSET_NOT_ALLOWED. Do not silently convert an invalid BASE request to QUOTE.
Preview order validates whether the selected fee Asset is allowed and whether the account currently has enough available balance. It does not return a fee estimate. Final fees are recorded per fill.