Yes, GMGN has an API. The gmgn api most people mean in 2026 is the official GMGN Agent API (GMGN also calls it "OpenAPI"), documented at docs.gmgn.ai and served from the host papi.gmgn.ai. You register a free key at gmgn.ai/ai using an Ed25519 key pair, then read token, wallet and market data or place trades programmatically. Reads are free; trades placed through the API pay GMGN's normal flat 1% fee.

This matters because for about two years "gmgn api" meant something completely different: a pile of undocumented endpoints that people reverse-engineered from the web app, wrapped in Python scripts, and watched break every few weeks. That era is over, but the old tutorials are still ranking, which is why so many searches for "does gmgn have an api" get confusing answers.

This page explains what the official API covers, how authentication and limits work, what it costs, why the old scraped endpoints fail, and how a typical agent workflow looks. It is an independent guide; GMGN AI App Guide is not affiliated with GMGN. For the step-by-step key setup see the separate GMGN API key guide, and for the ready-made agent tooling see gmgn-skills, CLI and MCP.

What is the GMGN Agent API?

The GMGN Agent API is the programmatic interface to the same data and trading engine that powers the GMGN AI app web terminal. GMGN positions it explicitly for AI agents: the documentation section is titled "GMGN Agent API", the registration page is gmgn.ai/ai, and the official open-source package that consumes it is called gmgn-skills, a set of skills for Claude Code, Cursor, Cline, Codex and OpenCode.

Two names are used interchangeably in GMGN's own material and in the community:

  • GMGN Agent API: the name used in the docs navigation and on gmgn.ai/ai.
  • GMGN OpenAPI: the name used for the HTTP specification. Searches for "gmgn openapi" or "openapi gmgn" point at the same thing.

Both refer to a single HTTPS API hosted at papi.gmgn.ai. The "p" is commonly read as "public" or "programmatic"; GMGN does not document what it stands for, so treat that as guesswork.

Where are the GMGN API docs?

The only official documentation is docs.gmgn.ai, specifically the page at docs.gmgn.ai/index/gmgn-agent-api. People search for "gmgn gitbook" because the docs use a GitBook-style layout with a left sidebar, but there is no separate GitBook space you need to find. "gmgn docs" and "docs gmgn" resolve to the same site, which also holds the fee schedule, copy-trade rules and error code lists that this site references throughout.

The second official source is the code itself: github.com/GMGNAI/gmgn-skills shows exactly how GMGN's own tooling signs requests and which endpoints it calls. If the docs and the repo ever disagree, the repo reflects what actually works.

Which endpoint categories exist?

GMGN groups the Agent API by what an agent needs to do rather than by chain. Based on the docs and the 12 skills in the official repo, the surface breaks down into five families.

Category What it covers Typical use in an agent
Token Token info, security checks, holders, K-line (candlestick) history, contract due-diligence scoring "Is this token safe to buy?" before any trade
Wallet Wallet analysis, PnL, holdings, copy-trade wallet scoring, smart money lists Ranking wallets to follow or avoid
Market Trending lists, new pairs, market data across chains Discovery and screening loops
Trade Market orders, limit orders, TP/SL orders, multi-wallet trading, portfolio Execution and position management
Signals Smart money activity and similar signal feeds Triggering strategies from on-chain events

GMGN claims order submission through this stack in under 0.3 seconds. That is a vendor claim from the gmgn-skills README, not an independent benchmark, and it measures submission to GMGN's router, not confirmation on-chain.

Supported chains for the API as of September 2026, per the gmgn-skills README chain list, are Solana, BSC, Base, Ethereum, Robinhood Chain, Arc and Stable. The demo key name (gmgn_solbscbaseethmonadtron) also hints at Monad and Tron support, but the README chain list is the safer reference; check the docs for the current set before building on a chain. See GMGN supported chains for how the web terminal's chain list compares.

What the API does not cover

