order validation
Articles about order validation.
Articles
- 10 min read
API order rejected for insufficient balance but you have enough
What a bot can spend is derived, not read: the free amount of the asset the order debits, in the wallet it debits, after venue holds and fees, from a snapshot that reflects the last balance change the bot knows of. When a field is missing or the snapshot may be older, the answer is unknown, not a number.
- 10 min read
Multiple trading bots on one account: sharing buying power
Two bots that check a shared balance and then send both pass when each check reads a balance that does not yet show the other's order. Check and reserve atomically at one admission point, persist the reservation before sending, and release it only on a terminal report, never on a cancel acknowledgment or a timeout.