Author

Topic: [ANN] BitBot - A Crypto-Currency trading bot and Backtesting platform (FREE) (Read 14003 times)

hero member
Activity: 504
Merit: 500
I would use it if it wasn't so hard to configure!
do you have some kind of tutorial for it?
sr. member
Activity: 417
Merit: 253
I hate everyone, equally.
After I launch, i'm keep getting error:
"{ [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
js-bson: Failed to load c++ bson extension, using pure JS version"
Searched internet, but no success to fix that?

I solved this way:

npm install bson
cd [BOTROOT]/node_modules/mongojs/node_modules/mongodb/node_modules/bson/ext
edit index.js and replace:

     bson = require('../build/Release/bson');

with:

     bson = require('bson');

I'm backtesting and waiting to see if this bot can bring some profits, or if it's gonna waste all my funds.  Undecided
USE IT with config.tradingEnabled = false; in config.js file and backtest a lot before giving it your money, trust me.
You will probably need to fix it a bit and keep testing until you find the correct indicators and parameters.  Wink
member
Activity: 118
Merit: 100
A Programmer
From what i heard, it is possible to convert node scripts to a desktop application such as appjs.com?
perhaps a UI will better inform newbie user such as myself Smiley
newbie
Activity: 10
Merit: 0
Bot needs serious expert modification. In 4 days lost 20% of money.
newbie
Activity: 10
Merit: 0
I'm facing same problem as "#R#a#u#t#e#" faced.

I have changed decimal rounder to 3, but no success.
IMO problem is in adviser. It doesn't check minimal amount to trade. I mean if your balanced is lower then 0.01 BTC, it shouldn't run "buy".

EDIT:
I have changed this function for now...

Quote
agent.prototype.placeRealOrder = function()
{

   if(this.orderDetails.amount <= 0.01) {

      this.logger.log('Insufficient funds to place an order.');

   } else {

      this.exchangeapi.placeOrder(this.orderDetails.orderType, this.orderDetails.amount, this.orderDetails.price, true, this.processOrder);

   }

};
newbie
Activity: 10
Merit: 0
Hello 5an1ty,

Thanks for your work.


After I launch, i'm keep getting error:

"{ [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }

js-bson: Failed to load c++ bson extension, using pure JS version"

Searched internet, but no success to fix that? Or I should ignore that? Because as I can see connections are comming to mongo db. And I see some better logs:

"[10-07-2015 14:05:08] - INFO: Created a new 5 minute candlestick!
[10-07-2015 14:05:08] - INFO: {"period":1436526000,"open":285.223,"high":286.786
,"low":284.203,"close":285.733,"volume":68.36832427,"vwap":285.98941818}
[10-07-2015 14:05:08] - INFO: Advice: hold (null)"
newbie
Activity: 48
Merit: 0
I will look into it later today, but my Java experience is very limited.
I think i only changed the amount value (in file ..tradingagent.js)
will test to round both to 3 decimal, but i dont think anymore that this is the issue.
The examples from BTC-E exteed the 3 decimals and Gekko bot uses 8 decimals as well...

I also found API Example from BTCE site:
Sample request:
https://btc-e.com/api/3/trades/btc_usd

{"type":"bid","price":243.141,"amount":0.015,"tid":54711701,"timestamp":1431264485}
{"type":"ask","price":242.412,"amount":0.01002,"tid":54711707,"timestamp":1431264511}

according to this the type should be bid/ask...
while in the documentation they (BTCE) say the type is buy/sell

i think in your code it is buy sell too. Now the more i look into it the less i underestand  Huh

Is there an easy way to write the actual API request for buy sell in the logfile (the exact same thing as is send to btce api)?  
Because then the problem should be found easy i guess.




EDIT:It just successfully bought and sold
...just did rounded to 3 decimals for both price and amount in tradingagent.js
for exampel: "this.orderDetails.price = tools.round(lowestAskWithSlippage, 3);"

but i think the amount can be up to 8 decimals, its should just be the price rounded to 3 decimals.

Glad you figured it out, when I get the time I'll make the changes upstream.
member
Activity: 65
Merit: 10
plese see my edit above...
also if you look in btce-orderbook this makes sense!

Price          Ammount
243.838   0.02202309
243.86   3.01000001
...             ...
newbie
Activity: 48
Merit: 0
Currently you don't see the raw request but in the btc-e exchange file I execute:

    if(type === 'buy') {

      this.btce.trade(pair, 'buy', price, amount, this.errorHandler(this.placeOrder, args, retry, 'placeOrder', handler, finished));

    } else if (type === 'sell') {

      this.btce.trade(pair, 'sell', price, amount, this.errorHandler(this.placeOrder, args, retry, 'placeOrder', handler, finished));

    } else {

      cb(new Error('Invalid order type!'), null);

    }

and I use a third party btc-e api wrapper you can find here:

https://github.com/pskupinski/node-btc-e

In that module you can see the required parameters for the Trade method:

BTCE.prototype.trade = function(pair, type, rate, amount, callback) {
  this.makeRequest('Trade', {
    'pair': pair,
    'type': type,
    'rate': rate,
    'amount': amount
  }, callback);
};

I provide them correctly, so not sure what's wrong.
member
Activity: 65
Merit: 10
I will look into it later today, but my Java experience is very limited.
I think i only changed the amount value (in file ..tradingagent.js)
will test to round both to 3 decimal, but i dont think anymore that this is the issue.
The examples from BTC-E exteed the 3 decimals and Gekko bot uses 8 decimals as well...

I also found API Example from BTCE site:
Sample request:
https://btc-e.com/api/3/trades/btc_usd

{"type":"bid","price":243.141,"amount":0.015,"tid":54711701,"timestamp":1431264485}
{"type":"ask","price":242.412,"amount":0.01002,"tid":54711707,"timestamp":1431264511}

according to this the type should be bid/ask...
while in the documentation they (BTCE) say the type is buy/sell

i think in your code it is buy sell too. Now the more i look into it the less i underestand  Huh

