Skip to content

/fetch/quote

GET
/fetch/quote

Fetch quote for swap.

Parameters

Query Parameters

network
required
string

Algorand “mainnet” or “testnet”.

fromAsset
required
integer

The asset id to swap from.

toAsset
required
integer

The asset id to swap into.

amount
required
integer

The amount in base units of either, the input asset to swap if FIXED_INPUT or the amount of the output asset to swap if FIXED_OUTPUT.

type
required
string

The swap type “FIXED_INPUT” or “FIXED_OUTPUT”.

maxGroupSize
integer

The maximum group size for the swap group transaction inside the quote to contain.

feeBps
integer

The fee basis points to charge. Split between Folks Router and Referrer if specified.

referrer
string

The Algorand address to collect the referral fee.

Responses

200

OK.

object
quoteAmount

The amount in base units of either, the output asset to receive if FIXED_INPUT or the amount of the input asset to receive if FIXED_OUTPUT.

integer
priceImpact

The difference in price between the quote received and the current price excluding all fees.

integer
microalgoTxnsFee

The microalgo cost to execute the quote group transaction.

integer
txnPayload

The encoded transaction payload returned by fetch/quote.

string

400

Request validation error.

object
errors

Missing or malformed query params.

object

404

Request cannot be satisfied.

string