aurbano / robinhood-node

:chart_with_upwards_trend: NodeJS client for Robinhood Trading :fire:
https://aurbano.github.io/robinhood-node
MIT License
694 stars 184 forks source link

Cancel an order by order id #68

Closed uladkasach closed 6 years ago

uladkasach commented 6 years ago

It should be possible to cancel an order by specifying the order id, rather than needing the full order object.

The uri request https://api.robinhood.com/orders/<order_id>/cancel is easily buildable.

uladkasach commented 6 years ago

The pull request is backwards compatible: the same operations result if an order object is passed (as the method originally expected).

uladkasach commented 6 years ago

I've confirmed through live testing that this new functionality works as expected and that the previous functionality works as expected (backwards compatible.)

aurbano commented 6 years ago

Sorry for the delay merging this! Added in 1.4.0