Swap Overview
The 'karrotcapital.spiderswap'
package offers a suite of functions to facilitate token swaps and transaction management on the Solana blockchain. Here is an overview of the four main functions provided by the package:
Functions
1. 'get_swap_raw'
'get_swap_raw'
Fetches raw swap data from the SpiderSwap API. This function is essential for retrieving detailed swap information required for executing token swaps.
Learn more about 'get_swap_raw'
2. 'get_swap'
'get_swap'
Simplifies the process of fetching swap data by converting the amount to lamports and slippage to basis points before making the API call. This function provides an easy-to-use interface for obtaining swap data.
3. 'create_transaction'
'create_transaction'
Creates a Solana transaction from a base64-encoded string containing the swap transaction data. This function is used to prepare transactions for submission to the blockchain.
Learn more about 'create_transaction'
4. 'send_transaction'
'send_transaction'
Sends a Solana transaction to the blockchain, handling retries and confirmation. This function is crucial for ensuring that transactions are successfully broadcasted and confirmed on the network.
Learn more about 'send_transaction'
These functions provide a comprehensive toolkit for developers to interact with the SpiderSwap API and manage token swaps efficiently. For detailed documentation and examples, refer to the respective function pages linked above.
Last updated