Is there an easy way to write the actual API request for buy sell in the logfile (the exact same thing as is send to btce api)?  
Because then the problem should be found easy i guess.




EDIT:It just successfully bought and sold
...just did rounded to 3 decimals for both price and amount in tradingagent.js
for exampel: "this.orderDetails.price = tools.round(lowestAskWithSlippage, 3);"

but i think the amount can be up to 8 decimals, its should just be the price rounded to 3 decimals.
newbie
Activity: 48
Merit: 0
Great Work 5an1ty!
Just played around with it a little and I like it.

However the real trading for BTC-E seems not to work.
The BTC-E API always returns: ERROR: You incorrectly entered one of fields. (like in the previous post)

The Order volumes was defenitly larger than the minimum of 0.01 BTC.
I changed the max decimal places from 8 to 3 (because the BTCE API says: "decimal_places":3,") but that does not seem to help...

Also the Bot seems retrying to place the order every 15 seconds without a timelimit or a count limit. I suggest stoppting this after x failed attempts or something.


Beside this little problems i realy like how flexible this Bot is.

Im now trying to get some basic JS knowledge.  Grin

I'm trying to figure that BTC-E issue out but it doesn't really make sense. I currently don't have a BTC-E account to play with so it's hard to test.

Did you try and change the rounding before it submits the order to 3 decimals in this file in your local copy:
https://github.com/5an1ty/BitBot/blob/master/services/tradingagent.js

this.orderDetails.price
this.orderDetails.amount

apply Math.Round for 3 decimals on these 2 variables.
hero member
Activity: 1204
Merit: 531
Metaverse 👾 Cyberweapons
I heard much of Javascript/Node from a friend who's developing in them. Personally, I find JS an excellent choice for this purpose because of various reasons even if I don't know Node much. I am sure this project will be useful. Thank you!
legendary
Activity: 1596
Merit: 1010
Would be interesting if this bot supported Bittrex as well, as most "traders" will prefer BTC/Alts vs BTC/Fiat
member
Activity: 65
Merit: 10
Great Work 5an1ty!
Just played around with it a little and I like it.

However the real trading for BTC-E seems not to work.
The BTC-E API always returns: ERROR: You incorrectly entered one of fields. (like in the previous post)

The Order volumes was defenitly larger than the minimum of 0.01 BTC.
I changed the max decimal places from 8 to 3 (because the BTCE API says: "decimal_places":3,") but that does not seem to help...

Also the Bot seems retrying to place the order every 15 seconds without a timelimit or a count limit. I suggest stoppting this after x failed attempts or something.


Beside this little problems i realy like how flexible this Bot is.

Im now trying to get some basic JS knowledge.  Grin
newbie
Activity: 83
Merit: 0
Hello.

Thank you for your answer.

The exchange I am using BTC-e.

I have more than 0.01 BTC.

The SEEL purchase gives the following message:

C:\BitBot-master>node app.js
[25-04-2015 21:58:55] - INFO: ----------------------------------------------------
[25-04-2015 21:58:55] - INFO: Starting BitBot v0.9.7
[25-04-2015 21:58:55] - INFO: Real Trading Enabled = true
[25-04-2015 21:58:55] - INFO: Working Dir = C:\BitBot-master
[25-04-2015 21:58:55] - INFO: ----------------------------------------------------
[25-04-2015 21:58:55] - INFO: ----------------------------------------------------
[25-04-2015 21:58:55] - INFO: Launching trader module.
[25-04-2015 21:58:55] - INFO: ----------------------------------------------------
[25-04-2015 21:58:59] - INFO: Downloader started!
[25-04-2015 21:59:01] - INFO: Advice: sell (-0.02892375)
[25-04-2015 21:59:06] - INFO: Preparing to place a sell order! (BTC Balance: 0.02013323 USD Balance: 0.00700479 Trading Fee:
0.2)
[25-04-2015 21:59:06] - INFO: Highest Bid: 226.704 Highest Bid With Slippage: 226.477296
[25-04-2015 21:59:08] - ERROR: placeOrder Exchange API returned the following error:
[25-04-2015 21:59:08] - ERROR: You incorrectly entered one of fields.
[25-04-2015 21:59:08] - ERROR: Retrying in 15 seconds!


The BUY:

[25-04-2015 18:14:51] - INFO: Downloader started!
[25-04-2015 18:14:53] - INFO: Advice: buy (0.10834456)
[25-04-2015 18:14:57] - INFO: Preparing to place a buy order! (BTC Balance: 0.02013323 USD Balance: 0.00700479 Trading Fee: 0.2)
[25-04-2015 18:14:57] - INFO: Lowest Ask: 226.5 Lowest Ask With Slippage: 226.7265
[25-04-2015 18:15:00] - ERROR: placeOrder Exchange API returned the following error:
[25-04-2015 18:15:00] - ERROR: Value BTC must be greater than 0.01 BTC.
[25-04-2015 18:15:00] - ERROR: Retrying in 15 seconds!

I do not understand, something seems to me that this evil, because I think I have all the conditions for business work.

Thank you.
newbie
Activity: 48
Merit: 0
Hi,

I'm trying to use BitBot which seems very good, but I have some errors in real, but in this simulation okay.

[25-04-2015 18:14:51] - INFO: Downloader started!
[25-04-2015 18:14:53] - INFO: Advice: buy (0.10834456)
[25-04-2015 18:14:57] - INFO: Preparing to place a buy order! (BTC Balance: 0.02013323 USD Balance: 0.00700479 Trading Fee: 0.2)
[25-04-2015 18:14:57] - INFO: Lowest Ask: 226.5 Lowest Ask With Slippage: 226.7265
[25-04-2015 18:15:00] - ERROR: placeOrder Exchange API returned the following error:
[25-04-2015 18:15:00] - ERROR: Value BTC must be greater than 0.01 BTC.
[25-04-2015 18:15:00] - ERROR: Retrying in 15 seconds!


I thank any suggestions



What exchange are you using?
But this makes sense, it's trying to place a buy order, but you have not enough USD balance to buy a significant enough BTC amount. The exchange won't accept an order smaller than 0.01 BTC.
newbie
Activity: 83
Merit: 0
hi

SELL:

C:\BitBot-master>node app.js
[25-04-2015 21:58:55] - INFO: ----------------------------------------------------
[25-04-2015 21:58:55] - INFO: Starting BitBot v0.9.7
[25-04-2015 21:58:55] - INFO: Real Trading Enabled = true
[25-04-2015 21:58:55] - INFO: Working Dir = C:\BitBot-master
[25-04-2015 21:58:55] - INFO: ----------------------------------------------------
[25-04-2015 21:58:55] - INFO: ----------------------------------------------------
[25-04-2015 21:58:55] - INFO: Launching trader module.
[25-04-2015 21:58:55] - INFO: ----------------------------------------------------
[25-04-2015 21:58:59] - INFO: Downloader started!
[25-04-2015 21:59:01] - INFO: Advice: sell (-0.02892375)
[25-04-2015 21:59:06] - INFO: Preparing to place a sell order! (BTC Balance: 0.02013323 USD Balance: 0.00700479 Trading Fee:
0.2)
[25-04-2015 21:59:06] - INFO: Highest Bid: 226.704 Highest Bid With Slippage: 226.477296
[25-04-2015 21:59:08] - ERROR: placeOrder Exchange API returned the following error:
[25-04-2015 21:59:08] - ERROR: You incorrectly entered one of fields.
[25-04-2015 21:59:08] - ERROR: Retrying in 15 seconds!
newbie
Activity: 83
Merit: 0
Hi,

I'm trying to use BitBot which seems very good, but I have some errors in real, but in this simulation okay.

[25-04-2015 18:14:51] - INFO: Downloader started!
[25-04-2015 18:14:53] - INFO: Advice: buy (0.10834456)
[25-04-2015 18:14:57] - INFO: Preparing to place a buy order! (BTC Balance: 0.02013323 USD Balance: 0.00700479 Trading Fee: 0.2)
[25-04-2015 18:14:57] - INFO: Lowest Ask: 226.5 Lowest Ask With Slippage: 226.7265
[25-04-2015 18:15:00] - ERROR: placeOrder Exchange API returned the following error:
[25-04-2015 18:15:00] - ERROR: Value BTC must be greater than 0.01 BTC.
[25-04-2015 18:15:00] - ERROR: Retrying in 15 seconds!


I thank any suggestions

newbie
Activity: 48
Merit: 0
Hello,

The settings that are provided are just examples and shouldn't be used without knowledge of what happens when the bot uses those settings.
I don't think we can expect the bot to profit using those settings and 5 minute candlesticks because the amount of transactions would be this high that you would lose money with paying the transaction fees every time.

You need to do some research into what MACD actually does (http://en.wikipedia.org/wiki/MACD) and what candlesticks (http://en.wikipedia.org/wiki/Candlestick_chart) are in order to be able to properly configure your settings.

You need to realize that automated trading is something very complicated and that it is not a money making machine (earning money with bots isn't something that magically works).

BitBot is set up to be modular so in principle you could write your own indicator that is more likely to fit your needs.

Also simulating on a very small historical dataset might not give you a correct idea of how the selected indicator settings actually perform.
Keep on running bitbot with real trading disabled for a while to gather more historical data and then find settings that you like.

Best of luck!
5an1ty
newbie
Activity: 8
Merit: 0
Hello,

After trying to create my own very naive trade bot in python for Kraken (sell if higher, buy if lower + some % profit, you get the idea...) I decided to have a look at what was out there.

I decided to try BitBot however I am at loss as to how to tweak it, so far I only have negative profit (simulated) with 5mn candlesticks using MACD with options: {neededPeriods: 26, shortPeriods: 12, longPeriods: 26, emaPeriods: 9, buyThreshold: 0, sellThreshold: 0}...

It has been running for a couple hours like this... I don't know if there is some "learning" time required for it to become profitable...

On Kraken would it be wise to use say 30mn candlesticks anyway?

Thank you,

Franz
newbie
Activity: 30
Merit: 0
Quote
I think a friend of mine got bitbot to work on raspbian, I'll ask him for some tips.
Thanks, but no hurry - atm I have a lot of work to do before I can try this.
newbie
Activity: 48
Merit: 0
Well, I managed to set up MongoDB, works fine, BitBot works well too, but when I make a backtest run, I get -46% profit. Is that because I didn't set it with the best setting or because he had not run long enough? Thanks for any help.

The Backtester will run on the data you have collected up until now, so that might be a very small timeframe and if you are unlucky a profit of -46% is very possible. The default settings I provided are just the most commonly used settings for that indicator. It's up to you to find settings that work for you.

Play around with the indicator settings and candlestick size until you are happy with the back testing result.
newbie
Activity: 48
Merit: 0
Hi 5an1ty,

I have tried to get your bot running on Win7x86, but node.js and the mongo is a bi..h in Windows environment - so I finally give up with Bills crap System...  Huh

I have a technical background but on Linux, Software Development and coding I have to learn a lot.

Now I want to give it a try on a Raspberry PI with Raspbian as OS. I have ordered the brand new Raspberry Pi 2 Model B (900MHz quad-core ARM Cortex-A7 CPU, 1GB RAM).

Is this possible and can you give me some tips to run your bot on the RPI with Raspbian (especially for the MongoDB)?.




I think a friend of mine got bitbot to work on raspbian, I'll ask him for some tips.
newbie
Activity: 51
Merit: 0
Well, I managed to set up MongoDB, works fine, BitBot works well too, but when I make a backtest run, I get -46% profit. Is that because I didn't set it with the best setting or because he had not run long enough? Thanks for any help.
newbie
Activity: 30
Merit: 0
Hi 5an1ty,

I have tried to get your bot running on Win7x86, but node.js and the mongo is a bi..h in Windows environment - so I finally give up with Bills crap System...  Huh

I have a technical background but on Linux, Software Development and coding I have to learn a lot.

Now I want to give it a try on a Raspberry PI with Raspbian as OS. I have ordered the brand new Raspberry Pi 2 Model B (900MHz quad-core ARM Cortex-A7 CPU, 1GB RAM).

Is this possible and can you give me some tips to run your bot on the RPI with Raspbian (especially for the MongoDB)?.


newbie
Activity: 48
Merit: 0
 v0.9.7 Trading disabled mode now simulates trades
- All remaining BTC-E bugs should be fixed
- When running with trading disabled, BitBot will generate fake trades and manage a fake balance.

Can someone that is using BTC-E please try BitBot and let me know if there are still issues with the API calls?
newbie
Activity: 48
Merit: 0
I'd like to test it on Cryptsy's.
Any schedule for that?

Working on lots of stuff right now (web interface is in the works :-)), I'll look into adding Cryptsy as soon as I get the rest done.
hero member
Activity: 686
Merit: 500
fb.com/Bitky.shop | Bitcoin Merch!Premium Quality!
Nice project and you still active . good Cheesy
I will try it soon.
hero member
Activity: 2170
Merit: 640
Undeads.com - P2E Runner Game
I'd like to test it on Cryptsy's.
Any schedule for that?
newbie
Activity: 48
Merit: 0
Hello Mr 5an1ty.

First of all, to wish you all the best for 2015.

My questions are :

I've set up and configured everything, I mean mongodb and the config file.

When I start the bot, I stay stucked on the following

[31-12-2014 12:36:06] - INFO: ------------------------------------------
[31-12-2014 12:36:06] - INFO: Starting BitBot v0.9.4
[31-12-2014 12:36:06] - INFO: Real Trading Enabled = false
[31-12-2014 12:36:06] - INFO: Working Dir = C:\Users\jfvarin\Desktop\Bots\BitBot
[31-12-2014 12:36:06] - INFO: ------------------------------------------
[31-12-2014 12:36:06] - INFO: Downloader started!

It doesn't connect to the database.
I checked the db connection using dbhealth and regardless to the errors due to an empty db, I can see the connection with the db monitor.

Any ideas or hints ?

Otherwise, do you have plans to implement cryptsy or should I try to integrate it by myself ?

Anyway, thanks in advance for your answers.

Jofo


That's strange, can you PM me your configuration settings? Don't forget to mark out any sensitive information like for example API keys.

why did you choose javascript and runs on Node.JS.?

btw, this is a really nice project, gonna look into it Smiley

Thanks, I'm always glad to see that someone appreciates my work.

Well I was interested in automated trading, but when I saw the available options (paid and free) I found them all lackluster.
When I started working on BitBot I didn't have a lot of coding experience and I saw this as an opportunity to start learning.

As for my choice of Node.JS: I was already familiar with JS and I really like the way it writes. Oh and I love the package manager: NPM
legendary
Activity: 1143
Merit: 1000
Hello Mr 5an1ty.

First of all, to wish you all the best for 2015.

My questions are :

I've set up and configured everything, I mean mongodb and the config file.

When I start the bot, I stay stucked on the following

[31-12-2014 12:36:06] - INFO: ------------------------------------------
[31-12-2014 12:36:06] - INFO: Starting BitBot v0.9.4
[31-12-2014 12:36:06] - INFO: Real Trading Enabled = false
[31-12-2014 12:36:06] - INFO: Working Dir = C:\Users\jfvarin\Desktop\Bots\BitBot
[31-12-2014 12:36:06] - INFO: ------------------------------------------
[31-12-2014 12:36:06] - INFO: Downloader started!

It doesn't connect to the database.
I checked the db connection using dbhealth and regardless to the errors due to an empty db, I can see the connection with the db monitor.

Any ideas or hints ?

Otherwise, do you have plans to implement cryptsy or should I try to integrate it by myself ?

Anyway, thanks in advance for your answers.

Jofo


That's strange, can you PM me your configuration settings? Don't forget to mark out any sensitive information like for example API keys.

why did you choose javascript and runs on Node.JS.?

btw, this is a really nice project, gonna look into it Smiley
newbie
Activity: 48
Merit: 0
Hello Mr 5an1ty.

First of all, to wish you all the best for 2015.

My questions are :

I've set up and configured everything, I mean mongodb and the config file.

When I start the bot, I stay stucked on the following

[31-12-2014 12:36:06] - INFO: ------------------------------------------
[31-12-2014 12:36:06] - INFO: Starting BitBot v0.9.4
[31-12-2014 12:36:06] - INFO: Real Trading Enabled = false
[31-12-2014 12:36:06] - INFO: Working Dir = C:\Users\jfvarin\Desktop\Bots\BitBot
[31-12-2014 12:36:06] - INFO: ------------------------------------------
[31-12-2014 12:36:06] - INFO: Downloader started!

It doesn't connect to the database.
I checked the db connection using dbhealth and regardless to the errors due to an empty db, I can see the connection with the db monitor.

Any ideas or hints ?

Otherwise, do you have plans to implement cryptsy or should I try to integrate it by myself ?

Anyway, thanks in advance for your answers.

Jofo


That's strange, can you PM me your configuration settings? Don't forget to mark out any sensitive information like for example API keys.
newbie
Activity: 32
Merit: 0
Hello Mr 5an1ty.

First of all, to wish you all the best for 2015.

My questions are :

I've set up and configured everything, I mean mongodb and the config file.

When I start the bot, I stay stucked on the following

[31-12-2014 12:36:06] - INFO: ------------------------------------------
[31-12-2014 12:36:06] - INFO: Starting BitBot v0.9.4
[31-12-2014 12:36:06] - INFO: Real Trading Enabled = false
[31-12-2014 12:36:06] - INFO: Working Dir = C:\Users\jfvarin\Desktop\Bots\BitBot
[31-12-2014 12:36:06] - INFO: ------------------------------------------
[31-12-2014 12:36:06] - INFO: Downloader started!

It doesn't connect to the database.
I checked the db connection using dbhealth and regardless to the errors due to an empty db, I can see the connection with the db monitor.

Any ideas or hints ?

Otherwise, do you have plans to implement cryptsy or should I try to integrate it by myself ?

Anyway, thanks in advance for your answers.

Jofo
newbie
Activity: 48
Merit: 0
Do you have any problem with mongo in mac?

node app.js
[08-12-2014 20:11:19] - INFO: ------------------------------------------
[08-12-2014 20:11:19] - INFO: Starting BitBot v0.9.4
[08-12-2014 20:11:19] - INFO: Real Trading Enabled = true
[08-12-2014 20:11:19] - INFO: Working Dir = /Users/leonardo/Sites/BitBot
[08-12-2014 20:11:19] - INFO: ------------------------------------------
[08-12-2014 20:11:19] - INFO: Downloader started!

/Users/user/Sites/BitBot/node_modules/mongojs/node_modules/mongodb/lib/mongodb/mongo_client.js:409
          throw err
                ^
Error: failed to connect to [localhost:27017]

I tried localhost, 127.0.0.1. Sometimes the bot works, sometimes doesn't work. Any idea?

I have never encountered that before, are you sure the MongoDB service is still running and that it doesn't crash?
I don't believe this is an issue with the bot, but more likely an issue with your MongoDB setup.

How did you install MongoDB on OSX? Via Homebrew?
Is the machine permanently on or would it try to hibernate or shut down disk after a period of inactivity?
newbie
Activity: 21
Merit: 0
Do you have any problem with mongo in mac?

node app.js
[08-12-2014 20:11:19] - INFO: ------------------------------------------
[08-12-2014 20:11:19] - INFO: Starting BitBot v0.9.4
[08-12-2014 20:11:19] - INFO: Real Trading Enabled = true
[08-12-2014 20:11:19] - INFO: Working Dir = /Users/leonardo/Sites/BitBot
[08-12-2014 20:11:19] - INFO: ------------------------------------------
[08-12-2014 20:11:19] - INFO: Downloader started!

/Users/user/Sites/BitBot/node_modules/mongojs/node_modules/mongodb/lib/mongodb/mongo_client.js:409
          throw err
                ^
Error: failed to connect to [localhost:27017]

I tried localhost, 127.0.0.1. Sometimes the bot works, sometimes doesn't work. Any idea?
brand new
Activity: 0
Merit: 0
dont worry..i didnt mad at all... Grin Grin Grin Grin
newbie
Activity: 48
Merit: 0
I don't know this bot, but maybe it want's to sell x percent and x percent of 0.22 btc is less than the minimum trade amount? At least that was one of the problems of my bots.

That is configurable, you can set that if you want, but I don't think that's the problem. I changed a couple of things around in the exchange wrapper code in the latest commit, I hope this solves a couple of problems that users might be experiencing.

But keep in mind a lot of exchanges have a minimum order size configured... 0.22 BTC shouldn't be a problem, but amounts as small as 0.05 BTC might be.
legendary
Activity: 965
Merit: 1000
I don't know this bot, but maybe it want's to sell x percent and x percent of 0.22 btc is less than the minimum trade amount? At least that was one of the problems of my bots.
brand new
Activity: 0
Merit: 0
dem...why you didnt tell me earlier...lol
newbie
Activity: 48
Merit: 0
it always trying to say that i dont have enough btc..

Quote
It is not enough BTC in the account for sale.

my btc in btce is 0.005 BTC..is it not enough?

I currently only go as far as 2 decimals, so that's why you get that error message.
You need at least 0.01 BTC for now, but I'll look into supporting smaller quantities.

I also get "It is not enough BTC in the account for sale."

0.22 available in my btc-e account Sad

Can you PM me some more detailed logs. 0.22 should be sufficient to trade so I wonder what's going on.
brand new
Activity: 0
Merit: 0
it always trying to say that i dont have enough btc..

Quote
It is not enough BTC in the account for sale.

my btc in btce is 0.005 BTC..is it not enough?
newbie
Activity: 21
Merit: 0
it always trying to say that i dont have enough btc..

Quote
It is not enough BTC in the account for sale.

my btc in btce is 0.005 BTC..is it not enough?

I currently only go as far as 2 decimals, so that's why you get that error message.
You need at least 0.01 BTC for now, but I'll look into supporting smaller quantities.

I also get "It is not enough BTC in the account for sale."

0.22 available in my btc-e account Sad
newbie
Activity: 48
Merit: 0
Any feature requests you guys have in mind? I'm thinking about creating a small web interface for the bot.
brand new
Activity: 0
Merit: 0
Quote
[30-10-2014 21:27:58] - INFO: ------------------------------------------
[30-10-2014 21:27:58] - INFO: Starting BitBot v0.9.2
[30-10-2014 21:27:58] - INFO: Real Trading Enabled = false
[30-10-2014 21:27:58] - INFO: Working Dir = C:\BTC\BitBot\trunk
[30-10-2014 21:27:58] - INFO: ------------------------------------------
[30-10-2014 21:27:58] - INFO: Downloader started!
[30-10-2014 21:29:03] - ERROR: getTrades Exchange API returned the following err
or:
[30-10-2014 21:29:03] - ERROR: Error: ETIMEDOUT
[30-10-2014 21:29:30] - INFO: Created a new 5 minute candlestick!
[30-10-2014 21:29:30] - INFO: {"period":1414675500,"open":330.733,"high":331.334
,"low":330.698,"close":331.27,"volume":9.2026749,"vwap":331.15}
[30-10-2014 21:29:30] - INFO: Advice: hold (null)
[30-10-2014 21:30:33] - ERROR: getTrades Exchange API returned the following err
or:
[30-10-2014 21:30:33] - ERROR: Error: ETIMEDOUT
[30-10-2014 21:30:53] - ERROR: getTrades Exchange API returned the following err
or:
[30-10-2014 21:30:53] - ERROR: Error: ETIMEDOUT
[30-10-2014 21:31:33] - ERROR: getTrades Exchange API returned the following err
or:
[30-10-2014 21:31:33] - ERROR: Error: ETIMEDOUT
[30-10-2014 21:32:33] - ERROR: getTrades Exchange API returned the following err
or:
[30-10-2014 21:32:33] - ERROR: Error: ETIMEDOUT
[30-10-2014 21:32:43] - ERROR: getTrades Exchange API returned the following err
or:
[30-10-2014 21:32:43] - ERROR: Error: ETIMEDOUT
[30-10-2014 21:33:04] - ERROR: getTrades Exchange API returned the following err
or:
[30-10-2014 21:33:04] - ERROR: Error: ETIMEDOUT
[30-10-2014 21:33:32] - ERROR: getTrades Exchange API returned the following err
or:
[30-10-2014 21:33:32] - ERROR: Error: ESOCKETTIMEDOUT
[30-10-2014 21:35:07] - INFO: Created a new 5 minute candlestick!
[30-10-2014 21:35:07] - INFO: {"period":1414675800,"open":331,"high":331.999,"lo
w":331,"close":331.5,"volume":13.68037269,"vwap":331.34}
[30-10-2014 21:35:07] - INFO: Advice: hold (null)

i get this error...it seems the API took long time or not connected to btce..

Quote
config.exchangeSettings = {
   exchange: 'btce',
   // Options: (bitstamp, kraken, btce)
   currencyPair: {pair: 'btc_usd', asset: 'BTC', currency: 'USD'},
   // For Bitstamp just use {pair: 'XBTUSD', asset: 'XBT', currency: 'USD'}
   // For Kraken look up the currency pairs in their API: https://api.kraken.com/0/public/AssetPairs
   // Kraken Example: {pair: 'XXBTZEUR', asset: 'XXBT', currency: 'ZEUR'}
   // For BTC-E look up the currency pairs in their API: https://btc-e.com/api/3/info
   // BTC-E Example: {pair: 'BTC_USD', asset: 'BTC', currency: 'USD'}
   tradingReserveAsset: 0,
   // Enter an amount of "asset" you would like to freeze (not trade)
   tradingReserveCurrency: 0,
   // Enter an amount of "currency" you would like to freeze (not trade)
   slippagePercentage: 0.1
};
newbie
Activity: 48
Merit: 0
v0.9.3 Released!

This update changes the expected structure for your config.js file. Makes sure config.js is structured EXACTLY as config.sample.js
brand new
Activity: 0
Merit: 0
gonna checkout the version now... Smiley
newbie
Activity: 48
Merit: 0
dem...why you didnt tell me earlier...lol

My apologies, I totally forgot about that limit.
newbie
Activity: 48
Merit: 0
it always trying to say that i dont have enough btc..

Quote
It is not enough BTC in the account for sale.

my btc in btce is 0.005 BTC..is it not enough?

I currently only go as far as 2 decimals, so that's why you get that error message.
You need at least 0.01 BTC for now, but I'll look into supporting smaller quantities.
newbie
Activity: 48
Merit: 0
Logs

This is indeed the BTC-E API not responding or responding slowly.

As long as these errors don't happen constantly, there is no problem as BitBot will automatically retry it's API requests. In your example there is sometimes a minute between errors and by default BitBot fetches data every 10 seconds, meaning that there were a couple of successful requests in between the errors.
brand new
Activity: 0
Merit: 0
can you include btc-e?  Grin Grin Grin

As a matter of fact I have been working on getting BTC-E added over the past couple of days.
I'm actually done writing the code but I have no balance at BTC-E to test if creating orders, etc actually works.

I'll try and get some balance on BTC-E to try out if everything works correctly before publishing to GitHub.

that will be great..i hv small btc in btc-e and i can be tester... Tongue
newbie
Activity: 48
Merit: 0
v0.9.2 released: BTC-E Support added (Experimental)

Don't forget to star the repository on GitHub if you enjoy using BitBot :-).

@aidi_hex: I would appreciate if you report back here if you have success running the bot on BTC-E.
newbie
Activity: 48
Merit: 0
can you include btc-e?  Grin Grin Grin

As a matter of fact I have been working on getting BTC-E added over the past couple of days.
I'm actually done writing the code but I have no balance at BTC-E to test if creating orders, etc actually works.

I'll try and get some balance on BTC-E to try out if everything works correctly before publishing to GitHub.
brand new
Activity: 0
Merit: 0
can you include btc-e?  Grin Grin Grin
newbie
Activity: 48
Merit: 0
Hello, I am intersting to know how your bot is working ?
When your bot know that he can sell and when your bot know that he must buy ?
I think it is a good idea to put it in description, many guys prefer to know how works a trading bot before using it.

Hello, thanks for taking a look at the bot :-)!

The bot is very modular. It uses different indicators to decide whether it should buy or sell. Currently the bot supports macd, ppo, psar and more can be added.

Have a look at the wikipedia entries for these indicators to understand how they work.
Ok thank you Smiley

As a follow-up because I was a little brief in my reply.

Good places to start learning are:
http://en.wikipedia.org/wiki/Candlestick_chart
http://en.wikipedia.org/wiki/MACD
http://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average

BitBot uses candlestick aggregation to calculate it's indicators.
MACD is the default enabled indicator in the bot, it's settings are completely configurable (long/short/EMA periods).
newbie
Activity: 48
Merit: 0
v0.9.1 Released! Nothing major just a couple of cosmetic changes and some extra documentation on the backtester.
Don't forget: If you enjoyed using BitBot, spread the word :-).
newbie
Activity: 39
Merit: 0
Hello, I am intersting to know how your bot is working ?
When your bot know that he can sell and when your bot know that he must buy ?
I think it is a good idea to put it in description, many guys prefer to know how works a trading bot before using it.

Hello, thanks for taking a look at the bot :-)!

The bot is very modular. It uses different indicators to decide whether it should buy or sell. Currently the bot supports macd, ppo, psar and more can be added.

Have a look at the wikipedia entries for these indicators to understand how they work.
Ok thank you Smiley
newbie
Activity: 48
Merit: 0
Hello, I am intersting to know how your bot is working ?
When your bot know that he can sell and when your bot know that he must buy ?
I think it is a good idea to put it in description, many guys prefer to know how works a trading bot before using it.

Hello, thanks for taking a look at the bot :-)!

The bot is very modular. It uses different indicators to decide whether it should buy or sell. Currently the bot supports macd, ppo, psar and more can be added.

Have a look at the wikipedia entries for these indicators to understand how they work.
newbie
Activity: 48
Merit: 0
it can use with window home pc?
or must use vps?

You can use any OS where you can install node.js on. So Windows should not be a problem.

Installation can be a bit technical as this is not a simple .exe that you can run.

I successfully used my bot on OSX and Linux. I do not have any experience with windows however...

Maybe someone else can post his/her experience here on getting the bot to work on windows?
newbie
Activity: 48
Merit: 0
i tried to run the backtester but you need kraken/bitstamp api?

i thought backtesting is just to test with random numbers? why do you need access to an exchange?

Hi, you reminded me that my backtester documentation is indeed a bit lacking...

What it does is it uses the historical data you collected over a periode of time by running app.js.

You first need to run app.js for a while (make sure real trading is set to disabled) to collect historical data for the exchangr you are interested in.

The backtester only does one API request at the beginning:

Request the trading fee of your account to give you a more realistic view of what would happen.

When creating an API key for the bot at your exchange you do not need to worry about the bot trying to steal your coins. At Bitstamp and Kraken you can set individual permissions for an API key. So do not grant the key permission to withdraw.

Apologies for any typos or bad grammar. I'm replying from my phone.
hero member
Activity: 658
Merit: 500
Thanks, that this bot is free Grin
newbie
Activity: 39
Merit: 0
Hello, I am intersting to know how your bot is working ?
When your bot know that he can sell and when your bot know that he must buy ?
I think it is a good idea to put it in description, many guys prefer to know how works a trading bot before using it.
newbie
Activity: 42
Merit: 0
it can use with window home pc?
or must use vps?
newbie
Activity: 6
Merit: 0
i tried to run the backtester but you need kraken/bitstamp api?

i thought backtesting is just to test with random numbers? why do you need access to an exchange?
newbie
Activity: 48
Merit: 0
v0.9.0 Released, Database layer rewrite and performance enhancements (Less memory usage).
newbie
Activity: 48
Merit: 0
New version tonight! Getting closer to the 1.0 release that will include Cryptsy support.
newbie
Activity: 8
Merit: 0
great! thanks for the update Smiley
newbie
Activity: 48
Merit: 0
V0.8.5 Stability & troubleshooting improvements
newbie
Activity: 48
Merit: 0
V0.8.4 Simplified exchange interface code and fixed the bug that should have been fixed in the previous release (PLEASE UPGRADE)
newbie
Activity: 48
Merit: 0
I just got an email from Kraken:

Code:
Fiat to digital currency trades:
The old fee structure ranged from 0.30% to 0.05%. The new fee structure ranges from 0.35% to 0.10%. Why the increase? The old fee structure was a promotional rate designed to support liquidity during our first year of operation. The promotional fee structure is not sufficient to sustain the level of service we provide and wish to continue providing. Fast execution, innovative features, exceptional support, high security - that's what Kraken is about.
Digital currency to digital currency trades:
The old fee structure ranged from 0.20% to 0.05%. The new fee structure will range from 0.10% to 0.05%. Why the decrease? Our aim is to strive for simplicity and encourage trading in selected alternative digital currencies in order to support the digital currency ecosystem. Further, we are delisting several pairs which means that some trades may now require two hops where they previously only required one.

Is BitBot able to handle those changes?

No worries, BitBot dynamically queries your personal trading fee, so everything should keep on working Smiley.
newbie
Activity: 48
Merit: 0
Important patch release for Kraken exchange users v0.8.3:
Fixed a bug that might cause the order monitor not to pick up on a cancelled order.
newbie
Activity: 8
Merit: 0
I just got an email from Kraken:

Code:
Fiat to digital currency trades:
The old fee structure ranged from 0.30% to 0.05%. The new fee structure ranges from 0.35% to 0.10%. Why the increase? The old fee structure was a promotional rate designed to support liquidity during our first year of operation. The promotional fee structure is not sufficient to sustain the level of service we provide and wish to continue providing. Fast execution, innovative features, exceptional support, high security - that's what Kraken is about.
Digital currency to digital currency trades:
The old fee structure ranged from 0.20% to 0.05%. The new fee structure will range from 0.10% to 0.05%. Why the decrease? Our aim is to strive for simplicity and encourage trading in selected alternative digital currencies in order to support the digital currency ecosystem. Further, we are delisting several pairs which means that some trades may now require two hops where they previously only required one.

Is BitBot able to handle those changes?
newbie
Activity: 8
Merit: 0
Bugfix is working, confirmed Smiley
newbie
Activity: 48
Merit: 0
v0.8.2 Fixed the push service bug and a bug when using the Bitstamp API.
Important: If you have used this bot or any other Bitstamp bot before and are receiving invalid nonce errors, I recommend generating a new API key on the Bitstamp website.
newbie
Activity: 48
Merit: 0
Bug Report:

Code:
/root/BitBot/services/pushservice.js:46
      this.logger.log('Push notification sent!');
                  ^
TypeError: Cannot call method 'log' of undefined
    at /root/BitBot/services/pushservice.js:46:19
    at IncomingMessage. (/root/BitBot/node_modules/pushover-notifications/lib/pushover.js:133:8)
    at IncomingMessage.EventEmitter.emit (events.js:117:20)
    at _stream_readable.js:920:16
    at process._tickCallback (node.js:415:13)

I'm disabling the Push-service for now...

Version: 0.8.0

Thanks for spotting the issue! That's an easy fix, I'll publish v0.8.1 with the bug fix in a couple of hours.
newbie
Activity: 8
Merit: 0
Bug Report:

Code:
/root/BitBot/services/pushservice.js:46
      this.logger.log('Push notification sent!');
                  ^
TypeError: Cannot call method 'log' of undefined
    at /root/BitBot/services/pushservice.js:46:19
    at IncomingMessage. (/root/BitBot/node_modules/pushover-notifications/lib/pushover.js:133:8)
    at IncomingMessage.EventEmitter.emit (events.js:117:20)
    at _stream_readable.js:920:16
    at process._tickCallback (node.js:415:13)

I'm disabling the Push-service for now...

Version: 0.8.0
newbie
Activity: 48
Merit: 0
v0.8.0 Released! Lot's of changes to the code (Modularity), but no extra features. Please report any bugs you encounter.
newbie
Activity: 48
Merit: 0
This looks promising, i'll try using it Smiley
Also, i'm a software developer... Any ways i could help you with anything?

v0.8.0 will be released this weekend and will include a lot of changes to the project. Be sure to update when it gets released :-).
I always appreciate bug reports, or as a developer have a look through the code code and let me know if you see anything that could use improvements :-).
newbie
Activity: 8
Merit: 0
This looks promising, i'll try using it Smiley
Also, i'm a software developer... Any ways i could help you with anything?
newbie
Activity: 48
Merit: 0
v0.7.8 Fixed a bug in the Kraken API wrapper

