How does mac save the data received at the terminal websocket? Provided by bitmex.

I can now use the sample code provided by bitmex to run on the terminal and receive data related to real-time push.
looks like this
but how to save the data here. The py program is executed at the terminal. An error will be reported if you go directly to the script to run.
there are no variables in the script studied to save this data and print it.
what should I do if I want to save this data now?

May.13,2022
Menu