Order types
Plus one flag:
post_only, which stops a resting quote from crossing and paying taker.
No reduce_only, no stop or trigger orders, no IOC/FOK, no icebergs, no algos. Build them on top.
The order model
OneOrder fans out to one or more VenueOrders. That is inherent to routing.
expected_price / achieved_price, because routing has to be measurable.
What a venue tells you
OrderUpdate is the venue’s own report, normalised: numbers as Decimal, the venue tagged on. No derived fields, no invented all-in price. raw holds the untouched payload.
Status is the venue’s own — open, closed, canceled, rejected, expired. SORY builds no state machine on top of it.
Cancelling
Wait for confirmation before reposting. A cancel that races a fill is how you end up double-filled, so
cancel returns when the venues have answered, not when the requests were sent.State
In memory only. No file, no database, no persistence of any kind. On restart, the venues tell you what is resting — that is the whole recovery story.Safety
The caps are yours to set. SORY does not invent a risk policy for you.
