Skip to content
docs

QuoteParams

Defined in: protocol-swap2-core/dist/types.d.ts:15

What the engine asks a provider to quote. Amounts are base-unit strings; exact input only.

amountIn: string

Defined in: protocol-swap2-core/dist/types.d.ts:30


destAddress: string

Defined in: protocol-swap2-core/dist/types.d.ts:35


destChain: string

Defined in: protocol-swap2-core/dist/types.d.ts:28


destToken: string

Defined in: protocol-swap2-core/dist/types.d.ts:29


optional dry?: boolean

Defined in: protocol-swap2-core/dist/types.d.ts:39

Pricing preview only — no deposit address is created upstream.


optional flex?: boolean

Defined in: protocol-swap2-core/dist/types.d.ts:45

Amount-flexible deposit (exchange flow): amountIn is only a pricing notional — the user may send any amount to the deposit address (1Click FLEX_INPUT). Providers that can’t do this return no quote.


optional minAmountOut?: string

Defined in: protocol-swap2-core/dist/types.d.ts:32

Caller-supplied output floor in destination base units.


optional onRefusal?: (reason) => void

Defined in: protocol-swap2-core/dist/types.d.ts:19

Local-only (never serialized): called with the reason when the provider refuses to quote — a shared-instance “last refusal” field raced under concurrent quotes, so the reason rides per-call.

string

void


optional refundAddress?: string

Defined in: protocol-swap2-core/dist/types.d.ts:37

Where a failed swap refunds on the source chain (the sender’s address).


optional slippageBps?: number

Defined in: protocol-swap2-core/dist/types.d.ts:34

Maximum slippage accepted by the caller, expressed in basis points.


sourceChain: string

Defined in: protocol-swap2-core/dist/types.d.ts:20


optional sourceDecimals?: number

Defined in: protocol-swap2-core/dist/types.d.ts:27

Set only for a source token the catalog does not list: sourceToken is then its contract (EVM) or mint (Solana) and this its decimals. Providers that can trade any token resolve it with resolveAsset(chain, sourceToken, {allowUnlisted: true, decimals}); the others refuse it.


sourceToken: string

Defined in: protocol-swap2-core/dist/types.d.ts:21