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:
| Parameter | Type | Required | Description |
|---|---|---|---|
| amountIn | Number | Yes* | Input amount in human-readable format (e.g. 100 for 100 USDC). Either amountIn or amountIn64 must be provided. |
| amountIn64 | String | Yes* | Input amount in base units (smallest denomination, e.g. 100000000 for 100 USDC). Either amountIn or amountIn64 must be provided. |
| fromToken | String | Yes | Token address on the source chain (use 0x0000000000000000000000000000000000000000 for native tokens) |
| fromChain | String | Yes | Source chain name (e.g. solana, ethereum, bsc, avalanche, arbitrum, base, optimism, polygon, sui) |
| toToken | String | Yes | Token address on the destination chain |
| toChain | String | Yes | Destination chain name |
| slippageBps | Number | Yes* | Maximum slippage in basis points (e.g. 300 = 3%, max 500). Either slippageBps or slippage must be provided. |
| slippage | Number | Yes* | Maximum slippage as a decimal (e.g. 0.03 = 3%). Either slippageBps or slippage must be provided. |
| swift | Boolean | No | Enable Swift routes |
| mctp | Boolean | No | Enable MCTP routes |
| fastMctp | Boolean | No | Enable Fast MCTP routes |
| wormhole | Boolean | No | Enable Wormhole Swap routes |
| gasless | Boolean | No | Enable gasless swap mode |
| solanaProgram | String | No | Mayan Solana program address |
| forwarderAddress | String | No | Mayan Forwarder contract address |
| sdkVersion | String | No | SDK version in major_minor_patch format (e.g. 13_1_0) |
| referrer | String | No | Referrer Solana address that receives the referrer fee |
| referrerBps | Number | No | Default is 0. The basis points the integrator earns through the referral program |
| gasDrop | Number | No | Default is 0. Amount of native gas to deliver to the user on the destination chain |
| fullList | Boolean | No | Default is false. Enables returning all available quote options instead of the default limited (fastest and best-return) results |
| destinationAddress | String | No | Helps provide a more accurate quote, for example by checking whether the Solana ATA exists. |
| apiKey | String | No | Defines an API key that prevents the rate-limit-exceeded error on a per-IP basis. |
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:| Field | Type | Description |
|---|---|---|
| type | String | Determines the bridge method which can be “WH”, “SWIFT”, “MCTP” or “FAST_MCTP” |
| effectiveAmountIn | Number | The actual input amount that will be deducted from user’s wallet |
| expectedAmountOut | Number | Expected output amount that user receives |
| minAmountOut | Number | Minimum output amount of auction |
| minReceived | Number | The minimum amount that user receives after deducting relayer fees |
| price | Number | The amount of output token that user receives per 1 unit of input token |
| solanaRelayerFee | Number | For “WH” type this fee is denominated in input token. For “MCTP” type the fee is denominated in USDC. For “SWIFT” type the fee is zero. |
| redeemRelayerFee | Number | For “WH” type this fee is denominated in output token. For “MCTP” type the fee is denominated in USDC. For “SWIFT” type the fee is zero. |
| RefundRelayerFee | Number | For “WH” and “SWIFT” types this fee is denominated in input token. For “MCTP” type the fee is denominated in USDC. |
| clientRelayerFeeSuccess | Number | Total dollar value of relayer fees in the success scenario |
| clientRelayerFeeRefund | Number | Total dollar value of relayer fee in the refund scenario |
| eta | Number | estimated time of arrival in minutes |
| client eta | String | human readable string of eta |
| fromToken | Object | Input token details |
| fromChain | String | Source network name |
| toToken | Object | Output token details |
| toChain | String | Destination network name |
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 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:
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.