Skip to main content

Overview

Blitzz is a simple yet lightning-fast API for trading and market data tokens on Pump Fun and Pump AMM. Use it to build transactions, send them, fetch token metadata, and stream live human readable events.

Base URLs

HTTP Base URL: https://api.blitzz.fun WebSocket URL: wss://api.blitzz.fun/ws
ONLY WSOL PAIRS: At the moment, the API only supports tokens whose Quote token is WSOL (pump-amm). Support for other pairs will be added in the future. We are NOT responsible for any issues caused when trading a non WSOL pair.

Health Endpoint

Method: GET Path: /health Purpose: Warm up the connection to remove TCP handshake delay before trading. Response: 200 OK (empty body)
curl -i https://api.blitzz.fun/health

Authentication

No API key is required to use the Blitzz API. However, per-IP rate limits apply to each endpoint.

Conventions

  • Public Keys: All public keys are represented as base58 strings.
  • Amounts:
    • amount for buy or create is specified in lamports (1 SOL = 1,000,000,000 lamports).
    • amount for sell is specified in token base units (6 decimals).
  • Slippage: slippage_pct is a percentage (e.g., 0.5 means 0.5%).
  • Priority Fee: prioFee is the priority fee in SOL (e.g., 0.0005).
  • Pool: pool must be one of “pump”, “pump-amm”, or “auto”.
  • Errors: Errors are returned in a standard JSON format.

Local Trade Endpoint

Build an unsigned transaction that you can sign with your own wallet and send through your preferred RPC endpoint or Transaction Processor (e.g., Astralane). Method: POST Path: /local-trade Rate Limit: 5 requests/second per IP

Request Body

type
string
required
The type of transaction to build. Must be one of: "buy", "sell", "create", or "claimCreatorFees".
pool
string
required
The liquidity pool to use for the trade. Must be one of: "pump", "pump-amm", or "auto".
mint
string
The base58 mint address of the token (required for buy and sell).
payer
string
The base58 public key of the fee payer (required for buy, sell, and create).
creator
string
The base58 public key of the token creator (required for claimCreatorFees).
amount
number
  • For buy/create: The amount of SOL in lamports.
  • For sell: The amount of tokens in base units (6 decimals).
  • Not required for claimCreatorFees.
slippage_pct
number
The slippage tolerance as a percentage (e.g., 0.5 for 0.5%). Required for buy, sell, and create.
prioFee
number
required
The priority fee in SOL (e.g., 0.0005).
metadata
object
Required for type="create". Contains name, symbol, and uri.
transferConfig
object
Optional configuration to transfer SOL in the same transaction. Contains pubkey (base58) and lamports (string).

Response

tx
string
Base64-encoded unsigned transaction.
error
string
Descriptive error message (only present on error).

Examples

curl -X POST https://api.blitzz.fun/local-trade \
  -H 'content-type: application/json' \
  -d '{
    "type": "buy",
    "pool": "pump",
    "mint": "MINT_ADDRESS",
    "payer": "PAYER_ADDRESS",
    "amount": 10000000,
    "slippage_pct": 0.5,
    "prioFee": 0.0005
  }'
The response contains a base64-encoded unsigned transaction. Decode it, sign it with your wallet, and send it using your RPC provider.

Blitzz Mode Endpoint

Build, sign, and send a transaction in a single API call. The API signs with the provided private key and sends the transaction through our dedicated nodes for the fastest landing times. Method: POST Path: /blitzz Rate Limit: 3 requests/second per IP

Request Body

Includes all fields from /local-trade, plus:
privateKey
string
required
The base58 private key used to sign the transaction and pay fees.
Handle with care: Never expose your private keys in client-side code or public repositories. For a fully self-custodial flow, use the /local-trade endpoint.

Response

status
string
Transaction status (e.g., "success").
signature
string
The transaction signature.
error
string
Descriptive error message (only present on error).

Examples

curl -X POST https://api.blitzz.fun/blitzz \
  -H 'content-type: application/json' \
  -d '{
    "type": "buy",
    "pool": "auto",
    "mint": "MINT_ADDRESS",
    "amount": 10000000,
    "slippage_pct": 0.5,
    "prioFee": 0.0005,
    "privateKey": "YOUR_PRIVATE_KEY"
  }'

Metadata Endpoint

Fetch on-chain metadata for one or more tokens. Method: POST Path: /metadata Rate Limit: 1 request/second per IP Limit: Up to 10 mints per request

Request Body

mints
array
required
An array of 1 to 10 base58 mint addresses.

Response

results
array
Array of metadata objects for successfully fetched tokens.
errors
array
Array of error objects for tokens that could not be fetched.

Example

curl -X POST https://api.blitzz.fun/metadata \
  -H 'content-type: application/json' \
  -d '{
    "mints": [
      "MINT_ADDRESS_1",
      "MINT_ADDRESS_2"
    ]
  }'

Data WebSocket

Stream real-time events, including trades, token creations, and migrations. URL: wss://api.blitzz.fun/ws Path: / Limits:
  • Max 2 connections per IP.
  • You must subscribe to at least one filter within 10 seconds of connecting.
  • Max Limit of 50 Pubkeys on the Mint and Account filter.

Subscribing to Events

Send a JSON message to the WebSocket to subscribe to events. You can filter by mint, account, or event type.
{ "method": "subscribeFilterMint", "pubkeys": ["MINT1", "MINT2"] }
{ "method": "subscribeFilterAccount", "pubkeys": ["ACCOUNT1"] }
{ "method": "subscribeNewCreation" }
{ "method": "subscribeMigrations" }

Unsubscribing from Events

{ "method": "unsubscribeFilterMint", "pubkeys": ["MINT1"] }
{ "method": "unsubscribeFilterAccount", "pubkeys": ["ACCOUNT1"] }
{ "method": "unsubscribeNewCreation" }
{ "method": "unsubscribeMigrations" }

Event Examples

{
  "signature": "SIG",
  "mint": "MINT",
  "traderPublicKey": "TRADER",
  "txType": "buy",
  "tokenAmount": 123.456,
  "solAmount": 0.123,
  "virtualSolReserves": 123456789,
  "virtualTokenReserves": 987654321,
  "pool": "pump"
}

Errors and Limits

Common HTTP Errors

  • 400 Bad Request: Invalid input (e.g., bad pubkey, amount < 0).
  • 404 Not Found: Item not found (e.g., token or pool does not exist).
  • 429 Too Many Requests: Rate limit exceeded.
  • 500 Internal Server Error / 502 Bad Gateway: Server or upstream error.
  • 503 Service Unavailable: Blockhash is temporarily unavailable.
  • 504 Gateway Timeout: Timed out waiting for transaction confirmation on /blitzz.

Rate Limits

/local-trade

5 requests/second per IP

/blitzz

3 requests/second per IP

/metadata

1 request/second per IP (10 mints max)

WebSocket

2 connections per IP

Best Practices

  • Slippage: Keep slippage reasonable to avoid failed trades.
  • Pool Selection:
    • "pump": For bonding-curve trades.
    • "pump-amm": For AMM trades.
    • "auto": Let the API automatically choose the pool. This can be slower sometimes.
  • Security: For /blitzz, use a dedicated hot wallet with limited funds incase of any leak. For maximum security and control, use /local-trade to sign transactions locally.
  • Warmup The Connection: Use the /health endpoint to keep the connection open with the server and have lower latency to the server.