Important bugfix, ordermonitor wasn't monitoring Kraken orders correctly.
newbie
Activity: 48
Merit: 0
Very nice project. Why not to use https://github.com/oransel/node-talib, you'll get 100+ indicators without the need to develop them from scratch. Bittrex support would be also nice.
Planning to look deeper into source, looks like it's a good base for developing custom bots.
Great work, thank you for publishing it Smiley

Thanks for the feedback! See my comments below:

- I've had a look at TA-LIB in the past but at this time I prefer to stick with these pre-packaged indicators I have. I'm 100% sure they work as intended and the best indicators are often the ones you make yourself as you'll be able to "beat the system". I might add support for TA-LIB at a future date, but at the moment it's low priority.

- Added Bittrex to my to-do list, but I'll add support for exchanges in order of volume, so I'll probably work on bigger exchanges first and move from there.
ExD
member
Activity: 107
Merit: 10
Very nice project. Why not to use https://github.com/oransel/node-talib, you'll get 100+ indicators without the need to develop them from scratch. Bittrex support would be also nice.
Planning to look deeper into source, looks like it's a good base for developing custom bots.
Great work, thank you for publishing it Smiley
newbie
Activity: 48
Merit: 0
Cryptsy should be pretty easy to add, I'll add it to my to-do list! Any other feature requests?
newbie
Activity: 48
Merit: 0
Can you add bittrex or cryptsy?

