Skip to main content
Request a MultiversX swap quote and, when sender is present, receive transaction data for signing.

Endpoint

FieldValue
MethodGET
Path/api/v1/quote
Base URLhttps://swap.xoxno.com
AuthNone
AvailabilityPublic
Rate limit100 requests per second per IP

Required Params

ParamTypeDescription
fromstringInput token identifier, for example WEGLD-bd4d79.
tostringOutput token identifier, for example USDC-c76f1f.
amountIn or amountOutstringExactly one amount, encoded as an integer string in the token’s smallest unit.

Optional Params

ParamTypeDefaultDescription
slippagenumber0.01Decimal slippage tolerance. 0.01 means 1%.
senderstringnoneBech32 sender. When set, the response can include a full transaction object.
includePathsbooleanfalseInclude paths[] route breakdown.
maxSplitsnumber6Maximum route splits.
maxHopsnumber6Maximum swaps per path.
algorithmstringhybridgreedy, lagrangian, or hybrid.
referralIdnumber0Referral identifier for fee attribution.
maxBuiltinCallsnumbernoneCap smart contract calls in the generated transaction.
includeLpRoutesbooleanfalseAllow LP tokens as intermediate hops. Enabled automatically when from or to is an LP token.
Convert human-readable amounts to smallest unit strings before quoting. Use /api/v1/pair-config to read decimals and minAmountIn.

Request

curl "https://swap.xoxno.com/api/v1/quote?\
from=WEGLD-bd4d79&\
to=USDC-c76f1f&\
amountIn=1000000000000000000&\
slippage=0.005&\
includePaths=true"

Success Response

{
  "amountIn": "1000000000000000000",
  "amountOut": "42500000",
  "amountOutMin": "42287500",
  "amountInShort": 1,
  "amountOutShort": 42.5,
  "amountOutMinShort": 42.2875,
  "priceImpact": 0.0021,
  "rate": 42.5,
  "rateInverse": 0.023529,
  "paths": [
    {
      "amountIn": "1000000000000000000",
      "amountOut": "42500000",
      "splitPpm": 1000000,
      "swaps": [
        {
          "dex": "xExchange",
          "pool": "erd1...",
          "tokenIn": "WEGLD-bd4d79",
          "tokenOut": "USDC-c76f1f"
        }
      ]
    }
  ]
}

Response Fields

FieldTypeDescription
amountInstringInput amount in smallest units.
amountOutstringExpected output amount in smallest units.
amountOutMinstringMinimum output after slippage, in smallest units.
amountInShortnumberHuman-readable input amount.
amountOutShortnumberHuman-readable output amount.
priceImpactnumberEstimated price impact as a decimal.
ratenumberOutput units per input unit.
rateInversenumberInput units per output unit.
paths[]arrayReturned only when includePaths=true.
txDatastringEncoded contract call data when a full transaction object is not returned.
transactionobjectFull transaction object when sender is set and transaction building succeeds.

Transaction Data

Pass sender when the user is ready to sign. The service fetches nonce, simulates gas, and returns a transaction object when those steps complete within the service timeout.
curl "https://swap.xoxno.com/api/v1/quote?\
from=WEGLD-bd4d79&\
to=USDC-c76f1f&\
amountIn=1000000000000000000&\
sender=erd1..."
If nonce fetch or simulation exceeds 8 seconds, the response falls back to txData without transaction.
Do not reuse txData across quote requests. It encodes route and slippage state from that request.

Errors

StatusCauseFix
400Missing from, to, or amount; both amount fields set; invalid token format.Fix query params and retry.
404No route for the pair.Call /api/v1/pair-config and show the unsupported pair state.
422Route exists, but transaction construction or simulation failed.Retry with lower maxSplits, lower maxHops, or without sender for pricing only.
429Per-IP rate limit exceeded.Back off and queue requests client-side.
503Service is warming up or pool snapshot is unavailable.Retry with backoff.

Edge Cases

CaseBehaviorClient handling
from equals toThe endpoint searches for same-token arbitrage cycles.Treat the result as an arbitrage route, not a swap quote.
ESDT input with only txDatatxData is not the full transaction data field.Wrap it with the correct ESDT transfer prefix.
Large routeMore splits and hops can increase response time and gas.Cap maxSplits and maxHops for wallet flows.
High-frequency pollingPath details increase response size.Keep includePaths=false.

Verify

Before signing:
  • amountOutMin matches the slippage shown to the user.
  • transaction.sender equals the current wallet when transaction is present.
  • Token amounts are smallest unit strings.
  • The quote was generated after the latest user change to token, amount, slippage, or sender.