alpaca-trade-api-python icon indicating copy to clipboard operation
alpaca-trade-api-python copied to clipboard

[Bug]: data_get() still uses v1

Open Enigma56 opened this issue 3 years ago • 0 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

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?

  • [X] I have entered valid steps to reproduce my issue or have attached a minimally reproducible case in code that shows my issue happening; and understand that without this my issue will be flagged as invalid and closed after 30 days.

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

Enigma56 avatar Jul 17 '22 21:07 Enigma56