tastyware / tastytrade

An unofficial, sync/async Python SDK for Tastytrade!
https://tastyworks-api.rtfd.io
MIT License
126 stars 43 forks source link

TastytradeError('Subscription channel not opened') raised #101

Closed Quenos closed 1 year ago

Quenos commented 1 year ago

Describe the bug In the DXLink streamer subscribing to a symbol raises TastytradeError('Subscription channel not opened')

How to reproduce

async def get_quotes():
    streamer = await DXLinkStreamer.create(session)
    subs = ['GLD']
    await streamer.subscribe(EventType.QUOTE, subs)
    quotes = []
    async for quote in streamer.listen(EventType.QUOTE):
        print(quote)
        if len(quotes) >= len(subs):
            break

** Solved in PR #100

Graeme22 commented 1 year ago

Can confirm this issue, I had the streamer working yesterday but I must have broken something. Please submit a PR from the master branch with a single commit.