Skip to main content
We highly recommend using Mayan SDK for integration as it simplifies the integration process. Before performing a swap we need find the best route and get the swap rate for the token pair using quote API.

API Reference

Swagger UI

Example:

The request to get the quote for swapping 100 USDC on Avalanche to receive SOL on Solana would be like this:

Request:

List of request parameters:

Response:

The quote service returns an array of quotes. By default, it includes at most two items: the first is the fastest option, and the second is the best-return quote. If the fastest option also provides the best return, only one quote is returned. It is possible to set the fullList request parameter to true to retrieve all available quote options. In this case, more than two items may be returned, and no sorting is applied. Interfaces can apply their own sorting logic by considering the etaSeconds and expectedAmountOut fields in each item.

Response fields:

The following table shows the common fields of response:
Auction modes (Swift quotes only, type = "SWIFT")
  • 2: English auction. The user receives at least minAmountOut, typically around expectedAmountOut and possibly higher or lower.
  • 3: Exact-out. The user is guaranteed to receive exactly expectedAmountOut.

MPS deposit address (mpsDeposit)

Pass mpsDeposit: true to make a quote fundable by a plain transfer. On eligible quotes the response carries an mpsDepositAddress — a deterministic address on the source chain — plus mpsIntegratorId and mpsUserId. When the payer simply sends the input token to that address, the Mayan Payment Service (MPS) detects the deposit and settles the swap to destinationAddress on the destination chain, with no transaction to sign and no SDK swap call. This is the recommended way to obtain an MPS deposit address — the quote endpoint derives it for you inline, so there is no separate address-generation call to make. Requirements and behavior:
  • destinationAddress is required. Without it mpsDepositAddress is null (the address is keyed to the final recipient).
  • MPS must be enabled for your API key. The address is minted under your integrator identity, so pass your apiKey; without an MPS-enabled key the field comes back null. Contact support@mayan.finance to enable it.
  • mpsUserId is optional. It’s an integrator-scoped identity (a 0x-prefixed hex string whose value fits in 20 bytes, e.g. 0x1); the same id always yields the same deposit address. When omitted, it is derived from your apiKey, so deposits still bucket by caller. The value used is echoed back as mpsUserId.
  • Only eligible quotes get an address. MPS attaches it to Swift, mono-chain, and direct (no source swap) Fast MCTP quotes whose source chain and token are indexed by MPS (see the deposit source chains and supported tokens) — and only when the amount clears the token’s minimum. Other quotes in the same response return mpsDepositAddress: null.
  • Best-effort. If the address can’t be derived for any reason, the quote is still returned with mpsDepositAddress: null. Never treat a null as an error.
The Mayan SDK (v15+) exposes this as fetchQuote options mpsDeposit and mpsUserId, and reads it back as quote.mpsDepositAddress. Passing mpsDeposit forces the SDK’s POST-body request path.
Track a deposit made to an mpsDepositAddress — detection, settlement, and delivery — with the MPS events stream or by polling GET /swaps.

Supported Tokens

Mayan is an intent-based protocol and supports any token as input or output, provided there is sufficient liquidity on the source or destination chains. We also maintain an approved, whitelisted token list for convenience:

Swagger UI

Example:

To get the aggregated list of tokens from all chains remove chain from in the query .

Supported Chains

GET sia.mayan.finance/v10/init

Returns configuration for every supported chain, including whether it can be used as a origin or destination** **chain.

Example:

This endpoint provides a JSON response containing a comprehensive list of all chains supported by the platform. Each chain entry includes detailed metadata such as the chain’s name, chain ID, and other relevant attributes. Two key fields indicate the chain’s functionality within the platform:
  • originActive: Specifies whether the chain is supported as a source chain.
  • destinationActive: Specifies whether the chain is supported as a destination chain.
Use this endpoint to determine compatibility and availability of specific chains for your operations.

API Key:

The apiKey parameter is optional. If you are using the Mayan SDK on a frontend and your request volume is low or comes from multiple origins, you can omit the apiKey to use the public endpoint. We recommend starting without an API key and only requesting one if you hit rate limits. To obtain an API key, email support@mayan.finance.