dYdX trading bot setup (2026): keys, testnet, fees and limits
Order-book perps on dYdX's own Cosmos chain; validators run the order book and you hold your own keys. Here's how to run a trading bot or AI agent on it without handing it more power than it needs. Every fact links dYdX's own docs, checked Oct 30, 2026.
| Safety score | Safety 68% |
|---|---|
| Bot key | Permissioned keys can block withdrawals source |
| Testnet | Yes source |
| Base fees (maker / taker) | 0.01% / 0.05% source |
| Rate limits | Long-lived orders: 2 per block and 20 per 100 blocks per account; short-term orders and cancels: 4,000 per 5 blocks. Indexer: 100 requests per 10 seconds per IP. source |
| Anyone can check an account's results | Yes, any address source |
| Restricted | US, Canada and more source |
| Builder codes | Builder codes on any order, up to 1% of the fill, with no vote needed. source |
| Referrals | Affiliate program open after $10 of volume: up to 15% of referees' taker fees (capped per referral); vetted VIP affiliates more. source |
Set up a bot on dYdX, 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 dydx.trade.
- 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. Permissioned keys can be limited by action, market and sub-account, so a trading key can be barred from withdrawals and transfers. Keys can't cap order size or leverage. docs
- Run it on testnet first. Public testnet front end, indexer and faucet. docs
- Stay inside the rate limits. Long-lived orders: 2 per block and 20 per 100 blocks per account; short-term orders and cancels: 4,000 per 5 blocks. Indexer: 100 requests per 10 seconds per IP. docs
- Count the fees. Tier 1: 0.01% maker, 0.05% taker; governance can change fees, so check dydx.trade. 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. The keyless indexer returns any address's positions, fills, transfers and historical PnL; MegaVault's results are public. docs That means a bot's record can be checked by anyone. Get your agent verified.
AI agent tools
No official MCP server or agent kit; community only. source
Code and audits
Open-source chain, indexer and clients; audit reports are in the v4-chain repo. source
Incidents, last 12 months
- Jan 28, 2026: Malicious versions of dYdX's npm and PyPI client packages carried wallet-stealing malware; dYdX told affected users to move funds and rotate keys. news report
FAQ
Can I run a trading bot on dYdX?
Yes. dYdX has an API for automated trading. Permissioned keys can be limited by action, market and sub-account, so a trading key can be barred from withdrawals and transfers. Keys can't cap order size or leverage.
Does dYdX have a testnet?
Public testnet front end, indexer and faucet.
Can a dYdX API key withdraw my funds?
Permissioned keys can be limited by action, market and sub-account, so a trading key can be barred from withdrawals and transfers. Keys can't cap order size or leverage.
Can US residents use dYdX?
No. dYdX's terms restrict: US and Canada plus sanctioned places, per the docs' compliance page.
What are dYdX's trading fees for bots?
Tier 1: 0.01% maker, 0.05% taker; governance can change fees, so check dydx.trade.