Skip to content
LCX Liberty DEX
RWA quote

LCX Liberty. American DeFi. Your keys. Your assets. Your control.

RWA API

RWA quote

POST /v1/rwa/quote prices a swap and measures it against the token's reference price, or refuses it.

Request

POST/v1/rwa/quote
Body
chainId*number

The chain both tokens are on.

tokenIn*string

The token being sold. At least one of tokenIn and tokenOut must be in the RWA registry for chainId, or the request is refused with not_an_rwa. The other side may be any token we route, usually the chain's dollar.

tokenOut*string

The token being bought. It must differ from tokenIn.

amountIn*string

The amount to sell in base units, as on /v1/quote. Required unless amount is sent; never both.

amountstring

The same amount in human units, scaled by the token's own decimals.

maxRefDeviationBpsnumber

Your tolerance: how far below the reference price you accept, in basis points. Default 100, above 0 and at most 500. A quote further below is refused with below_tolerance.

slippageBpsnumber

The bound against the quote itself. Default 50. The swap's minimum output is the tighter of this and your tolerance.

allowOffReferenceboolean

Default false. Buying a token whose market pays more than 3% above its reference (the market valuing it under what it stands for) is refused with off_reference unless this is true.

allowUnreferencedboolean

Default false. A token with no live reference is refused with no_reference_price. With this true the quote is served under the engine's own guards and your slippage only, and rwa.refDeviationBps is null.

integratorstring

Your integration, exactly as on /v1/quote.

* required

json
{
  "chainId": 8453,
  "tokenIn":  "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "tokenOut": "0xb20000000000000000000078ee7ce2fE4908108C",
  "amount": "10000",
  "maxRefDeviationBps": 50
}

Response

json
{
  "success": true,
  "data": {
    "quote": {
      "quoteId": "q_8453_7_1795014061",
      "chainId": 8453,
      "input":  { "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "amount": "10000000000", "decimals": 6 },
      "output": { "token": "0xb20000000000000000000078ee7ce2fE4908108C", "decimals": 18, "amount": "62018000000000000000" },
      "usdValueIn": 10000.0,
      "gasFeeUSD": 0.02,
      "venues": ["aerodrome-cl-3"],
      "expiresAt": 1795014181
    },
    "rwa": {
      "asset": {
        "symbol": "NVDAC",
        "name": "NVIDIA (Coinbase Tokenized Stock)",
        "issuer": "Coinbase",
        "category": "stocks",
        "underlying": "NVDA"
      },
      "referenceIn": null,
      "referenceOut": {
        "usd": 161.132,
        "source": "Chainlink Coinbase NVDA on Base",
        "updatedAt": 1795010461
      },
      "marketOpen": false,
      "refDeviationBps": -6.79,
      "maxRefDeviationBps": 50,
      "minOut": "61707910000000000000",
      "floorOut": "61740000000000000000",
      "slippageBps": 50,
      "named": false
    }
  }
}

data.quote is the /v1/quote answer, field for field. data.rwa is the rule set's verdict:

data.rwa
assetobject

The registry row of the RWA side: symbol, name, issuer, category, underlying.

referenceIn / referenceOutobject | null

The reference used for each RWA side: usd per whole token, its source, and when it was last set. Null for a side that is not an RWA token.

marketOpenboolean | null

Whether the reference's US session is open. Null for gold and vault rates.

refDeviationBpsnumber | null

The output's value against the input's at those prices, in basis points. Positive pays more than the reference. Null with allowUnreferenced.

maxRefDeviationBpsnumber

The tolerance this quote was judged by.

minOutstring

The least the swap may deliver, in base units of tokenOut.

floorOutstring

The output exactly at your tolerance.

slippageBpsnumber

minOut as a slippage figure, for /v1/build.

namedboolean

The chain has passed our benchmark gate. Informational.