Overview
API Trading Keys let you safely delegate trading to partners without ever sharing your seed phrase. This feature is only available for trading in your cross account with cross markets (and is not supported for isolated markets).
Step 1: Create a new API Trading Key (Owner)
In the navbar, click More → API Trading Keys.
Click Generate New API Key.
The app generates a new keypair:
API Wallet Address
Private Key (one-time view) Save your Private Key immediately. It will not be shown again and is not stored by dYdX.
Check the terms and click Authorize API Key.
Done — you can repeat this process to create multiple API keys if needed.
Step 2: Use the API Key to Trade (Trader / Bot Operator)
Prerequisites
dYdX Address → the account that holds your margin and positions (the “Owner”).
API Private Key → the private half of the API keypair (used by your bot).
Steps
Load the private key into your trading bot. This allows the bot to sign transactions as the API Wallet Address.
Set the dYdX Address (Owner)
Configure the transaction so that the dYdX Address is the account whose margin and balances are used.
All trades are executed against this account, even though they are signed with the API Private Key
Place orders. The chain verifies:
Signature matches the authorized API public key (derived from the API private key) and the action is allowed by the authenticator (e.g., place order),
Typescript Client Example
Our Typescript client has helper functions for:
As well as an end to end example, adding an authenticator and placing a short term order with the authenticated account.
Security & Best Practices
Treat the private key like a mnemonic. Store it offline; never paste in chats.
Use separate API keys per bot/venue for isolation and auditing.
FAQ / Explanation
Technical Details
API Trading Keys are a subset of Permissioned Keys. For technical detail on permissioned keys, read through the technical docs here
What does “full margin” mean in the warning?
The API key can place trades using all available margin in the owner’s cross margin account. It cannot place isolated trades or transfer isolated margin or withdraw funds.
Can this key withdraw funds or transfer assets?
No.
What happens if I lose the private key?
Funds are safe. You simply remove that authenticator and create a new key. The lost key can no longer place trades once revoked.
Can I have multiple API keys on the same account?
Yes. Add multiple authenticators (e.g., different bots/teams).
Disclaimer and Terms
This document may provide information with respect to the dYdX Chain software, and/or non-mandatory guidelines and suggestions that may help with using dYdX Chain software. dYdX Operations Services Ltd. does not run dYdX Chain validators nor operate or control the dYdX Chain network. dYdX Operations Services Ltd. is not responsible for any actions taken by other third parties who use dYdX Chain software. dYdX Operations Services Ltd. services and products are not available to persons or entities who reside in, are located in, are incorporated in, or have registered offices in the United States or Canada, or Restricted Persons (as defined in the Terms of Use). The content provided herein does not constitute, and should not be considered, or relied upon as, financial advice, legal advice, tax advice, investment advice or advice of any other nature, and you agree that you are responsible to conduct independent research, perform due diligence and engage a professional advisor prior to taking any financial, tax, legal or investment action related to the foregoing content. Supported wallets on dYdX Chain, including (without limitation) Keplr, are independent from and unaffiliated with dYdX Operation Services Ltd., and dYdX Operation Services Ltd. is not responsible for any action taken by the foregoing or any other third parties, including content set forth on any third-party websites, such as any links to such content in this document. The information contained herein, and any use of products or services provided by dYdX Operations Services Ltd., are subject to the Terms of Use.