From 7e39bb65727865e12306e42cce0352ca148728a5 Mon Sep 17 00:00:00 2001 From: Ewald de Wit Date: Tue, 8 Aug 2023 17:45:17 +0200 Subject: [PATCH] Remove async streaming ticks recipe. --- docs/recipes.rst | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/docs/recipes.rst b/docs/recipes.rst index 5e2b7261..8b8811f2 100644 --- a/docs/recipes.rst +++ b/docs/recipes.rst @@ -192,41 +192,6 @@ the data that has not been sent yet. ib.disconnect() -Async streaming ticks -^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: python - - import asyncio - - import ib_insync as ibi - - - class App: - - async def run(self): - self.ib = ibi.IB() - with await self.ib.connectAsync(): - contracts = [ - ibi.Stock(symbol, 'SMART', 'USD') - for symbol in ['AAPL', 'TSLA', 'AMD', 'INTC']] - for contract in contracts: - self.ib.reqMktData(contract) - - async for tickers in self.ib.pendingTickersEvent: - for ticker in tickers: - print(ticker) - - def stop(self): - self.ib.disconnect() - - - app = App() - try: - asyncio.run(app.run()) - except (KeyboardInterrupt, SystemExit): - app.stop() - Integration with PyQt5 or PySide2 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^