Learn how trade fees are calculated and accumulated
Overview
- Cybrid may implement trades fees as specified in each partner's partner agreement.
- Partners may also implement trade fees.
- Both Cybrid and partner trade fees are aggregated and displayed in the fees attribute of the /api/quotes and /api/trades endpoints.
- Trade fees are configured by the Cybrid team.
Calculation
Buy
- When the deliver_amount is specified, the fee is subtracted from the amount that is quoted by the liquidity provider.
- This ensures that the deliver_amount is the amount debited from their account inclusive of fees.
- When the receive_amount is specified, the fee is added to the deliver_amount which is quoted by the liquidity provider.
- This ensures that the receive_amount is the amount credited to their account inclusive of fees.
Sell
- When the receive_amount is specified, the fee is added to the amount quoted by the liquidity provider.
- This ensures that the receive_amount is the amount credited to their account inclusive of fees.
- When the deliver_amount is specified, the fee is subtracted from the receive_amount that is quoted by the liquidity provider.
- This ensures that the deliver_amount is the amount debited from their account inclusive of fees.
Accumulation
- Partner trade fees are accumulated in a fees fiat account at the bank-level.
Key take-away: The general principle behind trade fees is that regardless of which amount is specified (i.e. deliver_amount or receive_amount), the specified amount is always maintained after accounting for fees.