Before you start reading this article, let me make it clear that it can be a complex topic for some. However, I have tried to make this article as simple as possible while ensuring that no information is missed out.
There are 2 types of fees charged by Bybit: Trading Fee and Funding Fee.
Trading Fee
It can be either taker fees or maker fees, or both applied on a trade.
Taker fee: This fee is applied when we take liquidity from the order book. In simple terms, when we place an order in the order book, if the price we specify matches or is better than the current traded price of the coin, the order is executed immediately, and we are charged a taker fee, which is 0.06% on Bybit.
Maker fee: This fee is applied when we provide liquidity to the order book. In simple terms, when we place an order in the order book, if the price we specify is not matched by the current traded price of the coin, the order won’t be executed immediately, and when the order is placed then we are charged a maker fee, which is 0.01% on Bybit.
Funding Fee
Funding fees has different rates for different currency pairs. For example, BTCUSDT can have a different funding rate than ETHUSDT. Different pairs can also have different intervals at which the funding fee is charged. Some pairs can charge the funding fee on a daily basis, while others can charge it at an 8-hour interval. On Bybit, the funding fee is applied at exactly 00:00:00, 08:00:00, and 16:00:00 UTC Time Zone for all currency pair, and is executed at the exact market price that will be running for the currency pair.
For example
For long positions:
If we have a long position for BTCUSDT, and the funding fee at the current time is positive, we will be charged a fee based on the fee percentage that is currently placed for the pair at that given time.
If we have a long position for BTCUSDT, and the funding fee at the current time is negative, we will earn based on the fee percentage that is currently placed for the currency pair at that given time.
For short positions:
If we have a short position for BTCUSDT, and the funding fee at the current time is negative, we will be charged a fee based on the fee percentage that is currently placed for the pair at that given time.
If we have a short position for BTCUSDT, and the funding fee at the current time is positive, we will earn based on the fee percentage that is currently placed for the currency pair at that given time.
You can check funding fee of bybit exchange for all currency pair Here.
Trade History
Now let’s take some examples from my trade history to calculate how the profit and loss is calculated in Bybit and Cornix.
Example 1:
EGLDUSDT Short Trade
Since our trade was opened as soon as it was placed in the order book, our opening fee was taken in as a taker fee and closed at a maker fee.
Opening fee = quantity x entry price x taker fee
EGLDUSDT = 0.53 x 39.95 x 0.0006 (0.06/100)
EGLDUSDT = 0.0127041
Closing fee = quantity x exit price x maker fee
EGLDUSDT = 0.53 x 39.8 x 0.0001 (0.01/100)
EGLDUSDT = 0.0021094
Position P&L = (entry price – exit price) x quantity
Position P&L = (39.95 – 39.8) x 0.53
Position P&L = 0.0795
This is the profit and loss we see in Cornix as it gets rounded off to 0.08 when the last digit value is greater than or equal to 5.
Closed P&L in Bybit = position P&L – opening fee – closing fee
Closed P&L in Bybit = 0.0795 – 0.0127041 – 0.0021094
Closed P&L in Bybit = 0.0646865
This is the profit and loss we see in Bybit.
Note: The position P&L formula for the long direction will be:
Position P&L = (exit price – entry price) x quantity
Example 2:
EGLDUSDT long trade with multiple entries
Since our trade was opened as soon as it was placed in the order book, our opening fee was taken in as a taker fee. When opening a trade we allocate the new entry price in the order book, so when the new entry is filled we pay maker fee, and the trade closed at a maker fee as well.
Opening fee = quantity x entry price x taker fee
EGLDUSDT = 0.5 x 42.4 x 0.0006 (0.06/100)
EGLDUSDT = 0.01272
Closing fee = quantity x exit price x maker fee
EGLDUSDT = 1.55 x 41.1 x 0.0001 (0.01/100)
EGLDUSDT = 0.0063705
Position p&l = (exit price – average entry price) x quantity
Average entry price = Total contract value/Total quantity of contracts
Total contract value = [(Quantity1 × Price1) + (Quantity2 × Price2) + (Quantity3 × Price3)…]
For this trade:
Average entry price = (0.5 x 42.4 + 1.05 x 40.3) / (0.5 + 1.05)
Average entry price = 40.9774193548387096774193
Position p&l = (41.1 – 40.9774193548387096774193) x 1.55
Position p&l = 0.19 approx
This is the profit and loss we see in Cornix as it gets rounded off to 0.19 when the last digit value is greater than or equal to 5.
For Position p&l when trades have made multiple entries, we need to calculate the average entry price of all the entries made for the trade.
Closed P&L in Bybit = position p&l – opening fee – closing fee – funding fee – new position fee
Funding fee for this trade was taken 6 times according to UTC time zone, as this trade was open for 2 days, and for both days, the funding fee was positive, and our position was open for a long direction, so we had to pay the funding fee. During this period, the funding fee for each time was 0.01%.
1st Funding fee = position value x funding rate
1st Funding fee = 20.895 x 0.0001 (0.01/100)
1st Funding fee = 0.0020895
Position Value = Quantity of Contract x Market Price
Position Value = 0.5 x 41.79
Position Value = 20.895
Total funding fee = 0.0020895 + 0.0020885 + 0.0020655 + 0.002038 + 0.002049 + 0.0020375
Total funding fee = 0.012368
For a new position, you can use the same formula to calculate the maker fee, which in our case will be:
New position fee = 1.05 x 40.3 x 0.0001
New position fee = 0.0042315
Closed P&L in Bybit = position p&l – opening fee – closing fee – funding fee – new position fee
Closed P&L in Bybit = 0.19 – 0.01272 – 0.0063705 – 0.012368 – 0.0042315
Closed P&L in Bybit = 0.15431
This is the profit and loss we see in Bybit.
Note: If you close a trade manually, a taker fee will be applied to the exit price, as we are selling the trade at the market price when closing manually.