Skip to main content
Two lines is a working config. Everything else has a sensible default.
It is validated when the client is built, so a mistake shows up immediately with the field named — not at 3am against a live book.

Options

The client takes exactly one argument:

One symbol per client

A client streams one symbol. That is why book() takes no argument — there is only one book to ask for. Trading several symbols means several clients, which is one line each:
Each one runs on its own, with its own venues, depth and fees. Nothing is shared, so nothing surprises you.

One venue or many

The length of exchanges decides whether there is anything to merge:

Credentials

Market data is public on most venues, so you only need keys to send orders. SORY reads them from the environment, with the venue id upper-cased:
Or pass them in:
A venue with no keys still contributes to the book — it just cannot receive orders, and says so.

Treating several pairs as one book

BTC/USD, BTC/USDC and BTC/USDT are different instruments but often interchangeable. Pool them:
An order can then fill BTC/USD on one venue and BTC/USDT on another. Each slice knows which instrument it is.
This assumes those quote currencies are worth the same. Writing the list out is what keeps that assumption visible.