alpacahq/Momentum-Trading-Example

Project dependencies may have API risk issues

Opened this issue · 0 comments

Hi, In Momentum-Trading-Example, inappropriate dependency versioning constraints can cause risks.

Below are the dependencies and version constraints that the project is using

alpaca-trade-api>=0.25
ta
sklearn

The version constraint == will introduce the risk of dependency conflicts because the scope of dependencies is too strict.
The version constraint No Upper Bound and * will introduce the risk of the missing API Error because the latest version of the dependencies may remove some APIs.

After further analysis, in this project,
The version constraint of dependency ta can be changed to >=0.1.2,<=0.4.7.
The version constraint of dependency ta can be changed to >=0.7.0,<=0.10.2.

The above modification suggestions can reduce the dependency conflicts as much as possible,
and introduce the latest version as much as possible without calling Error in the projects.

The invocation of the current project includes all the following methods.

The calling methods from the ta
ta.macd
The calling methods from the all methods
datetime.datetime.today.astimezone.replace
int
api.polygon.all_tickers
get_1000m_history_data.dropna
str
open_orders.get
alpaca_trade_api.StreamConn.run
alpaca_trade_api.REST.get_calendar
alpaca_trade_api.REST.submit_order
time.sleep
alpaca_trade_api.REST.get_account
datetime.datetime.today
run
symbol.minute_history.dropna
api.polygon.historic_agg
datetime.datetime.today.astimezone
run_ws
datetime.timedelta
existing_order.submitted_at.astimezone
minute_history.dropna.resample
len
alpaca_trade_api.REST.cancel_order
get_1000m_history_data
partial_fills.get
format
print
alpaca_trade_api.REST.get_position
alpaca_trade_api.StreamConn.on
alpaca_trade_api.REST.list_assets
market_open.astimezone.astimezone
ta.macd
find_stop
alpaca_trade_api.REST.list_orders
positions.get
pytz.timezone
alpaca_trade_api.StreamConn.close
alpaca_trade_api.StreamConn.deregister
requests.session
alpaca_trade_api.REST
alpaca_trade_api.REST.list_positions
numpy.where
float
numpy.diff
minute_history.dropna.resample.min
nyc.datetime.today.astimezone.strftime
alpaca_trade_api.StreamConn
ubound.lbound.symbol.minute_history.max
now.floor
get_tickers
symbols.remove
market_close.astimezone.astimezone

@developer
Could please help me check this issue?
May I pull a request to fix it?
Thank you very much.