Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Commit

Permalink
Remove async streaming ticks recipe.
Browse files Browse the repository at this point in the history
  • Loading branch information
erdewit committed Aug 8, 2023
1 parent a003470 commit 7e39bb6
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions docs/recipes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down

0 comments on commit 7e39bb6

Please sign in to comment.