APILabPH · Independent integration

Pumpfun Buy and Sell API

Buy and sell with your own RPC. Build and simulate locally; sign inside your bot.

Start here: setup and examples · GitHub · Local API reference

One endpoint, under your control

  1. Clone the repository and install its dependencies.
  2. Set CUSTOMER_RPC_URL in your ignored local configuration.
  3. Run npm run api:local, or import createClient directly in your bot.
  4. Inspect the unsigned result, sign locally and submit through your RPC.
Local API: http://127.0.0.1:8787
Service fee: 0.25% on successful fee-bearing swaps

First quote

Start the local API using the setup guide, then replace the public address placeholders. A quote does not execute a trade.

curl http://127.0.0.1:8787/api/quote \
  -H "Content-Type: application/json" \
  --data '{"publicKey":"YOUR_PUBLIC_WALLET","mint":"TOKEN_MINT","action":"buy","amount":"0.01","pool":"auto","slippageBps":100,"maxServiceFeeBps":25}'

For a sell, use raw token units:

{"publicKey":"YOUR_PUBLIC_WALLET","mint":"TOKEN_MINT","action":"sell","amount":"1000000","pool":"auto","slippageBps":100,"maxServiceFeeBps":25}

APILabPH-hosted chain endpoints now return CUSTOMER_RPC_REQUIRED. Our documentation host makes no RPC calls. The Solana builder separately uses Jupiter routing; provide your own routing key if required.

The 0.25% service fee is included in buy input or deducted from sell proceeds. If the receiving wrapped-SOL account is missing, the first trader funds its creation; the build discloses that rent before signing.

Current-stage checks, minimum output and simulation remain required. Provider plans, protocol fees, network gas and account rent are separate. Funded trading remains unverified; no execution or speed guarantee is offered.

Release evidence and remaining setup