From 4f44809645bc68c89701c2cb70095b1797124919 Mon Sep 17 00:00:00 2001 From: Romazes Date: Fri, 13 Jun 2025 17:43:49 +0300 Subject: [PATCH 1/4] feat: support tastytrade --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f75e21f5..4b42a8d5 100644 --- a/README.md +++ b/README.md @@ -363,9 +363,9 @@ Usage: lean cloud live deploy [OPTIONS] PROJECT --notify-insights. Options: - --brokerage [Paper Trading|Interactive Brokers|Tradier|Oanda|Bitfinex|Coinbase Advanced Trade|Binance|Zerodha|Samco|Terminal Link|Trading Technologies|Kraken|CharlesSchwab|Bybit|TradeStation|Alpaca] + --brokerage [Paper Trading|Interactive Brokers|Tradier|Oanda|Bitfinex|Coinbase Advanced Trade|Binance|Zerodha|Samco|Terminal Link|Trading Technologies|Kraken|CharlesSchwab|Bybit|TradeStation|Alpaca|Tastytrade] The brokerage to use - --data-provider-live [QuantConnect|Interactive Brokers|Tradier|Oanda|Bitfinex|Coinbase Advanced Trade|Binance|Zerodha|Samco|Terminal Link|Trading Technologies|Kraken|CharlesSchwab|Polygon|CoinApi|Bybit|TradeStation|Alpaca] + --data-provider-live [QuantConnect|Interactive Brokers|Tradier|Oanda|Bitfinex|Coinbase Advanced Trade|Binance|Zerodha|Samco|Terminal Link|Trading Technologies|Kraken|CharlesSchwab|Polygon|CoinApi|Bybit|TradeStation|Alpaca|Tastytrade] The live data provider to use --ib-user-name TEXT Your Interactive Brokers username --ib-account TEXT Your Interactive Brokers account id From 45af50577c9afbdeb4af9a9b556d48fb89ef21ff Mon Sep 17 00:00:00 2001 From: Romazes Date: Fri, 13 Jun 2025 17:44:02 +0300 Subject: [PATCH 2/4] feat: support tastytrade --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4b42a8d5..8b904a54 100644 --- a/README.md +++ b/README.md @@ -453,6 +453,10 @@ Options: The TradeStation account Id --alpaca-environment [live|paper] Whether Live or Paper environment should be used + --tastytrade-environment [live|sandbox] + Whether Live or Sandbox environment should be used + --tastytrade-account-number TEXT + The Tastytrade account number --polygon-api-key TEXT Your Polygon.io API Key --coinapi-api-key TEXT Your coinapi.io Api Key --coinapi-product [Free|Startup|Streamer|Professional|Enterprise] @@ -1296,9 +1300,9 @@ Options: --environment TEXT The environment to use --output DIRECTORY Directory to store results in (defaults to PROJECT/live/TIMESTAMP) -d, --detach Run the live deployment in a detached Docker container and return immediately - --brokerage [Paper Trading|Interactive Brokers|Tradier|Oanda|Bitfinex|Coinbase Advanced Trade|Binance|Zerodha|Samco|Terminal Link|Trading Technologies|Kraken|CharlesSchwab|Bybit|TradeStation|Alpaca] + --brokerage [Paper Trading|Interactive Brokers|Tradier|Oanda|Bitfinex|Coinbase Advanced Trade|Binance|Zerodha|Samco|Terminal Link|Trading Technologies|Kraken|CharlesSchwab|Bybit|TradeStation|Alpaca|Tastytrade] The brokerage to use - --data-provider-live [Interactive Brokers|Tradier|Oanda|Bitfinex|Coinbase Advanced Trade|Binance|Zerodha|Samco|Terminal Link|Trading Technologies|Kraken|CharlesSchwab|IQFeed|Polygon|CoinApi|ThetaData|Custom data only|Bybit|TradeStation|Alpaca] + --data-provider-live [Interactive Brokers|Tradier|Oanda|Bitfinex|Coinbase Advanced Trade|Binance|Zerodha|Samco|Terminal Link|Trading Technologies|Kraken|CharlesSchwab|IQFeed|Polygon|CoinApi|ThetaData|Custom data only|Bybit|TradeStation|Alpaca|Tastytrade] The live data provider to use --data-provider-historical [Interactive Brokers|Oanda|Bitfinex|Coinbase Advanced Trade|Binance|Kraken|CharlesSchwab|IQFeed|Polygon|FactSet|AlphaVantage|CoinApi|ThetaData|QuantConnect|Local|Bybit|TradeStation|Alpaca] Update the Lean configuration file to retrieve data from the given historical provider @@ -1403,6 +1407,10 @@ Options: The TradeStation account Id --alpaca-environment [live|paper] Whether Live or Paper environment should be used + --tastytrade-environment [live|sandbox] + Whether Live or Sandbox environment should be used + --tastytrade-account-number TEXT + The Tastytrade account number --ib-enable-delayed-streaming-data BOOLEAN Whether delayed data may be used when your algorithm subscribes to a security you don't have a market data subscription for (Optional). From 2f2b9895039356c0f964a15cfbf9a381529af33c Mon Sep 17 00:00:00 2001 From: Romazes Date: Mon, 16 Jun 2025 23:07:53 +0300 Subject: [PATCH 3/4] refactor: use general pattern to paper environment as another brokerages --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8b904a54..22a524d1 100644 --- a/README.md +++ b/README.md @@ -453,8 +453,8 @@ Options: The TradeStation account Id --alpaca-environment [live|paper] Whether Live or Paper environment should be used - --tastytrade-environment [live|sandbox] - Whether Live or Sandbox environment should be used + --tastytrade-environment [live|paper] + Whether Live or Paper environment should be used --tastytrade-account-number TEXT The Tastytrade account number --polygon-api-key TEXT Your Polygon.io API Key @@ -1407,8 +1407,8 @@ Options: The TradeStation account Id --alpaca-environment [live|paper] Whether Live or Paper environment should be used - --tastytrade-environment [live|sandbox] - Whether Live or Sandbox environment should be used + --tastytrade-environment [live|paper] + Whether Live or Paper environment should be used --tastytrade-account-number TEXT The Tastytrade account number --ib-enable-delayed-streaming-data BOOLEAN From 95f836a47f2bf777a6225848056997c0f1ee6862 Mon Sep 17 00:00:00 2001 From: Romazes Date: Tue, 1 Jul 2025 00:18:14 +0300 Subject: [PATCH 4/4] refactor: tastytrade configs --- README.md | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 22a524d1..e2adabf1 100644 --- a/README.md +++ b/README.md @@ -165,7 +165,7 @@ Options: -d, --detach Run the backtest in a detached Docker container and return immediately --debug [pycharm|ptvsd|debugpy|vsdbg|rider|local-platform] Enable a certain debugging method (see --help for more information) - --data-provider-historical [Interactive Brokers|Oanda|Bitfinex|Coinbase Advanced Trade|Binance|Kraken|CharlesSchwab|IQFeed|Polygon|FactSet|AlphaVantage|CoinApi|ThetaData|QuantConnect|Local|Terminal Link|Bybit|TradeStation|Alpaca] + --data-provider-historical [Interactive Brokers|Oanda|Bitfinex|Coinbase Advanced Trade|Binance|Kraken|CharlesSchwab|IQFeed|Polygon|FactSet|AlphaVantage|CoinApi|ThetaData|QuantConnect|Local|Terminal Link|Bybit|TradeStation|Alpaca|Tastytrade] Update the Lean configuration file to retrieve data from the given historical provider --ib-user-name TEXT Your Interactive Brokers username --ib-account TEXT Your Interactive Brokers account id @@ -233,6 +233,8 @@ Options: The TradeStation account Id --alpaca-environment [live|paper] Whether Live or Paper environment should be used + --tastytrade-account-number TEXT + The Tastytrade account number --download-data Update the Lean configuration file to download data from the QuantConnect API, alias for --data-provider-historical QuantConnect --data-purchase-limit INTEGER The maximum amount of QCC to spend on downloading data during the backtest when using @@ -453,8 +455,6 @@ Options: The TradeStation account Id --alpaca-environment [live|paper] Whether Live or Paper environment should be used - --tastytrade-environment [live|paper] - Whether Live or Paper environment should be used --tastytrade-account-number TEXT The Tastytrade account number --polygon-api-key TEXT Your Polygon.io API Key @@ -864,7 +864,7 @@ Usage: lean data download [OPTIONS] https://www.quantconnect.com/datasets Options: - --data-provider-historical [Interactive Brokers|Oanda|Bitfinex|Coinbase Advanced Trade|Binance|Kraken|CharlesSchwab|IQFeed|Polygon|FactSet|AlphaVantage|CoinApi|ThetaData|QuantConnect|Local|Terminal Link|Bybit|TradeStation|Alpaca] + --data-provider-historical [Interactive Brokers|Oanda|Bitfinex|Coinbase Advanced Trade|Binance|Kraken|CharlesSchwab|IQFeed|Polygon|FactSet|AlphaVantage|CoinApi|ThetaData|QuantConnect|Local|Terminal Link|Bybit|TradeStation|Alpaca|Tastytrade] The name of the downloader data provider. --ib-user-name TEXT Your Interactive Brokers username --ib-account TEXT Your Interactive Brokers account id @@ -932,6 +932,8 @@ Options: The TradeStation account Id --alpaca-environment [live|paper] Whether Live or Paper environment should be used + --tastytrade-account-number TEXT + The Tastytrade account number --dataset TEXT The name of the dataset to download non-interactively --overwrite Overwrite existing local data -y, --yes Automatically confirm payment confirmation prompts @@ -1304,7 +1306,7 @@ Options: The brokerage to use --data-provider-live [Interactive Brokers|Tradier|Oanda|Bitfinex|Coinbase Advanced Trade|Binance|Zerodha|Samco|Terminal Link|Trading Technologies|Kraken|CharlesSchwab|IQFeed|Polygon|CoinApi|ThetaData|Custom data only|Bybit|TradeStation|Alpaca|Tastytrade] The live data provider to use - --data-provider-historical [Interactive Brokers|Oanda|Bitfinex|Coinbase Advanced Trade|Binance|Kraken|CharlesSchwab|IQFeed|Polygon|FactSet|AlphaVantage|CoinApi|ThetaData|QuantConnect|Local|Bybit|TradeStation|Alpaca] + --data-provider-historical [Interactive Brokers|Oanda|Bitfinex|Coinbase Advanced Trade|Binance|Kraken|CharlesSchwab|IQFeed|Polygon|FactSet|AlphaVantage|CoinApi|ThetaData|QuantConnect|Local|Bybit|TradeStation|Alpaca|Tastytrade] Update the Lean configuration file to retrieve data from the given historical provider --ib-user-name TEXT Your Interactive Brokers username --ib-account TEXT Your Interactive Brokers account id @@ -1407,8 +1409,6 @@ Options: The TradeStation account Id --alpaca-environment [live|paper] Whether Live or Paper environment should be used - --tastytrade-environment [live|paper] - Whether Live or Paper environment should be used --tastytrade-account-number TEXT The Tastytrade account number --ib-enable-delayed-streaming-data BOOLEAN @@ -1745,7 +1745,7 @@ Options: --parameter ... The 'parameter min max step' pairs configuring the parameters to optimize --constraint TEXT The 'statistic operator value' pairs configuring the constraints of the optimization - --data-provider-historical [Interactive Brokers|Oanda|Bitfinex|Coinbase Advanced Trade|Binance|Kraken|CharlesSchwab|IQFeed|Polygon|FactSet|AlphaVantage|CoinApi|ThetaData|QuantConnect|Local|Terminal Link|Bybit|TradeStation|Alpaca] + --data-provider-historical [Interactive Brokers|Oanda|Bitfinex|Coinbase Advanced Trade|Binance|Kraken|CharlesSchwab|IQFeed|Polygon|FactSet|AlphaVantage|CoinApi|ThetaData|QuantConnect|Local|Terminal Link|Bybit|TradeStation|Alpaca|Tastytrade] Update the Lean configuration file to retrieve data from the given historical provider --download-data Update the Lean configuration file to download data from the QuantConnect API, alias for --data-provider-historical QuantConnect @@ -1826,6 +1826,8 @@ Options: The TradeStation account Id --alpaca-environment [live|paper] Whether Live or Paper environment should be used + --tastytrade-account-number TEXT + The Tastytrade account number --lean-config FILE The Lean configuration file that should be used (defaults to the nearest lean.json) --verbose Enable debug logging --help Show this message and exit. @@ -2003,7 +2005,7 @@ Usage: lean research [OPTIONS] PROJECT Options: --port INTEGER The port to run Jupyter Lab on (defaults to 8888) - --data-provider-historical [Interactive Brokers|Oanda|Bitfinex|Coinbase Advanced Trade|Binance|Kraken|CharlesSchwab|IQFeed|Polygon|FactSet|AlphaVantage|CoinApi|ThetaData|QuantConnect|Local|Terminal Link|Bybit|TradeStation|Alpaca] + --data-provider-historical [Interactive Brokers|Oanda|Bitfinex|Coinbase Advanced Trade|Binance|Kraken|CharlesSchwab|IQFeed|Polygon|FactSet|AlphaVantage|CoinApi|ThetaData|QuantConnect|Local|Terminal Link|Bybit|TradeStation|Alpaca|Tastytrade] Update the Lean configuration file to retrieve data from the given historical provider --ib-user-name TEXT Your Interactive Brokers username --ib-account TEXT Your Interactive Brokers account id @@ -2071,6 +2073,8 @@ Options: The TradeStation account Id --alpaca-environment [live|paper] Whether Live or Paper environment should be used + --tastytrade-account-number TEXT + The Tastytrade account number --download-data Update the Lean configuration file to download data from the QuantConnect API, alias for --data-provider-historical QuantConnect --data-purchase-limit INTEGER The maximum amount of QCC to spend on downloading data during the research session