alpacahq / alpaca-py

The Official Python SDK for Alpaca API
https://alpaca.markets/sdks/python/getting_started.html
Apache License 2.0
602 stars 147 forks source link

[Bug]: CancelOrderResponse not returned by TradingClient.cancel_order_by_id like documentation says #508

Open kwilsonmg opened 2 months ago

kwilsonmg commented 2 months ago

Is there an existing issue for this?

Current Behavior

The documentation for TradingClient.cancel_order_by_id says that it returns a CancelOrderResponse object. However, it does not and the type hint indicates as such. This is a contradiction.

Expected Behavior

The quickest solution would be to update the documentation to reflect that it doesn't do this and returns None (see #78 ), the longer solution would be #78.

SDK Version I encountered this issue in

any modern version, including master

Steps To Reproduce

Try and use function (noting its lack of a return value) or read [the documentation](https://alpaca.markets/sdks/python/api_reference/trading/orders.html)

Filled out the Steps to Reproduce section?

Anything else?

No response