Why it is only this long
The order updates itself
order.filled is live. You hold the object place() gave you and read it — no lookup, no bookkeeping.The hedge picks its own venue
A market order across
HEDGE_ON walks the merged book and takes the cheapest liquidity, wherever it is.Fees are in the comparison
fee_offset on the hedge venues means “cheapest” accounts for what each one charges you.The quote is priced off the hedge
book.vwap(size, side, exclude=...) prices the clip on the venues that would actually fill it, so the edge you quote is the edge you can lay off.Silence is not a miss
confirm() asks the venues before you retry. A hedge re-sent because its fill was reported late is a position twice over.Dead venues drop out
A venue that stops publishing leaves the book on its own, so the hedge never routes into a stale price.
Picking up after a restart
SORY keeps nothing on disk. Ask the venues what you still have working:Before you point it at real money
Passdry_run=True on every place() above. Each one runs the whole path — routing the hedge, per-venue rounding, building the orders — and sends nothing. Watch the printed hedges for a while first.
Quotes rest until they are filled or cancelled. There is no post-only, so a quote placed inside the spread can cross and pay taker — price it outside the touch, as
EDGE_BPS does above, and it will not.