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 thefullListrequest parameter totrueto 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 theetaSecondsandexpectedAmountOutfields in each item.
Response fields:
The following table shows the common fields of response: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, Mayan 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 a deposit address. The quote endpoint derives it for you inline, so there is no separate address-generation call to make.
Requirements and behavior:
destinationAddressis required. Without itmpsDepositAddressisnull(the address is keyed to the final recipient).- Deposit addresses must be enabled for your API key. The address is minted under your integrator identity, so pass your
apiKey; without an enabled key the field comes backnull. Contact support@mayan.finance to enable it. mpsUserIdis optional. Itâs an integrator-scoped identity (a0x-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 yourapiKey, so deposits still bucket by caller. The value used is echoed back asmpsUserId.- Only eligible quotes get an address. Mayan attaches it to Swift, mono-chain, and direct (no source swap) Fast MCTP quotes whose source chain and token are indexed for deposit addresses (see 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 anullas 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.mpsDepositAddress through detection, settlement, and delivery with the 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:
chain from the query.
Supported Chains
GET sia.mayan.finance/v10/init
Returns configuration for every supported chain, including whether it can be used as an origin or destination chain.
Example:
originActive: Specifies whether the chain is supported as a source chain.destinationActive: Specifies whether the chain is supported as a destination chain.
API Key:
TheapiKey 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.