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:
- Ethereum Wallet - MetaMask, Ledger, or compatible wallet
- USDC Balance - dYdX uses USDC as collateral
- dYdX Account - Create at dydx.exchange
- TradeStaq Account - Sign up at tradestaq.com
Important: dYdX Versions
There are two versions of dYdX:
| Version | Chain | Status |
|---|---|---|
| dYdX v3 | Ethereum L2 (StarkEx) | Legacy |
| dYdX v4 | dYdX 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:
| Credential | Description |
|---|---|
| Mnemonic | 24-word recovery phrase (recommended) |
| Private Key | Alternative to mnemonic |
| Stark Private Key | Optional, 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:
- Your 24-word mnemonic phrase
- Format:
word1 word2 word3 ... word24 - This was shown when you created the account
Option B: Using Private Key
If exporting from an existing wallet:
- Export private key from MetaMask/wallet
- Ensure it's the key linked to your dYdX account
Step 2: Generate dYdX Keys
If you need to derive your dYdX-specific keys:
- Go to dydx.exchange
- Connect your wallet
- Sign the authentication message
- 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
- Go to TradeStaq Dashboard
- Click Exchanges → Add Exchange
- Select dYdX from the list
- Enter your credentials:
| Field | Value |
|---|---|
| Name | Give it a memorable name (e.g., "dYdX Main") |
| Mnemonic / Private Key | Enter your 24-word mnemonic or private key |
| Stark Private Key | Optional - for advanced users |
| Account Type | Futures (only option) |
- Click Connect Exchange
Step 4: Verify Connection
After connecting:
- Check the status shows Active (green indicator)
- Verify your USDC balance is displayed
- Test by viewing available perpetual markets
Supported Features
| Feature | Support |
|---|---|
| Market Orders | ✓ |
| Limit Orders | ✓ |
| Stop Orders | ✓ |
| Take Profit | ✓ |
| Reduce Only | ✓ |
| Leverage | Up 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
| Mode | Description |
|---|---|
| Cross Margin | Shared margin across positions |
| Isolated Margin | Per-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
| Type | Fee |
|---|---|
| Maker | 0.02% |
| Taker | 0.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
- Go to dydx.exchange
- Click Deposit
- Select USDC amount
- Approve and confirm transaction
- 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
- Go to dydx.exchange
- Click Withdraw
- Select destination chain
- Enter amount
- Confirm transaction
Note: Withdrawals to Ethereum may take longer due to bridging.
API Documentation
For advanced users:
- dYdX v4 Docs: docs.dydx.exchange
- dYdX GitHub: github.com/dydxprotocol
Next Steps
- Paper Trading - Practice risk-free
- Creating a Bot - Set up your first bot
- Risk Management - Protect your capital
- Custom Strategies - Write trading strategies
Strategies available on dYdX
Deploy any of these 10 automated strategies on dYdX.