Prerequisites
| Requirement | Why |
|---|---|
| Wallet or signing service | The Aggregator does not sign transactions. |
| Amount conversion | Quote amounts are smallest unit strings. |
| Broadcast path | Wallet, Gateway, or Relayer broadcast after signing. |
| Error handling | Pair, quote, rate limit, and simulation failures are expected states. |
Flow
Validate token support
Call
/api/v1/pair-config with from and to. Stop if supported=false.Convert the amount
Convert the user-entered human-readable amount with
decimalsIn. See Token amounts.Quote without sender for preview
Call
/api/v1/quote with amountIn or amountOut. Use the response for display only.Requote with sender at confirmation
Pass
sender when the user confirms. This lets the service build a transaction object when nonce and gas simulation succeed.Implementation Checklist
| Check | Required handling |
|---|---|
| Pair unsupported | Show error from pair config and stop. |
| Amount below minimum | Compare smallest-unit input with minAmountIn. |
| Slippage changed | Requote; txData encodes slippage-derived minimum output. |
| Sender changed | Requote; nonce and transaction fields are sender-specific. |
ESDT input with only txData | Wrap txData with ESDTTransfer or MultiESDTNFTTransfer. |
HTTP 429 | Back off and queue requests. |
HTTP 503 | Retry after service warmup or snapshot recovery. |
Minimal TypeScript Shape
Verify Before Signing
pair.supportedistrue.amountInis an integer string in the input token’s smallest unit.amountOutMinmatches the slippage shown in the UI.transaction.senderequals the connected wallet whentransactionis present.- The quote was requested after the latest user change to token, amount, slippage, or sender.

