Gunbot / dYdX (defi) automation

Self-custody trading automation

Flexible Trading Bot for dYdX v4

This solution enables customizable strategies and reliable performance on dYdX. Backed by active development, it helps you trade smarter in the DeFi derivatives market.

Meet the Gunbot workspace. Build your strategy, manage trading pairs, and follow execution from one interface.

Your exchange account

Connect through the exchange API and keep funds in your account.

Your trading rules

Choose a built-in strategy or develop custom JavaScript logic.

A connected workspace

Keep pairs, strategy settings and trading activity within reach.

From account to automation

Automate Crypto Trades on dYdX

Deployment is efficient. Connect your dYdX v4 API key, and automate trades across unlimited pairs. This ensures your strategies execute consistently, allowing you to diversify and optimize time management in DeFi trading.

Explore accounts and pair management →
Current Gunbot pair management interface with strategies and trading controls

Strategy and execution

Precision dYdX Trading

Simplify trading on dYdX with tools designed for all futures pairs. Use pre-built logic or custom scripts to match your style. Advanced options like grid setups and programmable strategies allow for deeper market engagement. Built-in risk management features, including automated stop limits and DCA, handle both volatility and accumulation. The bot handles execution, letting you focus on strategy optimization for better dYdX results.

Gunbot strategy controls for trading limits, trailing and risk management

Automation tools

Trading tools for dYdX (defi)

Continuous Execution

Operates 24/7, monitoring the market and executing trades instantly. Ensures efficient position management on dYdX.

Proven DeFi Strategies

Select from existing DeFi strategies or create custom logic to fit dYdX’s unique environment. Provides the tools to maintain an edge.

Disciplined Logic

Avoids emotional decision-making, adhering strictly to the plan for consistent, algorithmic execution.

Streamlined Management

A simple interface allows you to oversee trades and adjust settings from any device, including mobile access.

Automate Your dYdX Trading with Gunbot

Connect Gunbot to dYdX for sophisticated, automated strategy execution on a leading decentralized derivatives exchange. Both v3 and v4 protocols are supported.

Strategy modes
01 / Automated Grid Trading

Systematic Grid Trading on dYdX Perpetuals

How Gunbot enhances Grid Trading on dYdX

dYdX offers high performance and deep liquidity on its perpetual markets, an ideal environment for grid strategies. Gunbot connects directly to your dYdX account (v3 or v4), managing a grid of orders with precision. Its dynamic trailing and automatic profit target features help adapt the grid to dYdX's fast-moving order book, while you retain full self-custody of your funds.

Key Features

  • 01
    Direction Control
    Set the bot to trade LONG, SHORT, or let it decide automatically based on market trends.
  • 02
    Dynamic Profit Targets
    Use 'Auto Gain' to let Gunbot set profit targets based on volatility, adapting to current market conditions.
  • 03
    Grid Spacing
    Adjust the 'GRID_MULTIPLIER' to widen or tighten the distance between your grid orders.
  • 04
    Position Sizing
    Control your exposure with 'TRADING_LIMIT' per order and 'MAX_BUY_COUNT' to cap total position size.
  • 05
    Advanced Trailing
    Fine - tune both buy and sell trailing with custom percentage ranges to optimize entry and exit points.
  • 06
    Risk Management
    Set a 'MAX_LOSS' in quote currency to automatically close a position if it reaches an unacceptable loss level.
BTC/USDT · 15m
Strategy monitor
+2.41%
Live
Ideal Market
Ranging Volatility
Position Time
Hours to Days
Risk
Medium

Grid trading is designed to place a series of buy (long) and sell (short) orders within a defined range. It systematically trades price fluctuations, aiming to capture profits from market volatility without needing to predict the overall direction.

Direction ControlDynamic Profit TargetsGrid Spacing
Capital allocation68%

Get started with dYdX (defi)

A deliberate path to live trading.

01 / Connect your account

Follow the exchange setup guide and configure the API permissions required for trading. Keep withdrawal access disabled where applicable.

Read the setup guide →

02 / Shape your strategy

Choose the pairs and strategy you want to run. Review order sizes, exposure limits and entry and exit settings before enabling automation.

Explore strategy tools →

03 / Review and refine

Monitor orders and trading activity, then adjust settings as conditions change. Automation follows your rules; it does not remove market risk.

See Gunbot in action →

Guides and tools for trading on dYdX

Resources for dYdX Automation

These resources provide practical advice for optimizing your results on dYdX. Whether optimizing strategies or learning backtesting basics, find the necessary information here.

Backtesting Archive

Review backtesting data to evaluate strategy performance on dYdX. Use these insights to refine your setup.

See results →

Custom Strategy Scripting

Learn to craft and apply unique trading setups for dYdX using JavaScript.

Start coding →

Strategy Selection

Select approaches that align with your objectives on dYdX. This guide details your available options.

See strategy choices →

Supported Exchanges

View the full list of supported exchanges, including details on dYdX compatibility.

See exchange support →

Before you connect

Make the setup yours.

How does Gunbot Unlimited connect to my exchange?

Gunbot Unlimited combines the hosted workspace shown in the overview with self-hosted trading cores. API secrets and order execution stay on the cores you run.

Connect an exchange →
Can I use the same settings on every exchange?

Review each exchange’s supported markets, minimum order sizes and API requirements. Strategy settings should fit the selected pair and market; backtesting and past results do not guarantee live results.

Check exchange support →

Your next step

Bring your dYdX (defi) strategy into Gunbot.