vectorbt icon indicating copy to clipboard operation
vectorbt copied to clipboard

Consider Migrating from `alpaca-trade-api` to `alpaca-py`

Open ASRagab opened this issue 6 months ago • 1 comments

First, thank you for your work and efforts in maintaining this framework.

I would like to change the dependency on alpaca-trade-api to alpaca-py as the former library has been officially deprecated for some time.

Deprecation notice: https://github.com/alpacahq/alpaca-trade-api-python?tab=readme-ov-file#deprecation-notice

The reason is that some libraries are starting to get stale, specifically the websockets library, and I encountered some dependency conflict warnings.

Here is pipdevtree's report

╰─ pipdeptree --reverse --packages alpaca-trade-api                                                                                                                                                                                                       
Warning!!! Possibly conflicting dependencies found:
* alpaca-trade-api==3.2.0
 - websockets [required: >=9.0,<11, installed: 12.0]

Currently alpaca-py depends on these libraries, which I do not believe conflict with anything in vectorbt

requests = "^2.30.0"
pydantic = "^2.0.3"
pandas = ">=1.5.3"
msgpack = "^1.0.3"
websockets = ">=10.4"
sseclient-py = "^1.7.2"

The changes, I believe, would restricted mostly to a single class and a few supporting files and presumably some documentation. Let me know if you believe this change would be prudent.

ASRagab avatar Aug 13 '24 23:08 ASRagab