Some things people assume are there are not, or are not documented:

  • Copy trading tasks: copy trading in GMGN is Solana-only, limited to 10 concurrent tasks, and requires Telegram login per the docs. The API exposes copy-trade wallet scoring (which wallets are worth copying), not the managed copy-trade task engine itself as documented. If you want automated following via the API, you build the loop yourself from wallet signals plus trade endpoints. Read GMGN copy trading for how the native feature works.
  • Withdrawals: withdrawals require the website with Google Authenticator 2FA. Nothing in the docs suggests an API withdrawal endpoint, and that is a good thing.
  • WebSocket streams: covered below.
  • Perps, shorting, paper trading: none of these exist in GMGN as of September 2026, so there is no API for them.

How does GMGN API authentication work?

The auth model is asymmetric-key based rather than a plain bearer token, which is unusual among memecoin terminals and worth understanding before you write code.

  1. You sign in at gmgn.ai/ai with your normal GMGN account (Telegram, Google, email, or wallet login).
  2. You generate an Ed25519 key pair locally. The private key never leaves your machine.
  3. You bind the public key to your GMGN account, which issues you an API key identifier.
  4. Each request carries the API key plus a signature produced with your Ed25519 private key, so GMGN can verify the request came from you without you ever transmitting a secret it could leak.

Because the private key signs trades, it has the same practical power as your GMGN login for trading purposes. Anyone holding it can buy and sell with your GMGN-hosted wallet balance. The docs also describe IP whitelisting as a cooperation mechanism: you tell GMGN which IPs your agent runs from, and requests from elsewhere are refused. Use it. The full generation, binding and revocation flow is in the how to get a GMGN API key walkthrough.

The public demo key

GMGN publishes a demo key, gmgn_solbscbaseethmonadtron, for testing. It is shared by everyone, so:

  • Expect aggressive rate limits and no guarantees.
  • Never route real trades through it.
  • Never rely on it in production; it can be rotated or disabled without notice.

What are the GMGN API rate limits?

GMGN's docs state that rate limits apply and that higher limits are handled in cooperation with GMGN, tied to IP whitelisting. GMGN does not publish a single fixed number such as "N requests per second" in a way we could verify as of September 2026, so any tutorial quoting an exact figure is either quoting an old scraped-endpoint limit or guessing.

Practical guidance that holds regardless of the exact limit:

  • Cache token security and holder data; it does not change every 100 ms.
  • Poll market/trending endpoints on a fixed schedule rather than in a tight loop.
  • Back off on HTTP 429 responses with jitter instead of hammering.
  • Keep one key per deployment so a single misbehaving bot does not get your whole setup throttled.

Is the GMGN API free? What does it cost?

Short answer: the key is free, the data is free, the trades are not.

Item Cost (per docs.gmgn.ai, September 2026)
Registration at gmgn.ai/ai Free
API key generation and binding Free
Data endpoints (token, wallet, market, signals) Free, subject to rate limits
Trades executed via API Flat 1% GMGN fee on every buy and sell, same as the terminal
Priority fee / tip User-set, 0.0001–2 SOL each on Solana; paid to validators and private nodes, not GMGN
Subscription tier None documented

The 1% is the same fee explained in GMGN fees: there is no surcharge for automation, no discount for API use, and priority fees are on top. If your bot trades 0.1 SOL positions with a 0.006 SOL priority fee, that priority fee alone is 6% of the position on each leg, which will dwarf the 1% platform fee. Size positions and priority fees together, not separately.

There is one more cost that is easy to forget: GMGN's PnL display does not reliably deduct priority fees and tips. If your agent reads PnL from the API to decide whether a strategy is working, reconcile against actual wallet balance changes, not the displayed PnL. See GMGN PnL explained.

The old unofficial "gmgn api" and why it breaks

Before the Agent API, the phrase "gmgn api free" referred to something else entirely. Developers opened browser dev tools on gmgn.ai, copied the JSON endpoints the front end called, and wrapped them in Python or Node scripts. Dozens of GitHub repos with names like "gmgn-api", "gmgn-wrapper" or "gmgn-bot" still exist. Searching "github gmgn api" surfaces mostly these, not the official org.

