# GMX trading bot setup: API keys, testnet and fees

> How to run a trading bot on GMX: what its API keys can do, testnet, fees, rate limits and who&#x27;s restricted. Sourced from GMX&#x27;s own docs.

Canonical: https://tradingagentstack.com/gmx-trading-bot/

1. [Home](https://tradingagentstack.com/)

2. [Perp DEXs for bots](https://tradingagentstack.com/best-perp-dex-for-trading-bots/)

3. GMX

# GMX trading bot setup (2026): keys, testnet, fees and limits

Pool-based perps on Arbitrum, Avalanche and MegaETH: trades fill against liquidity pools at oracle prices, executed by a keeper in a second step. Here's how to run a trading bot or AI agent on it without handing it more power than it needs. Every fact links GMX's own docs, checked Oct 30, 2026.

**Watch out:** Two-step keeper execution and no WebSocket feed suit slower strategies better than high-frequency ones.

| Safety score | [Safety 68%](https://tradingagentstack.com/tool/gmx/) |
| --- | --- |
| Bot key | No API keys; delegated signer can't withdraw [source](https://docs.gmx.io/docs/api/contracts/delegated-trading) |
| Testnet | Yes [source](https://docs.gmx.io/docs/api/contracts/addresses) |
| Base fees (maker / taker) | 0.04%–0.06% per trade [source](https://docs.gmx.io/docs/trading/fees) |
| Rate limits | No rate limits published; orders are on-chain transactions. [source](https://docs.gmx.io/docs/api/overview) |
| Anyone can check an account's results | Yes, on-chain [source](https://docs.gmx.io/docs/api/contracts/reader) |
| Restricted | US persons [source](https://gmx.io/terms-and-conditions) |
| Builder codes | UI fee: an app sets a fee receiver on orders and claims the fees; the cap is set on-chain. [source](https://docs.gmx.io/docs/api/frontend-integration) |
| Referrals | Anyone can create a code on-chain: tier 1 gives traders 5% off and the referrer 5% of open and close fees; higher tiers need volume. [source](https://docs.gmx.io/docs/referrals) |

## Set up a bot on GMX, step by step

1. **Make sure you're on the real site.** Fake trading sites and bots copy every big exchange. Before you connect a wallet, use the official app at [app.gmx.io](https://app.gmx.io).

2. **Give the bot its own account.** Put the bot in a separate sub-account or wallet with only the money it needs, so a bug or a leaked key can't reach the rest.

3. **Create the bot's key.** Use a key that can trade but not send money out. No exchange API keys: bots sign with a wallet. A delegated subaccount signer can place and cancel orders with an expiry and a cap on actions, but can't withdraw, and order proceeds return to the main account. [docs](https://docs.gmx.io/docs/api/contracts/delegated-trading)

4. **Run it on testnet first.** Contracts on Arbitrum Sepolia and Avalanche Fuji; no testnet app in the docs. [docs](https://docs.gmx.io/docs/api/contracts/addresses)

5. **Stay inside the rate limits.** No rate limits published; orders are on-chain transactions. [docs](https://docs.gmx.io/docs/api/overview)

6. **Count the fees.** Opening or closing costs 0.04% or 0.06% depending on whether it balances longs and shorts, plus price impact, borrowing and funding. [docs](https://docs.gmx.io/docs/trading/fees)

7. **Put limits outside the bot.** A bot can't be trusted to police itself. [TAS Guard](https://tradingagentstack.com/guard/) adds order caps, phone approval and a kill switch in front of an AI agent, including Hyperliquid and EVM wallets.

8. **Let your results speak.** Everything is on-chain: anyone can read an address's positions, PnL and orders; liquidity pools are public. [docs](https://docs.gmx.io/docs/api/contracts/reader) That means a bot's record can be checked by anyone. [Get your agent verified](https://tradingagentstack.com/get-your-ai-agent-verified/).

## AI agent tools

Official agent skills and a Claude Code plugin can trade; the official MCP server isn't out yet. [source](https://docs.gmx.io/docs/ai-agents/plugins-and-skills)

## Code and audits

V2 contracts public on GitHub with audits by Guardian, Certora, ABDK, Dedaub and Sherlock. [source](https://docs.gmx.io/docs/security)

## Incidents, last 12 months

None found in official sources in the last 12 months.

## FAQ

### Can I run a trading bot on GMX?

Yes. GMX has an API for automated trading (orders are on-chain transactions signed by your wallet). No exchange API keys: bots sign with a wallet. A delegated subaccount signer can place and cancel orders with an expiry and a cap on actions, but can't withdraw, and order proceeds return to the main account.

### Does GMX have a testnet?

Contracts on Arbitrum Sepolia and Avalanche Fuji; no testnet app in the docs.

### Can a GMX API key withdraw my funds?

No exchange API keys: bots sign with a wallet. A delegated subaccount signer can place and cancel orders with an expiry and a cap on actions, but can't withdraw, and order proceeds return to the main account.

### Can US residents use GMX?

No. GMX's terms restrict: US persons and sanctioned places and people (terms, Aug 2026).

### What are GMX's trading fees for bots?

Opening or closing costs 0.04% or 0.06% depending on whether it balances longs and shorts, plus price impact, borrowing and funding.

## Compare

- [All 9 perp DEXs compared for bots](https://tradingagentstack.com/best-perp-dex-for-trading-bots/)

- [GMX Safety score and tool page](https://tradingagentstack.com/tool/gmx/)

Other exchanges: [Hyperliquid](https://tradingagentstack.com/hyperliquid-trading-bot/) · [Lighter](https://tradingagentstack.com/lighter-trading-bot/) · [Aster](https://tradingagentstack.com/aster-trading-bot/) · [dYdX](https://tradingagentstack.com/dydx-trading-bot/) · [Paradex](https://tradingagentstack.com/paradex-trading-bot/) · [Extended](https://tradingagentstack.com/extended-trading-bot/) · [Pacifica](https://tradingagentstack.com/pacifica-trading-bot/) · [edgeX](https://tradingagentstack.com/edgex-trading-bot/)

Facts from GMX's docs, terms and GitHub, read Oct 30, 2026; news reports are marked. Fees and limits change: confirm on GMX's site. No referral links. Not financial advice.

## For agents

- [When to use this site, and the page index](https://tradingagentstack.com/llms.txt)
- [Sitemap](https://tradingagentstack.com/sitemap.xml)
- [Contact](https://tradingagentstack.com/contact/)
- [MCP server](https://tradingagentstack.com/mcp/)
- [MCP discovery](https://tradingagentstack.com/.well-known/mcp)
