> For the complete documentation index, see [llms.txt](https://docs.architect.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.architect.co/algos-book/smart-order-router-sor.md).

# Smart order router (SOR)

The Smart Order Router (SOR) will intelligently split an order among different venues based on the available liquidity in order to optimize execution price, and can make sense to use if liquidity is fragmented. This is available from the Trade tab, using the Smart order type.<br>

<figure><img src="https://1135553376-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeAUlgqmwkYTmKcyTbHKL%2Fuploads%2Fbh2ENVXqXWazi37Sa02H%2Fimage.png?alt=media&amp;token=9b5eb53b-7c74-4103-a5e0-42544019339f" alt=""><figcaption><p>SOR evaluates the combined liquidity available on Coinbase and Kraken in order to optimize buying 1,000 SOL for a limit price of $195</p></figcaption></figure>

<figure><img src="https://1135553376-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeAUlgqmwkYTmKcyTbHKL%2Fuploads%2FYxDBatLHNvE2llXR2yJd%2Fimage.png?alt=media&amp;token=d2c56ffe-bfa8-4950-ba6a-a62f4abbb7c5" alt=""><figcaption><p>The Smart Order Router then populates proposed orders, allocating a portion to each venue to best capture available liquidity. In this example, of the 1000 SOL parent order, ~596.8 SOL is sent to Kraken and ~403.2 SOL is sent to Coinbase.</p></figcaption></figure>

<table><thead><tr><th width="213">Parameter</th><th>Description</th></tr></thead><tbody><tr><td>Buy/Sell</td><td>Direction of the order</td></tr><tr><td>Market</td><td>The symbol &#x26; price currency of the market will infer from the trading symbol of the trade page in the top left</td></tr><tr><td>Amount</td><td>Size of the order to execute, measured in token units</td></tr><tr><td>Limit Price</td><td>The price at which to send the orders</td></tr><tr><td>Duration</td><td>The execution time limit for the orders. Unfilled orders will cancel at the end of the duration.</td></tr><tr><td>Venues</td><td>Using the check boxes, select the different market/exchanges to use</td></tr></tbody></table>

After pressing "Get Quotes", the SOR algo will use the current order books in the selected markets to best allocate the parent order to optimize for price. The algo will simultaneously send the set of limit orders to the respective venues to maximize liquidity capture and reduce information leakage.&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.architect.co/algos-book/smart-order-router-sor.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
