Skip to content

Instantly share code, notes, and snippets.

@boyan-soubachov
Created February 21, 2019 20:21
Show Gist options
  • Save boyan-soubachov/65c3531ab7424ec7645bf250b696abd5 to your computer and use it in GitHub Desktop.
Save boyan-soubachov/65c3531ab7424ec7645bf250b696abd5 to your computer and use it in GitHub Desktop.
Aiocometd
import aiocometd
import asyncio
url = "https://tools.dxfeed.com/webservice/cometd"
async def main_loop():
async with aiocometd.Client(url) as client:
async for message in client:
print("message data: %s" % message)
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(main_loop())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment