Request examples

Here you can find /routes and /quote cURL request examples for Solana

Routes Request

Jupiter

Solana swaps:

curl --request POST \
     --url https://li.quest/v1/advanced/routes \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "fromChainId": "SOL",
  "fromAmount": "1000000000",
  "toChainId": "SOL",
  "fromTokenAddress": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  "toTokenAddress": "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
  "fromAddress": "YOUR_SOL_WALLET",
  "toAddress": "YOUR_SOL_WALLET"
}'

Mayan

From EVM to SOL:

curl --request POST \
     --url https://li.quest/v1/advanced/routes \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "fromChainId": "ARB",
  "fromAmount": "1000000000",
  "toChainId": "SOL",
  "fromTokenAddress": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
  "toTokenAddress": "7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs",
  "fromAddress": "YOUR_EVM_WALLET",
  "toAddress": "YOUR_SOL_WALLET"
}'

From SOL to EVM:

curl --request POST \
     --url https://li.quest/v1/advanced/routes \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "fromChainId": "SOL",
  "fromAmount": "1000000000",
  "toChainId": "ARB",
  "fromTokenAddress": "7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs",
  "toTokenAddress": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
  "fromAddress": "YOUR_SOL_WALLET",
  "toAddress": "YOUR_EVM_WALLET"
}'

AllBridge

From EVM to SOL:

  • the routes request without requesting the gas on the destination chain:

curl --request POST \
--url https://li.quest/v1/advanced/routes \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data ' 
{
    "fromChainId": 137, 
    "fromAmount": "2000000", 
    "fromTokenAddress": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174", 
    "toChainId": "SOL", 
    "toTokenAddress": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", 
    "fromAddress": "YOUR_EVM_WALLET", 
    "toAddress": "YOUR_SOL_WALLET",
    "options": 
    { 
        "slippage": 0.03 
    }
} '
  • the routes request with the gas on the destination chain:

curl --request POST \
--url https://li.quest/v1/advanced/routes \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data ' 
{
    "fromChainId": "POL", 
    "fromAmount": "2000000", 
    "fromTokenAddress": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174", 
    "toChainId": 1151111081099710, 
    "toTokenAddress": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", 
    "fromAddress": "YOUR_EVM_WALLET", 
    "toAddress": "YOUR_SOL_WALLET",
    "fromAmountForGas": 284126,
    "options": 
    { 
        "slippage": 0.03
    } 
} '

From SOL to EVM:

  • the routes request without requesting the gas on the destination chain:

curl --request POST \
--url https://li.quest/v1/advanced/routes \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data ' 
{
    "fromChainId": "SOL", 
    "fromAmount": "2000000", 
    "fromTokenAddress": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "toChainId": 137, 
    "toTokenAddress": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174", 
    "fromAddress": "YOUR_SOL_WALLET",
    "toAddress": "YOUR_EVM_WALLET",
    "options": 
    { 
        "slippage": 0.03 
    }
} '
  • the routes request with the gas on the destination chain:

curl --request POST \
--url https://li.quest/v1/advanced/routes \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data ' 
{
    "fromChainId": 1151111081099710, 
    "fromAmount": "2000000", 
    "fromTokenAddress": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "toChainId": "POL", 
    "toTokenAddress": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174", 
    "fromAddress": "YOUR_SOL_WALLET",
    "toAddress": "YOUR_EVM_WALLET",
    "fromAmountForGas": 37376,
    "options": 
    { 
        "slippage": 0.03
    } 
} '

Quote Request

Jupiter

Solana swaps:

curl --request GET \
     --url 'fromChain=SOL&toChain=SOL&fromToken=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&toToken=DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263&fromAddress=YOUR_SOL_WALLET&toAddress=YOUR_SOL_WALLET&fromAmount=1000000000' \
     --header 'accept: application/json'

Mayan

From EVM to SOL:

curl --request GET \
     --url 'https://li.quest/v1/quote?fromChain=ARB&toChain=SOL&fromToken=0xaf88d065e77c8cC2239327C5EDb3A432268e5831&toToken=7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs&fromAddress=YOUR_EVM_WALLET&toAddress=YOUR_SOL_WALLET&fromAmount=1000000000' \
     --header 'accept: application/json'

From SOL to EVM:

curl --request GET \
     --url 'https://li.quest/v1/quote?fromChain=SOL&toChain=ARB&fromToken=7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs&toToken=0xaf88d065e77c8cC2239327C5EDb3A432268e5831&fromAddress=YOUR_SOL_WALLET&toAddress=YOUR_EVM_WALLET&fromAmount=1000000000' \
     --header 'accept: application/json'

AllBridge

From EVM to SOL:

  • the quote request without requesting the gas on the destination chain:

curl --request GET \
     --url 'https://li.quest/v1/quote?fromChain=POL&toChain=1151111081099710&fromToken=0x2791bca1f2de4661ed88a30c99a7a9449aa84174&toToken=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&fromAddress=YOUR_EVM_WALLET&toAddress=YOUR_SOL_WALLET&fromAmount=2000000&slippage=0.03' \
     --header 'accept: application/json'
  • the routes request with the gas on the destination chain:

curl --request GET \
     --url 'https://li.quest/v1/quote?fromChain=137&toChain=SOL&fromToken=0x2791bca1f2de4661ed88a30c99a7a9449aa84174&toToken=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&fromAddress=YOUR_EVM_WALLET&toAddress=YOUR_SOL_WALLET&fromAmount=2000000&slippage=0.03&fromAmountForGas=284126' \
     --header 'accept: application/json'

From SOL to EVM:

  • the quote request without requesting the gas on the destination chain:

curl --request GET \
     --url 'https://li.quest/v1/quote?fromChain=1151111081099710&toChain=POL&toToken=0x2791bca1f2de4661ed88a30c99a7a9449aa84174&fromToken=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&toAddress=YOUR_EVM_WALLET&fromAddress=YOUR_SOL_WALLET&fromAmount=2000000&slippage=0.03' \
     --header 'accept: application/json'
  • the routes request with the gas on the destination chain:

curl --request GET \
     --url 'https://li.quest/v1/quote?fromChain=1151111081099710&toChain=POL&toToken=0x2791bca1f2de4661ed88a30c99a7a9449aa84174&fromToken=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&toAddress=YOUR_EVM_WALLET&fromAddress=YOUR_SOL_WALLET&fromAmount=2000000&slippage=0.03&fromAmountForGas=37376' \
     --header 'accept: application/json'

Last updated