diff --git a/README.md b/README.md index c383d123..2e4ca255 100644 --- a/README.md +++ b/README.md @@ -320,9 +320,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|TDAmeritrade|Bybit|TradeStation] + --brokerage [Paper Trading|Interactive Brokers|Tradier|Oanda|Bitfinex|Coinbase Advanced Trade|Binance|Zerodha|Samco|Terminal Link|Trading Technologies|Kraken|TDAmeritrade|Bybit|TradeStation|Alpaca] The brokerage to use - --data-provider-live [QuantConnect|Interactive Brokers|Tradier|Oanda|Bitfinex|Coinbase Advanced Trade|Binance|Zerodha|Samco|Terminal Link|Trading Technologies|Kraken|TDAmeritrade|Polygon|IEX|CoinApi|Bybit|TradeStation] + --data-provider-live [QuantConnect|Interactive Brokers|Tradier|Oanda|Bitfinex|Coinbase Advanced Trade|Binance|Zerodha|Samco|Terminal Link|Trading Technologies|Kraken|TDAmeritrade|Polygon|IEX|CoinApi|Bybit|TradeStation|Alpaca] The live data provider to use --ib-user-name TEXT Your Interactive Brokers username --ib-account TEXT Your Interactive Brokers account id @@ -407,9 +407,11 @@ Options: --bybit-vip-level [VIP0|VIP1|VIP2|VIP3|VIP4|VIP5|SupremeVIP|Pro1|Pro2|Pro3|Pro4|Pro5] Your Bybit VIP Level --trade-station-environment [live|paper] - Whether the testnet should be used + Whether Live or Paper environment should be used --trade-station-account-type [Cash|Margin|Futures|DVP] Specifies the type of account on TradeStation + --alpaca-environment [live|paper] + Whether Live or Paper environment should be used --polygon-api-key TEXT Your Polygon.io API Key --iex-cloud-api-key TEXT Your iexcloud.io API token publishable key --iex-price-plan [Launch|Grow|Enterprise] @@ -417,6 +419,8 @@ Options: --coinapi-api-key TEXT Your coinapi.io Api Key --coinapi-product [Free|Startup|Streamer|Professional|Enterprise] CoinApi pricing plan (https://www.coinapi.io/market-data-api/pricing) + --alpaca-api-key TEXT Your Alpaca Api Key + --alpaca-api-secret TEXT Your Alpaca Api Secret --node TEXT The name or id of the live node to run on --auto-restart BOOLEAN Whether automatic algorithm restarting must be enabled --notify-order-events BOOLEAN Whether notifications must be sent for order events @@ -1229,9 +1233,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|TDAmeritrade|Bybit|TradeStation] + --brokerage [Paper Trading|Interactive Brokers|Tradier|Oanda|Bitfinex|Coinbase Advanced Trade|Binance|Zerodha|Samco|Terminal Link|Trading Technologies|Kraken|TDAmeritrade|Bybit|TradeStation|Alpaca] The brokerage to use - --data-provider-live [Interactive Brokers|Tradier|Oanda|Bitfinex|Coinbase Advanced Trade|Binance|Zerodha|Samco|Terminal Link|Trading Technologies|Kraken|TDAmeritrade|IQFeed|Polygon|IEX|CoinApi|ThetaData|Custom data only|Bybit|TradeStation] + --data-provider-live [Interactive Brokers|Tradier|Oanda|Bitfinex|Coinbase Advanced Trade|Binance|Zerodha|Samco|Terminal Link|Trading Technologies|Kraken|TDAmeritrade|IQFeed|Polygon|IEX|CoinApi|ThetaData|Custom data only|Bybit|TradeStation|Alpaca] The live data provider to use --data-provider-historical [Interactive Brokers|Oanda|Bitfinex|Coinbase Advanced Trade|Binance|Kraken|IQFeed|Polygon|FactSet|IEX|AlphaVantage|CoinApi|ThetaData|QuantConnect|Local|Bybit] Update the Lean configuration file to retrieve data from the given historical provider @@ -1333,9 +1337,11 @@ Options: --bybit-use-testnet [live|paper] Whether the testnet should be used --trade-station-environment [live|paper] - Whether the testnet should be used + Whether Live or Paper environment should be used --trade-station-account-type [Cash|Margin|Futures|DVP] Specifies the type of account on TradeStation + --alpaca-environment [live|paper] + Whether Live or Paper environment should be used --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). @@ -1355,6 +1361,8 @@ Options: --thetadata-rest-url TEXT The ThetaData host address (Optional). --thetadata-subscription-plan [Free|Value|Standard|Pro] Your ThetaData subscription price plan + --alpaca-api-key TEXT Your Alpaca Api Key + --alpaca-api-secret TEXT Your Alpaca Api Secret --factset-auth-config-file FILE The path to the FactSet authentication configuration file --alpha-vantage-api-key TEXT Your Alpha Vantage Api Key diff --git a/lean/components/util/auth0_helper.py b/lean/components/util/auth0_helper.py index d6c35eb0..b5c453d4 100644 --- a/lean/components/util/auth0_helper.py +++ b/lean/components/util/auth0_helper.py @@ -35,6 +35,7 @@ def get_authorization(auth0_client: Auth0Client, brokerage_id: str, logger: Logg # keep checking for new data every 5 seconds for 7 minutes while time() - start_time < 420: + logger.info("Will sleep 5 seconds and retry fetching authorization...") sleep(5) data = auth0_client.read(brokerage_id) if data.authorization is None: