---
title: "Quote a conversion and return the transactions that execute it"
method: POST
path: "/convert/quote"
tags: ["convert"]
---

# Quote a conversion and return the transactions that execute it

`POST /convert/quote`

Takes an intent (chain, input token, output token, base-unit amount) and returns the `approve` + `mint` calls to sign, built from the addresses and ABIs this service holds. Routing policy — the slippage floor, the deadline window, which contract is called — therefore changes with a backend deploy rather than a client release, which is what makes the mobile app viable. The client signs through its own wallet; this service never holds a key, never broadcasts, and never appears in the calldata. `mint` mints to `msg.sender` and `approve` names only the spender, so no recipient address is present in these bytes for this service to substitute — which is what lets the client re-derive every call and refuse to sign on a mismatch. A 201 means the request was not statically refused, not that the mint will succeed.

## Request body

- ConvertQuoteRequestDto
  - `chainId` number, required — Chain the conversion executes on. Must be this deployment’s hub chain.
  - `fromToken` string, required — Input token address. Must be an accepted input stablecoin.
  - `toToken` string, required — Output token address. Must be dreUSD.
  - `amount` string, required — Input amount in the token’s smallest units, as a decimal integer string. Base units rather than a human decimal so no float ever touches a money value.

## Response `201`

Calls to sign

- ConvertQuoteResponseDto
  - `strategy` string, required — Which conversion this is. A client that does not recognise the value must refuse to sign rather than ignore it.
  - `chainId` number, required — Chain the calls execute on.
  - `calls` ConvertCallDto[], required — Transactions to sign, in order. Smart wallets batch them atomically; external wallets send them via EIP-5792 or sequentially.
    - `to` string, required — Target contract address.
    - `data` string, required — ABI-encoded calldata.
    - `value` string — Native value in wei, as a decimal string. Omitted for mint: both calls are non-payable.
  - `amounts` ConvertAmountsDto, required
    - `srcRaw` string, required — Input amount in base units.
    - `srcDecimals` number, required — Input token decimals.
    - `srcSymbol` string, required — Input token symbol.
    - `dstRaw` string, required — Expected output in base units, before slippage.
    - `dstMinRaw` string, required — Minimum output the transaction will accept, in base units. Enforced on-chain.
    - `dstDecimals` number, required — Output token decimals.
    - `dstSymbol` string, required — Output token symbol.
  - `fees` ConvertFeesDto, required
    - `totalUsd` string, required — Total protocol fee in USD.
    - `percent` string, required — Total protocol fee as a percentage.
    - `items` string[], required — Itemised fees. Empty for mint — there is no protocol fee, and network gas is quoted by the wallet at signing time.
  - `expiresAt` string, required — When the embedded deadline expires, ISO 8601. After this the transaction reverts on-chain.

## Other responses

- `400` — Wrong chain, unsupported token pair, or malformed amount
- `401` — Unauthorized
- `422` — The input token is not currently accepted for minting
- `429` — Rate limited

---

[API](https://skmtc.dev/dre/apis/dre-api.md) · [All operations](https://skmtc.dev/dre/apis/dre-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/dre/dre-api/revisions/5d14beb9482b/schema)
