Place the buy and sell order for pumpfun tokens
https://pmpapi.fun/api/trade
Your request body must contain the following Parameters:
Parameter | Example | Description | Required |
---|---|---|---|
trade_type | Buy or sell | ”buy” or “sell” to specify trade type | Yes |
mint | Token mint address | Token mint address | Yes |
amount | Value in of SOL/Tokens | Amount of SOL or tokens to trade | Yes |
slippage | Desired slippage | Slippage allowed (integer) | Yes |
priorityFee | Value in SOL (optional) | Amount to use as priority fee (optional) In SOL | No |
userPrivateKey | wallet privatekey | The 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.
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.200 OK
: The request was successful.