They break for predictable reasons:

  1. Cloudflare bot protection. gmgn.ai sits behind a Cloudflare challenge (the "Just a moment..." page users see). Scripts without a real browser fingerprint get blocked, so wrappers resorted to headless browsers, TLS fingerprint spoofing and cookie harvesting. Every Cloudflare rule update broke them.
  2. No contract. Internal endpoints renamed fields, changed pagination and moved hosts with no changelog because no one outside GMGN was supposed to depend on them.
  3. Session-bound auth. The web app authenticates with session cookies tied to your login, so scripts needed your cookies, which is a credential-leak risk on top of the fragility.
  4. Terms of service. Automated scraping of the site is the kind of thing a ToS typically prohibits, and GMGN's ToS is governed by British Virgin Islands law with BVI arbitration, so there is no realistic recourse if an account gets restricted.

If you are maintaining a scraped wrapper today, migrating to the documented API removes all four problems at once. The only thing you lose is access to data GMGN chose not to expose, and the trade-off is worth it for anything that touches money.

Does GMGN have a WebSocket API?

The GMGN web terminal streams Trenches, price and trade updates over WebSocket. Developers naturally ask for the same feed. As of September 2026, GMGN has published no WebSocket documentation, no message schema and no auth method for it. The documented Agent API is HTTPS request-response.

That means "gmgn websocket" tutorials are reverse-engineered from browser traffic and fall into the same unsupported category as the old scraped endpoints. If you need near-real-time data, the supportable options are polling the documented market and signal endpoints at a sane interval, or subscribing to raw chain data from your own RPC and using GMGN's API for enrichment (security checks, wallet labels, scoring).

What does a typical GMGN Agent API workflow look like?

Here is the shape of a screening-and-execution loop that the official skills already implement in pieces. The steps map cleanly onto the endpoint categories above.

  1. Discover. Pull a trending or new-pair list for one chain from the market endpoints, filtered by market cap, liquidity and age, mirroring the filters described in GMGN filters.
  2. Screen. For each candidate, fetch token security data: mint authority, freeze authority, top-10 holder percentage, LP burned, bundler and insider share, honeypot status on Ethereum. Reject anything that fails your rules. GMGN's contract due-diligence scoring skill wraps this.
  3. Check who is in it. Pull the holder list and look at wallet tags (Smart Degen, Sniper, Fresh wallet, Phishing). Cross-reference against smart-money signals. The GMGN wallet tracker guide explains what those tags mean.
  4. Size and execute. Submit a market buy with an explicit slippage and priority fee. GMGN's own recommendations are Auto slippage for manual trades, 30–35% for automated orders and 50%+ on brand-new tokens, with 0.006 SOL+ priority for automated orders.
  5. Manage. Place TP/SL or trailing take-profit orders. Note the native constraints: max 100 active limit orders per account and auto-created TP/SL orders are valid for 24 hours. Read GMGN limit orders and stop-loss for the order semantics.
  6. Reconcile. Read portfolio and wallet balance, not just PnL, and log every failure code. Codes like B4 (honeypot/blacklist unsellable) and D1 (liquidity pulled) should feed back into your screening rules.

Illustrative request shape

The following is illustrative pseudo-code only, not a copy of GMGN's real schema. Endpoint paths, header names and parameter names in the docs and the gmgn-skills repo take precedence.

# ILLUSTRATIVE ONLY - check docs.gmgn.ai for real paths, headers and signing
curl -s "https://papi.gmgn.ai/<token-info-endpoint>?chain=sol&address=<TOKEN>" \
  -H "X-API-Key: <your_api_key>" \
  -H "X-Signature: <ed25519_signature_of_request>" \
  -H "X-Timestamp: <unix_ms>"

The point of the example is the structure: an API key identifier, a per-request Ed25519 signature, and a timestamp to prevent replay. Do not paste it into production and expect it to run.

