We highly recommand using Mayan SDK for integration as it simplfies 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.Documentation Index
Fetch the complete documentation index at: https://mayan-mayanintern-image-upload.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
API Reference
Swagger UI
Example:
The request to get the quote for swapping BNB tokens from Binance Smart Chain (BSC) to receive USDC tokens on Solana would be like this:Request:
List of request parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| solanaProgram | String | Yes | Mayan WH Swap program address |
| amountIn | Number | Yes | Human readable amount of input token (e.g for 100 USDC it should be 100) |
| fromToken | String | Yes | Token address of input token |
| fromChain | String | Yes | Wormhole chain id of source network |
| toToken | String | Yes | Token address of output Token |
| toChain | String | Yes | Wormhole chain id of destination network |
| slippageBps | Number | Yes | Maximum slippage in bps, If the output token amount exceeds the slippage the swap will refund, (Max=100) |
| referrer | String | No | Referrer address that receives the referrer fee |
| gasDrop | Number | No | Default is 0. the amount of gas drop that must be delivered to user on delivered on destination network |
Response:
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” or “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/v6/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.