GuidesRecipesAPI ReferenceChangelog
Guides

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%)

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

{
  "product_type": "funding",
  "customer_guid": "customer_guid",
  "asset": "USD",
  "side": "withdrawal",
  "receive_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. For withdrawals, the deliver_amount includes the fee, so the customer's account is debited the full amount. Custom fees accumulate in the bank-level fee account alongside other partner trade fees.

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.

  • Cybrid invoices partners for accumulated trade fees in the bank-level fee account and other costs (such as ACH and KYC fees).