docs.pumpapi.fun
Open in
urlscan Pro
76.76.21.142
Public Scan
URL:
https://docs.pumpapi.fun/trade_api
Submission: On November 26 via manual from NG — Scanned from DE
Submission: On November 26 via manual from NG — Scanned from DE
Form analysis
0 forms found in the DOMText Content
PumpFun API home page Search... Ctrl K * PumpAPI * Support * PumpAPI Search... Navigation Pumpfun Trading API Trade API Documentation API Reference Documentation Community GET STARTED * Introduction PUMPFUN TRADING API * Quote API * Trade API * Trade Transaction * Token metadata SPECIAL APIS FOR DEGENS * Burn Tokens * Batch SOL Sender * Generate Wallets PUMPFUN SPECIAL APIS * Newer Mints * Trades On Token * Trades By User * Multi Trade MISCELLANEOUS * Faqs Pumpfun Trading API TRADE API Place the buy and sell order for pumpfun tokens To place a buy or sell trade for Pump.fun tokens, send a POST request to: We will try to land your transaction as fast as possible! Endpoint URL: https://pumpapi.fun/api/trade Your request body must contain the following Parameters: ParameterExampleDescriptionRequiredtrade_typeBuy or sell”buy” or “sell” to specify trade typeYesmintToken mint addressToken mint addressYesamountValue in of SOL/TokensAmount of SOL or tokens to tradeYesslippageDesired slippageSlippage allowed (integer)YespriorityFeeValue in SOL (optional)Amount to use as priority fee (optional) In SOLNouserPrivateKeywallet privatekeyThe wallet used the sign the transaction in string format (Phantom wallet’s key format)Yes > Note Amount in SOL , if buying or of tokens if selling. Accepted Parameters: The API accepts all parameters listed in the table above. EXAMPLES USAGE: Python Nodejs Rust Curl Copy import requests url = "https://pumpapi.fun/api/trade" payload = { "trade_type": "buy", # Buy or sell "mint": "YOUR_MINT_ADDRESS", # Token mint address "amount": 0.01, # Amount in SOL , if buying or of tokens if selling. "slippage": 5, # Desired slippage "priorityFee": 0.003, # Value in SOL "userPrivateKey: "WALLET_PRIVATEKEY" # Wallet private key } response = requests.post(url, json=payload) if response.status_code == 200: transaction_id = response.json()["tx_hash"] print(f"Transaction ID: {transaction_id}") else: print(f"Error: {response.status_code} - {response.text}") Response Type: The API returns JSON data upon successful execution: Copy { "tx_hash": "2wJWJW4Ln7N5EA8WnThaq4m4tgH6TPxcPYMP9ZN1VhyD...." } It returns the transaction hash. Note: This endpoint requires private key to sign the Tx, our server don’t store the keys. If you need to self sign then get a transaction on Trade Transaction endpoint instead. Error Codes * 400 Bad Request: Invalid request parameters or missing required fields. * 401 Unauthorized: Authentication failed. * 404 Not Found: The requested resource (endpoint) is not found. * 429 Too Many Requests: Rate limit exceeded. * 500 Internal Server Error: Unexpected server-side error. API Codes * 200 OK: The request was successful. Quote APITrade Transaction xgithub Powered by Mintlify On this page * Examples Usage: