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

# How parlays work

> The path a parlay takes from quote request, through market maker pricing and commit, to on-chain settlement, and how to close one early.

A parlay starts as a **quote request**: your legs, priced live by market makers. It becomes a real
**position** once you commit to a quote, the maker confirms, and it funds on chain, all within seconds. From there it settles automatically when the
underlying markets resolve, or you close it early.

## At a glance

* A parlay is one bet on one or more legs, priced live by competing market makers. Limits are on [Limits and fees](/solana/limits-and-fees).
* Requesting quotes holds nothing. From commit, your bet is held against your balance. It moves on chain once, when the maker confirms.
* The position then goes live on chain and settles by itself when the last market resolves.
* You can close a live position early through a cashout auction of about 10 seconds.

<img className="block dark:hidden rounded-2xl" src="https://mintcdn.com/ucalledit/WvSJofOhP4ytDyZp/images/pictures/lifecycle-light.png?fit=max&auto=format&n=WvSJofOhP4ytDyZp&q=85&s=6816937b405ba2c776aa36485445ff88" alt="How a parlay works: your slip, makers quote, one position, then it settles or you cash out early" width="1540" height="952" data-path="images/pictures/lifecycle-light.png" />

<img className="hidden dark:block rounded-2xl" src="https://mintcdn.com/ucalledit/WvSJofOhP4ytDyZp/images/pictures/lifecycle-dark.png?fit=max&auto=format&n=WvSJofOhP4ytDyZp&q=85&s=ce6a671c275ff92b572734402e6a53fe" alt="How a parlay works: your slip, makers quote, one position, then it settles or you cash out early" width="1540" height="952" data-path="images/pictures/lifecycle-dark.png" />

## Place a parlay

<Steps>
  <Step title="Open a quote request">
    Add your legs and a bet amount. Each leg names a market and a side (`yes` or `no`). The
    `market_ticker` is venue specific:

    * **Kalshi**: the market ticker, for example `KXBTC-25FEB07-T100000`.
    * **Polymarket**: the `condition_id`, the `0x` prefixed hex string. Not the slug and not the
      question id. Both sides of a binary share one `condition_id` and are told apart by `side`.

    <Accordion title="The call">
      ```bash theme={null}
      POST /v1/quote-requests
      {
        "legs": [
          { "market_ticker": "KXBTC-25FEB07-T100000", "side": "yes", "venue": "kalshi" },
          { "market_ticker": "0x4d2...",              "side": "no",  "venue": "polymarket" }
        ],
        "bet_amount": 25
      }
      ```
    </Accordion>

    Totalis checks each market, rejects correlated legs (markets whose exclusion rules conflict),
    and sends the request to market makers. The full field reference is on
    [Create quote request](/solana/api-reference/quote-service/create), and the constraints are on
    [Limits and fees](/solana/limits-and-fees).

    <Warning>
      Odds apply to your bet amount minus a 1% taker fee. A 25 USDC bet carries a 24.75 net stake, so
      do not expect the stake to match `bet_amount`. The fee locks with the stake and comes back to you
      if the parlay is voided.
    </Warning>
  </Step>

  <Step title="Market makers quote it">
    Makers receive the request and submit quotes with payout odds. You watch them arrive on the
    quote request [stream](/solana/api-reference/quote-service/stream). The best one is always on top.

    <Accordion title="What a quote carries">
      | Field | Meaning |
      | - | - |
      | `user_cost` | Your net stake, `bet_amount` minus the taker fee. |
      | `payout_odds` | The multiple applied to your net stake, never to the gross bet. |
      | `total_payout` | `user_cost * payout_odds`. What you receive if every leg wins. |
      | `book_seq` | The sequence number of the stream event that showed you the quote. You send it back at commit to prove your pricing was current. |
    </Accordion>
  </Step>

  <Step title="Commit the best quote">
    Accept a quote to lock the trade. Totalis selects the best still valid quote for the version of
    the request you saw, and creates the parlay with that quote already accepted.

    <Accordion title="The call">
      ```bash theme={null}
      POST /v1/quote-requests/<id>/commit
      {
        "expected_version": 3,
        "displayed_quote_id": "<quote-id>",
        "displayed_quote_book_seq": 5,
        "min_payout_odds_seen": 4.0
      }
      ```
    </Accordion>

    The call waits the few seconds it takes the maker to confirm. It then returns the parlay's real
    `rfq_id`, the accepted quote, and the payout odds, with the parlay already `confirmed`.
    The response's own `status`, `committed`, is the quote request's.

    If the commit fails, no funds moved and no trade happened. When the maker misses the
    confirmation window you get `409` with reason `mm_confirmation_timeout`, and your quote request
    stays open, so you can commit the next best quote. The rejection reasons are on
    [Errors](/solana/errors).
  </Step>

  <Step title="The parlay funds on-chain">
    The maker confirms, and your stake and the maker's collateral lock together, in one transaction,
    in [on-chain Solana vaults](/solana/guides/vault-architecture). Network fees are sponsored, so you only
    ever need USDC.

    Status moves to `confirmed`, then `executed` once the position is live on chain.
  </Step>

  <Step title="It settles automatically">
    The position settles as soon as the result is decided: when any leg loses, or when every leg has
    resolved.

    * **Every leg wins.** You receive the full payout, `total_payout`, minus the profit fee.
    * **Any leg loses.** Your stake transfers to the maker, minus the fee on their profit.
    * **A leg is voided.** The whole position is cancelled and both sides' collateral is released.
      You get your full bet back, taker fee included, and nobody wins or loses. If a leg
      loses before any void is known, the position has already settled as a loss.

    Status becomes `settled`. Read the outcome and transaction signatures from
    [`GET /v1/rfqs/{id}`](/solana/api-reference/parlays/get).
  </Step>
</Steps>

## Closing early

You can leave a live parlay before settlement. Totalis runs a short auction among market makers.
You see the best all-in price live and accept it or not. You are never filled at a price you did
not see. [Early cashout](/solana/guides/early-cashout) has the steps and the two ways an auction can
resolve.

## Status reference

In the API, a parlay is called an **RFQ** (request for quote). Its `status` field, returned by
[`GET /v1/rfqs/{id}`](/solana/api-reference/parlays/get), takes these values:

| Status | Meaning | Funds |
| - | - | - |
| `accepted` | You committed a quote and the maker is confirming. The commit call waits through this. | held, not moved |
| `confirmed` | Maker confirmed. Funding on chain. | locking |
| `executed` | Live on chain. Eligible for early cashout. | locked |
| `settled` | Resolved and paid out. | released |
| `bought_back` | Closed early via a cashout that the backing maker won. | released |
| `cancelled` | Ended before funding, or a leg was voided. | released or never moved |
| `expired` | Ended before funding, for example when the maker missed confirmation. | hold released |

The enum also contains `open` and `quoted`. They belong to an older flow. A parlay placed through a
quote request is created at `accepted` and never shows them.

Each quote has its own `status`:

| Quote status | Meaning |
| - | - |
| `pending` | Live. |
| `accepted`, `confirmed`, `executed` | The trade is progressing. |
| `withdrawn` | The maker pulled it. |
| `expired` | Its validity lapsed, or the maker missed confirmation. |
| `rejected` | You accepted a different quote on the same request. |

## Constraints

Leg counts, bet range, odds range, and every timing window live on
[Limits and fees](/solana/limits-and-fees).


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