I probably could, i'll have a look at their API's. :-)
legendary
Activity: 881
Merit: 1006
Can you add bittrex or cryptsy?
hero member
Activity: 518
Merit: 500
Will try it out on bitstamp nice work
newbie
Activity: 48
Merit: 0
v0.7.6 Fixed bugs in API and Candlestorage modules

These are some important bug fixes, so if you are already running BitBot, I highly suggest to upgrade to v0.7.6.
sr. member
Activity: 325
Merit: 250
newbie
Activity: 48
Merit: 0
v0.7.4 New Parabolic SAR indicator
newbie
Activity: 48
Merit: 0
Update: Big changes in the brand new v0.7 BitBot, It's now extremely easy to create and experiment with your own indicators.
newbie
Activity: 48
Merit: 0
newbie
Activity: 48
Merit: 0
BitBot

BitBot is a Crypto-Currency trading bot and backtesting platform that connects to popular Bitcoin exchanges (Bitstamp, Kraken). It is written in javascript and runs on Node.JS.
This bot is best suited for people with a technical background in Javascript/Node and will require some Node.JS and MongoDB knowledge to set up correctly.

I am still actively developing this bot, but if you happen to develop some extra features for this bot, don't forget to contribute it back to the repository so everyone can enjoy :-).

Planned features
- At this moment there is still plenty of room for improvement, I need to do some serious modularisation and cleaning up of code in the trading advisor section. (Done)
- Make indicators works as plug-ins (Easier for community to contribute contribute their own trading strategies). (Done)
- Web interface for easy follow-up of bot performance
- Make integration of new exchanges easier before I'll support additional exchanges. (Done)

