1.1 Installing on a Computer¶
Installing the bot on a computer is drag-and-drop and platform independent.
You will need:
- Python 2.7.10 (Must be added to PATH)
To download the bot you can either:
- Download the source .zip file from the GitHub repo page or from this link. Extract it into an empty folder you won’t accidentally delete.
git clone https://github.com/Mikadily/poloniexlendingbotif you have git installed.
To configure the bot with your settings:
default.cfgand enter your desired settings (information on settings here).
You are now ready to run the bot.
To run, either double-click lendingbot.py (if you have .py associated with the Python executable)
python lendingbot.py in console.
1.2 Installing on Pythonanywhere.com¶
Pythonanywhere.com is a useful website that will host and run Python code for you. This is perfect for our bot.
You will need:
- A pythonanywhere.com account (Free version works fine, premium recommended)
1.2.2 Uploading the bot’s files to Pythonanywhere¶
- Download the bot’s code from this link.
- Extract the files, and run
lendingbot.pyonce to generate the default.cfg
- Modify the default.cfg with your settings (See section 2, Configuration.) It is recommended to use a high sleeptimeinactive time for this website, as they meter your CPU usage if you are a free user.
- Go to the “files” tab of the website.
- Create a new directory, preferably named “poloniexlendingbot” and upload all the files within the folder. (You cannot upload the .zip or a folder itself, you must do all the contents.)
1.2.3 Creating the Web App (Optional)¶
- If you would like to use the Webserver to view your bot’s status, navigate to the “Web” tab.
- Add a new web app.
- Set the working directory to
- Set the static files to URL:
- Refresh your website.
- You will be able to access the webapp at
http://<username>.pythonanywhere.com/static/lendingbot.htmlonce it finishes setting up.
1.2.4 Running the Bot¶
To run the bot continuously (Recommended for free accounts):
- Navigate to the “Consoles” tab.
- Add a new “Custom console,” name it “Poloniexlendingbot” and set the path to “python /home/<username>/poloniexlendingbot/lendingbot.py”
- Click this link whenever you want to start the bot, it will run continuously until the website goes down for maintenance or the bot experiences an unexpected error.
To have the bot restart itself every 24 hours, you need to have a premium pythonanywhere account. This will make the bot more or less invincible to crashes and resets.
- Navigate to the “Schedule” tab.
- Create a new task to run daily (time does not matter) set the path to:
- The bot will start once the time comes (UTC) and run indefinitely.
If you are a free user, it will allow you to make the scheduled restart, but then it will only run for one hour and stop for 23.