Overview
This node interacts with the Solana blockchain to provide token swap functionalities using the Jupiter aggregator. Specifically, the 'Get Quote' operation fetches a quote for swapping a specified amount of one token (input mint) to another token (output mint) on the Solana network. It is useful for users who want to estimate the amount of output tokens they would receive before executing a swap, considering slippage tolerance.
Use Case Examples
- A user wants to swap 100 USDC tokens to SOL tokens and needs to know the expected output amount before performing the swap.
- A DeFi application integrates this node to provide real-time swap quotes to its users for various token pairs on Solana.
Properties
| Name | Meaning |
|---|---|
| Input Mint | The mint address of the token to swap from, specified as a string representing the token's unique identifier on Solana. |
| Output Mint | The mint address of the token to swap to, specified as a string representing the token's unique identifier on Solana. |
| Amount | The amount of the input token to swap, expressed in lamports or the smallest unit of the token, provided as a string. |
| Slippage (Basis Points) | The maximum slippage allowed for the swap, expressed in basis points (1% = 100), which controls the tolerance for price movement during the swap. |
Output
JSON
*- The output is an array of quote objects representing possible swap quotes returned from the Jupiter aggregator.
Dependencies
- Requires connection to the Solana blockchain via RPC URL and WebSocket endpoint.
- Needs Solana API credentials including a private key for signing transactions.
Troubleshooting
- Common issues include invalid or incorrect mint addresses which will cause the quote retrieval to fail.
- Incorrect or insufficient RPC URL or WebSocket endpoint configuration may lead to connection errors.
- Invalid private key or credential misconfiguration can cause authentication failures.
- Slippage set too low might result in no valid quotes being returned if market conditions change rapidly.
Links
- Jupiter Aggregator Documentation - Official documentation for the Jupiter aggregator used for token swaps on Solana.
- Solana Developer Resources - Resources and documentation for developing on the Solana blockchain.