LI.FI Documentation
LI.FI WebsiteAPI ReferenceHelp / FAQ / Create support ticketRequest API Key
  • 🏡Getting Started
    • ❓What is LI.FI
    • 🌟Why LI.FI?
    • 🆚LI.FI vs Aggregators/DEXs/Bridges
    • 📖LI.FI Terminology
    • ❓FAQ
    • 💡Use Cases
      • Mobile/Gaming Wallets
    • 🏹LI.FI vs. Other Aggregators
    • 🤝Partnership
    • 🌐Powered by LI.FI
  • 🔐Security First
  • ✅List: Chains, Bridges, DEX Aggregators, Solvers
  • 💲Monetization / Take Fees
  • 🔎Transaction Explorer
  • 🔏Rate Limits & API Key
  • How to get integrated by LI.FI?
    • For Bridges
    • For DEXs/Aggregators/Solvers
  • 🆘Technical FAQ
  • LI.FI PRODUCTS
    • Glacis
    • LI.FI Solver
    • LI.FI Intents System
  • LI.FI API
    • ⚙️LI.FI API
      • Transferring Tokens (Example)
      • Requesting supported Chains
      • Requesting all supported Tools
      • Requesting all known Tokens
      • Getting Token Information
      • Getting all possible Connections
      • Requesting a Quote
        • Token Transfer
        • Optimizing quote response timing
        • Cross-Chain Contract Calls
        • Possible Tool Errors
        • Testing your integration
      • Status of a Transaction
      • Requesting Analytics Data
    • ⚔️TX-Batching aka "Zaps"
    • 🏄Solana
      • Request examples
    • 🪙Bitcoin
      • Request examples
    • ⛽LI.Fuel
  • Integrate LI.FI SDK
    • 🚀LI.FI SDK Overview
    • 📦Install LI.FI SDK
    • ⚙️Configure SDK
    • 🪐Configure SDK Providers
    • 📜Request Routes/Quotes
    • 🎯Execute Routes/Quotes
    • ⛓️Chains and Tools
    • 💰Token Management
    • 🕵️Testing Integration
    • 🚗Migrate from v2 to v3
  • INTEGRATE LI.FI WIDGET
    • 🧩LI.FI Widget Overview
    • 📦Install Widget
    • 🎮Select Widget Variants
    • ⚙️Configure Widget
    • 🎨Customize Widget
    • ⚡Widget Events
    • 👛Wallet Management
    • 🌍Internationalization
    • ⚛️Compatibility with Next.js, Remix, Nuxt, etc.
    • 🛣️React Router Compatibility
    • 📖Widget API Reference
    • 🚗Migrate from v2 to v3
  • Smart Contracts
    • Overview
    • Deployments/Contract Addresses
    • Audits
  • Support & Misc.
    • API Status
    • Technical Help Desk & FAQ
    • Create a Partner Ticket
    • Discord Support
    • Telegram Support
    • Twitter
    • Github
    • Licenses
Powered by GitBook
LogoLogo

Connect with us

  • Github
  • Twitter
  • Discord
  • LinkedIn

More Information

  • Help Desk / FAQ
  • API Reference
  • Website
On this page
  • Routes Request
  • Jupiter
  • Mayan
  • AllBridge
  • Quote Request
  • Jupiter
  • Mayan
  • AllBridge

Was this helpful?

Export as PDF
  1. LI.FI API
  2. Solana

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 10 months ago

Was this helpful?

🏄