Skip to content
Alan McIntyre edited this page May 7, 2013 · 7 revisions
  1. Make sure you have Python installed. Right now this code isn't compatible with Python3, so if you need to install Python, make sure to get the latest 2.x version (which at the moment is 2.7.4).

  2. Get the source code; the easiest way to do that is to download these two files:

  3. Extract these two files to wherever you like on your machine (like maybe C:\temp).

  4. Open a command window (Windows+R, type "cmd" and hit enter)

  5. In the command window, change to where you extracted the btce-api source code:

    cd C:\temp\btce-api-master

  6. Install the btce-api library into your Python setup (note that you might have to type C:\Python27\python instead of python depending on what your Python installer did):

    python setup.py install

  7. In the command window, change to where you extracted the btce-bot source code:

    cd C:\temp\btce-bot-master

  8. Install the btce-bot library into your Python setup:

    python setup.py install

  9. You'll need a file containing your key and secret data from BTC-e:

    • Go to your "profile" page and click the "API keys" button.
    • If you don't already have a key, give it whatever name you like in the "Create Key" field and click "Create"
    • Check the "info" box if you just want to collect market data with the key; check "trade" as well if you want to execute trades.
    • Click "Save"
    • Create a new text file wherever you like on your computer (for example, I might use C:\Users\Alan\My Documents\btce-keys.txt).
    • Copy the "Key" and "Secret" fields into your text file, one on each line, and then add a third line with "1" in it. You should end up with a file that has three lines looking something like this in it (you don't need any spaces before or after anything on these lines, or any blank lines, and of course your key and secret will be completely different):

      GZGQE3IY-8WHYJANV-S5DSYB5Z-BERG3J79-8K8NSSP6 a034b00c827a84400956d697a7da0a216cb6cde9818ccf5346b3e0979a34fdfa 1

    • Save this file and close the text editor, but remember where you saved it.
  10. In the command window, go to the sample bot directory:

    cd C:\temp\btce-bot-master\samples

  11. Run the sample bot; it will want to know where your keys file is, and the prices you want to buy and sell at (in this case, I'm pointing it to my text file created in step 8, and I want to buy LTC at $4.00, and sell at $4.10--the sample only does LTC-USD trades, but you can look for "ltc_usd" in hello-world-bot.py and replace it with whatever pair you'd like to trade):

    python hello-world-bot.py "C:\Users\Alan\My Documents\btce-keys.txt" 4.0 4.1

    When you run the bot this way, it will tell you what trades it would like to make, but it won't actually make any trades. To run and make real trades, you have to add the --live-trades argument to the command:

    python hello-world-bot.py "C:\Users\Alan\My Documents\btce-keys.txt" 4.0 4.1 --live-trades

And that should be it!

Clone this wiki locally