async def onStart(self, event: Event) -> None: # Create an instrument inst = Instrument(name=self._symbol, type=InstrumentType(self._symbol_type)) # Subscribe await self.subscribe(inst) print("Subscribing to {}".format(inst))
async def onStart(self, event: Event) -> None: # Create an instrument inst = Instrument(name=self._symbol, type=InstrumentType(self._symbol_type)) # Check that its available if inst not in self.instruments(): raise Exception("Not available on exchange: {}".format( self._symbol)) # Subscribe await self.subscribe(inst) print("Subscribing to {}".format(inst))