Skip to main content
Validate a MultiversX pair, request a swap quote, and verify the response fields needed before signing.

Prerequisites

RequirementValue
Base URLhttps://swap.xoxno.com
AuthNone
Rate limit100 requests per second per IP
Amount formatInteger strings in the token’s smallest unit

1. Validate The Pair

Call /api/v1/pair-config before quoting so your client has decimals and minimum input.
curl "https://swap.xoxno.com/api/v1/pair-config?\
from=WEGLD-bd4d79&\
to=USDC-c76f1f"
Expected response:
{
  "supported": true,
  "decimalsIn": 18,
  "decimalsOut": 6,
  "minAmountIn": "1000000000"
}

2. Request A Quote

Quote 1 WEGLD to USDC. 1000000000000000000 is 1 WEGLD at 18 decimals.
curl "https://swap.xoxno.com/api/v1/quote?\
from=WEGLD-bd4d79&\
to=USDC-c76f1f&\
amountIn=1000000000000000000&\
slippage=0.005"
Inspect these fields:
FieldUse
amountOutSmallest-unit output estimate.
amountOutMinSlippage-protected minimum output.
amountOutShortDisplay amount for the output token.
priceImpactDecimal price impact estimate.

3. Request Transaction Data

Pass sender only when the user is ready to sign.
curl "https://swap.xoxno.com/api/v1/quote?\
from=WEGLD-bd4d79&\
to=USDC-c76f1f&\
amountIn=1000000000000000000&\
slippage=0.005&\
sender=erd1..."
The response can include:
FieldMeaning
transactionFull MultiversX transaction object for wallet signing.
txDataEncoded contract call data when a full transaction object is not returned.
Do not reuse txData across quote requests. It encodes route and slippage state from that request.

Verify

You have a valid quickstart result when:
  • /api/v1/pair-config returns supported: true.
  • amountIn is greater than or equal to minAmountIn.
  • /api/v1/quote returns non-zero amountOut.
  • amountOutMin matches the slippage shown to the user.
  • If transaction is present, transaction.sender matches the connected wallet.

Common Failure

SymptomCauseFix
Quote returns 400Both amountIn and amountOut were sent, or neither was sent.Send exactly one amount field.
Pair is unsupportedToken is unknown or no route exists.Stop before quoting and show error from pair config.
Signed transaction fails for ESDT inputClient used txData as the full data field.Use the full transaction object, or wrap txData in the ESDT transfer prefix.

Next Steps