Is building on the GMGN API safe?

The data side is low-risk. The trade side deserves the same caution as any hot wallet:

  • Custody. GMGN wallets are hosted; private key export is prohibited on all chains, disabled around 19 March 2025 per the docs. Your bot trades a balance you cannot withdraw without the website plus 2FA. Fund it with what you would accept losing to a bug. Full discussion in is GMGN safe.
  • Key custody. Your Ed25519 private key equals trading control. Store it in a secrets manager, not in a repo, and use IP whitelisting.
  • Anti-MEV. GMGN shipped Anti-MEV in July 2025 after an April 2025 report found GMGN users absorbed roughly 30.8% of Solana sandwich-attack profits over 30 days. Anti-MEV needs at least 0.002 SOL priority fee plus 0.0001 SOL tip; make sure your automated orders meet that if you enable it.
  • Failure costs. Submission failures (B-codes) cost nothing; execution failures (C1 slippage revert) burn gas and priority fee. Bots that retry blindly can bleed fees. The No Available Router page covers the most common non-costly failure.

Key takeaways

  • The gmgn api that matters in 2026 is the official GMGN Agent API / OpenAPI at docs.gmgn.ai, host papi.gmgn.ai; everything else is scraped and unsupported.
  • Endpoints cover token, wallet, market, trade and signal data; copy-trade task management, withdrawals and WebSocket streams are not documented.
  • Auth uses an Ed25519 key pair generated by you and bound at gmgn.ai/ai; IP whitelisting is available and recommended.
  • The key and data are free; trades pay the flat 1% GMGN fee plus your priority fee and tip.
  • The public demo key gmgn_solbscbaseethmonadtron is for testing only.
  • The fastest way to use the API from an AI IDE is the official gmgn-skills package rather than writing a client from scratch.

If you want to try the API against a real account, register at gmgn.ai/ai after creating an account: Open GMGN. Then follow the API key guide for the Ed25519 setup.

Frequently asked questions

Does GMGN have an API?

Yes. As of September 2026 GMGN publishes an official Agent API (OpenAPI) at docs.gmgn.ai/index/gmgn-agent-api, served from papi.gmgn.ai. Before that, the only "gmgn api" people used was a set of undocumented endpoints scraped from the web app, which GMGN never supported.

Is the GMGN API free?

Registering and generating an API key at gmgn.ai/ai is free, and GMGN does not document a subscription tier for the API. Any trade you execute through the API still pays GMGN's flat 1% fee on buys and sells, exactly like trades placed in the web terminal.

Where are the GMGN API docs?

The official documentation lives at docs.gmgn.ai under the "GMGN Agent API" section. Some people search for "gmgn gitbook" because the docs site uses a GitBook-style layout, but docs.gmgn.ai is the only official source. The gmgn-skills repository on github.com/GMGNAI is the official reference implementation that calls the API.

Does GMGN have a WebSocket API?

GMGN's web app streams live data over WebSocket, but GMGN has not published public WebSocket documentation as of September 2026. Treat the WebSocket feed as undocumented and unsupported; the documented Agent API is request-response over HTTPS.

How does GMGN API authentication work?

You register at gmgn.ai/ai, generate an Ed25519 key pair, and bind the public key to your account to receive an API key. Requests are then signed with your private key. A public demo key, gmgn_solbscbaseethmonadtron, exists for testing only and should never be used for anything you care about.

Why did the old GMGN API endpoints stop working?

The old endpoints were internal calls the web app made to its backend. They sat behind Cloudflare bot checks, changed without notice, and were never a contract with developers. When GMGN shipped the official Agent API, the scraped approach became both fragile and unnecessary.

Ready to try the GMGN AI app?

Open the official terminal, install the iOS or Android app, or start with the Telegram bot. Keep only trading capital in the wallet.

Sources: GMGN documentation, DefiLlama, official app store listings and GMGN's public channels. See our methodology. Last reviewed 2026-09-22.