Connecting dYdX

This guide walks you through connecting your dYdX account to TradeStaq for automated trading on this decentralized perpetual exchange.

Overview

dYdX is a leading decentralized perpetual exchange offering:

  • Decentralized Trading - Non-custodial, on-chain settlement
  • Perpetual Contracts - Major cryptocurrency perpetuals
  • Low Fees - Competitive trading fees
  • No KYC - Permissionless access
  • High Performance - Order book matching off-chain

Prerequisites

Before connecting dYdX:

  1. Ethereum Wallet - MetaMask, Ledger, or compatible wallet
  2. USDC Balance - dYdX uses USDC as collateral
  3. dYdX Account - Create at dydx.exchange
  4. TradeStaq Account - Sign up at tradestaq.com

Important: dYdX Versions

There are two versions of dYdX:

VersionChainStatus
dYdX v3Ethereum L2 (StarkEx)Legacy
dYdX v4dYdX Chain (Cosmos)Current

This guide covers dYdX v4 (dYdX Chain). The connection process uses your wallet's mnemonic or private key.


Understanding dYdX Authentication

Unlike centralized exchanges, dYdX uses wallet-based authentication:

CredentialDescription
Mnemonic24-word recovery phrase (recommended)
Private KeyAlternative to mnemonic
Stark Private KeyOptional, for v3 compatibility

Security Note: Your mnemonic/private key gives full control of your dYdX account. Only enter it on trusted platforms.


Step 1: Access Your dYdX Wallet

Option A: Using Mnemonic (Recommended)

If you created your dYdX account with a new wallet:

  1. Your 24-word mnemonic phrase
  2. Format: word1 word2 word3 ... word24
  3. This was shown when you created the account

Option B: Using Private Key

If exporting from an existing wallet:

  1. Export private key from MetaMask/wallet
  2. Ensure it's the key linked to your dYdX account

Step 2: Generate dYdX Keys

If you need to derive your dYdX-specific keys:

  1. Go to dydx.exchange
  2. Connect your wallet
  3. Sign the authentication message
  4. Your account is now active

For API trading, you'll need the mnemonic or private key that controls this wallet.


Step 3: Connect to TradeStaq

  1. Go to TradeStaq Dashboard
  2. Click ExchangesAdd Exchange
  3. Select dYdX from the list
  4. Enter your credentials:
FieldValue
NameGive it a memorable name (e.g., "dYdX Main")
Mnemonic / Private KeyEnter your 24-word mnemonic or private key
Stark Private KeyOptional - for advanced users
Account TypeFutures (only option)
  1. Click Connect Exchange

Step 4: Verify Connection

After connecting:

  1. Check the status shows Active (green indicator)
  2. Verify your USDC balance is displayed
  3. Test by viewing available perpetual markets

Supported Features

FeatureSupport
Market Orders
Limit Orders
Stop Orders
Take Profit
Reduce Only
LeverageUp to 20x
Cross Margin

Available Markets

dYdX offers perpetual contracts for major cryptocurrencies:

Major Pairs

  • BTC-USD, ETH-USD
  • SOL-USD, AVAX-USD
  • MATIC-USD, DOGE-USD
  • LINK-USD, UNI-USD
  • And more...

Market Naming

dYdX uses USD notation:

  • BTC-USD (perpetual)
  • ETH-USD (perpetual)

Collateral & Margin

USDC Collateral

  • dYdX uses USDC as the sole collateral
  • Deposit USDC to trade
  • All PnL settled in USDC

Margin Modes

ModeDescription
Cross MarginShared margin across positions
Isolated MarginPer-position margin (some markets)

Maximum Leverage

  • Most markets: 20x maximum
  • Check individual market specs for exact limits

Security Considerations

Wallet Security

Since dYdX is non-custodial:

  • ✅ You maintain full control of funds
  • ✅ No centralized custody risk
  • ⚠️ Your mnemonic is critical
  • ⚠️ Lost keys = lost funds

Best Practices

  • ✅ Use a dedicated trading wallet
  • ✅ Never share your mnemonic
  • ✅ Store backup securely offline
  • ✅ Use hardware wallet for large amounts
  • ❌ Never enter mnemonic on untrusted sites

What TradeStaq Can Access

With your credentials, TradeStaq can:

  • ✅ View balances and positions
  • ✅ Place and cancel orders
  • ✅ Manage positions
  • ⚠️ Withdraw funds (inherent to DeFi)

Unlike CEX APIs, DeFi credentials inherently allow withdrawals. Use a separate trading wallet if concerned.


dYdX-Specific Notes

Trading Fees

TypeFee
Maker0.02%
Taker0.05%

Fee Discounts

  • Trading volume discounts available
  • DYDX token holders may get benefits

Funding Rates

  • Funding paid/received every hour
  • Check current rates on dYdX interface
  • Factor into position holding costs

Network Differences

dYdX v4 (dYdX Chain):

  • Native Cosmos chain
  • Native USDC
  • Better decentralization
  • Gas fees in USDC

Gas and Transaction Fees

dYdX v4 Fees

  • Minimal transaction fees
  • Fees paid in USDC
  • Much lower than Ethereum mainnet

Deposits/Withdrawals

  • Bridge from Ethereum to dYdX Chain
  • Allow time for bridging
  • Small bridge fees apply

Troubleshooting

Connection Failed

Solutions:

  • Verify mnemonic is entered correctly
  • Check for extra spaces
  • Ensure all 24 words are included
  • Verify this wallet has a dYdX account

Balance Not Showing

Solutions:

  • Ensure USDC is deposited on dYdX
  • Bridge may take time to complete
  • Refresh the connection
  • Check dydx.exchange directly

Order Rejected

Solutions:

  • Check sufficient margin
  • Verify position size limits
  • Ensure market is open
  • Check for maintenance

Position Not Opening

Solutions:

  • Verify sufficient USDC balance
  • Check leverage limits
  • Ensure order meets minimum size
  • Verify market isn't in reduce-only mode

Depositing to dYdX

From Ethereum

  1. Go to dydx.exchange
  2. Click Deposit
  3. Select USDC amount
  4. Approve and confirm transaction
  5. Wait for bridge completion (minutes to hours)

From Other Chains

dYdX v4 supports deposits from:

  • Ethereum (via bridge)
  • Noble USDC (native)
  • Other Cosmos chains (IBC)

Withdrawing from dYdX

  1. Go to dydx.exchange
  2. Click Withdraw
  3. Select destination chain
  4. Enter amount
  5. Confirm transaction

Note: Withdrawals to Ethereum may take longer due to bridging.


API Documentation

For advanced users:


Next Steps