Based on what you’ve described, it seems that what you want is handling events coming from a WebSocket connection. This is usually done at the message callback level, which you define. How you pass this callback to the WebSocket depends on the library you’re using. python-binance is not the official library, so I would suggest discussing this topic with their community.
However, if you want to use the official library, you have WebSocket examples available at https://github.com/binance/binance-connector-python/blob/master/examples/websocket/spot/websocket_api/.