In this release, support for advanced order types - bracket orders - is added. You can now submit bracket orders like so:
{
"side": "buy",
"symbol": "SPY",
"type": "market",
"qty": "100",
"time_in_force": "gtc",
"class": "bracket",
"take_profit": {
"limit_price": "301"
},
"stop_loss": {
"stop_price": "299",
"limit_price": "298.5"
}
}
Please note the inclusion of the new `nested` parameter in the order list call. Specifying nested=true will make it so that bracket orders have `legs` fields which will contain their child orders. Child orders will be in this nested field rather than the main array of orders. For more information about using bracket orders with Alpaca, please refer to https://docs.alpaca.markets.
Watchlist endpoint support was also added - learn more about using it here: https://docs.alpaca.markets/api-documentation/api-v2/watchlist/.
Additionally, support for Alpha Vantage has been added for those looking for more data sources akin to our Polygon integration. Please see the updated README.md for information about using the Alpha Vantage API. We also corrected an issue where Position-closing endpoints were not returning the created Order objects.