Well I think you're getting ahead of yourself a little bit, and this is where I keep saying most people here don't really understand the way the market really works at a nuts and bolts level.
The quotes that the firm is recieving from whatever upstream source they source liquidity from take a certain amount of time to cross the gap between the two servers (host server and client server). In that time the market may be moving. So each quote will have a 'time to live' of a certain number of milliseconds (varies according to circumstance). And the two systems will be constantly exchanging 'heartbeats' to prove they're connected. Plus they will as far as possible synchronise system clocks so that they agree the time to less than a second.So most likely when you send an order to the broker that is meant to be STP it will be forwarded on to the upstream liquidity provider on a fill or kill basis with a specific level attached. If it doesn't get there before the time to live has expired then tough. If they do get filled then cool - they send it back, including their spread, and you've dealt.
They could in theory fill you every time, regardless of the above constraints, but that would leave the broker beholden to the round trip speed not only of their connection to the liquidity provider (whch is likely to be both fast, and a known commodity), but also, more tellingly, to YOUR end of things, which frankly could be anything. They can't legislate for the speed / reliability of your internet connnection (I'm assuming you're connecting via the internet - feel free to correct me if not) as they don't own the line, don't know which ISP you're using, don't know whether you live in a well supported area for lines etc etc.
So the simple fact is if you're trying to run an API operation based but using low end connectivity infrastructure then you're gonna run into this kind of issue.
I personally have high speed dedicated leased lines with service level agreements in place with multiple carriers, some degree of proximity hosting (i.e. same city, but not inside the building close) and I still run into this sort of thing from time to time.
That's not to say that the broker has never messed you around, I just think you need to be more aware of how it all works.
GJ