GMGN APIgmgn.ai ↗
Access real-time Solana token trends, OHLCV candles, holder data, security flags, trade history, and top-trader rankings via the GMGN.ai API.
What is the GMGN API?
The GMGN.ai API provides 8 endpoints covering real-time Solana blockchain analytics, from trending token discovery to per-wallet PnL breakdowns. The get_trending_tokens endpoint returns ranked token lists with price, volume, market cap, holder count, and security indicators in a single response, while companion endpoints expose OHLCV candles, trade history, holder lists, and a top-trader leaderboard — giving you a full view of both tokens and the wallets trading them.
curl -X GET 'https://api.parse.bot/scraper/fd0acc27-2d9b-49ca-b8ff-216a1b3ce0e0/get_trending_tokens?filters=renounced&orderby=swaps&direction=asc&timeframe=1m' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace gmgn-ai-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""GMGN Crypto Analytics — discover safe trending tokens, inspect holders, track top traders."""
from parse_apis.gmgn_crypto_analytics_api import (
Gmgn, Timeframe, Resolution, Period, TrendingOrderBy, WalletOrderBy, NotFound
)
client = Gmgn()
# Trending tokens sorted by volume in the last hour
for token in client.tokens.trending(timeframe=Timeframe.ONE_HOUR, orderby=TrendingOrderBy.VOLUME, limit=3):
print(token.name, token.symbol, token.price, token.holder_count)
# Drill into the first trending token for security analysis
top = client.tokens.trending(timeframe=Timeframe.ONE_HOUR, limit=1).first()
if top:
info = top.details()
print(info.stat.holder_count, info.stat.top_10_holder_rate)
print(info.security.security.renounced_mint, info.security.security.is_honeypot)
# Candle chart data for that token
for candle in client.token(address=top.address).candles.list(resolution=Resolution.FIVE_MINUTES, limit=3):
print(candle.time, candle.open, candle.close, candle.volume)
# Recent trades
for trade in client.token(address=top.address).trades.list(limit=3):
print(trade.event, trade.amount_usd, trade.price_usd, trade.maker)
# Search for a token by name
for coin in client.coins.search(query="bonk", limit=3):
print(coin.name, coin.symbol, coin.address)
# Top traders leaderboard
for trader in client.wallets.ranking(period=Period.SEVEN_DAYS, orderby=WalletOrderBy.PNL_7D, limit=3):
print(trader.wallet_address, trader.pnl_7d, trader.winrate_7d)
# Typed error handling on wallet lookup
try:
wallet = client.wallets.get(wallet_address="FpwgTbw7os7SWPCEticrtDPGmCgTRdjnwvL8mFghra4e")
print(wallet.realized_profit, wallet.pnl_7d, wallet.tags)
except NotFound as exc:
print(f"Wallet not found: {exc}")
print("exercised: tokens.trending / tokens.get / candles.list / trades.list / coins.search / wallets.ranking / wallets.get")
Retrieve trending tokens on Solana ranked by trading activity within a timeframe. Returns tokens with price, volume, market cap, holder count, swap counts, and security indicators. Single-page response of ranked results.
| Param | Type | Description |
|---|---|---|
| filters | string | Comma-separated security filters: renounced, frozen, not_honeypot, has_twitter, has_website |
| orderby | string | Field to order results by. |
| direction | string | Sort direction. |
| timeframe | string | Timeframe bucket for trending data. |
{
"type": "object",
"fields": {
"rank": "array of TokenSummary objects ranked by activity"
},
"sample": {
"data": {
"rank": [
{
"buys": 5917,
"name": "Umur",
"rank": 1,
"price": 0.000120544,
"sells": 3816,
"swaps": 9733,
"symbol": "Umur",
"volume": 316477,
"address": "EANGBwtW8pkF4qtKJBzQQoztRVYDTqH1gFjAN1vuKAQ8",
"creator": "GGTQB23PaLxb8ty2XtB3mc8r2iJBbsKrnWkq7e3KGMev",
"exchange": "meteora_damm_v2",
"launchpad": "",
"liquidity": 24933,
"market_cap": 120544,
"is_honeypot": 0,
"holder_count": 1732,
"renounced_mint": 1,
"twitter_username": "",
"top_10_holder_rate": 0.3205
}
]
},
"status": "success"
}
}About the GMGN API
Token Discovery and Security Analysis
get_trending_tokens accepts optional comma-separated filters such as renounced, frozen, not_honeypot, has_twitter, and has_website, letting you narrow the ranked list to tokens that meet specific safety criteria. Each result in the rank array carries price, volume, market cap, swap counts, and security indicators. For deeper inspection, get_token_info takes a base-58 address and returns two objects: stat (holder analytics including top-10 concentration and dev holdings) and security (flags for renounced mint, honeypot status, burn ratio, and launchpad provenance).
Market Data and Trade History
get_token_candles returns up to 500 OHLCV candles per request controlled by the limit and resolution parameters. Each Candle object contains time, open, close, high, low, volume, and amount, expressed in market-cap terms rather than raw price. get_token_trades retrieves the most recent trades for a token with fields including maker address, USD value, event type (buy or sell), and transaction hash. It supports cursor-based pagination via the next field, allowing sequential traversal of trade history up to 50 records per page.
Holder and Wallet Intelligence
get_token_holders returns holders ordered by holding percentage descending, with per-holder fields for balance, USD value, realized profit, cost basis, and wallet classification tags. Pagination follows the same cursor / next pattern as get_token_trades. On the wallet side, get_wallet_rankings exposes a leaderboard sortable by PnL or realized profit over configurable periods, and get_wallet_profile returns a single wallet's pnl_7d, pnl_30d, winrate, sol_balance, realized_profit, risk metrics (honeypot_ratio, fast_tx_ratio), and linked twitter_username.
The GMGN API is a managed, monitored endpoint for gmgn.ai — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when gmgn.ai changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official gmgn.ai API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Screen new Solana token launches for honeypot and renounced-mint flags before trading
- Build OHLCV charting dashboards using market-cap candlestick data from
get_token_candles - Identify top-performing wallets by realized profit using
get_wallet_rankingsand deep-dive withget_wallet_profile - Monitor whale concentration risk via top-10 holder percentage from
get_token_info - Paginate through full trade history of a token to reconstruct on-chain activity timelines
- Alert on newly trending tokens that already have a verified Twitter presence and a clean security profile
- Copy-trade candidate discovery by filtering the leaderboard for wallets with high win rates over a 30-day period
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does GMGN.ai offer an official developer API?+
What security fields does `get_token_info` return, and how are they different from the trending filters?+
get_token_info returns a security object with discrete flags: renounced mint status, honeypot classification, burn ratio, and launchpad source. The filters parameter on get_trending_tokens lets you pre-filter the ranked list to tokens matching criteria like not_honeypot or has_website, but it does not return the raw flag values — those require a follow-up call to get_token_info by contract address.How does pagination work across the trade and holder endpoints?+
get_token_trades and get_token_holders both use cursor-based pagination. Each response includes a next field containing an opaque cursor string. Pass that value as the cursor parameter in your next request to retrieve the following page. When next is null, you have reached the end of the dataset. Page size is controlled by limit (max 50 for trades).Does the API cover Ethereum, Base, or other EVM chains?+
Is historical wallet PnL available beyond 30 days?+
get_wallet_profile exposes pnl_7d and pnl_30d ratio fields along with total realized_profit. Finer historical breakdowns or PnL time series beyond 30 days are not currently returned. You can fork this API on Parse and revise it to add an endpoint exposing longer-range wallet history if the source data supports it.