A crypto trading bot that automates trades based on TradingView alerts.
- Install Ngrok, create an account, and set up an auth token.
- Create a
.env
file and add the following variables:MNEMONIC
,ETHERSCAN_KEY
,POLYGONSCAN_KEY
, andAPI_KEY
. Generate an api key by runningyarn apiKey
. - Create a
chainData.json
file based on thechainData.default.json
file in thesrc/config
folder. - Start the app by running
yarn start
, your dashboard should now be up and running at https://localhost:80. - Launch Ngrok with
yarn ngrok
to expose your server on port 80.Note: TradingView only accepts URLs with port numbers 80 and 443. More info here
- Review and customize your preferences in the Control Panel section.
- Open a chart with your desired token pair, select an indicator/strategy, and create buy/sell alerts.
- In the "Settings" tab of each alert, add
{ type: "BUY", price: "{{close}}", apiKey: "YOUR_KEY" }
for buy alerts and{ type: "SELL", price: "{{close}}", apiKey: "YOUR_KEY" }
for sell alerts. - In the "Notifications" tab, add the URL from your Ngrok output and append "/route" to the end.
- Add @BotFather on Telegram and follow the prompts to obtain an API key.
- Use "Telegram Bot Raw" to get your unique chat ID.
- Add your API key as
TELEGRAM_BOT_TOKEN
and chat ID asTELEGRAM_CHAT_ID
in your.env
file. - The bot will send notifications for buys, sells, errors, and insufficient balance (out of gas) to Telegram. If you don't provide an API key or chat ID, Telegram notifications will be disabled.
- Start the bot by toggling the switch in the Controls section of the Control Panel tab. You can now monitor for incoming trades in the Trades tab and see detailed error/event logs in the Logs tab. You can also see logs in the server output.
Note: Argilac currently only includes support for WETH, MATIC, USDC, and DAI on the Ethereum and Polygon mainnets and testnets. Additional tokens can be added in the config folder and in the ControlPanel component. Support for more tokens, chains, and DEXs coming soon.