alpacahq / Alpaca-API

The Alpaca API is a developer interface for trading operations and market data reception through the Alpaca platform.
https://alpaca.markets/
143 stars 13 forks source link

Status of order will always return as "accepted" even tho it is rejected #107

Closed Xatnagh closed 3 years ago

Xatnagh commented 4 years ago

I just started doing this today and is following the step by step tutorial on your website:https://docs.alpaca.markets/get-started-with-alpaca/tutorial-videos/
(first video) When i got to the order section, I successfully created a order and have it show up in the overview page, but since market is closed right now, the order didn't get filled, hence rejected. But when I print out the status of the order, it shows as accepted.

umitanuki commented 4 years ago

Did you get the latest order status from List Orders API? When you receive the order entity from Submit Order API (POST), its status is "accepted", yes, but the status change to "rejected" is asynchronous.