My order came back saying that I had bought 0 shares. And the quote from the exchange now read “500 shares available at $120.”
Maybe I don't get the full picture, but it sounds like you have to poll via REST API to query the book? Modern exchanges just give you a feed of updates (adds, deletes, trades), so you don't run into situations like this. You can just check the feed to see what happened.