Skip to main content
When you send a market order across more than one venue, SORY walks the merged book and takes the cheapest liquidity first, wherever it is.
Give it your fees and it compares what you actually pay. Without them it compares quoted prices, which is still useful but not the same thing.

Three things it will not do

Send a slice a venue will reject

Too small, or below the venue’s minimum order value.

Lose part of your order

Requested always equals allocated plus unallocated, with a reason.

Use a venue that went quiet

Stale or offline venues are skipped and named.

How far it will sweep

As far as depth — the number of price levels you asked each venue for. Whatever the book cannot fill comes back as unallocated, with a reason, rather than SORY digging deeper than you configured.
A market order carries no price to the venue. SORY splits it using the book it last saw, but if the market moves between planning and arrival it can still fill somewhere else. Send a limit order if you need a guaranteed price.

Slices too small to send

Venues have minimum order sizes. If one venue’s share lands under its minimum, that venue is dropped and the split is worked out again without it — so the quantity moves somewhere else instead of disappearing. Anything genuinely unplaceable comes back as unallocated.

Seeing the split before you send

Place the order with dry_run=True. Everything runs — routing, validation, per-venue rounding, building each venue order — and nothing leaves the process. The plan is on the order that comes back.
A dry run needs no credentials, and routes across venues you have no keys for. Keys are what it takes to send; a dry run does not send. That is how you price a venue before opening an account on it — put it in exchanges, ask what the order would cost with it in the book, and compare. Live, the same venue is excluded with its reason attached. Market data is the one thing a dry run still needs: a venue that serves no book without credentials has nothing to route against, and the book says so. plan is None only when there was no routing decision to make: a limit order, or a market order naming a single venue. Otherwise you get back: order.children holds the venue orders that would have gone out, already rounded to each venue’s tick and lot size — so a dry run shows you the real thing, not an approximation of it.

Was it worth it?

The difference is the number that tells you whether routing is earning its keep. Track it.

Why a venue was skipped