yasinkuyu / binance-trader

💰 Cryptocurrency Trading Bot for Binance (Experimental)
2.51k stars 828 forks source link

configuration step 7 #104

Open maxmehlbaum opened 6 years ago

maxmehlbaum commented 6 years ago

how do you run Optional: run as an excutable application in Docker containers

your creating a lightweight virtual machine to run the bot right? how do u do that? if you could also briefly explain how dockers relationship to the python code and the virtual machine I would much appreciate it

thanks bro

maxmehlbaum commented 6 years ago

whats also another way to run the bot other than on docker? also how do u know its running? what are the indicators?

also sorry for so many questions... just excited someone finally made an open source bot :)

elysium-12 commented 6 years ago

The configuration steps cover in the main page cover pretty much everything, one confusion part of me was the ones I described below.

Download the repo, either as a zip file, click on "Clone or Download", extract it. You can run the bot from Windows, Linux or OSX. For linux or OSX, After installing python:

$ cd /binance-trader/app
$ mv config.sample.py config.py

Edit config.py to include the api key and secret you generated in binance.

$ python                                                                                                                                                                   
Python 2.7.12 (default, Dec  4 2017, 14:50:18)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import config
>>> import argparse
>>> import threading
>>> import sqlite3
>>> import os
>>> import time
>>> import sys
giftedwon commented 6 years ago

What I did was install a VM on my laptop using Vagrant. The VM is running Centos 7. I then installed GIT yum -y install git

once Git was installed I pulled the Repo download to Virtualmachine $ git clone 'repo url"

The repo is now on my VM. I edited the Config files per the instructions posted by the Coder. Next I installed Docker . yum -y install docker

After docker is installed , I started docker systemctl start docker

Then I will build the trader image docker build -t trader . that will build the image, download python and ubuntu.

Once complete you can test by running docker run trader

but you can't trader yet. You will have to start the docker image type docker run trader cat /etc/issue then type docker ps -l to list the containers finally docker start 'container id'

then docker run -it trader bash you will be in the ubuntu shell, type cd /app to get the the app directory

I am just learning Docker myself. Its not so hard after you do it a few times. Check this tutorial. its golden https://www.tecmint.com/install-docker-and-learn-containers-in-centos-rhel-7-6/