Skip to main content
Choose the Stellar execution plane before building a quote that the user or contract will execute.

Definition

Stellar swaps can execute through Soroban contracts or Classic SDEX operations. The platform parameter restricts which plane the Aggregator searches and which envelope shape it can return.

Decision table

FlowplatformWhy
Lending contract calls the AggregatoraggregatorKeeps execution inside Soroban.
App needs a Soroban batch_execute envelopeaggregatorReturns a Soroban-compatible TransactionEnvelope.
Direct-user UI can sign a Classic path paymentsdexRestricts the route to Classic SDEX.
Direct-user UI wants one route across planesallRuns both searches and returns one selected quote.
Classic SDEX operations do not compose inside another Soroban contract. Do not use platform=all for a contract-to-contract flow unless your app rejects Classic results.

Visual flow

Worked example

curl "https://stellar-swap.xoxno.com/api/v1/quote?\
from=XLM&\
to=USDC&\
amount_in=1000000000&\
platform=aggregator&\
sender=GA..."
Verify the result:
  • transaction.envelopeXdr is present when sender is set.
  • platform in the response matches the execution plane you intended.
  • simulated is true when you rely on the prepared Soroban footprint.

Edge cases

CaseBehaviorFix
platform=all returns only one quoteThe service drops the losing plane.Make separate explicit requests for side-by-side display.
simulate=false with senderThe caller must prepare Soroban resources.Simulate and prepare before signing.
Alias token IDsUSDC and XLM resolve from the snapshot.Use C-strkeys or SEP-11 IDs for deterministic flows.