PumpFun API - Cryptoscan
A TypeScript API wrapper for interacting with PumpFun on Solana blockchain.
Current Price: $400 Contacts: https://t.me/dan_cryptoscan
What you get:
Free setup into your hosting.
Free help to integrate app to your server
Full access to the codebase and code updates
Free updates for app, you can request for free updates via access to issues
Full access to Project Time tracking by developers
Transaction Example
Here's a complete example of creating and sending a transaction using the API:
Docker Deployment
Prerequisites
Docker installed on your system
NPM token for private package access
Build and Run
Create
.env
file with your NPM token:
Build the Docker image:
Run the container:
The API will be available at http://localhost:3000
Docker Compose (Optional)
Create docker-compose.yml
:
Then run:
Environment Variables
NPM_TOKEN
- Required for accessing private npm packages
Features
Create buy/sell transactions for PumpFun tokens
Get real-time rates and price information
Fetch coin details
WebSocket support for real-time updates
Built-in retry mechanisms and error handling
Proxy support for requests
Installation
Quick Start
API Methods
Get Coin Information
Get Exchange Rate
Create Transaction
Listen to Price Updates
REST API Endpoints
Get Coin Information
Parameters:
address
(required): Solana address of the coin (string)
Response:
Get Exchange Rate
Parameters:
to
(required): Destination token address or 'sol' (string)from
(optional): Source token address or 'sol' (string, default: 'sol')amount
(optional): Amount to exchange (number, default: 1)network
(optional): Network name (string)slippage
(optional): Slippage percentage (number)
Response:
Create Transaction
Parameters:
walletAddress
(required): User's wallet address (string)from
(required): Source token address or 'sol' (string)to
(required): Destination token address or 'sol' (string)amount
(required): Amount to exchange (number)slippage
(optional): Slippage percentage (number)payerAddress
(optional): Payer's address (string, defaults to walletAddress)partnerAddress
(optional): Partner's address for fee collection (string)partnerFeePercentage
(optional): Partner fee percentage (number)fee
(optional): Additional fee (number)
Response:
Start Coin Listener
Request Body:
Response:
Notes:
Starts a new listener for the specified coin that will run for 10 minutes
If a listener already exists for the coin, its timeout will be reset to 10 minutes
Required for PNL tracking if no recent swap activity exists
Get Wallet PNL
Parameters:
coinAddress
(required): Address of the coin to check PNL for (string)walletAddress
(required): Wallet address to get PNL for (string)
Response:
Notes:
PNL data is only available for coins that have had recent swap activity (within last 10 minutes)
A swap transaction automatically starts PNL tracking for that coin
Returns 404 if no active listener exists for the coin or no PNL data is available
Create New Coin
Parameters (FormData):
file
(required): Image file for the coinname
(required): Coin name (string)symbol
(required): Coin symbol (string)description
(required): Coin description (string)twitter
(optional): Twitter link (string)telegram
(optional): Telegram link (string)website
(optional): Website link (string)showName
(optional): Show name flag (boolean, default: true)video
(optional): Video link (string)payerAddress
(required): Payer's wallet address (string)
Response:
Swap Tokens
Parameters:
privateKey
(required): Private key for transaction signing (string)coinAddress
(required): Address of the coin to swap (string)amount
(required): Amount to swap (number)type
(required): Type of swap - 'buy' or 'sell' (string)
Response:
Example:
Example using Node.js:
Configuration
Default parameters:
Buy slippage: 1%
Sell slippage: 5%
Network: Solana Mainnet
Error Handling
The API includes built-in retry mechanisms for network requests and comprehensive error messages. All methods will throw errors with descriptive messages when operations fail.
WebSocket Support
Real-time updates are available through WebSocket connections, with automatic reconnection handling and error recovery.
Requirements
Node.js 14+
Solana Web3.js
Active internet connection
License
ISC
Last updated