Trade Fees

How do trade fees work?

Learn how trade fees are calculated and accumulated

Overview

  • Cybrid may implement trade fees as specified in each partner's agreement.
  • Partners may also implement trade fees.
  • Both Cybrid and partner trade fees aggregate into the fee field of the POST /api/quotes and POST /api/trades responses.
  • The Cybrid team configures trade fees.

Charging Custom Fees

To charge a custom fee (such as for an ACH withdrawal), include the fees parameter when creating a quote via POST /api/quotes. The fees array accepts up to two custom fees per quote. Supported fee types are:

  • fixed: A fixed amount in base units of the asset (e.g., 300 = $3.00 USD)
  • spread: A percentage-based fee in basis points (e.g., 20 = 0.20%)

Custom fees on a quote replace the static fee configured for your bank for that quote; they are not added to it. If you omit fees, the quote uses your bank's configured fee. If you pass an empty fees array, no bank fee is charged on that quote.

By default, your bank's configured fee is applied to all trades. To charge a different fee on a specific trade, calculate the fee in your application and pass it in fees on that quote. For example, use custom fees for tiered pricing based on monthly volume or for a customer promotion.

Example request body for a funding withdrawal quote with a fixed fee:

{
  "product_type": "funding",
  "customer_guid": "customer_guid",
  "asset": "USD",
  "side": "withdrawal",
  "deliver_amount": 10000,
  "fees": [
    {
      "type": "fixed",
      "fixed_fee": 300
    }
  ]
}

The quote response includes an aggregated fee field showing the total fees, including both platform and custom fees. With deliver_amount specified above, the customer's account is debited the full $100.00 and the recipient receives deliver_amount - fee. Custom fees accumulate in the bank-level fee account alongside other partner trade fees.

ℹ️

deliver_amount vs receive_amount

Examples elsewhere default to deliver_amount. Both fields are supported; the buy/sell tables below document how fees apply for each option. See Create and execute a trade for the canonical explanation.

Calculation

Spread fee units are represented in basis points (e.g., 20 charges a 0.20% spread), while fixed fees are denoted in the base units of the asset (e.g., 100 for a USD fee translates to a $1.00 USD fixed fee).

Buy

  • When deliver_amount is specified, fee is subtracted from the amount quoted by the liquidity provider.
    • The deliver_amount is the amount debited from the account, inclusive of fees.
  • When receive_amount is specified, fee is added to the deliver_amount quoted by the liquidity provider. The total fee + deliver_amount is debited from the account.
    • The receive_amount is the amount credited to the account, inclusive of fees.

Sell

  • When receive_amount is specified, fee is added to the amount quoted by the liquidity provider.
    • The receive_amount is the amount credited to the account, inclusive of fees.
  • When deliver_amount is specified, fee is subtracted from the receive_amount quoted by the liquidity provider. The total receive_amount - fee is credited to the account.
    • The deliver_amount is the amount debited from the account, inclusive of fees.

Accumulation

  • Partner trade fees accumulate in a fee fiat account at the bank level.
ℹ️

Key takeaway

Regardless of which amount is specified (deliver_amount or receive_amount), the specified amount is always maintained after accounting for fees.


Did this page help you?