alpacahq / alpaca-trade-api-python

Python client for Alpaca's trade API
https://pypi.org/project/alpaca-trade-api/
Apache License 2.0
1.73k stars 538 forks source link

[Bug]: data_get() still uses v1 #639

Open Enigma56 opened 2 years ago

Enigma56 commented 2 years ago

Is there an existing issue for this?

Current Behavior

Throws an HTTP 404 Error saying that there is no endpoint "https://data.alpaca.markets/v1/stocks/AAPL/trades"

Expected Behavior

Return the trade with whatever query results are given.

SDK Version I encountered this issue in

alpaca-trade-api: version 2.3.0

Steps To Reproduce

Run any .data_get() call without specifying the version as v2

Filled out the Steps to Reproduce section?

Anything else?

Simply change the code inside of the SDK to default data_get() to version 2 instead of version 1

OR

change the default to v1beta1. No where on the api documentation for market data does it still use v1 as a valid version.

OR write a more clear error that gets thrown inside of the SDK to tell people to change api_version