Skip to content

Commit

Permalink
Add Alpaca to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin-Molinero committed Jul 18, 2024
1 parent 7268ea0 commit 07b64f9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -407,16 +407,20 @@ 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]
Your IEX Cloud Price plan
--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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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).
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions lean/components/util/auth0_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 07b64f9

Please sign in to comment.