diff --git a/iron_condor.py b/iron_condor.py index a3af87b..0ee293d 100644 --- a/iron_condor.py +++ b/iron_condor.py @@ -1,7 +1,20 @@ from datetime import datetime +from dotenv import load_dotenv from ibkr import Client +from os import getenv +from tastytrade import Tastytrade -ibkr_client = Client(host = '127.0.0.1', port = 7497) +load_dotenv() + +ibkr_host = getenv("IBKR_HOST") +ibkr_port = getenv("IBKR_PORT") +ibkr_client = Client(host = ibkr_host, port = ibkr_port) + +tastytrade_account = getenv("TASTYTRADE_ACCOUNT") +tastytrade_username = getenv("TASTYTRADE_USERNAME") +tastytrade_password = getenv("TASTYTRADE_PASSWORD") +tastytrade_client = Tastytrade(tastytrade_username, tastytrade_password) +tastytrade_client.login() underlying_ticker = ibkr_client.get_ticker('SPX', 'CBOE') current_price = underlying_ticker.last