# Table of Contents - [GitHub](#github) - [GitHub](#github) - [GitHub](#github) - [GitHub](#github) - [GitHub](#github) - [GitHub](#github) - [GitHub](#github) - [GitHub](#github) - [GitHub](#github) - [GitHub](#github) - [GitHub](#github) - [GitHub](#github) - [GitHub](#github) - [GitHub](#github) - [GitHub](#github) - [GitHub](#github) - [GitHub](#github) - [GitHub](#github) - [GitHub](#github) - [GitHub](#github) - [GitHub](#github) - [GitHub](#github) - [GitHub](#github) - [GitHub](#github) - [GitHub](#github) - [GitHub](#github) - [GitHub](#github) - [GitHub](#github) - [GitHub](#github) --- # GitHub [Swap API](/swap-api "Swap API") Swap Swap API Documentation ====================== API now supports: * [Moonshot](https://dexscreener.com/moonshot/new) * [Pump.fun](https://pump.fun) tokens * Raydium * Raydium CPMM * Orca * Meteora * Any token supported by Jupiter Endpoints[](#endpoints) ------------------------ ### GET /swap[](#get-swap) curl --location 'https://swap-v2.solanatracker.io/swap?from=So11111111111111111111111111111111111111112&to=4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R&fromAmount=1&slippage=10&payer=PAYER_ADDRESS' ### POST /swap[](#post-swap) curl --location 'https://swap-v2.solanatracker.io/swap' \ --header 'Content-Type: application/json' \ --data '{ "from": "So11111111111111111111111111111111111111112", "to": "4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R", "amount": 1, "slippage": 15, "payer": "arsc4jbDnzaqcCLByyGo7fg7S2SmcFsWUzQuDtLZh2y", "priorityFee": 0.0005, "feeType": "add", "fee": "arsc4jbDnzaqcCLByyGo7fg7S2SmcFsWUzQuDtLZh2y:0.1" }' Request Parameters[](#request-parameters) ------------------------------------------ Both GET and POST requests support the following parameters: | Parameter | Description | Example | | --- | --- | --- | | `from` | The base token address | `So11111111111111111111111111111111111111112` (SOL) | | `to` | The quote token address | `4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R` (RAY) | | `amount` | The amount of the base token to swap. Can be a specific value, “auto” to use full wallet amount, or a percentage (e.g., “50%”) to use that portion of the wallet balance | `1`, `"auto"`, or `"50%"` | | `slippage` | Maximum acceptable slippage percentage | `10` | | `payer` | Public key of the wallet sending the transaction | `PAYER_ADDRESS` | ### Optional Parameters[](#optional-parameters) | Parameter | Description | Example | | --- | --- | --- | | `priorityFee` | Amount in SOL to increase transaction processing priority | `0.000005` or set it to auto and provide an priority level | | `priorityFeeLevel` | Required if priorityFee is set to auto | min, low, medium, high, veryHigh, unsafeMax, for more info [read this blog post](https://www.solanatracker.io/blog/priority-fee-api) | | `txVersion` | Transaction version (`"v0"` or `"legacy"`) | `"v0"` | | `fee` | Charge a custom fee to your users for each transaction (earn sol for each swap) | `WALLET_ADDRESS:PERCENTAGE` (Add multiple fees by seperating with a comma) | | `feeType` | Fee application type (default: `"add"`) | `"add"` or `"deduct"` | | `onlyDirectRoutes` | Disable multi hops on swaps | Default is false | Note: The `feeType` parameter is set to `"add"` by default. The `"deduct"` option is only used when the `from` address is SOL. Example Response[](#example-response) -------------------------------------- { "txn":"BASE64_TX", "rate":{ "amountIn":1, "amountOut":81.631985, "minAmountOut":73.4687865, "currentPrice":0.012219167460548153, "executionPrice":0.010997250714493338, "priceImpact":0.002517, "fee":0.000005, "baseCurrency":{ "mint":"So11111111111111111111111111111111111111112", "decimals":9 }, "quoteCurrency":{ "mint":"4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R", "decimals":6 }, "platformFee":9000000, "platformFeeUI":0.009 }, "timeTaken":0.016, "type":"legacy" } Loading the Transaction[](#loading-the-transaction) ---------------------------------------------------- const serializedTransactionBuffer = Buffer.from(res.txn, "base64"); let txn; if (res.type === 'v0') { txn = VersionedTransaction.deserialize(serializedTransactionBuffer); } else { txn = Transaction.from(serializedTransactionBuffer); } if (!txn) return false; Sending the Transaction[](#sending-the-transaction) ---------------------------------------------------- ### Using React Wallet Adapter[](#using-react-wallet-adapter) if (res.type === 'v0' && txn) { await wallet.signTransaction(txn); } const txid = await wallet.sendTransaction(txn, connection, { skipPreflight: true, maxRetries: 4, }); ### Using NodeJS[](#using-nodejs) const keypair = Keypair.fromSecretKey(bs58.decode('YOUR_SECRET_KEY')); let txid; if (res.type === 'v0' ) { const txn = VersionedTransaction.deserialize(serializedTransactionBuffer); txn.sign([keypair]); txid = await connection.sendRawTransaction(txn.serialize(), { skipPreflight: true, }); } else { const txn = Transaction.from(serializedTransactionBuffer); txn.sign(keypair); const rawTransaction = txn.serialize(); txid = await connection.sendRawTransaction(rawTransaction, { skipPreflight: true, }); } Fees[](#fees) -------------- We charge a 0.5% fee on each successful transaction. For high-volume usage on public bots or sites, contact us via Discord or email ([\[email protected\]](/cdn-cgi/l/email-protection#55262234257834253c15263a39343b34212734363e30277b3c3a) ) to discuss reduced fees. [Libraries](/swap-api/libraries "Libraries") --- # GitHub Discord Trading Bot Solana Trading Bot for Discord ============================== Trade and Snipe all Solana tokens directly from Discord using our free to use Discord Bot. More information here: [https://www.solanatracker.io/solana-trading-bot](https://www.solanatracker.io/solana-trading-bot) ### Notes[](#notes) * Make sure your Solana Tracker wallet is configured before using commands involving buying/selling. * When specifying custom amounts, always use a comma (`,`) as the decimal separator, not a dot (`.`). * Slippage and priority fee settings impact the execution price of your buys and sells. [Introduction](/ "Introduction") [Discord Trading Bot](/Discord-Trading-Bot/about "Discord Trading Bot") --- # GitHub Introduction Solana Swap and Data API by Solana Tracker ========================================== Welcome to Solana Tracker for Developers What is Solana Tracker?[](#what-is-solana-tracker) --------------------------------------------------- A platform to buy, sell and snipe all Solana tokens. Track upcoming token releases, track Solana wallets and more. We provide our API for Developers that want to build their own Solana Swap or Solana Sniping bot. If you are looking for a Pump.fun Swap API, Moonshot Swap API, Raydium Swap API, Meteora Swap API or for any other Solana token you are in the right place. Documentation[](#documentation) -------------------------------- The documentation is available at [https://docs.solanatracker.io](https://docs.solanatracker.io) . For more information about Solana Tracker [click here](https://www.solanatracker.io) . Public Data API[](#public-data-api) ------------------------------------ We just added access to our Paid Public Data API used on Solana Tracker, with websocket option. The documentation is available at [https://docs.solanatracker.io/public-data-api/docs](https://docs.solanatracker.io/public-data-api/docs) . [Discord Trading Bot](/Discord-Trading-Bot "Discord Trading Bot") --- # GitHub [Discord Trading Bot](/Discord-Trading-Bot "Discord Trading Bot") Commands All Commands ============ ### /buy[](#buy) #### Buys the token for you using your quick buy settings. Requires the token address.[](#buys-the-token-for-you-using-your-quick-buy-settings-requires-the-token-address) Examples: /buy 4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R Or for a custom amount use (Make sure you use a comma and not a dot) /buy 4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R 0,001 [Discord Trading Bot](/Discord-Trading-Bot/about "Discord Trading Bot") [Buy](/Discord-Trading-Bot/commands/buy "Buy") --- # GitHub [Discord Trading Bot](/Discord-Trading-Bot "Discord Trading Bot") [Commands](/Discord-Trading-Bot/commands "Commands") Info /info[](#info) --------------- Displays information about your linked wallet. ### Usage[](#usage) No parameters required. Simply use: /info ![Info Command](https://www.solanatracker.io/images/bot/view-info.png) ### Notes[](#notes) * Make sure your Solana Tracker wallet is configured before using commands involving buying/selling. * When specifying custom amounts, always use a comma (`,`) as the decimal separator, not a dot (`.`). * Slippage and priority fee settings impact the execution price of your buys and sells. [Buy](/Discord-Trading-Bot/commands/buy "Buy") [Profit and Loss](/Discord-Trading-Bot/commands/profit-and-loss "Profit and Loss") --- # GitHub [Discord Trading Bot](/Discord-Trading-Bot "Discord Trading Bot") [Commands](/Discord-Trading-Bot/commands "Commands") Profit and Loss PnL (Profit & Loss)[](#pnl-profit--loss) ----------------------------------------- Click View PnL under an opened position to view all information about that position. For example: the current PnL percentage, PnL amount and more. ![Profit & Loss (PnL)](https://www.solanatracker.io/images/bot/pnl.png) [Info](/Discord-Trading-Bot/commands/info "Info") [Retrieve Token](/Discord-Trading-Bot/commands/retrieve-token "Retrieve Token") --- # GitHub [Discord Trading Bot](/Discord-Trading-Bot "Discord Trading Bot") [Commands](/Discord-Trading-Bot/commands "Commands") Retrieve Token /retrieve-token[](#retrieve-token) ----------------------------------- Retrieves information about a token. ### Usage[](#usage) Requires the token address. #### Example[](#example) /retrieve-token 4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R ### Parameters[](#parameters) * `token` (required): The token address to retrieve information for. ![Retrieve Token Webhook](https://www.solanatracker.io/images/bot/token.png) ### Notes[](#notes) * Make sure your Solana Tracker wallet is configured before using commands involving buying/selling. * When specifying custom amounts, always use a comma (`,`) as the decimal separator, not a dot (`.`). * Slippage and priority fee settings impact the execution price of your buys and sells. [Profit and Loss](/Discord-Trading-Bot/commands/profit-and-loss "Profit and Loss") [Sell](/Discord-Trading-Bot/commands/sell "Sell") --- # GitHub [Discord Trading Bot](/Discord-Trading-Bot "Discord Trading Bot") Discord Trading Bot Solana Trading Bot for Discord ============================== Trade and Snipe all Solana tokens directly from Discord using our free to use Discord Bot. More information here: [https://www.solanatracker.io/solana-trading-bot](https://www.solanatracker.io/solana-trading-bot) ### Notes[](#notes) * Make sure your Solana Tracker wallet is configured before using commands involving buying/selling. * When specifying custom amounts, always use a comma (`,`) as the decimal separator, not a dot (`.`). * Slippage and priority fee settings impact the execution price of your buys and sells. [Discord Trading Bot](/Discord-Trading-Bot "Discord Trading Bot") [Commands](/Discord-Trading-Bot/commands "Commands") --- # GitHub [Discord Trading Bot](/Discord-Trading-Bot "Discord Trading Bot") [Commands](/Discord-Trading-Bot/commands "Commands") Buy /buy[](#buy) ------------- Buys a token for you using your quick buy settings. ### Usage[](#usage) Requires the token address. #### Examples[](#examples) To buy using your default settings: /buy 4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R To buy a custom amount (make sure to use a comma, not a dot): /buy 4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R 0,001 ### Parameters[](#parameters) * `tokenAddress` (required): The address of the token to buy. * `amount` (optional): The custom amount of tokens to buy. If not provided, your default quick buy settings will be used. Use a comma as the decimal separator. ![Buy Command](https://www.solanatracker.io/images/bot/buy.png) ### Notes[](#notes) * Make sure your quick buy settings are configured before using the `/buy` command without specifying an amount. * When specifying a custom amount, always use a comma (`,`) as the decimal separator, not a dot (`.`). [Commands](/Discord-Trading-Bot/commands "Commands") [Info](/Discord-Trading-Bot/commands/info "Info") --- # GitHub [Discord Trading Bot](/Discord-Trading-Bot "Discord Trading Bot") [Commands](/Discord-Trading-Bot/commands "Commands") Sell How to sell a Position?[](#how-to-sell-a-position) --------------------------------------------------- You can sell a position by clicking on any of the sell options under your position webhook. ![Sell Position Webhook](https://www.solanatracker.io/images/bot/sell.png) [Retrieve Token](/Discord-Trading-Bot/commands/retrieve-token "Retrieve Token") [Set Amount](/Discord-Trading-Bot/commands/set-amount "Set Amount") --- # GitHub [Discord Trading Bot](/Discord-Trading-Bot "Discord Trading Bot") [Commands](/Discord-Trading-Bot/commands "Commands") Set Amount /setamount[](#setamount) ------------------------- Sets the default amount of SOL to use when buying with /buy. ### Usage[](#usage) Requires the amount to set as default. #### Example[](#example) /setamount 0,1 ### Parameters[](#parameters) * `amount` (required): The amount of SOL to set as the default. Must be greater than 0. ![Quick Buy Settings](https://www.solanatracker.io/images/bot/quick-buy.png) ### Notes[](#notes) * Make sure your Solana Tracker wallet is configured before using commands involving buying/selling. * When specifying custom amounts, always use a comma (`,`) as the decimal separator, not a dot (`.`). * Slippage and priority fee settings impact the execution price of your buys and sells. [Sell](/Discord-Trading-Bot/commands/sell "Sell") [Set Buy Priority Fee](/Discord-Trading-Bot/commands/set-buy-priority-fee "Set Buy Priority Fee") --- # GitHub [Discord Trading Bot](/Discord-Trading-Bot "Discord Trading Bot") [Commands](/Discord-Trading-Bot/commands "Commands") Set Buy Priority Fee /setbuypriorityfee[](#setbuypriorityfee) ----------------------------------------- Sets the priority fee to use when buying. ### Usage[](#usage) Requires the fee amount in SOL. #### Example[](#example) /setbuypriorityfee 0,001 ### Parameters[](#parameters) * `fee` (required): The priority fee in SOL. Must be greater than 0. ![Quick Buy Settings](https://www.solanatracker.io/images/bot/quick-buy.png) ### Notes[](#notes) * Make sure your Solana Tracker wallet is configured before using commands involving buying/selling. * When specifying custom amounts, always use a comma (`,`) as the decimal separator, not a dot (`.`). * Slippage and priority fee settings impact the execution price of your buys and sells. [Set Amount](/Discord-Trading-Bot/commands/set-amount "Set Amount") [Set Buy Slippage](/Discord-Trading-Bot/commands/set-buy-slippage "Set Buy Slippage") --- # GitHub [Discord Trading Bot](/Discord-Trading-Bot "Discord Trading Bot") [Commands](/Discord-Trading-Bot/commands "Commands") Set Buy Slippage /setbuyslippage[](#setbuyslippage) ----------------------------------- Sets the slippage tolerance for buying. ### Usage[](#usage) Requires the slippage percentage. #### Example[](#example) /setbuyslippage 10 ### Parameters[](#parameters) * `slippage` (required): The slippage percentage to set. Must be between 0 and 100. ![Quick Buy Settings](https://www.solanatracker.io/images/bot/quick-buy.png) ### Notes[](#notes) * Make sure your Solana Tracker wallet is configured before using commands involving buying/selling. * When specifying custom amounts, always use a comma (`,`) as the decimal separator, not a dot (`.`). * Slippage and priority fee settings impact the execution price of your buys and sells. [Set Buy Priority Fee](/Discord-Trading-Bot/commands/set-buy-priority-fee "Set Buy Priority Fee") [Set Percentage](/Discord-Trading-Bot/commands/set-percentage "Set Percentage") --- # GitHub [Discord Trading Bot](/Discord-Trading-Bot "Discord Trading Bot") [Commands](/Discord-Trading-Bot/commands "Commands") Set Percentage /setpercentage ============== Sets the default percentage of your position to sell when using quick sell. ### Usage[](#usage) Requires the percentage to set. #### Example[](#example) /setpercentage 50 ### Parameters[](#parameters) * `percentage` (required): The percentage to set. Must be between 0 and 100. ![Quick Sell Settings](https://www.solanatracker.io/images/bot/quick-sell.png) ### Notes[](#notes) * Make sure your Solana Tracker wallet is configured before using commands involving buying/selling. * When specifying custom amounts, always use a comma (`,`) as the decimal separator, not a dot (`.`). * Slippage and priority fee settings impact the execution price of your buys and sells. [Set Buy Slippage](/Discord-Trading-Bot/commands/set-buy-slippage "Set Buy Slippage") [Set Sell Priority Fee](/Discord-Trading-Bot/commands/set-sell-priority-fee "Set Sell Priority Fee") --- # GitHub [Discord Trading Bot](/Discord-Trading-Bot "Discord Trading Bot") [Commands](/Discord-Trading-Bot/commands "Commands") Set Sell Slippage /setsellslippage[](#setsellslippage) ------------------------------------- Sets the slippage tolerance for selling. ### Usage[](#usage) Requires the slippage percentage. #### Example[](#example) /setsellslippage 10 ### Parameters[](#parameters) * `slippage` (required): The slippage percentage to set. Must be between 0 and 100. ![Quick Sell Settings](https://www.solanatracker.io/images/bot/quick-sell.png) ### Notes[](#notes) * Make sure your Solana Tracker wallet is configured before using commands involving buying/selling. * When specifying custom amounts, always use a comma (`,`) as the decimal separator, not a dot (`.`). * Slippage and priority fee settings impact the execution price of your buys and sells. [Set Sell Priority Fee](/Discord-Trading-Bot/commands/set-sell-priority-fee "Set Sell Priority Fee") [Priority Fee API](/priority-fee-api "Priority Fee API") --- # GitHub [Discord Trading Bot](/Discord-Trading-Bot "Discord Trading Bot") [Commands](/Discord-Trading-Bot/commands "Commands") Set Sell Priority Fee /setsellpriorityfee[](#setsellpriorityfee) ------------------------------------------- Sets the priority fee to use when selling. ### Usage[](#usage) Requires the fee amount in SOL. #### Example[](#example) /setsellpriorityfee 0,001 ### Parameters[](#parameters) * `fee` (required): The priority fee in SOL. Must be greater than 0. ![Quick Sell Settings](https://www.solanatracker.io/images/bot/quick-sell.png) ### Notes[](#notes) * Make sure your Solana Tracker wallet is configured before using commands involving buying/selling. * When specifying custom amounts, always use a comma (`,`) as the decimal separator, not a dot (`.`). * Slippage and priority fee settings impact the execution price of your buys and sells. [Set Percentage](/Discord-Trading-Bot/commands/set-percentage "Set Percentage") [Set Sell Slippage](/Discord-Trading-Bot/commands/set-sell-slippage "Set Sell Slippage") --- # GitHub Priority Fee API This API is available on all Shared RPC plans and can also be enabled on Dedicated Nodes! [View Packages](https://www.solanatracker.io/solana-rpc) Understanding Priority Fees on Solana ===================================== Priority fees are optional fees that you can add to your Solana transactions to incentivize block producers (leaders) to include your transaction in the next block. While including a priority fee is recommended, determining the optimal amount can be challenging. Let’s explore how to effectively use priority fees with Solana Tracker’s Priority Fee API. What Are Priority Fees?[](#what-are-priority-fees) --------------------------------------------------- Priority fees are priced in micro-lamports per compute unit. They serve as an additional incentive for block producers to prioritize your transaction. Think of it as a “tip” to get your transaction processed faster. The Priority Fee API[](#the-priority-fee-api) ---------------------------------------------- Solana Tracker’s `getPriorityFeeEstimate` RPC method provides fee recommendations based on historical data, considering both global and local fee markets. This helps you make informed decisions about priority fees for your transactions. ### Using the API[](#using-the-api) You can use the API in two ways: 1. **With a Serialized Transaction** { "jsonrpc": "2.0", "id": "solana-tracker-example", "method": "getPriorityFeeEstimate", "params": [\ {\ "transaction": "",\ "options": {\ "recommended": true\ }\ }\ ] } 2. **With Account Keys** Here’s how to implement it in JavaScript: const { Transaction, Connection, ComputeBudgetProgram, PublicKey, TransactionInstruction } = require('@solana/web3.js'); // Initialize Connection const connection = new Connection("https://rpc-mainnet.solanatracker.io/?api-key=YOUR_API_KEY"); async function getPriorityFeeEst() { const transaction = new Transaction(); // Add a sample instruction transaction.add( new TransactionInstruction({ programId: new PublicKey("MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"), data: Buffer.from("Experimenting", "utf8"), keys: [], }) ); transaction.recentBlockhash = (await connection.getLatestBlockhash()).blockhash; transaction.feePayer = new PublicKey("your-wallet-public-key"); // Extract account keys const accountKeys = transaction.compileMessage().accountKeys; const publicKeys = accountKeys.map(key => key.toBase58()); // Get fee estimate try { const response = await fetch(connection.rpcEndpoint, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ jsonrpc: '2.0', id: 'solana-tracker-example', method: 'getPriorityFeeEstimate', params: [\ {\ accountKeys: publicKeys,\ options: {\ recommended: true,\ },\ }\ ], }), }); const data = await response.json(); const priorityFeeEstimate = data.result?.priorityFeeEstimate; // Add priority fee to transaction transaction.add( ComputeBudgetProgram.setComputeUnitPrice({ microLamports: priorityFeeEstimate }), ); console.log("Estimated priority fee:", priorityFeeEstimate); return priorityFeeEstimate; } catch (err) { console.error(`Error: ${err}`); return 10_000; } } Advanced Features[](#advanced-features) ---------------------------------------- ### Empty Slot Evaluation[](#empty-slot-evaluation) The `evaluateEmptySlotAsZero` flag helps optimize fee calculations for accounts with sparse transaction history: const response = await fetch("https://rpc-mainnet.solanatracker.io/?api-key=YOUR_API_KEY", { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ jsonrpc: '2.0', id: '1', method: 'getPriorityFeeEstimate', params: [{\ transaction: base58EncodedTransaction,\ options: {\ recommended: true,\ evaluateEmptySlotAsZero: true\ }\ }] }) }); ### Priority Levels[](#priority-levels) The API supports different priority levels to match your transaction urgency: * Min (0th percentile) * Low (25th percentile) * Medium (50th percentile) * High (75th percentile) * VeryHigh (95th percentile) * UnsafeMax (100th percentile) Here’s an example request for all priority levels: { "jsonrpc": "2.0", "id": "1", "method": "getPriorityFeeEstimate", "params": [{\ "accountKeys": ["JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4"],\ "options": {\ "includeAllPriorityFeeLevels": true\ }\ }] } Complete Transaction Example[](#complete-transaction-example) -------------------------------------------------------------- Here’s a full example of sending a transaction with priority fees: const { Connection, SystemProgram, Transaction, sendAndConfirmTransaction, Keypair, ComputeBudgetProgram, } = require("@solana/web3.js"); const bs58 = require("bs58"); const connection = new Connection("https://rpc-mainnet.solanatracker.io/?api-key=YOUR_API_KEY"); const fromKeypair = Keypair.fromSecretKey(Uint8Array.from("[Your secret key]")); const toPubkey = "receiving-wallet-public-key"; async function sendTransactionWithPriorityFee(priorityLevel) { const transaction = new Transaction(); // Add transfer instruction const transferIx = SystemProgram.transfer({ fromPubkey: fromKeypair.publicKey, toPubkey, lamports: 100, }); transaction.add(transferIx); // Get and add priority fee let feeEstimate = { priorityFeeEstimate: 0 }; if (priorityLevel !== "NONE") { feeEstimate = await getPriorityFeeEstimate(priorityLevel, transaction); const computePriceIx = ComputeBudgetProgram.setComputeUnitPrice({ microLamports: feeEstimate.priorityFeeEstimate, }); transaction.add(computePriceIx); } // Sign and send transaction transaction.recentBlockhash = (await connection.getLatestBlockhash()).blockhash; transaction.sign(fromKeypair); try { const txid = await sendAndConfirmTransaction(connection, transaction, [fromKeypair]); console.log(`Transaction sent successfully with signature ${txid}`); } catch (e) { console.error(`Failed to send transaction: ${e}`); } } // Use the function with your desired priority level sendTransactionWithPriorityFee("High"); Understanding the Fee Calculation[](#understanding-the-fee-calculation) ------------------------------------------------------------------------ The Priority Fee API calculates fees based on both global and local market conditions: priority_estimate(p: Percentile, accounts: Accounts) = max( percentile(txn_fees, p), percentile(account_fees(accounts), p) ) This calculation considers: * Global fee market: Percentile of fees paid across all transactions * Local fee market: Percentile of fees paid for transactions involving specific accounts * Lookback period: Last 150 slots by default By using Solana Tracker’s Priority Fee API, you can optimize your transaction fees and improve the likelihood of quick transaction processing on the Solana network. We have to thank Helius for coding the Priority Fee API and providing the code for free on [Github](https://github.com/helius-labs/atlas-priority-fee-estimator) , this API is hosted on our network of RPC’s. [Set Sell Slippage](/Discord-Trading-Bot/commands/set-sell-slippage "Set Sell Slippage") [Public Data API](/public-data-api "Public Data API") --- # GitHub [Public Data API](/public-data-api "Public Data API") Risk Risk Scores / Rugcheck API ========================== No social media[](#no-social-media) ------------------------------------ * **Description**: This token has no social media links * **Level**: Warning * **Score**: 2000 No file metadata[](#no-file-metadata) -------------------------------------- * **Description**: This token has no file metadata * **Level**: Warning * **Score**: 100 Pump.fun contracts can be changed at any time[](#pumpfun-contracts-can-be-changed-at-any-time) ----------------------------------------------------------------------------------------------- * **Description**: Pump.fun contracts can be changed by Pump.fun at any time * **Level**: Warning * **Score**: 10 Bonding curve not complete[](#bonding-curve-not-complete) ---------------------------------------------------------- * **Description**: No raydium liquidity pool, bonding curve not complete * **Level**: Warning * **Score**: 4000 Freeze Authority Enabled[](#freeze-authority-enabled) ------------------------------------------------------ * **Description**: Tokens can be frozen and prevented from trading in the future * **Level**: Danger * **Score**: 7500 Mint Authority Enabled[](#mint-authority-enabled) -------------------------------------------------- * **Description**: More tokens can be minted by the owner at any time * **Level**: Danger * **Score**: 2500 Transitioning from Pump.fun to Raydium[](#transitioning-from-pumpfun-to-raydium) --------------------------------------------------------------------------------- * **Description**: This token is currently transitioning to Raydium * **Level**: Warning * **Score**: 100 Rugged[](#rugged) ------------------ * **Description**: No liquidity, don’t buy this token * **Level**: Danger * **Score**: 20000 Low Liquidity (Very Low)[](#low-liquidity-very-low) ---------------------------------------------------- * **Description**: The total liquidity for this token is very low * **Level**: Danger * **Score**: 7500 Low Liquidity (Low)[](#low-liquidity-low) ------------------------------------------ * **Description**: The total liquidity for this token is low * **Level**: Warning * **Score**: 5000 Price Decrease[](#price-decrease) ---------------------------------- * **Description**: Price decreased by more than 50% in the last 24 hours * **Level**: Warning * **Score**: 1000 LP Burned[](#lp-burned) ------------------------ * **Description**: Allows the owner to remove liquidity at any time * **Level**: Danger * **Score**: 4000 Single Holder Ownership (>90%)[](#single-holder-ownership-90) -------------------------------------------------------------- * **Description**: One holder owns more than 90% of the total supply * **Level**: Danger * **Score**: 7000 Single Holder Ownership (>80%)[](#single-holder-ownership-80) -------------------------------------------------------------- * **Description**: One holder owns more than 80% of the total supply * **Level**: Danger * **Score**: 6000 Single Holder Ownership (>70%)[](#single-holder-ownership-70) -------------------------------------------------------------- * **Description**: One holder owns more than 70% of the total supply * **Level**: Danger * **Score**: 4600 Single Holder Ownership (>60%)[](#single-holder-ownership-60) -------------------------------------------------------------- * **Description**: One holder owns more than 60% of the total supply * **Level**: Danger * **Score**: 4400 Single Holder Ownership (>50%)[](#single-holder-ownership-50) -------------------------------------------------------------- * **Description**: One holder owns more than 50% of the total supply * **Level**: Danger * **Score**: 4300 Single Holder Ownership (>40%)[](#single-holder-ownership-40) -------------------------------------------------------------- * **Description**: One holder owns more than 40% of the total supply * **Level**: Danger * **Score**: 4100 Single Holder Ownership (>30%)[](#single-holder-ownership-30) -------------------------------------------------------------- * **Description**: One holder owns more than 30% of the total supply * **Level**: Danger * **Score**: 3500 Single Holder Ownership (>20%)[](#single-holder-ownership-20) -------------------------------------------------------------- * **Description**: One holder owns more than 20% of the total supply * **Level**: Danger * **Score**: 2500 Single Holder Ownership (>10%)[](#single-holder-ownership-10) -------------------------------------------------------------- * **Description**: One holder owns more than 10% of the total supply * **Level**: Danger * **Score**: 2000 Top 10 Holders[](#top-10-holders) ---------------------------------- * **Description**: Top 10 holders own more than 15% of the total supply * **Level**: Danger * **Score**: 5000 Note: The final risk score is normalized to a scale of 1 to 10, calculated based on the sum of individual risk scores (weights). More risk factors will be added soon. [Docs](/public-data-api/docs "Docs") [Websocket](/public-data-api/websocket "Websocket") --- # GitHub [Solana Rpc](/solana-rpc "Solana Rpc") Credits Credits and Rate Limits ======================= Credit Costs[](#credit-costs) ------------------------------ ### Default Cost[](#default-cost) * 1 credit per call ### Exceptions[](#exceptions) #### getProgramAccounts[](#getprogramaccounts) * 10 credits per call #### Archival Calls (10 credits each)[](#archival-calls-10-credits-each) The following methods are considered archival calls: * getTransaction * getBlock * getBlocks * getInflationReward * getConfirmedBlock * getConfirmedBlocks * getConfirmedTransaction * getConfirmedSignaturesForAddress2 * getConfirmedSignaturesForAddress * getSignaturesForAddress * getBlockTime #### Priority Fee API[](#priority-fee-api) * 1 credit per call #### DAS API Calls (10 credits each)[](#das-api-calls-10-credits-each) The following DAS API methods cost 10 credits per call: * getAsset * getAssetProof * getAssetsByOwner * getAssetsByAuthority * getAssetsByCreator * getAssetsByGroup * searchAssets * getSignaturesForAsset * getTokenAccounts * getNFTEditions Rate Limits by Plan[](#rate-limits-by-plan) -------------------------------------------- ### Free Plan[](#free-plan) * Credits: 500,000 * Requests per second: 10 * Send transaction per second: 1 * getProgramAccounts per second: 1 * DAS API requests per second: 2 * WebSocket connections: 2 ### Developer Plan[](#developer-plan) * Credits: 15,000,000 * Requests per second: 60 * Send transaction per second: 5 * getProgramAccounts per second: 15 * DAS API requests per second: 10 * WebSocket connections: 25 ### Business Plan[](#business-plan) * Credits: 100,000,000 * Requests per second: 225 * Send transaction per second: 50 * getProgramAccounts per second: 25 * DAS API requests per second: 50 * WebSocket connections: 100 ### Professional Plan[](#professional-plan) * Credits: 220,000,000 * Requests per second: 500 * Send transaction per second: 100 * getProgramAccounts per second: 50 * DAS API requests per second: 100 * WebSocket connections: 250 [Solana Rpc](/solana-rpc "Solana Rpc") [Swap API](/swap-api "Swap API") --- # GitHub [Public Data API](/public-data-api "Public Data API") Docs Solana Tracker Public API ========================= Public API for Solana Tracker data. Token and pool data for all Pumpfun, Raydium, Meteora, Raydium CPMM, Raydium CLMM Moonshot and Orca tokens. Including Market Cap, Price, Liquidity, Chart data, price changes, stats, wallet trades and total value, last trades and more You can now buy and manage your package directly on Solana Tracker. [Websocket Documentation](/public-data-api/websocket) Authentication[](#authentication) ---------------------------------- Solana Tracker: Include your API Key (available after subscription) in the “x-api-key” header with each API call. Base url: [https://data.solanatracker.io](https://data.solanatracker.io) Subscription Plans and Limits[](#subscription-plans-and-limits) ---------------------------------------------------------------- | Plan | Price | Requests/Month | Rate Limit | Additional Features | | --- | --- | --- | --- | --- | | [Free](https://www.solanatracker.io/account/data-api) | Free | 10,000 | 1/second | \- | | [Starter](https://www.solanatracker.io/account/data-api) | €14.99/month | 50,000 | None | \- | | [Advanced](https://www.solanatracker.io/account/data-api) | €50/month | 200,000 | None | \- | | [Pro](https://www.solanatracker.io/account/data-api) | €200/month | 1,000,000 | None | \- | | [Premium](https://www.solanatracker.io/account/data-api) | €397/month | 10,000,000 | None | Websocket access | | [Business](https://www.solanatracker.io/account/data-api) | €599/month | 25,000,000 | None | Websocket access | | [Enterprise](https://www.solanatracker.io/account/data-api) | €1499/month | 100,000,000 | None | Websocket access | | [Enterprise Plus](/cdn-cgi/l/email-protection#e4818a90819694968d9781a4978b88858a85909685878f8196ca8d8b) | Custom | Unlimited | None | Custom package | Looking to try out the websocket or have questions about the packages before buying? Email: [\[email protected\]](/cdn-cgi/l/email-protection#e2818d8c96838196a2918d8e838c8396908381898790cc8b8d) for more information. Endpoints[](#endpoints) ------------------------ ### Token Information[](#token-information) #### GET /tokens/`{tokenAddress}`[](#get-tokenstokenaddress) Retrieve all information for a specific token. **Response:** { "token": { "name": "Token Name", "symbol": "SYMBOL", "mint": "TokenAddress", "uri": "URI", "decimals": 9, "image": "ImageURL", "description": "Token description", "extensions": { "twitter": "TwitterURL", "telegram": "TelegramURL" }, "tags": ["Tag1", "Tag2"], "creator": { "name": "Creator Name", "site": "CreatorWebsite" }, "hasFileMetaData": true }, "pools": [\ {\ "liquidity": {\ "quote": 69528.489316466,\ "usd": 12452942.564826211\ },\ "price": {\ "quote": 1,\ "usd": 179.17998615931597\ },\ "tokenSupply": 3030626199.347329,\ "lpBurn": 0,\ "tokenAddress": "So11111111111111111111111111111111111111112",\ "marketCap": {\ "quote": 16927915.73839435,\ "usd": 3031884692.2295995\ },\ "market": "orca",\ "quoteToken": "So11111111111111111111111111111111111111112",\ "decimals": 6,\ "security": {\ "freezeAuthority": "7dGbd2QZcCKcTndnHcTL8q7SMVXAkp688NTQYwrRCrar",\ "mintAuthority": "BJE5MMbqXjVwjAF7oxwPYXnTXDyspzZyt4vwenNw5ruG"\ },\ "lastUpdated": 1730206992965,\ "createdAt": 1721811041043,\ "poolId": "Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE"\ }\ ], "events": { "1m": { "priceChangePercentage": -0.02395367583072253 }, "5m": { "priceChangePercentage": -0.139517803539473 }, "15m": { "priceChangePercentage": -0.13743076152318937 }, "30m": { "priceChangePercentage": -0.3174663455055821 }, "1h": { "priceChangePercentage": -0.7950502487407005 }, "2h": { "priceChangePercentage": -0.976698965183501 }, "3h": { "priceChangePercentage": -0.9908067493344578 }, "4h": { "priceChangePercentage": -0.9937799084527167 }, "5h": { "priceChangePercentage": -0.509505344816874 }, "6h": { "priceChangePercentage": -0.4934817877466533 }, "12h": { "priceChangePercentage": 0.411093000902713 }, "24h": { "priceChangePercentage": 0.9930426419943744 } }, "risk": { "rugged": false, "risks": [\ {\ "name": "No social media",\ "description": "This token has no social media links",\ "level": "warning",\ "score": 2000\ }\ ], "score": 2 }, "buys": 0, "sells": 0, "txns": 0, "holders": 670804 } #### GET /tokens/by-pool/`{poolAddress}`[](#get-tokensby-poolpooladdress) Retrieve all information for a specific token by searching by pool address **Response:** { "token": { "name": "Token Name", "symbol": "SYMBOL", "mint": "TokenAddress", "uri": "URI", "decimals": 9, "image": "ImageURL", "description": "Token description", "extensions": { "twitter": "TwitterURL", "telegram": "TelegramURL" }, "tags": ["Tag1", "Tag2"], "creator": { "name": "Creator Name", "site": "CreatorWebsite" }, "hasFileMetaData": true }, "pools": [\ {\ "liquidity": {\ "quote": 69528.489316466,\ "usd": 12452942.564826211\ },\ "price": {\ "quote": 1,\ "usd": 179.17998615931597\ },\ "tokenSupply": 3030626199.347329,\ "lpBurn": 0,\ "tokenAddress": "So11111111111111111111111111111111111111112",\ "marketCap": {\ "quote": 16927915.73839435,\ "usd": 3031884692.2295995\ },\ "market": "orca",\ "quoteToken": "So11111111111111111111111111111111111111112",\ "decimals": 6,\ "security": {\ "freezeAuthority": "7dGbd2QZcCKcTndnHcTL8q7SMVXAkp688NTQYwrRCrar",\ "mintAuthority": "BJE5MMbqXjVwjAF7oxwPYXnTXDyspzZyt4vwenNw5ruG"\ },\ "lastUpdated": 1730206992965,\ "createdAt": 1721811041043,\ "poolId": "Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE"\ }\ ], "events": { "1m": { "priceChangePercentage": -0.02395367583072253 }, "5m": { "priceChangePercentage": -0.139517803539473 }, "15m": { "priceChangePercentage": -0.13743076152318937 }, "30m": { "priceChangePercentage": -0.3174663455055821 }, "1h": { "priceChangePercentage": -0.7950502487407005 }, "2h": { "priceChangePercentage": -0.976698965183501 }, "3h": { "priceChangePercentage": -0.9908067493344578 }, "4h": { "priceChangePercentage": -0.9937799084527167 }, "5h": { "priceChangePercentage": -0.509505344816874 }, "6h": { "priceChangePercentage": -0.4934817877466533 }, "12h": { "priceChangePercentage": 0.411093000902713 }, "24h": { "priceChangePercentage": 0.9930426419943744 } }, "risk": { "rugged": false, "risks": [\ {\ "name": "No social media",\ "description": "This token has no social media links",\ "level": "warning",\ "score": 2000\ }\ ], "score": 2 }, "buys": 0, "sells": 0, "txns": 0 } #### GET /tokens/`{tokenAddress}`/holders[](#get-tokenstokenaddressholders) Get the top 100 holders for a specific token. **Response:** { "total": 1976, "accounts": [\ {\ "wallet": "WalletAddress",\ "amount": 29762511.787972,\ "value": {\ "quote": 731.5710758766651,\ "usd": 106189.02499701138\ },\ "percentage": 2.9762545119795907\ },\ ...\ ] } #### GET /tokens/`${tokenAddress}`/holders/top[](#get-tokenstokenaddressholderstop) Get the top 20 holders for a token, recommended over the /holders endpoint. **Response:** [\ {\ "address": "FwbBBzAfBgGaAWjEG4nprZQ8mp8w2W3eHLxAWbyUnwXR",\ "amount": 114837224.78981262,\ "percentage": 12.897608531935292,\ "value": {\ "quote": 364.490083024,\ "usd": 80016.91106116588\ }\ },\ {\ "address": "Cst5bqk7QJAj1tR7qH9eiYnT7ygDEashKYTFvV1obRGK",\ "amount": 27748733.327190395,\ "percentage": 3.116518187950125,\ "value": {\ "quote": 88.07368980529128,\ "usd": 19334.914534601114\ }\ }\ ] Do you want to receive all token holders? Use this example using your RPC. const tokenAccounts = await connection.getParsedProgramAccounts( new PublicKey("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"), { filters: [{ dataSize: 165 }, { memcmp: { offset: 0, bytes: mintAddress } }], } ); const accounts = tokenAccounts.map((account) => ({ wallet: account.account.data.parsed.info.owner, amount: account.account.data.parsed.info.tokenAmount.uiAmount, })); #### GET /tokens/`{tokenAddress}/ath`[](#get-tokenstokenaddressath) Retrieve the all time high price of a token (since data api started recording) **Response:** { "highest_price": 0.002399892080590551, "timestamp: 171924662484 } #### GET /deployer/`{wallet}`[](#get-deployerwallet) Retrieve all tokens created by wallet **Response:** { "total": 2, "tokens": [\ {\ "name": "damn.",\ "symbol": "damn.",\ "mint": "H3SmThjjdhXGM5YQ7W1bhavwBkGXhtTJaEa7GaWNpump",\ "image": "H3SmThjjdhXGM5YQ7W1bhavwBkGXhtTJaEa7GaWNpump",\ "decimals": 6,\ "hasSocials": false,\ "poolAddress": "H3SmThjjdhXGM5YQ7W1bhavwBkGXhtTJaEa7GaWNpump",\ "liquidityUsd": 11940.760420425438,\ "marketCapUsd": 5598.570785740448,\ "priceUsd": 0.000005598570785740448,\ "lpBurn": 100,\ "market": "pumpfun",\ "freezeAuthority": null,\ "mintAuthority": null,\ "createdAt": 1739200226964,\ "lastUpdated": 1739315923234,\ "buys": 0,\ "sells": 0,\ "totalTransactions": 0\ },\ {\ "name": "1st African that actually held",\ "symbol": "FAUSTIN",\ "mint": "8tZVpbPZfrjT872onDwPbsqCCge6ujyZ7k1rCKXGpump",\ "image": "8tZVpbPZfrjT872onDwPbsqCCge6ujyZ7k1rCKXGpump",\ "decimals": 6,\ "hasSocials": true,\ "poolAddress": "8tZVpbPZfrjT872onDwPbsqCCge6ujyZ7k1rCKXGpump",\ "liquidityUsd": 12208.031688779925,\ "marketCapUsd": 5688.7379724044395,\ "priceUsd": 0.000005688737972404439,\ "lpBurn": 100,\ "market": "pumpfun",\ "freezeAuthority": null,\ "mintAuthority": null,\ "createdAt": 1739200032602,\ "lastUpdated": 1739203753916,\ "buys": 0,\ "sells": 9,\ "totalTransactions": 9\ }\ ] } #### GET /search[](#get-search) The `/search` endpoint provides a flexible search interface for pools and tokens with support for multiple filtering criteria and pagination. * **Method**: GET * **Path**: `/search` ##### Query Parameters[](#query-parameters) ###### Search & Pagination[](#search--pagination) | Parameter | Type | Default | Description | | --- | --- | --- | --- | | `query` | string | required | Search term for token symbol, name, or address | | `page` | integer | 1 | Page number for pagination | | `limit` | integer | 100 | Number of results per page | | `sortBy` | string | createdAt | Field to sort by | | `sortOrder` | string | desc | Sort order: asc (ascending) or desc (descending) | | `showAllPools` | string | false | Return all pools for a token in a response if enabled | ###### Creation filters[](#creation-filters) | Parameter | Type | Description | | --- | --- | --- | | `minCreatedAt` | integer | Minimum creation date in unix time in ms | | `maxCreatedAt` | integer | Maximum creation date in unix time in ms | ###### Liquidity & Market Cap Filters[](#liquidity--market-cap-filters) | Parameter | Type | Description | | --- | --- | --- | | `minLiquidity` | float | Minimum liquidity in USD | | `maxLiquidity` | float | Maximum liquidity in USD | | `minMarketCap` | float | Minimum market cap in USD | | `maxMarketCap` | float | Maximum market cap in USD | ###### Volume Filters[](#volume-filters) | Parameter | Type | Description | | --- | --- | --- | | `minVolume` | float | Minimum volume in USD (for default timeframe) | | `maxVolume` | float | Maximum volume in USD (for default timeframe) | | `volumeTimeframe` | string | Timeframe for volume filtering (e.g., ‘24h’) | ###### Timeframe-Specific Volume Filters[](#timeframe-specific-volume-filters) | Parameter | Type | Description | | --- | --- | --- | | `minVolume_5m` | float | Minimum volume in USD for 5-minute timeframe | | `maxVolume_5m` | float | Maximum volume in USD for 5-minute timeframe | | `minVolume_15m` | float | Minimum volume in USD for 15-minute timeframe | | `maxVolume_15m` | float | Maximum volume in USD for 15-minute timeframe | | `minVolume_30m` | float | Minimum volume in USD for 30-minute timeframe | | `maxVolume_30m` | float | Maximum volume in USD for 30-minute timeframe | | `minVolume_1h` | float | Minimum volume in USD for 1-hour timeframe | | `maxVolume_1h` | float | Maximum volume in USD for 1-hour timeframe | | `minVolume_6h` | float | Minimum volume in USD for 6-hour timeframe | | `maxVolume_6h` | float | Maximum volume in USD for 6-hour timeframe | | `minVolume_12h` | float | Minimum volume in USD for 12-hour timeframe | | `maxVolume_12h` | float | Maximum volume in USD for 12-hour timeframe | | `minVolume_24h` | float | Minimum volume in USD for 24-hour timeframe | | `maxVolume_24h` | float | Maximum volume in USD for 24-hour timeframe | ###### Transaction Filters[](#transaction-filters) | Parameter | Type | Description | | --- | --- | --- | | `minBuys` | integer | Minimum number of buy transactions | | `maxBuys` | integer | Maximum number of buy transactions | | `minSells` | integer | Minimum number of sell transactions | | `maxSells` | integer | Maximum number of sell transactions | | `minTotalTransactions` | integer | Minimum total number of transactions | | `maxTotalTransactions` | integer | Maximum total number of transactions | ###### Token Characteristics[](#token-characteristics) | Parameter | Type | Description | | --- | --- | --- | | `lpBurn` | integer | LP token burn percentage | | `market` | string | Market identifier | | `freezeAuthority` | string | Freeze authority address | | `mintAuthority` | string | Mint authority address | | `deployer` | string | Deployer address | | `status` | string | Token status | ###### Additional Options[](#additional-options) | Parameter | Type | Description | | --- | --- | --- | | `showPriceChanges` | boolean | Include price change data in response | ###### Response Format[](#response-format) { "status": "success", "data": [\ {\ "id": "EHHaCsCoXb2BFGbzfANpS1VXQ7GXnQXbzxuwxyZUpump_EHHaCsCoXb2BFGbzfANpS1VXQ7GXnQXbzxuwxyZUpump",\ "name": "Rana CHAN",\ "symbol": "Rana",\ "mint": "EHHaCsCoXb2BFGbzfANpS1VXQ7GXnQXbzxuwxyZUpump",\ "image": "https://image.solanatracker.io/proxy?url=https%3A%2F%2Fipfs.io%2Fipfs%2FQmU69YQnurKMELNaBosGiK1HvWRDbfy5SeVoe1mpT5rWXA",\ "decimals": 6,\ "quoteToken": "So11111111111111111111111111111111111111112",\ "hasSocials": true,\ "poolAddress": "EHHaCsCoXb2BFGbzfANpS1VXQ7GXnQXbzxuwxyZUpump",\ "liquidityUsd": 41955.42330534584,\ "marketCapUsd": 74947.16560440486,\ "lpBurn": 100,\ "market": "pumpfun",\ "freezeAuthority": null,\ "mintAuthority": null,\ "deployer": "AbxWePY9XW9MxLbYmdAStiDhoyxZfD3cKG8Rv4NLf1X5",\ "createdAt": 1730173895419,\ "status": "graduating",\ "lastUpdated": 1730175342540,\ "buys": 402,\ "sells": 243,\ "totalTransactions": 645,\ "volume": 25000.50,\ "volume_5m": 500.25,\ "volume_15m": 1500.75,\ "volume_30m": 2800.00,\ "volume_1h": 5600.30,\ "volume_6h": 12500.45,\ "volume_12h": 18750.60,\ "volume_24h": 25000.50\ }\ ], "total": 1, "pages": 1, "page": 1 } #### GET /tokens/latest[](#get-tokenslatest) Retrieve the latest 100 tokens. **Query Parameters:** * `page` (optional): Page number (1-10) **Response:** [\ {\ "token": {\ "name": "Jupiter Perps LP",\ "symbol": "JLP",\ "mint": "27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4",\ "uri": "https://static.jup.ag/jlp/metadata.json",\ "decimals": 6,\ "image": "https://image.solanatracker.io/proxy?url=https%3A%2F%2Fstatic.jup.ag%2Fjlp%2Ficon.png",\ "description": "JLP is the liquidity provider token for Jupiter Labs Perpetual.",\ "hasFileMetaData": true\ },\ "pools": [...],\ "events": {...},\ "risk": {...}\ },\ ...\ ] #### POST /tokens/multi[](#post-tokensmulti) Accepts an array of token addresses in the request body. Up to 20 per request. **Request Body:** { "tokens": [\ "So11111111111111111111111111111111111111112",\ "4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R"\ ] } **Response:** {"tokens": { "27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4": { "token": { "name": "Jupiter Perps LP", "symbol": "JLP", "mint": "27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4", "uri": "https://static.jup.ag/jlp/metadata.json", "decimals": 6, "image": "https://image.solanatracker.io/proxy?url=https%3A%2F%2Fstatic.jup.ag%2Fjlp%2Ficon.png", "description": "JLP is the liquidity provider token for Jupiter Labs Perpetual.", "hasFileMetaData": true }, "pools": [...], "events": {...}, "risk": {...} } } } #### GET /tokens/trending[](#get-tokenstrending) Get the top 100 trending tokens based on transaction volume in the past hour. **Response:** [\ {\ "token": {\ "name": "Jupiter Perps LP",\ "symbol": "JLP",\ "mint": "27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4",\ "uri": "https://static.jup.ag/jlp/metadata.json",\ "decimals": 6,\ "image": "https://image.solanatracker.io/proxy?url=https%3A%2F%2Fstatic.jup.ag%2Fjlp%2Ficon.png",\ "description": "JLP is the liquidity provider token for Jupiter Labs Perpetual.",\ "hasFileMetaData": true\ },\ "pools": [...],\ "events": {...},\ "risk": {...}\ },\ ...\ ] #### GET /tokens/trending/:timeframe[](#get-tokenstrendingtimeframe) GET /tokens/trending/:timeframe Returns trending tokens for a specific time interval. ##### Available Timeframes[](#available-timeframes) * `5m`: 5 minutes * `15m`: 15 minutes * `30m`: 30 minutes * `1h`: 1 hour * `2h`: 2 hours * `3h`: 3 hours * `4h`: 4 hours * `5h`: 5 hours * `6h`: 6 hours * `12h`: 12 hours * `24h`: 24 hours ##### Response Format[](#response-format-1) [\ {\ "token": {\ "name": "Jupiter Perps LP",\ "symbol": "JLP",\ "mint": "27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4",\ "uri": "https://static.jup.ag/jlp/metadata.json",\ "decimals": 6,\ "image": "https://image.solanatracker.io/proxy?url=https%3A%2F%2Fstatic.jup.ag%2Fjlp%2Ficon.png",\ "description": "JLP is the liquidity provider token for Jupiter Labs Perpetual.",\ "hasFileMetaData": true\ },\ "pools": [...],\ "events": {...},\ "risk": {...}\ },\ ...\ ] ##### Examples[](#examples) Get trending tokens for the last hour (default): GET /tokens/trending Get trending tokens for the last 15 minutes: GET /tokens/trending/15m Get trending tokens for the last 24 hours: GET /tokens/trending/24h #### GET /tokens/volume[](#get-tokensvolume) Retrieve the top 100 tokens sorted by highest volume. **Response:** [\ {\ "token": {\ "name": "Jupiter Perps LP",\ "symbol": "JLP",\ "mint": "27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4",\ "uri": "https://static.jup.ag/jlp/metadata.json",\ "decimals": 6,\ "image": "https://image.solanatracker.io/proxy?url=https%3A%2F%2Fstatic.jup.ag%2Fjlp%2Ficon.png",\ "description": "JLP is the liquidity provider token for Jupiter Labs Perpetual.",\ "hasFileMetaData": true\ },\ "pools": [...],\ "events": {...},\ "risk": {...}\ },\ ...\ ] #### GET /tokens/volume/:timeframe[](#get-tokensvolumetimeframe) GET /tokens/volume/:timeframe Returns trending tokens for a specific time interval. ##### Available Timeframes[](#available-timeframes-1) * `5m`: 5 minutes * `15m`: 15 minutes * `30m`: 30 minutes * `1h`: 1 hour * `6h`: 6 hours * `12h`: 12 hours * `24h`: 24 hours ##### Response Format[](#response-format-2) [\ {\ "token": {\ "name": "Jupiter Perps LP",\ "symbol": "JLP",\ "mint": "27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4",\ "uri": "https://static.jup.ag/jlp/metadata.json",\ "decimals": 6,\ "image": "https://image.solanatracker.io/proxy?url=https%3A%2F%2Fstatic.jup.ag%2Fjlp%2Ficon.png",\ "description": "JLP is the liquidity provider token for Jupiter Labs Perpetual.",\ "hasFileMetaData": true\ },\ "pools": [...],\ "events": {...},\ "risk": {...}\ },\ ...\ ] #### GET /tokens/multi/all[](#get-tokensmultiall) Get an overview of latest, graduating, and graduated tokens (Pumpvision / Photon Memescope style). **Response:** { "latest": [...], "graduating": [...], "graduated": [...] } #### GET /tokens/multi/graduated[](#get-tokensmultigraduated) Overview of all graduated pumpfun/moonshot tokens (Pumpvision / Photon Memescope style). **Response:** [{\ "token": {...},\ "pools": {...},\ "events": {...},\ }] ### Price Information[](#price-information) #### GET /price[](#get-price) Get price information for a single token. **Query Parameters:** * `token` (required): The token address * `priceChanges` (optional): Returns price change percentages for the token up to 24 hours ago **Response:** { "price": 1.23, "liquidity": 1000000, "marketCap": 50000000, "lastUpdated": 1628097600000 } #### GET /price/history[](#get-pricehistory) Get historic price information for a single token. **Query Parameters:** * `token` (required): The token address **Response:** { "current": 0.00153420295896641, "3d": 0.0003172284163334442, "5d": 0.00030182128340039925, "7d": 0.0003772164702056164, "14d": 0.0003333105740474755, "30d": 0.0008621030248959815 } #### GET /price/history/timestamp[](#get-pricehistorytimestamp) Get specific historic price information for a token at a given timestamp. **Query Parameters:** * `token` (required): The token address * `timestamp` (required): The target timestamp (unix timestamp) **Response:** { "price": 0.0010027648651222173, "timestamp": 1732237829688, "timestamp_unix": 1732237830, "pool": "D5Nbd1N7zAu8zjKoz3yR9WSXTiZr1c1TwRtiHeu5j7iv" } **Response Fields:** * `price`: The token price at the specified timestamp * `timestamp`: Millisecond timestamp of the price data * `timestamp_unix`: Unix timestamp in seconds * `pool`: The liquidity pool address associated with this price data **Example Request:** GET /price/history/timestamp?token=ASNoTS4cYopuUbmDMWM4AU9xdCQnb5zPe3gBWfTUsLTE×tamp=1732238022 #### POST /price[](#post-price) Similar to GET /price, but accepts token address in the request body. **Request Body:** { "token": "So11111111111111111111111111111111111111112" } **Response:** Same as GET /price #### GET /price/multi[](#get-pricemulti) Get price information for multiple tokens (up to 100). **Query Parameters:** * `tokens` (required): Comma-separated list of token addresses * `priceChanges` (optional): Returns price change percentages for the tokens up to 24 hours ago **Response:** { "So11111111111111111111111111111111111111112": { "price": 1.23, "liquidity": 1000000, "marketCap": 50000000, "lastUpdated": 1628097600000 }, "4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R": { "price": 0.45, "liquidity": 500000, "marketCap": 25000000, "lastUpdated": 1628097600000 } } #### POST /price/multi[](#post-pricemulti) Similar to GET /price/multi, but accepts an array of token addresses in the request body. **Request Body:** { "tokens": [\ "So11111111111111111111111111111111111111112",\ "4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R"\ ] } **Response:** Same as GET /price/multi ### Wallet Information[](#wallet-information) #### GET /wallet/`{owner}`[](#get-walletowner) Get all tokens in a wallet with current value in USD. **Response:** { "tokens": [\ {\ "token": {\ "name": "Wrapped SOL",\ "symbol": "SOL",\ "mint": "So11111111111111111111111111111111111111112",\ "uri": "",\ "decimals": 9,\ "image": "https://image.solanatracker.io/proxy?url=https%3A%2F%2Fcoin-images.coingecko.com%2Fcoins%2Fimages%2F21629%2Flarge%2Fsolana.jpg%3F1696520989",\ "hasFileMetaData": true\ },\ "pools": [...],\ "events": {...},\ "risk": {...},\ "balance": 0.775167121,\ "value": 112.31297732160377\ }\ ], "total": 228.41656975961473, "totalSol": 1.5750283296373857, "timestamp": "2024-08-15 12:49:06" } #### GET /wallet/`{owner}`/basic[](#get-walletownerbasic) Get all tokens in a wallet with current value in USD, more lightweight and faster non cached option. (beta) **Response:** { "tokens": [\ {\ "address": "9BT13kNGQFKvSj2BibHPKmpxxSnqMFUEEZEMQ5SNpump",\ "balance": 35145.6526,\ "value": 0.10688973368757697,\ "price": {\ "usd": 0.0000030413358631894336,\ "quote": 1.6874628599175107e-8\ },\ "marketCap": {\ "usd": 3039.7142413463316,\ "quote": 16.8656311495143\ },\ "liquidity": {\ "usd": 6006.944420295068,\ "quote": 33.329089804\ }\ }\ ], "total": 0.10688973368757697, "totalSol": 0.0006299653164349511 } #### GET /wallet/`{owner}`/page/`{page}`[](#get-walletownerpagepage) Retrieve wallet tokens using pagination with a limit of 250 tokens per request. This optimized endpoint reduces data transfer overhead and server memory usage by avoiding the need to cache complete token lists for large wallets. Instead, tokens are fetched in smaller, manageable batches. **Response:** { "tokens": [\ {\ "token": {\ "name": "Wrapped SOL",\ "symbol": "SOL",\ "mint": "So11111111111111111111111111111111111111112",\ "uri": "",\ "decimals": 9,\ "image": "https://image.solanatracker.io/proxy?url=https%3A%2F%2Fcoin-images.coingecko.com%2Fcoins%2Fimages%2F21629%2Flarge%2Fsolana.jpg%3F1696520989",\ "hasFileMetaData": true\ },\ "pools": [...],\ "events": {...},\ "risk": {...},\ "balance": 0.775167121,\ "value": 112.31297732160377\ }\ ], "total": 228.41656975961473, "totalSol": 1.5750283296373857, "timestamp": "2024-08-15 12:49:06" } #### GET /wallet/`{owner}`/trades[](#get-walletownertrades) Get the latest trades of a wallet. **Query Parameters:** * `cursor` (optional): Cursor for pagination **Response:** { "trades": [\ {\ "tx": "Transaction Signature here",\ "from": {\ "address": "So11111111111111111111111111111111111111112",\ "amount": 0.00009999999747378752,\ "token": {\ "name": "Wrapped SOL",\ "symbol": "SOL",\ "image": "https://image.solanatracker.io/proxy?url=https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/So11111111111111111111111111111111111111112/logo.png",\ "decimals": 9\ }\ },\ "to": {\ "address": "4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R",\ "amount": 0.00815899996086955,\ "token": {\ "name": "Raydium",\ "symbol": "RAY",\ "image": "https://image.solanatracker.io/proxy?url=https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R/logo.png",\ "decimals": 6\ }\ },\ "price": {\ "usd": 1.7136074522202307,\ "sol": ""\ },\ "volume": {\ "usd": 0.014018403988365319,\ "sol": 0.00009999999747378752\ },\ "wallet": "WALLET_ADDRESS",\ "program": "raydium",\ "time": 1722759119596\ }\ ], "nextCursor": 1722759119596, "hasNextPage": true } ### Trade Information[](#trade-information) #### GET /trades/`{tokenAddress}`[](#get-tradestokenaddress) Get the latest trades for a token across all pools. #### GET /trades/`{tokenAddress}`/`{poolAddress}`[](#get-tradestokenaddresspooladdress) Get the latest trades for a specific token and pool pair. #### GET /trades/`{tokenAddress}`/`{poolAddress}`/`{owner}`[](#get-tradestokenaddresspooladdressowner) Get the latest trades for a specific token, pool, and wallet address. #### GET /trades/`{tokenAddress}`/by-wallet/`{owner}`[](#get-tradestokenaddressby-walletowner) Get the latest trades for a specific token and wallet address. **Query Parameters for all trade endpoints:** * `cursor` (optional): Cursor for pagination * `showMeta` (optional): Set to ‘true’ to add metadata for from and to tokens * `parseJupiter` (optional): Set to ‘true’ to combine all transfers within a Jupiter swap into a single transaction. By default, each transfer is shown separately. * `hideArb` (optional): Set to ‘true’ to hide arbitrage or other transactions that don’t have both the ‘from’ and ‘to’ token addresses matching the token parameter. **Response for all trade endpoints:** { "trades": [\ {\ "tx": "Transaction Signature",\ "amount": 1000,\ "priceUsd": 0.1,\ "volume": 100,\ "type": "buy",\ "wallet": "WalletAddress",\ "time": 1723726185254,\ "program": "jupiter"\ }\ ], "nextCursor": 1723726185254, "hasNextPage": true } ### Chart Data[](#chart-data) #### GET /chart/`{token}`[](#get-charttoken) #### GET /chart/`{token}`/`{pool}`[](#get-charttokenpool) Get OLCVH (Open, Low, Close, Volume, High) data for charts. #### Available Intervals[](#available-intervals) | Shorthand | Interval | | --- | --- | | 1s | 1 SECOND | | 5s | 5 SECOND | | 15s | 15 SECOND | | 1m | 1 MINUTE | | 3m | 3 MINUTE | | 5m | 5 MINUTE | | 15m | 15 MINUTE | | 30m | 30 MINUTE | | 1h | 1 HOUR | | 2h | 2 HOUR | | 4h | 4 HOUR | | 6h | 6 HOUR | | 8h | 8 HOUR | | 12h | 12 HOUR | | 1d | 1 DAY | | 3d | 3 DAY | | 1w | 1 WEEK | | 1mn | 1 MONTH | Note: The shorthand “1mn” is used for 1 month to avoid confusion with “1m” (1 minute). **Query Parameters:** * `type` (optional): Time interval (e.g., “1s”, “1m”, “1h”, “1d”) * `time_from` (optional): Start time (Unix timestamp in seconds) * `time_to` (optional): End time (Unix timestamp in seconds) * `marketCap` (optional): Return chart for market cap instead of pricing * `removeOutliers` (optional): Set to false to disable outlier removal, true by default. **Response:** { "oclhv": [\ {\ "open": 0.011223689525154462,\ "close": 0.011223689525154462,\ "low": 0.011223689525154462,\ "high": 0.011223689525154462,\ "volume": 683.184501136,\ "time": 1722514489\ },\ {\ "open": 0.011223689525154462,\ "close": 0.011257053686384555,\ "low": 0.011257053686384555,\ "high": 0.011257053686384555,\ "volume": 12788.70421942799,\ "time": 1722514771\ }\ ] } ### Profit and Loss (PnL) Data[](#profit-and-loss-pnl-data) #### GET /pnl/`{wallet}`[](#get-pnlwallet) Get Profit and Loss data for all positions of a wallet. **Query Parameters:** * `showHistoricPnL` (optional): Adds PnL data for 1d, 7d and 30d intervals (BETA) * `holdingCheck` (optional): Does an extra check to check current holding value in wallet (increases response time) * `hideDetails` (optional): Return only summary for the pnl without seperate data for every token.x **Response:** { "tokens": { "85tgA28eJCUwpTGkREdocDtkHCgZZySyrdv35w6opump": { "holding": 34909.416624, "held": 402288.62697, "sold": 367379.210346, "realized": 48.24649003, "unrealized": 4665.26723313, "total": 4713.51372317, "total_sold": 1195.95048046, "total_invested": 1256.76208526, "average_buy_amount": 38.08369955, "current_value": 4774.3253279697965, "cost_basis": 0.00312403 }, "Fwjk3SQ4zpg68x9mQLKJm5W6DkisjFGn76jHvi7vb4wE": { "holding": 34909.416624, "held": 402288.62697, "sold": 367379.210346, "realized": 48.24649003, "unrealized": 4665.26723313, "total": 4713.51372317, "total_sold": 1195.95048046, "total_invested": 1256.76208526, "average_buy_amount": 38.08369955, "current_value": 4774.3253279697965, "cost_basis": 0.00312403 } }, "summary": { "realized": 2418.42956164, "unrealized": -634.74038817, "total": 1783.68917347, "totalInvested": 103020.70911717, "averageBuyAmount": 1535.12073025, "totalWins": 222, "totalLosses": 295, "winPercentage": 34.8, "lossPercentage": 46.24 } } ### Chart Data[](#chart-data-1) #### GET /chart/`{token}`[](#get-charttoken-1) #### GET /chart/`{token}`/`{pool}`[](#get-charttokenpool-1) Get OLCVH (Open, Low, Close, Volume, High) data for charts. #### Available Intervals[](#available-intervals-1) | Shorthand | Interval | | --- | --- | | 1s | 1 SECOND | | 5s | 5 SECOND | | 15s | 15 SECOND | | 1m | 1 MINUTE | | 3m | 3 MINUTE | | 5m | 5 MINUTE | | 15m | 15 MINUTE | | 30m | 30 MINUTE | | 1h | 1 HOUR | | 2h | 2 HOUR | | 4h | 4 HOUR | | 6h | 6 HOUR | | 8h | 8 HOUR | | 12h | 12 HOUR | | 1d | 1 DAY | | 3d | 3 DAY | | 1w | 1 WEEK | | 1mn | 1 MONTH | Note: The shorthand “1mn” is used for 1 month to avoid confusion with “1m” (1 minute). **Query Parameters:** * `type` (optional): Time interval (e.g., “1s”, “1m”, “1h”, “1d”) * `time_from` (optional): Start time (Unix timestamp in seconds) * `time_to` (optional): End time (Unix timestamp in seconds) * `marketCap` (optional): Return chart for market cap instead of pricing * `removeOutliers` (optional): Set to false to disable outlier removal, true by default. **Response:** { "oclhv": [\ {\ "open": 0.011223689525154462,\ "close": 0.011223689525154462,\ "low": 0.011223689525154462,\ "high": 0.011223689525154462,\ "volume": 683.184501136,\ "time": 1722514489\ },\ {\ "open": 0.011223689525154462,\ "close": 0.011257053686384555,\ "low": 0.011257053686384555,\ "high": 0.011257053686384555,\ "volume": 12788.70421942799,\ "time": 1722514771\ }\ ] } ### Holders Chart Data[](#holders-chart-data) #### GET /holders/chart/`{token}`[](#get-holderscharttoken) Get token holder count data over time. Returns up to 1000 of the most recent data points. #### Available Intervals[](#available-intervals-2) All the same intervals available for price charts are supported: | Shorthand | Interval | | --- | --- | | 1s | 1 SECOND | | 5s | 5 SECOND | | … | … | | 1d | 1 DAY | | 1w | 1 WEEK | | 1mn | 1 MONTH | **Query Parameters:** * `type` (optional): Time interval (e.g., “1s”, “1m”, “1h”, “1d”), defaults to “1d” * `time_from` (optional): Start time (Unix timestamp in seconds) * `time_to` (optional): End time (Unix timestamp in seconds) **Response:** { "holders": [\ {\ "holders": 1235,\ "time": 1722414489\ },\ {\ "holders": 1242,\ "time": 1722514771\ }\ ] } The response includes an array of data points, each containing: * `holders`: Number of token holders at that point in time * `time`: Unix timestamp in seconds #### GET /first-buyers/`{token}`[](#get-first-buyerstoken) Retrieve the first 100 buyers of a token (since API started recording data) with Profit and Loss data for each wallet. **Response:** [\ {\ "wallet": "pumpZuAcJZwUwNmP84KZDNUMVYvCYdwSiUhYjyAhm7v",\ "first_buy_time": 1721518521841,\ "last_transaction_time": 1721519113069,\ "held": 289393486.26179785,\ "sold": 289393486.26179785,\ "holding": 0,\ "realized": 997.3821375,\ "unrealized": 0,\ "total": 997.3821375,\ "total_invested": 1425.80360732\ },\ {\ "wallet": "9345npSvXdmiD7SszgLuWvPAJ8edUR1F4bnNS5dUiFmU",\ "first_buy_time": 1721518521860,\ "last_transaction_time": 1721518582164,\ "held": 138858105.00812,\ "sold": 138858105.00812,\ "holding": 0,\ "realized": 984.56781931,\ "unrealized": 0,\ "total": 984.56781931,\ "total_invested": 967.85402712\ }\ ] #### GET /pnl/`{wallet}`/`{token}`[](#get-pnlwallettoken) Get Profit and Loss data for a specific token in a wallet. **Response:** { "holding": 34909.416624, "held": 402288.62697, "sold": 367379.210346, "realized": 48.24649003, "unrealized": 4665.26723313, "total": 4713.51372317, "total_sold": 1195.95048046, "total_invested": 1256.76208526, "average_buy_amount": 38.08369955, "current_value": 4774.3253279697965, "cost_basis": 0.00312403 } ### Top Traders Information[](#top-traders-information) #### GET /top-traders/all[](#get-top-tradersall) #### GET /top-traders/all/:page[](#get-top-tradersallpage) Get the most profitable traders across all tokens, with optional pagination. **Query Parameters:** | Parameter | Type | Default | Description | | --- | --- | --- | --- | | `expandPnl` | boolean | false | Include detailed PnL data for each token if true | | `sortBy` | string | ”total” | Sort results by metric (“total” or “winPercentage”) | **Response:** { "wallets": [\ {\ "wallet": "WalletAddress",\ "summary": {\ "realized": 2418.42956164,\ "unrealized": -634.74038817,\ "total": 1783.68917347,\ "totalInvested": 103020.70911717,\ "totalWins": 222,\ "totalLosses": 295,\ "winPercentage": 34.8,\ "lossPercentage": 46.24,\ "neutralPercentage": 18.96\ }\ }\ ], "hasNext": true } If `expandPnl=true`, each wallet entry will include an additional `tokens` object containing detailed PnL data for each token: { "wallets": [\ {\ "wallet": "WalletAddress",\ "tokens": {\ "TokenAddress": {\ "holding": 0,\ "held": 24608227.322611,\ "sold": 24608227.322611,\ "realized": 312.48840947,\ "unrealized": 0,\ "total": 312.48840947,\ "total_invested": 153.64456248,\ "meta": {\ "name": "Token Name",\ "symbol": "SYMBOL",\ "image": "ImageURL",\ "decimals": 9\ }\ }\ },\ "summary": {\ "realized": 2418.42956164,\ "unrealized": -634.74038817,\ "total": 1783.68917347,\ "totalInvested": 103020.70911717,\ "totalWins": 222,\ "totalLosses": 295,\ "winPercentage": 34.8,\ "lossPercentage": 46.24,\ "neutralPercentage": 18.96\ }\ }\ ], "hasNext": true } #### GET /top-traders/`{token}`[](#get-top-traderstoken) Get top 100 traders by PnL for a token. **Response:** [\ {\ "wallet": "234JMcei3WcQWaMjyxVEcHZsGvz1m8A8hTtEnCJCYWRo",\ "held": 50819020.99990307,\ "sold": 17890408.81074299,\ "holding": 32928612.18916008,\ "realized": 1692.12014818,\ "unrealized": 866.69739102,\ "total": 2558.81753919,\ "total_invested": 1651.25276018\ },\ {\ "wallet": "BUyvzQp1v2kJ6sKR6qunhdSxypDUTEZS8dsTpQYkw6wQ",\ "held": 7131355.76925302,\ "sold": 7131355.76925302,\ "holding": 0,\ "realized": 761.7829419,\ "unrealized": 0,\ "total": 761.7829419,\ "total_invested": 343.2357682\ }\ ] **Response Fields:** | Field | Type | Description | | --- | --- | --- | | `held` | number | Total amount of tokens ever held | | `sold` | number | Total amount of tokens sold | | `holding` | number | Current token balance | | `realized` | number | Realized profit/loss in USD | | `unrealized` | number | Unrealized profit/loss in USD based on current price | | `total` | number | Total profit/loss (realized + unrealized) | | `total_invested` | number | Total amount invested in USD | ### Other Endpoints[](#other-endpoints) #### GET /stats/`{token}`/`{pool}`[](#get-statstokenpool) Get detailed stats for a token-pool pair over various time intervals. **Response:** { "1m": { "buyers": 7, "sellers": 9, "volume": { "buys": 642.307406481682, "sells": 3071.093119714688, "total": 3713.4005261963716 }, "transactions": 102, "buys": 90, "sells": 12, "wallets": 14, "price": 0.0026899499819631667, "priceChangePercentage": 0.017543536395684036 }, "5m": {...}, "15m": {...}, "30m": {...}, "1h": {...}, "2h": {...}, "3h": {...}, "4h": {...}, "5h": { {...}, "6h": {...}, "12h": {...}, "24h": {...} } #### GET /stats/`{token}`[](#get-statstoken) Get detailed stats for a token over various time intervals. **Response:** { "1m": { "buyers": 7, "sellers": 9, "volume": { "buys": 642.307406481682, "sells": 3071.093119714688, "total": 3713.4005261963716 }, "transactions": 102, "buys": 90, "sells": 12, "wallets": 14, "price": 0.0026899499819631667, "priceChangePercentage": 0.017543536395684036 }, "5m": {...}, "15m": {...}, "30m": {...}, "1h": {...}, "2h": {...}, "3h": {...}, "4h": {...}, "5h": { {...}, "6h": {...}, "12h": {...}, "24h": {...} } Pagination[](#pagination) -------------------------- All trade endpoints use cursor-based pagination. Use the `nextCursor` value from the response as the `cursor` parameter in subsequent requests until `hasNextPage` is false. Example usage: GET /trades/{tokenAddress} GET /trades/{tokenAddress}?cursor=1723726185254 The `cursor` is based on the `time` field of the trades. Extra information[](#extra-information) ---------------------------------------- If a token was bundled. It will have the bundleId on the pool object. Example: { "poolId": "ELBKHojRoP8oKu67zTeKxPb3Exz81pmCbro4yDjpump", "liquidity": { "quote": 60.246977672, "usd": 10227.888120255442 }, "price": { "quote": 2.8189642105022452e-8, "usd": 0.000004785642645344013 }, "tokenSupply": 1000000000, "lpBurn": 100, "tokenAddress": "ELBKHojRoP8oKu67zTeKxPb3Exz81pmCbro4yDjpump", "marketCap": { "quote": 28.18964210502245, "usd": 4785.642645344013 }, "decimals": 6, "security": { "freezeAuthority": null, "mintAuthority": null }, "quoteToken": "So11111111111111111111111111111111111111112", "market": "pumpfun", "curvePercentage": 0.5546182621565947, "curve": "BvRVC3sSA3qPscfyxLEP8EZxt3EjoBQigJMgcdQt4CfF", "deployer": "HvFsFTB59XWFmRcXN6noEuej5GBd2yZnYDDmnHtYiECz", "lastUpdated": 1740318305150, "createdAt": 1740318255995, "txns": { "buys": 6, "total": 11, "volume": 832, "sells": 4 }, "bundleId": "1a4ef430786340775d41a48a7648e633d2e3e711743c808851c260bf9af0153f" } [Public Data API](/public-data-api "Public Data API") [Risk](/public-data-api/risk "Risk") --- # GitHub Solana Rpc Solana Tracker - RPC plans ========================== [Websocket Python](/public-data-api/websocket-python "Websocket Python") [Credits](/solana-rpc/credits "Credits") --- # GitHub Public Data API Solana Tracker Public API ========================= Public API for Solana Tracker data. Token and pool data for all Pumpfun, Raydium, Raydium CPMM, Moonshot, Meteora DLMM, Meteora DYN and Orca tokens. Including Market Cap, Price, Liquidity, Chart data, price changes, stats, wallet trades and total value, last trades and more [Priority Fee API](/priority-fee-api "Priority Fee API") [Docs](/public-data-api/docs "Docs") --- # GitHub [Public Data API](/public-data-api "Public Data API") Websocket Websocket - Data Stream Documentation ===================================== The Websocket API is only available for Premium, Business and Enterprise plans. With the Websocket API you can stream: Parsed transactions (per pair or for a wallet), receive new pools/tokens, price updates and more. This document provides information on how to use the `WebSocket` and the various room types available for WebSocket communication. WebSocketService Class[](#websocketservice-class) -------------------------------------------------- Below is the `WebSocketService` class that can be used to establish WebSocket connections and manage room subscriptions: import EventEmitter from "eventemitter3"; class WebSocketService { constructor(wsUrl) { this.wsUrl = wsUrl; this.socket = null; this.transactionSocket = null; this.reconnectAttempts = 0; this.reconnectDelay = 2500; this.reconnectDelayMax = 4500; this.randomizationFactor = 0.5; this.emitter = new EventEmitter(); this.subscribedRooms = new Set(); this.transactions = new Set(); this.connect(); if (typeof window !== "undefined") { window.addEventListener("beforeunload", this.disconnect.bind(this)); } } async connect() { if (this.socket && this.transactionSocket) { return; } try { this.socket = new WebSocket(this.wsUrl); this.transactionSocket = new WebSocket(this.wsUrl); this.setupSocketListeners(this.socket, "main"); this.setupSocketListeners(this.transactionSocket, "transaction"); } catch (e) { console.error("Error connecting to WebSocket:", e); this.reconnect(); } } setupSocketListeners(socket, type) { socket.onopen = () => { console.log(`Connected to ${type} WebSocket server`); this.reconnectAttempts = 0; this.resubscribeToRooms(); }; socket.onclose = () => { console.log(`Disconnected from ${type} WebSocket server`); if (type === "main") this.socket = null; if (type === "transaction") this.transactionSocket = null; this.reconnect(); }; socket.onmessage = (event) => { try { const message = JSON.parse(event.data); if (message.type === "message") { if (message.data?.tx && this.transactions.has(message.data.tx)) { return; } else if (message.data?.tx) { this.transactions.add(message.data.tx); } if (message.room.includes('price:')) { this.emitter.emit(`price-by-token:${message.data.token}`, message.data); } this.emitter.emit(message.room, message.data); } } catch (error) { console.error("Error processing message:", error); } }; } disconnect() { if (this.socket) { this.socket.close(); this.socket = null; } if (this.transactionSocket) { this.transactionSocket.close(); this.transactionSocket = null; } this.subscribedRooms.clear(); this.transactions.clear(); } reconnect() { console.log("Reconnecting to WebSocket server"); const delay = Math.min( this.reconnectDelay * Math.pow(2, this.reconnectAttempts), this.reconnectDelayMax ); const jitter = delay * this.randomizationFactor; const reconnectDelay = delay + Math.random() * jitter; setTimeout(() => { this.reconnectAttempts++; this.connect(); }, reconnectDelay); } joinRoom(room) { this.subscribedRooms.add(room); const socket = room.includes("transaction") ? this.transactionSocket : this.socket; if (socket && socket.readyState === WebSocket.OPEN) { socket.send(JSON.stringify({ type: "join", room })); } } leaveRoom(room) { this.subscribedRooms.delete(room); const socket = room.includes("transaction") ? this.transactionSocket : this.socket; if (socket && socket.readyState === WebSocket.OPEN) { socket.send(JSON.stringify({ type: "leave", room })); } } on(room, listener) { this.emitter.on(room, listener); } off(room, listener) { this.emitter.off(room, listener); } getSocket() { return this.socket; } resubscribeToRooms() { if ( this.socket && this.socket.readyState === WebSocket.OPEN && this.transactionSocket && this.transactionSocket.readyState === WebSocket.OPEN ) { for (const room of this.subscribedRooms) { const socket = room.includes("transaction") ? this.transactionSocket : this.socket; socket.send(JSON.stringify({ type: "join", room })); } } } } export default WebSocketService; Room Types and Usage[](#room-types-and-usage) ---------------------------------------------- The WebSocketService supports various room types for different purposes. Here’s a breakdown of the available rooms: ### Room Types[](#room-types) 1. **Latest Tokens/Pools** * Room Name: `latest` * Description: Receive updates about the latest tokens and pools. { "token": { "name": "Token Name", "symbol": "DANCE", "mint": "AmJaZvdNptvofC4qe3tvuBNgqLm65p1of5pk6JFHpump", "uri": "https://cf-ipfs.com/ipfs/QmVrh4ER81fns3S4QU48WiBuhiusc1KsCxsM8mSs1bEGPv", "decimals": 6, "hasFileMetaData": true, "createdOn": "https://pump.fun" }, "pools": [\ {\ "liquidity": {\ "quote": 62,\ "usd": 8907.761583907999\ },\ "price": {\ "quote": 2.9853991922957425e-8,\ "usd": 0.000004289229715768062\ },\ "tokenSupply": 1000000000000000,\ "lpBurn": 100,\ "tokenAddress": "AmJaZvdNptvofC4qe3tvuBNgqLm65p1of5pk6JFHpump",\ "marketCap": {\ "quote": 29.853991922957423,\ "usd": 4289.229715768061\ },\ "decimals": 6,\ "security": {\ "freezeAuthority": null,\ "mintAuthority": null\ },\ "quoteToken": "So11111111111111111111111111111111111111112",\ "market": "pumpfun",\ "deployer": "4Rz5xqikxtZ2s7wE9uQ6n2oLXQi6K65XGoYpKxf24Hqo",\ "openTime": 0,\ "poolId": "GmJaZvdNptvofC4qe3tvuBNgqLm65p1of5pk6JFHpump"\ }\ ], "events": { "30m": { "priceChangePercentage": 0 }, "1h": { "priceChangePercentage": 0 }, "4h": { "priceChangePercentage": 0 }, "24h": { "priceChangePercentage": 0 } }, "risk": { "rugged": false, "risks": [\ {\ "name": "No social media",\ "description": "This token has no social media links",\ "level": "warning",\ "score": 2000\ },\ {\ "name": "Pump.fun contracts can be changed at any time",\ "description": "Pump.fun contracts can be changed by Pump.fun at any time",\ "level": "warning",\ "score": 10\ },\ {\ "name": "Bonding curve not complete",\ "description": "No raydium liquidity pool, bonding curve not complete",\ "level": "warning",\ "score": 4000\ }\ ], "score": 5 } } 2. **Pool Changes** * Room Name: `pool:poolId` * Description: Receive updates about changes in a specific pool. Example Response { "liquidity": { "quote": 62.280000004, "usd": 8947.990185184213 }, "price": { "quote": 3.012424976894315e-8, "usd": 0.000004328058626384536 }, "tokenSupply": 1000000000000000, "lpBurn": 100, "tokenAddress": "HCuFjMcDaSNAyT6mXegLXvrYdBZdT4Xh1YajS8vrpump", "marketCap": { "quote": 30.124249768943148, "usd": 4328.058626384535 }, "decimals": 6, "security": { "freezeAuthority": null, "mintAuthority": null }, "quoteToken": "So11111111111111111111111111111111111111112", "market": "pumpfun", "deployer": "EB58aFKZ3bXSFcPvVNDB9P5QXaG1AiMykmsNo6XmsV4Y", "lastUpdated": 1723727796824, "createdAt": 1723727770351, "poolId": "HCuFjMcDaSNAyT6mXegLXvrYdBZdT4Xh1YajS8vrpump" } 3. **Pair Transactions** * Room Name: `transaction:tokenAddress:poolId` * Description: Receive updates about the latest transactions for a specific token pair. Example Response Returns an array of transactions, can contain 1 or more transactions. [\ {\ "tx": "2BN6pJ2zJE4cVerXxeBxbRCMZ8ZzcpPmEeBmoB2gESLRxeNNShxtyhKRhDZST6QcWuYBQWf6dJxV4TVQMHJ85fs",\ "amount": 946904.652554,\ "priceUsd": 0.000007945268449484616,\ "volume": 7.625805739043482,\ "type": "sell",\ "wallet": "orcACRJYTFjTeo2pV8TfYRTpmqfoYgbVi9GeANXTCc8",\ "time": 1723728022856,\ "program": "pump"\ },\ {\ "tx": "2BN6pJ2zJE4cVerXxeBxbRCMZ8ZzcpPmEeBmoB2gESLRxeNNShxtyhKRhDZST6QcWuYBQWf6dJxV4TVQMHJ85fs",\ "amount": 946904.652554,\ "priceUsd": 0.000007945268449484616,\ "volume": 7.625805739043482,\ "type": "sell",\ "wallet": "orcACRJYTFjTeo2pV8TfYRTpmqfoYgbVi9GeANXTCc8",\ "time": 1723728022861,\ "program": "pump"\ }\ ] 4. **Transactions** * Room Name: `transaction:tokenAddress` * Description: Receive updates about the latest transactions for a specific token. Example Response Returns an array of transactions, can contain 1 or more transactions. [\ {\ "tx": "2BN6pJ2zJE4cVerXxeBxbRCMZ8ZzcpPmEeBmoB2gESLRxeNNShxtyhKRhDZST6QcWuYBQWf6dJxV4TVQMHJ85fs",\ "amount": 946904.652554,\ "priceUsd": 0.000007945268449484616,\ "volume": 7.625805739043482,\ "type": "sell",\ "wallet": "orcACRJYTFjTeo2pV8TfYRTpmqfoYgbVi9GeANXTCc8",\ "time": 1723728022856,\ "program": "pump"\ },\ {\ "tx": "2BN6pJ2zJE4cVerXxeBxbRCMZ8ZzcpPmEeBmoB2gESLRxeNNShxtyhKRhDZST6QcWuYBQWf6dJxV4TVQMHJ85fs",\ "amount": 946904.652554,\ "priceUsd": 0.000007945268449484616,\ "volume": 7.625805739043482,\ "type": "sell",\ "wallet": "orcACRJYTFjTeo2pV8TfYRTpmqfoYgbVi9GeANXTCc8",\ "time": 1723728022861,\ "program": "pump"\ }\ ] 5. **Pair and Wallet Transactions** * Room Name: `transaction:tokenAddress:poolId:wallet` * Description: Receive updates about the latest transactions for a specific token pair and wallet. Example Response Returns an array of transactions, can contain 1 or more transactions. [\ {\ "tx": "2BN6pJ2zJE4cVerXxeBxbRCMZ8ZzcpPmEeBmoB2gESLRxeNNShxtyhKRhDZST6QcWuYBQWf6dJxV4TVQMHJ85fs",\ "amount": 946904.652554,\ "priceUsd": 0.000007945268449484616,\ "volume": 7.625805739043482,\ "type": "sell",\ "wallet": "orcACRJYTFjTeo2pV8TfYRTpmqfoYgbVi9GeANXTCc8",\ "time": 1723728022856,\ "program": "pump"\ },\ {\ "tx": "2BN6pJ2zJE4cVerXxeBxbRCMZ8ZzcpPmEeBmoB2gESLRxeNNShxtyhKRhDZST6QcWuYBQWf6dJxV4TVQMHJ85fs",\ "amount": 946904.652554,\ "priceUsd": 0.000007945268449484616,\ "volume": 7.625805739043482,\ "type": "sell",\ "wallet": "orcACRJYTFjTeo2pV8TfYRTpmqfoYgbVi9GeANXTCc8",\ "time": 1723728022861,\ "program": "pump"\ }\ ] 6. **Price Updates** * Room Name: `price:poolId` or `price-by-token:tokenId` * Description: Receive price updates for a specific pool or token Example response { "price": 0.000008006158441370585, "price_quote": 0.0000010064, "pool": "EWiYmq3nWQpoTkcU4UfGYEoYvDHduDsXhpPvqmoqpump", "token": "EWiYmq3nWQpoTkcU4UfGYEoYvDHduDsXhpPvqmoqpump", "time": 1723728065246 } 7. **Wallet Transactions** * Room Name: `wallet:walletAddress` * Description: Receive updates about transactions for a specific wallet. Example response { "tx": "4R3ngzDKhgyXDBRJdXiKXUDKUWz3oeMwV6mDh4RjqSpeiA1Jc9i8VHcasrg4UzTvG3GVYpyBXYQBMmh6okYUgbZX", "amount": 77.12537, "priceUsd": 15.381611661924738, "solVolume": 5.994944529684513, "volume": 1186.3124906222604, "type": "buy", "wallet": "MfDuWeqSHEqTFVYZ7LoexgAK9dxk7cy4DFJWjWMGVWa", "time": 1739318753652, "program": "meteora-dlmm", "token": { "from": { "name": "USD Coin", "symbol": "USDC", "image": "https://image.solanatracker.io/proxy?url=undefined", "decimals": 6, "amount": 1187.5, "address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" }, "to": { "name": "OFFICIAL TRUMP", "symbol": "TRUMP", "image": "https://image.solanatracker.io/proxy?url=https%3A%2F%2Farweave.net%2FVQrPjACwnQRmxdKBTqNwPiyo65x7LAT773t8Kd7YBzw", "decimals": 6, "amount": 77.12537, "address": "6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN" } } } 8. **Graduating** * Room Name: `graduating` or set a market cap like this: `graduating:sol:170` (this will send a websocket message when market cap reaches 170 SOL) * Description: Receive latest graduating tokens, graduating means tokens that are close to completing their bonding curve on pumpfun / moonshot { "token": { "name": "Token Name", "symbol": "DANCE", "mint": "AmJaZvdNptvofC4qe3tvuBNgqLm65p1of5pk6JFHpump", "uri": "https://cf-ipfs.com/ipfs/QmVrh4ER81fns3S4QU48WiBuhiusc1KsCxsM8mSs1bEGPv", "decimals": 6, "hasFileMetaData": true, "createdOn": "https://pump.fun" }, "pools": [\ {\ "liquidity": {\ "quote": 62,\ "usd": 8907.761583907999\ },\ "price": {\ "quote": 2.9853991922957425e-8,\ "usd": 0.000004289229715768062\ },\ "tokenSupply": 1000000000000000,\ "lpBurn": 100,\ "tokenAddress": "AmJaZvdNptvofC4qe3tvuBNgqLm65p1of5pk6JFHpump",\ "marketCap": {\ "quote": 29.853991922957423,\ "usd": 4289.229715768061\ },\ "decimals": 6,\ "security": {\ "freezeAuthority": null,\ "mintAuthority": null\ },\ "quoteToken": "So11111111111111111111111111111111111111112",\ "market": "pumpfun",\ "deployer": "4Rz5xqikxtZ2s7wE9uQ6n2oLXQi6K65XGoYpKxf24Hqo",\ "openTime": 0,\ "poolId": "GmJaZvdNptvofC4qe3tvuBNgqLm65p1of5pk6JFHpump"\ }\ ], "events": { "30m": { "priceChangePercentage": 0 }, "1h": { "priceChangePercentage": 0 }, "4h": { "priceChangePercentage": 0 }, "24h": { "priceChangePercentage": 0 } }, "risk": { "rugged": false, "risks": [\ {\ "name": "No social media",\ "description": "This token has no social media links",\ "level": "warning",\ "score": 2000\ },\ {\ "name": "Pump.fun contracts can be changed at any time",\ "description": "Pump.fun contracts can be changed by Pump.fun at any time",\ "level": "warning",\ "score": 10\ }\ ], "score": 5 } } 9. **Graduated** * Room Name: `graduated` * Description: Receive latest graduated tokens, graduating means tokens that just completed their bonding curve on pumpfun/moonshot and are now on Raydium. { "token": { "name": "Token Name", "symbol": "DANCE", "mint": "AmJaZvdNptvofC4qe3tvuBNgqLm65p1of5pk6JFHpump", "uri": "https://cf-ipfs.com/ipfs/QmVrh4ER81fns3S4QU48WiBuhiusc1KsCxsM8mSs1bEGPv", "decimals": 6, "hasFileMetaData": true, "createdOn": "https://pump.fun" }, "pools": [\ {\ "liquidity": {\ "quote": 62,\ "usd": 8907.761583907999\ },\ "price": {\ "quote": 2.9853991922957425e-8,\ "usd": 0.000004289229715768062\ },\ "tokenSupply": 1000000000000000,\ "lpBurn": 100,\ "tokenAddress": "AmJaZvdNptvofC4qe3tvuBNgqLm65p1of5pk6JFHpump",\ "marketCap": {\ "quote": 29.853991922957423,\ "usd": 4289.229715768061\ },\ "decimals": 6,\ "security": {\ "freezeAuthority": null,\ "mintAuthority": null\ },\ "quoteToken": "So11111111111111111111111111111111111111112",\ "market": "pumpfun",\ "deployer": "4Rz5xqikxtZ2s7wE9uQ6n2oLXQi6K65XGoYpKxf24Hqo",\ "openTime": 0,\ "poolId": "GmJaZvdNptvofC4qe3tvuBNgqLm65p1of5pk6JFHpump"\ }\ ], "events": { "30m": { "priceChangePercentage": 0 }, "1h": { "priceChangePercentage": 0 }, "4h": { "priceChangePercentage": 0 }, "24h": { "priceChangePercentage": 0 } }, "risk": { "rugged": false, "risks": [\ {\ "name": "No social media",\ "description": "This token has no social media links",\ "level": "warning",\ "score": 2000\ },\ {\ "name": "Pump.fun contracts can be changed at any time",\ "description": "Pump.fun contracts can be changed by Pump.fun at any time",\ "level": "warning",\ "score": 10\ }\ ], "score": 5 } } 10. **Metadata** (BETA) * Room Name: `metadata:tokenAddress` * Description: Retrieves complete token metadata for a given address, particularly useful when the initial response lacks full details due to pending IPFS propagation { "name": "Token Name", "symbol": "Token Symbol", "mint": "ZDp3WVAH2wFvCeYa76myFaGoX4wv5u8VQGWvDpmqpump", "uri": "https://ipfs.io/ipfs/Qme5wcWJjnuvHUMwjo7gFDqK4CYr1zsL6uHSKr8EhuYdj7", "decimals": 6, "hasFileMetaData": true, "createdOn": "https://pump.fun", "description": "Description", "image": "https://image.solanatracker.io/proxy?url=https%3A%2F%2Fimage.solanatracker.io%2Fproxy%3Furl%3Dhttps%253A%252F%252Fipfs.io%252Fipfs%252FQmasCGX7Gyhhz6ERhGQU1xYRmDo2oqvE8WobHxo1AJcudJ", "showName": true, "twitter": "https://x.com/", "telegram": "https://t.me/", "website": "https://website.ag/" } 11. **Holders** (BETA) * Room Name: `holders:tokenAddress` * Description: Receive update on any holder count change for a token. Must have been requested by /tokens/:token/holders endpoint first. { "total": 91367 } 12. **Token Changes** * Room Name: `token:tokenAddress` * Description: Receive all updates from any pool for a token Example Response { "liquidity": { "quote": 62.280000004, "usd": 8947.990185184213 }, "price": { "quote": 3.012424976894315e-8, "usd": 0.000004328058626384536 }, "tokenSupply": 1000000000000000, "lpBurn": 100, "tokenAddress": "HCuFjMcDaSNAyT6mXegLXvrYdBZdT4Xh1YajS8vrpump", "marketCap": { "quote": 30.124249768943148, "usd": 4328.058626384535 }, "decimals": 6, "security": { "freezeAuthority": null, "mintAuthority": null }, "quoteToken": "So11111111111111111111111111111111111111112", "market": "pumpfun", "deployer": "EB58aFKZ3bXSFcPvVNDB9P5QXaG1AiMykmsNo6XmsV4Y", "lastUpdated": 1723727796824, "createdAt": 1723727770351, "poolId": "HCuFjMcDaSNAyT6mXegLXvrYdBZdT4Xh1YajS8vrpump" } ### Usage Examples[](#usage-examples) Here are examples of how to use each room type: const wsService = new WebSocketService("wss://websocket-url-here.com"); // 1. Latest Tokens/Pools wsService.joinRoom("latest"); wsService.on("latest", (data) => { console.log("Latest token/pool update:", data); }); // 2. Pool Changes wsService.joinRoom(`pool:${poolId}`); wsService.on(`pool:${poolId}`, (data) => { console.log(`Pool ${poolId} update:`, data); }); // 3. Pair Transactions wsService.joinRoom(`transaction:${tokenAddress}:${poolId}`); wsService.on(`transaction:${tokenAddress}:${poolId}`, (data) => { console.log(`New transaction for ${tokenAddress} in pool ${poolId}:`, data); }); // 4. Transactions wsService.joinRoom(`transaction:${tokenAddress}`); wsService.on(`transaction:${tokenAddress}`, (data) => { console.log(`New transaction for ${tokenAddress}:`, data); }); // 5. Pair and Wallet Transactions wsService.joinRoom(`transaction:${tokenAddress}:${poolId}:${walletAddress}`); wsService.on( `transaction:${tokenAddress}:${poolId}:${walletAddress}`, (data) => { console.log( `New transaction for ${tokenAddress} in pool ${poolId} for wallet ${walletAddress}:`, data ); } ); // 6. Price Updates wsService.joinRoom(`price:${poolId}`); wsService.on(`price:${poolId}`, (data) => { console.log(`Price update for pool ${poolId}:`, data); }); wsService.joinRoom(`price-by-token:${tokenId}`); // Make sure to use latest version of websocket service. wsService.on(`price-by-token:${tokenId}`, (data) => { console.log(`Price update for token ${tokenId}:`, data); }); // 7. Wallet Transactions wsService.joinRoom(`wallet:${walletAddress}`); wsService.on(`wallet:${walletAddress}`, (data) => { console.log(`New transaction for wallet ${walletAddress}:`, data); }); // 8. Graduating tokens wsService.joinRoom("graduating"); wsService.on("graduating", (data) => { console.log("Latest graduating token", data); }); // Graduating with custom market cap wsService.joinRoom("graduating:sol:175"); wsService.on("graduating:sol:175", (data) => { console.log("Latest graduating token", data); }); // 9. Graduating tokens wsService.joinRoom("graduated"); wsService.on("graduated", (data) => { console.log("Latest graduated token", data); }); // 10. Metadata wsService.joinRoom("metadata:token"); wsService.on("metadata:token", (data) => { console.log("Metadata updated", data); }); // 11. Holders update wsService.joinRoom("holders:token"); wsService.on("holders:token", (data) => { console.log("Total holders count for token has been updated", data); }); // 12. Token Changes wsService.joinRoom(`token:${tokenAddress}`); wsService.on(`token:${tokenAddress}`, (data) => { console.log(`Token ${tokenAddress} update:`, data); }); [Risk](/public-data-api/risk "Risk") [Websocket Python](/public-data-api/websocket-python "Websocket Python") --- # GitHub [Public Data API](/public-data-api "Public Data API") Websocket Python Python Websocket - Data Stream Documentation ============================================ The Websocket API is only available for Premium, Business and Enterprise plans. With the Websocket API you can stream: Parsed transactions (per pair or for a wallet), receive new pools/tokens, price updates and more. This document provides information on how to use the `WebSocket` and the various room types available for WebSocket communication. WebSocketService Class[](#websocketservice-class) -------------------------------------------------- Below is the `WebSocketService` class that can be used to establish WebSocket connections and manage room subscriptions: import json import time import threading from typing import Set import websocket from pyee import EventEmitter class WebSocketService: def __init__(self, ws_url: str): self.ws_url = ws_url self.socket = None self.transaction_socket = None self.reconnect_attempts = 0 self.reconnect_delay = 2.5 self.reconnect_delay_max = 4.5 self.randomization_factor = 0.5 self.emitter = EventEmitter() self.subscribed_rooms: Set[str] = set() self.transactions: Set[str] = set() self.connect() def connect(self): if self.socket and self.transaction_socket: return try: self.socket = websocket.WebSocketApp( self.ws_url, on_open=lambda ws: self.on_open(ws, "main"), on_close=lambda ws: self.on_close(ws, "main"), on_message=self.on_message ) self.transaction_socket = websocket.WebSocketApp( self.ws_url, on_open=lambda ws: self.on_open(ws, "transaction"), on_close=lambda ws: self.on_close(ws, "transaction"), on_message=self.on_message ) threading.Thread(target=self.socket.run_forever, daemon=True).start() threading.Thread(target=self.transaction_socket.run_forever, daemon=True).start() except Exception as e: print(f"Error connecting to WebSocket: {e}") self.reconnect() def on_open(self, ws, socket_type): print(f"Connected to {socket_type} WebSocket server") self.reconnect_attempts = 0 self.resubscribe_to_rooms() def on_close(self, ws, socket_type): print(f"Disconnected from {socket_type} WebSocket server") if socket_type == "main": self.socket = None elif socket_type == "transaction": self.transaction_socket = None self.reconnect() def on_message(self, ws, message): try: message = json.loads(message) if message["type"] == "message": if message["data"].get("tx") and message["data"]["tx"] in self.transactions: return elif message["data"].get("tx"): self.transactions.add(message["data"]["tx"]) if "price:" in message["room"]: self.emitter.emit(f"price-by-token:{message['data']['token']}", message["data"]) self.emitter.emit(message["room"], message["data"]) except Exception as e: print(f"Error processing message: {e}") def disconnect(self): if self.socket: self.socket.close() self.socket = None if self.transaction_socket: self.transaction_socket.close() self.transaction_socket = None self.subscribed_rooms.clear() self.transactions.clear() def reconnect(self): print("Reconnecting to WebSocket server") delay = min( self.reconnect_delay * (2 ** self.reconnect_attempts), self.reconnect_delay_max ) jitter = delay * self.randomization_factor reconnect_delay = delay + (jitter * (2 * time.time() % 1 - 0.5)) def delayed_reconnect(): time.sleep(reconnect_delay) self.reconnect_attempts += 1 self.connect() threading.Thread(target=delayed_reconnect, daemon=True).start() def join_room(self, room: str): self.subscribed_rooms.add(room) socket = self.transaction_socket if "transaction" in room else self.socket if socket and socket.sock and socket.sock.connected: socket.send(json.dumps({"type": "join", "room": room})) def leave_room(self, room: str): self.subscribed_rooms.discard(room) socket = self.transaction_socket if "transaction" in room else self.socket if socket and socket.sock and socket.sock.connected: socket.send(json.dumps({"type": "leave", "room": room})) def on(self, room: str, listener): self.emitter.on(room, listener) def off(self, room: str, listener): self.emitter.remove_listener(room, listener) def get_socket(self): return self.socket def resubscribe_to_rooms(self): if (self.socket and self.socket.sock and self.socket.sock.connected and self.transaction_socket and self.transaction_socket.sock and self.transaction_socket.sock.connected): for room in self.subscribed_rooms: socket = self.transaction_socket if "transaction" in room else self.socket socket.send(json.dumps({"type": "join", "room": room})) # Usage example: ws_service = WebSocketService("wss://datastream.solanatracker.io/your-datastream-url-here") ws_service.join_room("price-by-token:GqmEdRD3zGUZdYPeuDeXxCc8Cj1DBmGSYK97TCwSpump") def on_price_update(data): print(f"Received price update for {data['token']}: {data['price']}") def main(): # Initialize the WebSocket service ws_url = "wss://datastream.solanatracker.io/your-datastream-url-here" ws_service = WebSocketService(ws_url) # Join a room (in this case, for a specific token's price updates) token_room = "price-by-token:GqmEdRD3zGUZdYPeuDeXxCc8Cj1DBmGSYK97TCwSpump" ws_service.join_room(token_room) # Register the event listener ws_service.on(token_room, on_price_update) print("Listening for price updates. Press Ctrl+C to exit.") try: # Keep the script running while True: time.sleep(1) except KeyboardInterrupt: print("Stopping the WebSocket listener...") finally: # Clean up ws_service.off(token_room, on_price_update) ws_service.leave_room(token_room) ws_service.disconnect() if __name__ == "__main__": main() [Websocket](/public-data-api/websocket "Websocket") [Solana Rpc](/solana-rpc "Solana Rpc") --- # GitHub Swap API Solana Tracker - Swap API ========================= Why use this API?[](#why-use-this-api) --------------------------------------- We have no delays, as soon as a token is released on Solana you will be able to trade it using our API. [Credits](/solana-rpc/credits "Credits") [About](/swap-api/about "About") --- # GitHub [Swap API](/swap-api "Swap API") About Solana Tracker - Swap API ========================= Why use this API?[](#why-use-this-api) --------------------------------------- We have no delays, as soon as a token is released on Solana you will be able to trade it using our API. API supports Pump.fun, Moonshot, Orca, Meteora, Raydium, Raydium CPMM and Jupiter swaps. We charge a 0.5% fee on each successful transaction. Using this for a trading / volume bot or site with a high processing volume? Contact us via Discord or email ([\[email protected\]](/cdn-cgi/l/email-protection#23505442530e42534a63504c4f424d42575142404846510d4a4c) ) and get the fee reduced (down to 0.5 - 0.1%, fee reduction depends on volume, only if accepted.) [Swap API](/swap-api "Swap API") [Errors](/swap-api/errors "Errors") --- # GitHub [Swap API](/swap-api "Swap API") Errors Swap API - Error Messages ========================= This document provides a list of possible error messages that may occur for the Swap API General Errors[](#general-errors) ---------------------------------- ### Internal Error[](#internal-error) { "error": "An internal error occurred" } **Explanation:** This error indicates that an unexpected issue occurred within the api. **Solution:** Retry or contact support if the problem persists. ### Invalid or Missing Token Address[](#invalid-or-missing-token-address) { "error": "Invalid or missing 'from' or 'to' token address" } **Explanation:** The addresses for either the source (“from”) token or the destination (“to”) token are either missing or invalid. **Solution:** Double-check that you’ve provided valid addresses for both the source and destination tokens. ### Invalid Amount[](#invalid-amount) { "error": "Invalid amount" } **Explanation:** The amount specified for the token swap is not valid. **Solution:** Ensure you’re entering a valid number for the amount you wish to swap. The amount should be greater than zero ### Invalid Slippage Tolerance[](#invalid-slippage-tolerance) { "error": "Invalid slippage tolerance (should be between 0 and 100%)" } **Explanation:** The specified slippage tolerance is outside the acceptable range. **Solution:** Set a slippage tolerance between 0% and 100%. Common values are typically between 0.1% and 10%. Swap-related Errors[](#swap-related-errors) -------------------------------------------- ### Unable to Fetch Pools[](#unable-to-fetch-pools) { "error": "Failed to swap", "details": "Unable to fetch pools for token" } **Explanation:** The system couldn’t retrieve information about liquidity pools for the specified token. **Solution:** Verify that the token address is correct and that the token is supported on the platform. Try again later if the issue persists or contact support ### No Pools for Token[](#no-pools-for-token) { "error": "Failed to swap", "details": "Token has no pools" } **Explanation:** There are no liquidity pools available for the specified token. **Solution:** Check if the token is newly listed or has no liquidity (rug). ### No Liquidity in Pools[](#no-liquidity-in-pools) { "error": "Failed to swap", "details": "No pools with liquidity found" } **Explanation:** While pools exist for the token, none of them currently have sufficient liquidity for the swap. **Solution:** Try swapping a smaller amount, or wait for more liquidity to be added to the pools. * * * If you encounter any of these errors, please try the suggested solutions. If problems persist, contact our support team for further assistance. [About](/swap-api/about "About") [Get Rate](/swap-api/get-rate "Get Rate") --- # GitHub [Swap API](/swap-api "Swap API") Libraries Libaries[](#libaries) ---------------------- API now supports: [Pump.fun](https://pump.fun) tokens, Meteora, Orca, Moonshot, Raydium tokens and any token supported by Jupiter. Javascript [https://github.com/YZYLAB/solana-swap](https://github.com/YZYLAB/solana-swap) Python [https://github.com/YZYLAB/solana-swap-python](https://github.com/YZYLAB/solana-swap-python) [Get Rate](/swap-api/get-rate "Get Rate") [Swap](/swap-api/swap "Swap") --- # GitHub [Swap API](/swap-api "Swap API") Get Rate GET /rate[](#get-rate) ----------------------- API now supports: [Pump.fun](https://pump.fun) tokens, Meteora, Moonshot, Orca, Raydium tokens and any token supported by Jupiter. curl --location 'https://swap-v2.solanatracker.io/rate?from=So11111111111111111111111111111111111111112&to=4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R&amount=1&slippage=10' ### Request Parameters[](#request-parameters) The cURL request requires the following parameters in the URL: * `from`: The base token address. In this case, it’s the Solana token address (`So11111111111111111111111111111111111111112`). * `to`: The quote token address. In this case, it’s the RAY token address (`4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R`). * `amount`: The amount of the base token to convert. In this case, it’s `1` which means 1 SOL * `slippage`: The maximum acceptable slippage percentage. In this case, it’s `10`. ### Example Response[](#example-response) { "amountIn": 1, "amountOut": 9181.330823048, "minAmountOut": 9089.517514818, "currentPrice": 9181.330823048, "executionPrice": 9089.517514818, "priceImpact": 0.0334641736518774, "fee": 0.01, "baseCurrency": { "decimals": 9, "mint": "So11111111111111111111111111111111111111112" }, "quoteCurrency": { "decimals": 9, "mint": "4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R" }, "platformFee": 9000000, "platformFeeUI": 0.009, } The response includes the following information: * `amountIn`: The amount of the source token that was used for the conversion. * `amountOut`: The amount of the destination token that was received. * `minAmountOut`: The minimum amount of the destination token that the user is willing to receive after slippage. * `currentPrice`: The current market price for the token pair. * `executionPrice`: The actual price at which the trade will be executed * `priceImpact`: The difference between the current market price and the execution price as a percentage, usually caused by lack of liquidity. * `fee`: The trading fee charged for the transaction. * `baseCurrency`: Information about the source token, including its decimal precision and mint address. * `quoteCurrency`: Information about the destination token, including its decimal precision and mint address. * `platformFee`: The fee charged by the platform for the transaction in SOL Lamports * `platformFeeUI`: The platform fee in SOL [Errors](/swap-api/errors "Errors") [Libraries](/swap-api/libraries "Libraries") ---