Using APIs. I'm doing it on TD and Interactive Brokers using their apis.
Interactive Brokers: https://interactivebrokers.github.io/tws-api/introduction.html
TD api is merging with schwab: https://developer.tdameritrade.com/content/trader-api-schwab-integration-guide-june-2023-update