Pumpfun Trading API
Quote API
Get the buy and sell quote for any pumpfun token.
Welcome to thepump.fun Buy & Sell quote api’s.
To fetch a swap quote for Pump.fun tokens, send a POST request to:
https://pumpapi.fun/api/quote
The outAmount
indicates the amount of tokens in lamports, which futher dividing by the token decimals (6) gives exact amount as in the pump.fun website.
Your request Body Parameters for /api/quote
Endpoint:
Parameter | Type | Description | Required |
---|---|---|---|
quote_type | string | ”buy” or “sell” to specify the quote type | Yes |
mint | string | Token mint address | Yes |
amount | number | Amount of SOL or tokens in lamports | Yes |
slippage | number | Desired slippage tolerance (integer) | No |
Example usage:
Response Type:
The API returns JSON data upon successful execution:
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.