Supported Exchanges
- Bitstamp
- Kraken
- BTC-E

OS Compatibility
Every OS is supported, just makes sure you have Node.JS and MongoDB installed.

Download
https://github.com/5an1ty/BitBot

Change log
- V0.6 Initial Public Version
- V0.7 Big changes throughout the application (Rewrote Backtester, Made indicators work as plugins, ...)
- V0.7.1 Backtester now monitors profit lost on fees
- V0.7.2 DBHealth and extra backtester functionality
- V0.7.3 Indicators are now aware of position
- V0.7.4 Added Parabolic SAR as an indicator
- V0.7.5 MongoDB Storage and Backtester bugfixes
- V0.7.6 Fixed bugs in API and Candlestorage modules
- V0.7.7 Moved DB functions, Enhanced profit report
- V0.7.8 Fixed a bug in the Kraken API wrapper
- V0.7.9 Critical bug fix
- V0.8.0 Modular Exchanges, Services Rewrite
- V0.8.1 Bug fixes
- V0.8.2 Require new bitstamp-api package 0.1.5
- V0.8.3 Kraken API handler bug fix
- V0.8.4 Simplified exchange interface code
- V0.8.5 Stability & troubleshooting improvements
- V0.9.0 Database Layer Rewrite
- V0.9.1 Backtester cosmetic changes
- V0.9.2 BTC-E Support
- V0.9.3 Kraken API bugfix and more in details

Support
I will try and answer as many questions as possible in this topic, but I would prefer that you create issues on Github (Easier for me to follow up).

FAQ
Q: I often receive invalid nonce / invalid signature errors when using Bitstamp, how do I fix that?
A: Generate a new API key on the Bitstamp website.

Donations
If you enjoyed using BitBot or would like to help me continue development of this bot, consider buying me a beer:
(BTC) 1BitBotSYYMAsn6c1AsrxWphWAGkNE6hmQ

Disclaimer
I provide this bot for free and without a guarantee that it will continue functioning or generate any profit.

I have no bad intentions, but don’t take my word for it, please go through the source code!
Jump to: