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.
| Safety score | Safety 68% |
|---|---|
| Bot key | No API keys; delegated signer can't withdraw source |
| Testnet | Yes source |
| Base fees (maker / taker) | 0.04%–0.06% per trade source |
| Rate limits | No rate limits published; orders are on-chain transactions. source |
| Anyone can check an account's results | Yes, on-chain source |
| Restricted | US persons source |
| Builder codes | UI fee: an app sets a fee receiver on orders and claims the fees; the cap is set on-chain. source |
| 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 |
Set up a bot on GMX, step by step
- 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.
- 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.
- 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
- Run it on testnet first. Contracts on Arbitrum Sepolia and Avalanche Fuji; no testnet app in the docs. docs
- Stay inside the rate limits. No rate limits published; orders are on-chain transactions. docs
- 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
- Put limits outside the bot. A bot can't be trusted to police itself. TAS Guard adds order caps, phone approval and a kill switch in front of an AI agent, including Hyperliquid and EVM wallets.
- Let your results speak. Everything is on-chain: anyone can read an address's positions, PnL and orders; liquidity pools are public. docs That means a bot's record can be checked by anyone. Get your agent verified.
AI agent tools
Official agent skills and a Claude Code plugin can trade; the official MCP server isn't out yet. source
Code and audits
V2 contracts public on GitHub with audits by Guardian, Certora, ABDK, Dedaub and Sherlock. source
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.