Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Needed for futures. Funding fees are charged, or rewarded to traders based on the price of the asset, and keep the futures contracts in line with the actual asset. Binance charges them at 00:00, 08:00, and 16:00 UTC every day.
They're explained here
https://www.binance.com/en/blog/421499824684900382/A-Beginners-Guide-To-Funding-Rates
Summary
Creates a funding fee object which periodically increases the funding fee on all trades by looping through all trades at 00:00, 08:00, and 16:00 UTC and adding a certain amount to each trade. When the bot crashes, FundingFee has a reboot function which checks all trades for when the last funding fee was applied, and applies missed funding fees. When a new trade is created, if the time is within 15s of 00:00, 08:00, or 16:00 UTC, then a funding fee amount is applied immediately