Memecoin data in Python
Updated
No SDK to install. Every endpoint is plain HTTPS with a Bearer key and answers the same envelope: data, cost_usd, balance_usd, cached and request_id.
Key
Run this once and keep the key.
Python
import requests
key = requests.post("https://api.crypto2api.com/v1/keys").json()["key"]
print(key)A tiny client
Everything below uses this helper.
Python
import requests
API = "https://api.crypto2api.com/v1/memecoin"
S = requests.Session()
S.headers["Authorization"] = "Bearer c2a_your_key"
def get(path, **params):
r = S.get(API + path, params=params, timeout=30)
r.raise_for_status()
return r.json()["data"]
def post(path, body):
r = S.post(API + path, json=body, timeout=30)
r.raise_for_status()
return r.json()["data"]Trending memecoins
window is 5m, 1h, 6h or 24h; chain defaults to solana.
Python
for c in get("/trending", window="1h", limit=10)["coins"]:
print(c["symbol"], c["price_usd"])50 prices in one call
POST /prices takes up to 50 mints and costs one call.
Python
prices = post("/prices", {"mints": ["MINT_1", "MINT_2"]})
print(prices)Holders and safety
Python
print(get("/token/MINT/holder-count"))
print(get("/token/MINT/safety")["score"])Endpoints in this guide
- Trending Coins GET /memecoin/trending
- Many Prices POST /memecoin/prices
- Holder Count GET /memecoin/token/:mint/holder-count
- Safety Score GET /memecoin/token/:mint/safety
- New Launches GET /memecoin/launches
Questions
- Is there a Python SDK?
- Not needed: it is plain JSON over HTTPS. The helper above is the whole client.
- How do I see what a call cost?
- Every answer carries cost_usd and balance_usd next to data.
More guides
- The pump.fun API, without running a node
- Get every new Solana token the moment it launches
- Check a memecoin for a rug pull from code
- Build a memecoin bot: watch, filter, quote, swap
All endpoints · Pricing · Compared with other APIs · Get a key