Skip to content

Releases: alpacahq/alpaca-trade-api-python

Enable Raw API Response

17 Jan 10:10
788f035
Compare
Choose a tag to compare

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

  • handle better aggs empty response (e2c9b74)
  • fixing dates for polygon queries (d84675e)
  • fix should use asyncio.sleep inside async methods (c329fba)
  • Calendar Entity dates (f848bdd)
  • polygon grouped_daily() url (013cb80)
  • update polygon trade mapping for Entity (8dbb109)

Add support for the alpaca-proxy-agent project

08 Oct 20:00
aaf41f9
Compare
Choose a tag to compare

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 under examples/websocket_example.py
  • Cleaner look for the documentation (README file)
  • Explain exactly how to use get_barset()

Support Trailing Stop in replace_order

24 Aug 20:25
e5d3c0d
Compare
Choose a tag to compare

Replace trailing stop orders are now supported by the API.

Adding it to the SDK as well

Add support for trailing stop orders

18 Aug 21:38
Compare
Choose a tag to compare

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

04 Aug 06:09
fb99696
Compare
Choose a tag to compare

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

  • fix bug with polygons' historic_aggs_v2 (#280)
  • 'NoneType' object is not iterable (#270)

Websocket Reconnect

14 Jul 16:40
257cbbf
Compare
Choose a tag to compare

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

11 May 06:36
Compare
Choose a tag to compare

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

06 May 20:27
Compare
Choose a tag to compare
Pre-release

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

06 May 19:41
b342fef
Compare
Choose a tag to compare

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

28 Apr 20:36
Compare
Choose a tag to compare

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.