@toinou222 instead of modifying the commission scheme you can simply increment the value of the account with every funding.
dt = self.datetime.datetime()
if not self.position.size:
# Entry logic
...
else:
# Collect funding
rate = self.data._dataname.loc[dt].funding
if not np.isnan(rate):
funding = -self.position.size * rate
self.broker.add_cash(funding)
# Exit logic
...
Here I am assuming that you are using Pandas DataFeed and there exists a funding
column in it with NaNs everywhere except at 0-8-16h. You can pull the historical data using Binance's API endpoint.