tastytrade/streaming_data_example.py

12 lines
317 B
Python
Raw Normal View History

from dotenv import load_dotenv
from os import getenv
from tastytrade import Tastytrade
load_dotenv()
account = getenv("TASTYTRADE_ACCOUNT")
username = getenv("TASTYTRADE_USERNAME")
password = getenv("TASTYTRADE_PASSWORD")
client = Tastytrade(username, password)
client.login()
client.stream_quotes(['AAPL', 'AMZN'])