having this example:
import websocket
from bitmex_websocket import Instrument
from bitmex_websocket.constants import InstrumentChannels
websocket.enableTrace(True)
channels = [
InstrumentChannels.quote,
InstrumentChannels.trade,
InstrumentChannels.orderBookL2
]
XBTUSD = Instrument(symbol='XBTUSD',
channels=channels)
XBTUSD.on('action', lambda msg: print(message))
XBTUSD.run_forever()
how to run websocket for multiple pairs e.g. ETHXBT, ETHXBT, ... at the same time?
Is there any way to add a list of instruments like channels in Instrument constructor?
having this example:
how to run websocket for multiple pairs e.g. ETHXBT, ETHXBT, ... at the same time?
Is there any way to add a list of
instrumentslikechannelsinInstrumentconstructor?