All In vs Cost Plus Pricing
Prime offers two fee structures that determine how trading costs are presented in API responses: All In Pricing: Uses a single consolidated basis points rate for all trading activity. The total fee is delivered exclusively via thecommission
field.
Cost Plus Pricing: Separates fees into two components:
commission
: The Prime trading feeexchange_fee
: External exchange fees passed directly through to the client
commission
and exchange_fee
fields to calculate your total trading costs.
The examples below demonstrate All In Pricing structure. For Cost Plus pricing, both commission
and exchange_fee
fields would contain values, and both must be included when calculating total trading costs.
Fee Calculations
Fee Currency: Fees are always charged in the quote currency of the trading pair, regardless of order type or direction. For example, in an ETH-USD pair, fees are always charged in USD (the quote currency). This is also true for crypto-to-crypto orders - in an ETH-BTC pair, fees are taken in BTC. Order Denomination: Prime supports specifying orders in both base units (e.g., “1 ETH”) and quote units (e.g., “500 USD of ETH”). While fees are always charged in quote currency, how you denominate your order affects the user experience and how fees impact your final amounts. Before examining the specifics, consider each of the following order scenarios:- Quote buy: “I wish to buy 500 USD of ETH”
- Base buy: “I wish to buy 1 ETH”
- Quote sell: “I wish to sell 500 USD of ETH”
- Base sell: “I wish to sell 1 ETH”
Quote Buy
In a quote buy scenario (e.g., “I wish to buy 500 USD of ETH”), the trading fee is deducted directly from the specified quote amount. This approach ensures users know exactly how much they will spend when placing an order. Quote purchases typically result in fractional cryptocurrency amounts due to Prime’s support for high decimal precision. This design optimizes the user experience by treating the quote value as the maximum expenditure. The example below highlights the most important fields in a quote buy order response:quote_value
- The original order size in quote units from your order requestfilled_value
- The actual amount of quote currency used to purchase the asset (after fees)commission
- The Coinbase Prime trading fee for this orderfilled_quantity
- The amount of base currency (i.e. BTC) actually purchasedaverage_filled_price
- The average execution price before feesnet_average_filled_price
- The effective price per unit including fees
Base Orders (Buy & Sell)
Base orders allow you to specify an exact amount of cryptocurrency to buy or sell. The key principle for base orders is that you always get exactly what you request - fees are handled transparently in the quote currency.Base Buy Example
“I wish to buy 1 ETH” → You receive exactly 1 ETH, and fees are added to the total USD cost.Base Sell Example
“I wish to sell 1 ETH” → You sell exactly 1 ETH, and fees are deducted from the USD proceeds. In both cases, the important fields to monitor are:base_quantity
- The exact amount of cryptocurrency you requested to buy/sellfilled_quantity
- The actual amount of cryptocurrency bought/sold (matches your request)commission
- The Coinbase Prime trading fee charged in quote currencyfilled_value
- For buys: total quote spent; For sells: quote proceeds; The fee is NOT included here.average_filled_price
- The average market execution price before feesnet_average_filled_price
- The effective price per unit including fees
Quote Sell
Quote sell orders work similarly to quote buy orders, but with one additional feature: Size Equals Total After Fees (is_raise_exact
)
Quote sells support an optional is_raise_exact
boolean parameter that controls how fees affect your proceeds:
is_raise_exact: true
- You receive exactly the requested quote amount. For example, selling “100 USD of XRP” withis_raise_exact: true
means you receive exactly 100 USD, and Prime automatically increases the amount of XRP sold to cover trading fees.is_raise_exact: false
or omitted - You receive the requested quote amount minus trading fees. For example, selling “100 USD of XRP” withoutis_raise_exact
means you will receive 100 USD minus fees.