Merge pull request #1 from jessesung/master

Make arguments overwritable in config.php
config: add config file template

Signed-off-by: AceLan Kao <acelan@acelan.idv.tw>
Rename the API key name

because it is confusing
Fix typo lable->label
Merge pull request #2 from lexical/kengyu

Kengyu
refine the code and make it more abstract

split the bot into 2 files
cryptsy_bot.php is the bot abstract class, it might be easier to add more sites
my_doge_bot.php contains the algorithm and the bot, it can trade other currency
by changing few lines of code.

Signed-off-by: AceLan Kao <acelan@acelan.idv.tw>
bot and lib: fixed some bugs

PHP Notice:  Undefined index: ordertype in /home/acelan/litecoin/bot/cryptsy_bot/my_doge_bot.php on line 107
PHP Notice:  Undefined index: price in /home/acelan/litecoin/bot/cryptsy_bot/my_doge_bot.php on line 107
PHP Notice:  Undefined index: ordertype in /home/acelan/litecoin/bot/cryptsy_bot/my_doge_bot.php on line 109
PHP Notice:  Undefined index: ordertype in /home/acelan/litecoin/bot/cryptsy_bot/my_doge_bot.php on line 114
PHP Notice:  Undefined variable: label in /home/acelan/litecoin/bot/cryptsy_bot/cryptsy_bot.php on line 32
PHP Notice:  Undefined variable: buy_count in /home/acelan/litecoin/bot/cryptsy_bot/my_doge_bot.php on line 123

Signed-off-by: AceLan Kao <acelan@acelan.idv.tw>
bot: make sure we've made a new trade

check the order_id to make sure new trade has beed made

Signed-off-by: AceLan Kao <acelan@acelan.idv.tw>
lib: remore debug message

Signed-off-by: AceLan Kao <acelan@acelan.idv.tw>
bot: fix total btc calculation

the original formula is wrong, it can't calculation the correct account value.
fixed now.

Signed-off-by: AceLan Kao <acelan@acelan.idv.tw>
bot: adjust the doge sell amount

If we bought doge more than 1 time, then we don't want to sell too much next
time. If we do, then we will sell the price lower than we buy.
So, adjust the amount to not to sell that much next time.

Signed-off-by: AceLan Kao <acelan@acelan.idv.tw>
bot: remove debug message

Signed-off-by: AceLan Kao <acelan@acelan.idv.tw>