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

# Quote system

> How OMS locks pricing, structures fees, and calculates exchange rates.

Every transaction that involves a currency conversion or a fiat rail requires a quote. A quote locks the exchange rate and fee structure for a short window, giving you a guaranteed price before committing to execution.

## Quote lifecycle

```
POST /quotes  →  open
                   └── POST /transactions  →  accepted
                   └── (time passes)       →  expired
```

| Status     | Meaning                                         |
| ---------- | ----------------------------------------------- |
| `open`     | Rate locked. Awaiting transaction creation.     |
| `accepted` | A transaction has been created from this quote. |
| `expired`  | Pricing window closed. Create a new quote.      |

## What a quote contains

A quote response includes:

* **`source`**: the source instrument (a typed side identifying the wallet, bank account, or card being pulled from)
* **`destination`**: the destination instrument (typed the same way, identifying where funds are delivered)
* **`pricing`**: consolidated economics for both sides, the rate pair, and gas sponsorship (see below)
* **`sourceToDestination`**: a composite corridor tag such as `cryptoToCrypto`, `cryptoToCash`, `cryptoToFiatAccount`, `cashToCrypto`, or `fiatAccountToCrypto`
* **`expiresAt`**: when the rate lock expires

## Fee structure

Economics live in a single top-level `pricing` object. Each side under `pricing.source` and `pricing.destination` carries the same shape:

```json theme={null}
{
  "pricing": {
    "source": {
      "asset": "usd",
      "amountGross": "100.00",
      "amountNet": "99.42",
      "feesDeducted": {
        "total": "0.58",
        "developer": "0.20",
        "oms": "0.35",
        "gas": "0.03"
      }
    },
    "destination": { "asset": "usdc" },
    "pair": "usd/usdc",
    "exchangeRate": "1.0",
    "effectiveRate": "0.9942",
    "fixedAmountSide": "source",
    "sponsorGas": false,
    "sponsorGasCost": "0"
  }
}
```

The core equation: `pricing.source.amountNet × pricing.exchangeRate = pricing.destination.amountGross`.

**Developer fees** are configurable per integration. Set them on your OMS account or pass them in the quote request. OMS never shows your fee margin to the end user.

## Gas sponsorship

Set `sponsorGas: true` on the quote request to cover network gas for your users. Gas costs move out of the transaction fee breakdown and into `pricing.sponsorGasCost` on your account, a separate, out-of-band developer cost. This is the standard pattern for custodial wallets where users should not be aware of blockchain mechanics.

## Fixed-amount quoting

You can fix either side via `pricing.fixedAmountSide`:

* `pricing.fixedAmountSide: "source"`: user sends an exact amount, destination is calculated
* `pricing.fixedAmountSide: "destination"`: user receives an exact amount, source is calculated

This maps cleanly to common UX patterns: "I want to send \$100" vs. "I want my recipient to receive exactly \$100."

## When quotes are not required

Auto-created transactions from deposit addresses, virtual accounts, and cash-ins skip the quote step. OMS uses live pricing at the moment funds arrive. The same fee structure applies, but pricing is not locked in advance.
