Skip to main content

The Bloomberg Terminal for Degenerates

Project description

pumpfunpy

⚠️ Unofficial third‑party library

pumpfunpy is NOT affiliated with Pump.fun.
All Pump.fun trademarks and logos belong to their respective owners.

This client ships with default public credentials that are embedded in Pump.fun’s own JavaScript bundle (as observed on 2025‑05‑23). They may change at any time.

Use of pumpfunpy is subject to Pump.fun’s Terms of Service; please respect their rate limits. See DISCLAIMER.md for full legal terms.

The Bloomberg Terminal for Degenerates

A Python client library for interacting with Pump.fun’s on-chain and off-chain APIs: stream live trades & coin listings, query market data, execute swaps, and transfer SPL tokens.


📦 Features

  • REST API wrappers for Pump.fun Frontend, Advanced, and Swap endpoints
  • WebSocket & NATS streaming of:
    • All trades
    • New coins
    • New replies
    • Graduated-coin trade events via DexScreener
  • On-chain trading & wallet (coming soon!)
  • Extensible HTTP client & streamer factories
  • Async & sync support (plans to expand both)

🛣 Roadmap & Upcoming Features

We’re constantly improving pumpfunpy. Here’s what’s on the horizon:

  1. Comprehensive Documentation

    • Add detailed docstrings for every module, class, and method
    • Generate API reference with Sphinx or MkDocs + autodoc
    • Publish hosted docs (ReadTheDocs or GitHub Pages)
  2. Inline Commenting & Code Clarity

    • Audit and enhance inline comments for complex logic
    • Standardize docstring style (Google or NumPy style)
    • Add usage examples in docstrings
  3. Refactoring & Modularization

    • Extract common base classes for endpoint wrappers
    • Introduce Pydantic models or dataclasses for responses
    • Centralize retry/backoff logic in HTTPClient
    • Implement dependency injection for HTTP/Solana clients and streamers
  4. Solana On-Chain Trading Integration

    • SolanaClient: wrapper around solana-py or JSON-RPC
    • TradingAPI: support swaps via Jupiter, Raydium, Serum
    • WalletAPI: SPL token transfers, account management
    • Key management: local Keypair, env-vars, hardware wallet support
    • Configurable RPC endpoints: support Mainnet-Beta, Helius, QuickNode
  5. Testing & CI Improvements

    • Unit tests for new modules, mocking network calls
    • Integration tests against Devnet or a local validator
    • GitHub Actions workflows for build, test, lint, and publish

🚀 Installation

pip install pumpfunpy

Or install the latest development version:

git clone https://github.com/TanPingZhi/pumpfunpy.git
cd pumpfunpy
pip install .

⚡ Quickstart

from pumpfunpy import api

# List the newest coins
resp = api.list_new_coins(last_score=0)
print(resp["coins"][:5])

# Get SOL price
sol = api.get_sol_price()
print(f"SOL price: ${sol}")

# Stream live trades (async)
import asyncio

async def main():
    async for trade in api.stream_all_trades():
        print(trade)

asyncio.run(main())

🔧 Configuration

By default, pumpfunpy picks up API endpoints from pumpfunpy/config.py. You can override:

from pumpfunpy import PumpFunAPI, HTTPClient

# Custom Frontend URL & headers
frontend_client = HTTPClient(
    base_url="https://my-custom-endpoint.com",
    headers={"X-Api-Key": "MY_KEY"}
)
api = PumpFunAPI(_frontend_client=frontend_client)

Future versions will include Solana RPC, key-management, and swap configuration.


🤝 Contributing

  1. Fork the repo
  2. Create a feature branch:
    git checkout -b feature/my-feature
    
  3. Commit your changes & push:
    git commit -am "Add awesome feature"
    git push origin feature/my-feature
    
  4. Open a Pull Request

Please run pytest for existing tests and add coverage for new features.


📄 License

This project is licensed under the MIT License. See LICENSE for details.


📬 Contact

Have questions, ideas, or want to report an issue?
✉️ Email: pumpfunpy@gmail.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pumpfunpy-0.1.2.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pumpfunpy-0.1.2-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file pumpfunpy-0.1.2.tar.gz.

File metadata

  • Download URL: pumpfunpy-0.1.2.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for pumpfunpy-0.1.2.tar.gz
Algorithm Hash digest
SHA256 feda092205588d20f05b01e9cad56ba3ef8d39a1b24775fe4f3b825184e67e6e
MD5 d595741b6605d74b794d52797269d7a9
BLAKE2b-256 9981c3c2407a6a84b8bdc15dba32663828dbaea811765eabbad90b920b069310

See more details on using hashes here.

File details

Details for the file pumpfunpy-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pumpfunpy-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for pumpfunpy-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f806826c9a59b41244033899a5b6ee11ad96849f7f70366e62717e3a7d7802fe
MD5 f32d0415f59c8aa9359e59b46dda291d
BLAKE2b-256 2f310d110fd805e508ce4fc9f06d0bc3a532e066cb935da3c22c821175fae900

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page