I couldn't understand the concept of "before the market open" on a crypto currency context.
Here, beforeTrading is simply the name of a daily callback in the backtesting framework. It runs once at the start of each UTC trading day to prepare the day's funding rate data, rather than before an actual market open.