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

# Binary markets

> Two outcomes, one book, and no short positions

A binary market poses one question with two outcomes. A share of `yes` pays 100¢ if
the answer turns out to be yes and 0¢ otherwise; a share of `no` pays 100¢ if it
turns out no. Their prices always sum to 100 — if `yes` trades at 63¢, `no` is worth
37¢ by definition, not by coincidence.

Prices are whole cents from **1 to 99**. Zero and 100 are settlement values, not
prices: a market at either has no uncertainty left to trade.

## One market, two outcomes

This is the fact to internalise before writing any code against this API.

A binary market is **one market with one ticker and one book**. `yes` and `no` are
not two markets, and they are not two books. They are two ways of describing the
same position:

| You send | Economically identical to |
| - | - |
| `buy no` @ 40¢ | `sell yes` @ 60¢ |
| `sell no` @ 40¢ | `buy yes` @ 60¢ |

So a `buy no` order can trade against a `buy yes` order. They are the two sides of
one trade.

<Warning>
  A bot that treats `yes` and `no` as separate books sees half the liquidity that
  is actually there, and will quote against itself while believing it is quoting two
  independent markets.
</Warning>

## What you paid, and what printed

When a `buy no` at 40¢ trades against a `buy yes` at 60¢, one trade happened at one
price — but the two parties paid different numbers. Fills carry both, and picking the
wrong one is the most expensive mistake available on this API:

| Field | Whose | Use it for |
| - | - | - |
| `trade_price` | The trade's. Both counterparties see the same number. | The tape. Candles are built from it. |
| `outcome_price` | **Yours.** Equal to `trade_price` if you hold `yes`, `100 − trade_price` if you hold `no`. | Anything about your money: collateral, cost basis, realised P\&L. |

Reading `trade_price` where you meant `outcome_price` is wrong by `100 − 2p` on every
position — at 30¢ that is 40¢ per share — and it is wrong *silently*, in a direction
that looks plausible. There is no error, just a P\&L that drifts.

## There are no shorts

You cannot sell what you do not hold. A `sell` beyond your inventory is
`422 insufficient_shares` — not a short position, a rejection.

To take the other side of a market, **buy the opposite outcome**:

* Bearish on `yes`? `buy no`.
* Want out of a `yes` position you hold? `sell yes`, up to the quantity you hold.

Positions in both outcomes are non-negative, always. There is no borrow, no margin,
and no synthetic short.

## Covered pairs

Because `yes` and `no` pay 100¢ between them in every outcome, holding one of each is
riskless: whichever way the market resolves, the pair pays exactly 100¢.

You can end up holding both sides just by trading — buying `yes` on one order and
`no` on another. That part of your book then carries no market risk: it pays 100¢ per
pair at resolution no matter where the market trades in the meantime.

Two consequences when you read your own state back:

* **A position is per market *and* per outcome.** Both sides of one market is two
  entries in `positions`, not one net entry. Code that reads only the first drops a
  leg of its own hedge.
* **Netting is yours to do.** Nothing on the venue collapses the two into a single
  number for you.

## Time in force

| Value | Behaviour |
| - | - |
| `gtc` | Trades what it can now; the remainder rests on the book. |
| `ioc` | Trades what it can now; the remainder is canceled. |
| `fok` | Trades in full or not at all, consuming nothing if it cannot. |

Omitting `time_in_force` gives you `gtc`. That default is deliberate: an order that
silently became `ioc` would die the moment it failed to cross, which is the opposite
of what someone who omitted the field usually wants.

## Fees

Fees are charged on **the price you named**, not on the canonical price. A `buy no` at
35¢ is charged against 35, not against 65.

The curve is parabolic: zero at the extremes, largest at 50¢, and symmetric — 30¢ and
70¢ cost the same. Each market publishes its own `maker_fee_rate` and `taker_fee_rate`
as decimal strings (`"0.0700"` is 7%). See
[Matching](/concepts/matching-engine#fees) for the formula.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.