Setting up your Ethereum wallet¶
Why does Hummingbot need my Ethereum wallet private key?¶
Strategies that transact on decentralized exchanges (such as Radar Relay, DDEX, Bamboo Relay, and Dolomite) directly interact with smart contracts on the Ethereum blockchain. Therefore, transactions must be signed and authorized, which requires your private key.
Towards the end of initial
config walkthrough for each strategy, you will be prompted to either import or create a wallet.
Creating your wallet¶
create to the prompt to create a new Hummingbot wallet. Note that you will need to send ETH and tokens to this wallet address in order to run trading bots.
Afterwards, you are prompted to enter a password that protects the wallet. Each time you launch Hummingbot, you need to unlock the wallet using this password in order to start running trading bots on decentralized exchanges.
Importing your wallet¶
There are two ways to import your Hummingbot wallet from other wallets like Metamask and MyCrypto:
- Importing the wallet's keyfile (recommended)
- Importing the wallet's private key
Using a wallet that is available in your Metamask (i.e. importing a wallet from Metamask) allows you to view orders created and trades filled by Hummingbot on the decentralized exchange's website.
To import your wallet using its JSON keyfile:
- Export the JSON keyfile from other wallets such as Metamask, MyCrypto, or MyEtherWallet
- Save the file in the
- Rename the file to
[address]is the public Ethereum address in the format
- Start Hummingbot
importto the question: Would you like to import an existing wallet or create a new wallet?
- Your wallet should be available in the list of options
- After you start Hummingbot and run the
configprocess, you are asked: Would you like to import an existing wallet or create a new wallet?
- Respond with
importand you are prompted to enter the private key associated with the wallet
- Secure your wallet with a password
Exporting your wallet¶
There are two ways to export your Hummingbot wallet to other wallets like Metamask and MyCrypto:
- Exporting the wallet's keyfile (recommended)
- Exporting the wallet's private key
When you import or create a wallet with Hummingbot, a JSON file named
key_file_[address].json is created in the
/conf directory. This JSON keyfile contains the encrypted private key of your wallet and can be imported into other dApps.
Within the Hummingbot CLI, you can use the
export_private_key command to display the private key associated with a wallet address. You can import your wallet to dApps like Metamask and MyCrypto using this private key as well.