A High Speed client for interacting with pump.fun .
npm install pumpfunapi.xyz[Documentation 📖][Documentation]
[Documentation]: https://pumpfunapi.xyz
PumpFunAPI class provides methods to interact with pump.fun for instant trades and creation of tokens.
javascript
npm i pumpfunapi.xyz
`
`javascript
yarn add pumpfunapi.xyz
`
`javascript
pnpm i pumpfunapi.xyz
`
use any of the above package manager to install the pumpfunapi.xyz package
$3
``javascript
new PumpFunAPI(rpcUrl, privateKey)
``
#### Parameters
- rpcUrl (string): RPC URL for Solana. only mainnet rpc urls will work here.
- privateKey (string): Base58 encoded Solana private key. this private key is not used for any trades or token creation process. the privatekey mentioned here is only used to pay the trade execution fee of the api. make sure you have enough solana to pay the fees. each successfull execution costs flat 0.002 SOL. you can trade as much amount as needed as we will NOT BE TAKING FEE IN %, ALL FEES ARE FLAT AND WILL NOT CHANGE
#### Example in Common JS
`javascript
const PumpFunAPI = require('pumpfunapi.xyz');
const client = new PumpFunAPI('https://api.mainnet-beta.solana.com', 'your-private-key');
`
#### Example in ES Module
``javascript