Skip to main content

Creating a dYdX v4 API Key for Crypto Trading Bots

Set up API access for dYdX v4 by creating and funding a protocol wallet, then configuring your trading bot with the wallet address and secret phrase.

Info

A decentralized exchange (DEX) lets users trade directly from their wallets without a central authority. dYdX v4 is a DEX.

Funding the Wallet

Before creating your dYdX v4 protocol wallet, make sure your account is funded:

  1. Connect Your Wallet: Link your existing crypto wallet (e.g., MetaMask) to the dYdX platform.
  2. Access Portfolio: Visit the dYdX portfolio overview.
  3. Add Funds: Use the Deposit button (usually found in the bottom left) to fund your account.

dYdX v4 platform login page

Creating Your dYdX v4 Protocol Wallet

Create your dYdX v4 protocol wallet:

  1. Access Platform: Log into the dYdX platform.
  2. Create Wallet: Select Create dYdX v4 Wallet from the profile menu.
  3. Save Address: Copy the dYdX Chain Address for API configuration. This address will serve as your API Key.

dYdX v4 API key creation interface

Retrieving API Credentials

Collect the credentials you will use in your bot:

  1. Get Secret Phrase: Open the profile menu, select Export Secret Phrase, acknowledge any security warnings, and carefully copy all 24 words. This phrase is your API Secret.
  2. Store Securely: Keep the dYdX Chain Address (API Key) and the 24-word Secret Phrase (API Secret) in a secure offline location. Never share these credentials.

dYdX v4 API key configuration page

Configuring Your Trading Bot

Configure your bot with the credentials you gathered:

  1. Access Settings: Open your bot's API configuration section.
  2. Enter Credentials:
    • API Key: Your dYdX Chain Address.
    • API Secret: Your 24-word secret phrase.
    • Verify all details carefully.
  3. Trading Parameters:
    • Set fee structure.
    • Configure rate limits.
    • Adjust trading delays. Double-check all settings.

dYdX v4 API key confirmation and credentials display

Verification Steps

Complete these final checks:

  1. Save Configuration:
    • Verify all API settings.
    • Confirm credentials are saved in your bot.
  2. Test Connection:
    • Add a trading pair.
    • Check for data updates from the exchange.
    • Verify your account balance is correctly displayed. Monitor initial operations closely.

A properly configured API key supports reliable automated trading. Review API settings regularly, never share credentials, and use secure channels when configuring your bot.

Ready to Start Automated Trading on dYdX v4?

Transform your trading approach with automated strategies designed for dYdX v4. Explore our dYdX Trading Bot features for optimal performance.