code, never on message. Codes are stable; messages are not.
origin tells you whether it happened
This is the field worth understanding, because it answers “did my order exist?”
For a retry decision:
gateway and port rejects are safe to fix and resend.
A core reject is a real economic answer — resending unchanged gets the same
result.
Common codes
Authentication
Your request was malformed
The exchange said no
Timeouts are not rejections
Cancellations are not errors
Post-only orders that would cross, unfillable FOKs, IOC remainders and self-trade prevention all come back as a successful201 with
status: "canceled" and a reason. They are execution outcomes, not failures,
so check status on success responses rather than assuming 201 means resting.