enarjord / passivbot

Trading bot running on Bybit, Bitget, OKX, GateIO, Binance and Hyperliquid
https://www.passivbot.com
Other
1.09k stars 413 forks source link

Bybit fee #452

Closed JohnyX closed 3 months ago

JohnyX commented 3 months ago

Is the commission calculated correctly? I set the maker_fee=0.0360 and taker_fee=0.1 for Bybit because the Bybit website lists the taker fee as 0.1% and the maker fee as 0.036%. However, the backtest on XLMUSDT shows a Fee sum of -16.7 from an initial deposit of 100 over 14 days and 48 trades, which seems implausibly high.

enarjord commented 3 months ago

The convention in Passivbot's code is to use decimals or ratios (per uno), not percent. So to express 1%, put 0.01 and 0.3%, put 0.003.

The numbers you put were 10% taker fee and 3.6% maker fee. Try instead maker_fee=0.000360 and taker_fee=0.001.

JohnyX commented 3 months ago

Despite the fees indicated on the website, in practice, I found exactly the coefficients specified in the code