Lazy-trader-bot is a NodeJS Console based application that fetches ETH/USD price every second using a Chainlink reference data contract. Auto Swap the ETH to DAI when the ETH price falls below to predefined ETH/USD price.
- Clone the repositorie git clone
https://github.com/Usman75/Lazy-trader-bot.git
cd Lazy-trader-bot
- Create a new file and name it
.env
- Past the following code:
RPC_URL="https://ropsten.infura.io/v3/YOUR_API_KEY"
INFURA_API_KEY="YOUR _INFURA_API_KEY"
PRIVATE_KEY="0x..."
ACCOUNT="0x..."
npm install
truffle compile
truffle migrate --network ropsten
npm run start