# Pumpfun Dflow

> DFlow spot routing for pumpfun. Quote, build an unsigned swap through the keyless Musebook proxy, compare against Jupiter, simulate, and hand the transaction to the owner to sign. Never signs or broadcasts.

- Skill: `solizardking/pumpfun-dflow` (Agent Skill)
- Install (CLI): `npx get-skill add solizardking/pumpfun-dflow`
- Raw SKILL.md: https://api.skillmd.com/api/skills/solizardking/pumpfun-dflow/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: Solizardking (https://skillmd.com/u/solizardking)
- Updated: 2026-11-22
- Page: https://skillmd.com/skills/solizardking/pumpfun-dflow

---


# DFlow spot routing

Use this when the owner wants to swap a token on Solana and wants the best route. Everything goes through the keyless proxy `https://musebook-proxy.mynameisjeffspicoli.workers.dev`, which adds the DFlow API key on the server. Never ask the owner for a DFlow key and never call quote-api.dflow.net directly.

## Routes
Use these proxy routes:
- `GET /api/trade/dflow/order?inputMint&outputMint&amount&slippageBps&userPublicKey`. This is live today. It returns the quote plus an unsigned `transaction` for `userPublicKey`.
- `GET /api/trade/quote?inputMint&outputMint&amount&slippageBps`. This races Jupiter and DFlow and returns the winner.
- `GET /api/trade/dflow/order-status?signature=...`
- These routes are coming once the proxy deploy lands:
  - `GET /api/dflow/quote`, `/api/dflow/order`, `/api/dflow/order-status`, `/api/dflow/tokens`, `/api/dflow/tokens-with-decimals`, `/api/dflow/venues`, `/api/dflow/priority-fees`
  - `POST /api/dflow/swap` and `/api/dflow/swap-instructions`, with body `{quoteResponse, userPublicKey}`
  - `GET /api/dflow/markets`, `/events`, `/series` for prediction-market reads
- If a `/api/dflow/*` route returns 404, fall back to the `/api/trade/dflow/*` routes.

`amount` is in base units, so 0.01 SOL is `10000000`. The SOL mint is `So11111111111111111111111111111111111111112` and the USDC mint is `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v`.

## Flow
1. Resolve both mints and their decimals. Check that the owner's wallet has enough balance.
2. Get a DFlow quote and a Jupiter quote (`/api/trade/quote`) with the same amount and slippage. Pick the higher `outAmount`, and say which venue won and by how much.
3. Show the owner:
   - the expected output and the minimum output (`otherAmountThreshold`)
   - the effective price
   - `priceImpactPct`
   - the slippage, which defaults to 800 bps (8%). The allowed range is 5–10% unless the owner says otherwise.
   - the route venues
   For pump.fun tokens, also show market cap in SOL and graduation %. Warn when graduation is over 90%, when liquidity is thin, when price impact is over 3%, or when the curve looks drained.
4. Build the unsigned transaction with `/api/trade/dflow/order` (or `/api/dflow/swap`), using the owner's public key.
5. Simulate the transaction with `simulateTransaction` via `POST /api/solana/rpc`, using `sigVerify:false` and `replaceRecentBlockhash:true`. Report any errors and the expected balance changes.
6. Return the base64 transaction for the owner to review and sign in their own wallet. After they send it, track it with order-status.

## Rules
- Never sign, broadcast or submit an intent yourself. Never use `/api/trade/execute` or `/api/trade/broadcast` on the owner's behalf.
- The bot's OWS wallet stays observe-only until the owner sets a policy with a spend limit and a scoped key.
- Requote if the quote is more than 30 seconds old. The proxy allows about 60 requests per minute per IP, so back off on a 429.
