dYdX Setup
Last updated
Last updated
Connecting the Kingfisher OEMS to dYdX is a unique process compared to other exchanges due to its decentralized nature. This guide will walk you through the steps to set up your dYdX API for use with the Kingfisher OEMS.
Unlike centralized exchanges, dYdX generates API credentials automatically when you connect your MetaMask wallet. These credentials are stored in your browser. It's important to use a MetaMask wallet that is not connected to a hardware wallet, as the private key of a hardware wallet cannot be used for signing messages due to security protocols.
info
Wallet Choice: You don't need to use the same wallet as your Gunthy Wallet Address for dYdX. You can create a new Metamask wallet separate from your the Kingfisher OEMS License Wallet.
info
Info about market orders: dYdX enforces 'fill or kill' on market orders, meaning the order gets cancelled when it cannot fill immediately. This is fine in most trading strategies as they would just replace the order at next opportunity. When you're using an alert based sell trigger, please be aware that market orders might get cancelled.
Go to dYdX.
Select 'Connect wallet' to start the process.
Select 'MetaMask' to continue.
Click on 'Connect'.
Enter your MetaMask password to log in.
Select 'Remember me' and click 'Send requests'.
Approve the connection prompts in MetaMask.
Log out and back in to ensure the account is remembered.
This step is optional, it allows the Kingfisher OEMS to ensure position data on L2 gets updated at the time orders get placed. You can leave the field blank or enter a placeholder when you do not want to enter the real key.
Open MetaMask and select the three dots icon.
Go to 'Account details'.
Select 'Export private key' and save it.
Open browser developer tools (F12 or Ctrl-Shift-i).
Navigate to the local storage section.
Save the 'privateKey' in 'STARK_KEY_PAIRS'.
Save the 'walletAddress' in 'STARK_KEY_PAIRS'.
Save the 'key' in 'API_KEY_PAIRS'.
Save the 'secret' in 'API_KEY_PAIRS'.
Save the 'passphrase' in 'API_KEY_PAIRS'.
After configuring the Kingfisher OEMS, ensure to delete the plain text credentials collected during the setup. the Kingfisher encrypts and stores these credentials for security.
Follow these steps carefully to ensure a secure and successful setup of dYdX with the Kingfisher OEMS.