For AI agents: the documentation index is at /llms.txt, and this page is available as Markdown at /api/institutional/post-markets-quote-cefi.md.

Compute market quote

POST
/v1/cefi/markets/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 Body

Quote request parameters. qty_unit is required and has no default.

application/json
  1. body
qty*string

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.

Match^[0-9]+(\.[0-9]+)?$
Length1 <= length
instrument_id*string

The instrument ID for which to calculate the quote. Must be a valid non-zero numeric ID.

Match^[1-9][0-9]*$
Length1 <= length
side*string

The side of the quote request. BUY calculates the price to buy the base asset, SELL calculates the price to sell.

Value in"BUY""SELL"
qty_unit*string

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.

Value in"BASE""QUOTE"

Response Body

Successful operation.

application/json
  1. response
qty?string

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

The calculated VWAP (Volume-Weighted Average Price) across consumed order book levels.

notional?string

Schema v2026_01_23 only. The expected quote amount consumed from visible order book liquidity.

notional_residual?string

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.

Example Request
curl -X POST 'https://api.truex.co/v1/cefi/markets/quote' \  -H 'Content-Type: application/json' \  -d '{  "qty": "1.5",  "instrument_id": "1",  "side": "BUY",  "qty_unit": "BASE"}'
Example Response
{  "qty": "1.5",  "price": "50025.50",  "notional": "75038.25",  "notional_residual": "0.10"}