Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to subscribe to market data due to likely invalid endpoint /quote-streamer-tokens. #20

Open
pangyuteng opened this issue Sep 21, 2024 · 2 comments

Comments

@pangyuteng
Copy link

Unable to subscribe to market data due to likely invalid endpoint /quote-streamer-tokens

version used was tastytrade-sdk==1.0.0

minimal reproducible example and error/traceback provided below.

import os
from tastytrade_sdk import Tastytrade
tasty = Tastytrade(api_base_url=api_url).login(login=username, password=password)
symbols = ['BTC/USD']
subscription = tasty.market_data.subscribe(
    symbols=symbols,
    on_quote=print,
    on_candle=print,
    on_greeks=print
)
![image](https://github.com/user-attachments/assets/09512ba8-cab1-4141-a9df-64117b4cd34f)

related issues provided below.

tastytrade/tastytrade-api-js#7
tastyware/tastytrade#142

@pangyuteng
Copy link
Author

solution (for now) seems to be to replace GET /quote-streamer-tokens with GET /api-quote-tokens per tastytrade/tastytrade-api-js#7 (comment)

in https://github.com/tastytrade/tastytrade-sdk-python/blob/master/src/tastytrade_sdk/market_data/market_data.py#L34

@pangyuteng
Copy link
Author

pangyuteng commented Sep 21, 2024

proposed patch provided below:

update

--

evidence below showing proposed patch resolved the issue raised:

image

--

and now i'm on the same page with #17 😆 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant