Releases: alpacahq/alpaca-trade-api-python
Enable Raw API Response
In this release we enable raw data responses from REST and Stream APIs. (de0fc4f)
It is achieved by passing raw_data=True
to API instances and it returns the data without wrapping it with Entity objects. Default is using Entities, exactly as before.
Also:
- Support for polygon financials V2 (200f667)
- Update the example code for websocket usage (a02e694)
- Add oauth support for StreamConn (05f3a78)
- Add CI pipelines for python 3.6-3.9 (be04063)
- Make sure there are no issues with pandas 1.2.0+ and numpy 1.20.0+ which dropped support for python 3.6 (e2eb54d)
Fixes
Add support for the alpaca-proxy-agent project
In this release we add support for the alpaca-proxy-agent which allows users to run multiple strategies in parallel.
also:
- Add a new simple stream example to demonstrate how to use the streaming service.
It's underexamples/websocket_example.py
- Cleaner look for the documentation (README file)
- Explain exactly how to use
get_barset()
Support Trailing Stop in replace_order
Replace trailing stop orders are now supported by the API.
Adding it to the SDK as well
Add support for trailing stop orders
In this release we add support for the new added feature - trailing stop:
- submit_order now supports a new type
trailing_stop
. - 2 new optional args to submit_order:
trail_price
,trail_percent
.
Bugs
- Fix functions related to the Watchlist endpoint.
Debugging Enhancements
In this release we add small changes to help the user debug issues easily:
- Indicate that websocket is connected and to which endpoint
- add a debug flag to make websocket exceptions more verbose
- explain in the docs, how to define a logger to see these changes
Other changes
- We also removed the Alpha Vantage Integration. it will be moved to a stand alone package
- We now allow working with all versions of pandas (required for Pylivetrader)
Bugs
Websocket Reconnect
In this release we:
- reconnect when the data websocket disconnects
- add type hints for the rest and stream modules
- add some input validators for URLs, price floats and dates
- remove deprecated polygon api wrappers: historic_trades, historic_quotes, splits
- add integration with pyup
- change the package requirements to be less strict
- update the README documentation
fixes:
- historic_agg_v2 now accepts different date formats
- adjust the sample code: martingale.py to work with the new data api
Support new Alpaca Data API
Alpaca Data API's new endpoints are supported as of this version.
- get_last_trade()
- get_last_quote()
- StreamConn() can now connect to streams of trade, quotes and minute bars provided by Alpaca streaming endpoint
Now all users (with or without live brokerage account) can access realtime quotes/trades both in REST and streaming.
As part of these changes, this release defaults streaming connection to the Alpaca streaming endpoint. If you want to keep using Polygon streaming endpoint, you will need to specify data_stream
in the StreamConn()
initializer, as
conn = StreamConn(data_stream="polygon")
Alias timestamp for streaming Agg
For the compatibility with other entities around, we alias "start" to also be "timestamp" in the streaming bars.
Bug fixes on rc3 and modifications to the api data schema
This is another pre-release for 0.47. In this release we:
- removed the polyfeed prefix
- better exception handling for stream2
- support the new data schema:
- trade in WS: rename “sym” to “T”, “t” to be nanoseconds (from milliseconds)
- quote in WS: no change
- bars in WS: rename “sym” to “T”
- trade in REST: timestamp resolution is now nanoseconds
- quote in REST: timestamp resolution is now nanoseconds
- bars in REST: no change
Bug fixes on rc2 and default streaming to Alpaca Data streaming
This is another pre-release for the upcoming Alpaca Data API upgrade. This release notably changes the default streaming connection from polygon to alpaca. The caller can still choose polygon with data_stream='polygon'
in StreamConn initializer.