Skip to main content

Managed Trading API Docs

To buy or sell a Pump.fun token with the funds in your wallet, send a POST request to

https://pumpportal.fun/api/trade?api-key=your-api-key-here

Once the transaction passes a simulation check, a response is sent with the transaction signature or error(s).

PumpPortal will attempt to land your transaction using multiple RPC nodes, as well as sending your transaction as a Jito bundle.

Your request body must contain the following options:

  • action: "buy" or "sell"
  • mint: The contract address of the token you want to trade (this is the text after the '/' in the pump.fun url for the token.)
  • amount: The amount of SOL or tokens to trade. If selling, amount can be a percentage of tokens in your wallet (ex. amount: "100%")
  • denominatedInSol: "true" if amount is SOL, "false" if amount is tokens
  • slippage: The percent slippage allowed
  • priorityFee: Amount to use as priority fee or Jito tip
  • pool: (optional) Currently 'pump' and 'raydium' are supported options. Default is 'pump'.

Examples

import requests

response = requests.post(url="https://pumpportal.fun/api/trade?api-key=your-api-key-here", data={
"action": "buy", # "buy" or "sell"
"mint": "your CA here", # contract address of the token you want to trade
"amount": 100000, # amount of SOL or tokens to trade
"denominatedInSol": "false", # "true" if amount is amount of SOL, "false" if amount is number of tokens
"slippage": 10, # percent slippage allowed
"priorityFee": 0.005, # amount to use as Jito tip or priority fee
"pool": "pump" # exchange to trade on. "pump" or "raydium"
})

data = response.json() # Tx signature or error(s)