---
title: getQuoteState
description: Load a block-pinned, frozen market snapshot for local quotes.
---

> **For AI agents:** the complete documentation index is at [llms.txt](/llms.txt). Append `.md` to any page URL for its markdown version.

Reads one market at a single block and returns a frozen `MarketSnapshot`. This is the state object every `/math` function consumes.

`getSnapshot` is an alias.

## Import

```ts
import { createSv3Client } from "@repo/contract-client";
```

## Usage

```ts
const snapshot = await sv3.market.getQuoteState(market);

snapshot.spotPriceWad;
snapshot.floorPriceWad;
snapshot.curveSupply;
snapshot.engine;
snapshot.balances.liquidReserveRaw;
snapshot.paused;
snapshot.pin.blockNumber;
```

The client fetches the block first, then multicalls `snapshot`, `isSolvent`, identity, tokens, fees, and revision at that `blockNumber`. Results are cached by `(chainId, market, blockHash)`.

For wallet balances in the same pin, use [getTradeContext](/developers/get-trade-context). For a position as well, use [getAccountContext](/developers/get-account-context).

## Return Value

`Promise<MarketSnapshot>`

| Field                                           | Meaning                                         |
| ----------------------------------------------- | ----------------------------------------------- |
| `spotPriceWad` / `floorPriceWad`                | Current spot and floor, 18-decimal USDC per AVM |
| `curveSupply` / `actualSupply` / `supplyOffset` | Curve vs token supply                           |
| `engine`                                        | Decoded linear-curve coefficients               |
| `balances.liquidReserveRaw`                     | USDC in the market (6 decimals)                 |
| `paused` / `globalPaused`                       | Market and directory pause                      |
| `feePolicy`                                     | Creator share used by `splitFee`                |
| `tokens`                                        | AVM and reserve addresses                       |
| `math`                                          | Revision that local math must match             |
| `pin`                                           | `{ blockNumber, blockHash, blockTimestamp }`    |

The object is frozen. Do not mutate it between quotes.

## Parameters

### market

- **Type:** `Address`

The FloorMarket proxy.

```ts
const snapshot = await sv3.market.getQuoteState(
  "0x…", // FloorMarket
);
```

## Error

| Error                           | When                                         |
| ------------------------------- | -------------------------------------------- |
| `UnsupportedCurveRevisionError` | On-chain revision is not in `SUPPORTED_MATH` |
| Transport errors                | RPC / multicall failure                      |

## Tips

- Pin once per UI tick. Then call `quoteBuyExactReserveIn(snapshot, amount)` with no extra RPC.
- `sv3.quote.buyExactReserveIn({ market, amount })` will load this snapshot for you if you pass an address instead of a snapshot.
