Skip to main content
POST
Quote

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

network
enum<string>

Network on which the operation will be performed

Available options:
testnet,
mainnet

Body

application/json

Data required to perform the swap

assetIn
string
required

Input asset contract address

Example:

"CAS3J7GYLGXMF6TDJBBYYSE3HQ6BBSMLNUQ34T6TZMYMW2EVH34XOWMA"

assetOut
string
required

Output asset contract address

Example:

"CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75"

amount
integer<int64>
required

Expected input amount in stroops

Example:

"10000000"

tradeType
enum<string>
required

Type of trade: EXACT_IN = input fixed; EXACT_OUT = output fixed

Available options:
EXACT_IN,
EXACT_OUT
Example:

"EXACT_IN"

protocols
array[]
required

Array of protocols to aggregate liquidity from

Example:
parts
number

Number of route splits for optimization. Higher values improve price discovery but increase latency. Max: 1000..

Example:

10

slippageBps
number

Slippage tolerance in basis points (bps). 10000 = 100%, 100 = 1%, 50 = 0.5%. Default is 50 bps (0.5%)

Example:

"50"

maxHops
number

Maximum number of hops to aggregate liquidity from

Example:

2

assetList
string[]

Restricts intermediate tokens to a specific list. Only useful for Soroban transactions (Router and Aggregator). Not useful for SDEX.

Example:
feeBps
number

Ignored. Your fee rate lives in your partner profile (see GET /partner). Kept for wire compatibility; the value you send is recorded so Soroswap can seed your profile.

Example:

50

gaslessTrustline
string

Whether to use gasless trustline swap. Only use this if you are sure that the user does not have a trustline for the output asset and if you have an sponsor account.

Example:

true

Response

Found quote

assetIn
string

Input asset contract address

Example:

"CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75"

assetOut
string

Output asset contract address

Example:

"CDTKPWPLOURQA2SGTKTUQOWRCBZEORB4BWBOMJ3D3ZTQQSGE5F6JBQLV"

amountIn
string

Expected input amount in stroops

Example:

"10000000"

amountOut
string

Expected output amount in stroops

Example:

9067253

otherAmountThreshold
number

Minimum output (exact_in) or maximum input (exact_out) considering slippage protection

Example:

9067253

tradeType
enum<string>

Type of trade: EXACT_IN = input fixed; EXACT_OUT = output fixed

Available options:
EXACT_IN,
EXACT_OUT
Example:

"EXACT_IN"

priceImpactPct
string

Estimated price impact of the trade, as a percentage string

Example:

"0.50"

platform
enum<string>

Indicates where the trade is routed: "router" (only Soroswap), "aggregator" (aggregating more DEXes on Soroban), or "sdex" (The Stellar Classic DEX

Available options:
router,
aggregator,
sdex
Example:

"aggregator"

rawTrade
object

Data needed to execute the trade; structure varies by platform. For "aggregator" quotes on mainnet, amountIn is the post-fee amount that gets routed and each distribution entry carries its share of it (shares add up to amountIn) plus hops, the venue, pool, tokens and amounts of every hop (poolHash on Aquarius hops). protocol_id names only the first hop's venue, so read venues from hops.

Example:
routePlan
object[]

Array of route steps (e.g., AMMs, pools) with associated splits and paths. The sum of the percentages should be 100.

platformFee
object

Platform fee details. Present only when your partner rate applies (see GET /partner); absent for protocol-only swaps.