ccjr / alpaca-trade-api

MIT License
32 stars 28 forks source link

Adds fractionable and notional orders #17

Closed travishooper closed 3 years ago

travishooper commented 3 years ago

This change adds to the Asset class a boolean field to determine if an asset can be ordered in a fractionable amount. If the asset is fractionable, a new order can be created for that asset using a float as the quantity. Furthermore, the quantity qty field for a new order is now optional, however new orders require that either the qty or notional argument is passed. Notional allows for a set dollar amount of a fractionable asset to be passed to create a new order.

travishooper commented 3 years ago

@ccjr I was able to record the cassettes today and get the specs passing. This should be good to go now.

ccjr commented 3 years ago

This looks good. I'll merge and release a new version this weekend, thanks!