---
title: "Compute market quote"
url: https://docs.truemarkets.co/api/institutional/post-markets-quote-cefi
description: "Calculate a quote preview for an asset using current visible order book depth. Supports both base quantity and quote (notional) quantity via the required qty_unit parameter. For qty_unit=QUOTE, the exchange computes the largest executable base quantity that fits within the requested quote amount while respecting the instrument's base increment at the final consumed price level. As a result, the returned notional may be slightly less than the requested quote amount and the difference is reported in notional_residual."
---

Docs index: https://docs.truemarkets.co/llms.txt

# Compute market quote

Calculate a quote preview for an asset using current visible order book depth. Supports both base quantity and quote (notional) quantity via the required qty_unit parameter.
For `qty_unit=QUOTE`, the exchange computes the largest executable base quantity that fits within the requested quote amount while respecting the instrument's base increment at the final consumed price level. As a result, the returned `notional` may be slightly less than the requested quote amount and the difference is reported in `notional_residual`.

## Request

```
POST https://api.truex.co/v1/cefi/markets/quote
```

### Body

`application/json`, required

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `qty` | string | yes | The quantity to quote. Interpretation depends on qty_unit: for BASE this is the base asset amount, for QUOTE this is the notional (e.g. USD) amount. |
| `instrument_id` | string | yes | The instrument ID for which to calculate the quote. Must be a valid non-zero numeric ID. |
| `side` | string, one of `BUY`, `SELL` | yes | The side of the quote request. BUY calculates the price to buy the base asset, SELL calculates the price to sell. |
| `qty_unit` | string, one of `BASE`, `QUOTE` | yes | Unit of the qty field. BASE means qty is in base asset units, QUOTE means qty is in quote asset (notional) units. Required — no default. |

## Responses

Every error status returns the same body, described in [Errors](https://docs.truemarkets.co/developer-resources/errors.md).

### 200

Successful operation.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `qty` | string | no | The base quantity. For qty_unit=QUOTE, this is the computed base amount. For qty_unit=BASE, this echoes back the requested base quantity. |
| `price` | string | no | The calculated VWAP (Volume-Weighted Average Price) across consumed order book levels. |
| `notional` | string | no | Schema `v2026_01_23` only. The expected quote amount consumed from visible order book liquidity. |
| `notional_residual` | string | no | Schema `v2026_01_23` only. The unfilled portion of the requested quote amount. This is typically zero, but for qty_unit=QUOTE it can be positive when the remaining amount is smaller than one base increment at the final consumed price level. |

### 400

Bad request.

### 404

Not found.

### 500

Internal server error.

### 503

Service unavailable.
