> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sory.pro/llms.txt
> Use this file to discover all available pages before exploring further.

# SORY

> A smart order router for crypto, in a Python package.

Aggregate order books across every venue you trade. Execute against the best **all-in** price — fees included.

```python theme={"dark"}
async with SoryClient(config=config, licence_key="...") as sory:
    book = sory.book("BTC/USDT")          # every venue, merged, fee-adjusted

    order = await sory.place(              # split across venues, best all-in price
        symbol="BTC/USDT", side="buy", qty=Decimal("2"),
        type="market", max_slippage_bps=15,
    )
```

That is the whole integration. No adapters to write, no per-venue special cases, no WebSocket plumbing.

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" horizontal href="/quickstart">
    Running in five minutes.
  </Card>

  <Card title="Venues" icon="building-2" horizontal href="/venues">
    24 venues, one string each.
  </Card>
</CardGroup>

## Why all-in pricing

Routing on quoted prices is routing on the wrong number.

| Venue | Quoted ask | Your taker fee | **All-in**  |
| ----- | ---------- | -------------- | ----------- |
| A     | 100.00     | 20 bps         | 100.200     |
| B     | 100.05     | 1 bp           | **100.060** |

Venue A looks cheaper and costs more. SORY compares all-in prices everywhere, using [your negotiated rates](/fees) — never a published retail tier.

## What it does

<Columns cols={2}>
  <Card title="Market data" icon="layers" href="/market-data">
    One consolidated book across any number of venues, fee-adjusted, with venue health tracked and VWAP depth on request.
  </Card>

  <Card title="Execution" icon="split" href="/routing">
    One order, split across venues on best all-in price, with hard price bounds and a full account of what filled where.
  </Card>
</Columns>

<Note>
  SORY is not an OEMS. No balances, no positions, no PnL, no trade database, no persistence of any kind. It plugs into whatever already owns those.
</Note>

## What people build with it

<Columns cols={3}>
  <Card title="Best execution" icon="target">
    Sweep a consolidated book instead of guessing which venue is cheapest.
  </Card>

  <Card title="Arbitrage" icon="arrow-left-right">
    One book, every venue, fee-adjusted.
  </Card>

  <Card title="Hedging" icon="shield">
    Fill on one venue, hedge across the rest in one call.
  </Card>

  <Card title="Market making" icon="repeat">
    Quote passively with `post_only`, hedge the fill.
  </Card>

  <Card title="Unwinds" icon="trending-down">
    Size against real depth, with a bound that holds.
  </Card>

  <Card title="Execution algos" icon="timer">
    You schedule the slices, SORY routes each one.
  </Card>
</Columns>

## How it behaves

These are enforced in tests, not aspirations.

<AccordionGroup>
  <Accordion title="Fees are never a footnote" icon="percent">
    Every price crossing a decision boundary is fee-aware, and SORY is explicit about whether a number is raw or all-in. A maker rebate is a negative fee and the arithmetic handles the sign with no special case.
  </Accordion>

  <Accordion title="A quiet venue is a broken venue" icon="wifi-off">
    A feed that stops publishing is marked `Stale` and drops out of both the book and routing, with the reason attached. A socket that stays open while delivering nothing is the failure that fills a hedge far through the touch.
  </Accordion>

  <Accordion title="Nothing is dropped silently" icon="scale">
    `requested == filled + unfilled`, always, with a reason. A slice too small for a venue is re-routed, not discarded.
  </Accordion>

  <Accordion title="A cancel never races a fill" icon="octagon-x">
    `cancel` returns when every venue has confirmed, not when the requests were sent.
  </Accordion>

  <Accordion title="Decimal everywhere" icon="calculator">
    Float never touches a price, size or fee.
  </Accordion>
</AccordionGroup>
