Documentation Index Fetch the complete documentation index at: https://docs.solanatracker.io/llms.txt
Use this file to discover all available pages before exploring further.
SDK Libraries
Official client libraries for integrating Solana token swaps into your application.
All SDKs support Pump.fun, PumpSwap, Orca, Meteora, Moonshot, Raydium, and Jupiter.
Available SDKs
JavaScript / TypeScript For Node.js, React, Next.js, and browsers
Python For Python applications and scripts
Installation
Quick Start
JavaScript
import { SolanaTracker } from 'solana-swap' ;
const tracker = new SolanaTracker ( 'YOUR_API_KEY' , 'YOUR_PRIVATE_KEY' );
// Get quote
const quote = await tracker . getRate ({
from: 'So11111111111111111111111111111111111111112' ,
to: '4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R' ,
amount: 1 ,
slippage: 10
});
// Execute swap
const swap = await tracker . swap ({
from: 'So11111111111111111111111111111111111111112' ,
to: '4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R' ,
fromAmount: 0.1 ,
slippage: 10 ,
payer: 'YOUR_WALLET_ADDRESS'
});
Python
from solana_swap import SolanaTracker
tracker = SolanaTracker( 'YOUR_API_KEY' , 'YOUR_PRIVATE_KEY' )
# Get quote
quote = tracker.get_rate(
from_token = 'So11111111111111111111111111111111111111112' ,
to_token = '4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R' ,
amount = 1 ,
slippage = 10
)
# Execute swap
swap = tracker.swap(
from_token = 'So11111111111111111111111111111111111111112' ,
to_token = '4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R' ,
from_amount = 0.1 ,
slippage = 10 ,
payer = 'YOUR_WALLET_ADDRESS'
)
React Integration
This example is quote-only. Execute swaps from a backend or from a wallet-integrated flow that can safely sign transactions.
import { useState } from 'react' ;
import { SolanaTracker } from 'solana-swap' ;
function SwapComponent () {
const [ quote , setQuote ] = useState ( null );
const tracker = new SolanaTracker ( process . env . NEXT_PUBLIC_API_KEY );
async function getQuote ( amount ) {
const result = await tracker . getRate ({
from: 'So11111111111111111111111111111111111111112' ,
to: '4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R' ,
amount: parseFloat ( amount ),
slippage: 10
});
setQuote ( result );
}
return (
< div >
< input
type = "number"
onChange = { ( e ) => getQuote ( e . target . value ) }
placeholder = "Amount"
/>
{ quote && (
< div >
< p > Expected: { quote . amountOut } </ p >
< p > Minimum: { quote . minAmountOut } </ p >
< p > Impact: { ( quote . priceImpact * 100 ). toFixed ( 2 ) } % </ p >
< p > Connect a wallet-backed signing flow before executing swaps. </ p >
</ div >
) }
</ div >
);
}
Python Trading Example
from solana_swap import SolanaTracker
tracker = SolanaTracker(
api_key = 'YOUR_API_KEY' ,
private_key = 'YOUR_PRIVATE_KEY'
)
SOL = 'So11111111111111111111111111111111111111112'
TARGET = '4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R'
# Get quote
quote = tracker.get_rate(
from_token = SOL ,
to_token = TARGET ,
amount = 0.1 ,
slippage = 10
)
# Check price impact
if quote[ 'priceImpact' ] < 0.03 : # < 3%
# Execute swap
swap = tracker.swap(
from_token = SOL ,
to_token = TARGET ,
from_amount = 0.1 ,
slippage = 10 ,
payer = 'YOUR_WALLET' ,
priority_fee = 'auto' ,
priority_fee_level = 'high'
)
print ( f "Swap completed: { swap[ 'txn' ] } " )
else :
print ( "Price impact too high" )
Features
Zero-Delay Trading - Sub-second execution
Multi-DEX Routing - Optimal prices across DEXs
Priority Control - Manual or automatic fee optimization
Custom Fees - Monetization with add/deduct modes
Flexible Amounts - Numeric, auto, or percentage
Common Token Addresses
Token Symbol Address Wrapped SOL SOL So11111111111111111111111111111111111111112USD Coin USDC EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1vTether USDT Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYBRaydium RAY 4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R
Support
Swap API Swap endpoint docs
Rate API Rate endpoint docs