This is an Arbitraging Trading bot codebase used for my Major Project.
What this does:
- It retrieves price data from DeFi exchanges on the BSC chain.
- Takes the information and stores them on a SQL database.
- Uses prices to compare and find Arbitraging Opportunities.
- Activates a flashloan Smart contract when opportunity is found. (Work in Progress)
- Sends a Alert when opportunity is found.
- Maps price data on a Chart.
How to run?
Arbitrage Bot:
- Git clone the repo.
- Open your Terminal
- cd Major-Project-BSC
- npm install to get all dependencies
- Set-up a getblock.io account and get your api key
- Get the link to call a BSC node
- Create a Telegram bot using botfather and get the key
- Set up database (Refer Below)
- Fill in the info at env_example and rename it to .env
- Open terminal and go into the Major-Project-Bsc directory
- node index.js to run the codes
Database set-up:
- Download a mysql reader. MAMP for macbook and xampp for windows.
- Run the database tables and create a new table
- Import the arbitraging database provided
- Record down your user login, password and table name for .env
Toggle on or off console logging:
- LOGGING = 0 in .env to activate logging
- Remove the 0 and leave LOGGING empty to deactivate logging
Thanks for reading!