Username: Password:

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - beer-k0in

Pages: [1]
1
General Discussion / How long do you hold your bags
« on: May 27, 2017, 12:03:47 AM »
Hey,

when the GUNBOT buys coins and you have bad luck and the price falls by 20% to 40%.
Than in this lower price area the price goes up and down as always, but you still holding this bag - how long till you sell with a loss to be able to trade with that pair again?

BK

2
gmon - A command line application to monitor your Gunbot




Basics

🚨 gmon 1.x will only work with Gunbot v9! 🚨

- gmon works best on Unix based systems (Linux and OSX)
- gmon requires Gunbot v9, Node.js 6 or higher and npm
- gmon uses up to 100MB memory
- you should not use gmon if your server has less than 230MB available free memory
- you need a wide window / screen
- gmon and it's creator are not responsible/liable for wrong numbers or wrong calculations
- use at own risk



Installation - Linux, OSX, Windows

You need to install Gunbot-Monitor on the same machine as Gunbot.

This is a Node.js command line app available through the npm registry.

Before installing, download and install Node.js.
Node.js 6.11.2 or higher is required.

Installation is done using the "npm install -g" command:

Code: [Select]
npm install -g gunbot-monitor


Update

Use npm to update:

Code: [Select]
npm uninstall -g gunbot-monitor && npm install -g gunbot-monitor


Usage

To start gmon, go to the folder your Gunbot is installed (`cd /path/to/gunbot`) and run this command:

Code: [Select]
gmon [options]

Options

Code: [Select]
    -h, --help                               Output usage information
    -v, --version                            Output the version number
    -p, --path <path>                        Path to the GUNBOT folder. Separate multiple paths with ":" (like: -p /path1:/path2). [Default: current folder]
    -N, --path-name <name>                   Optional name for each path to the GUNBOT folder(s). Separate multiple path names with ":" (like: -N Kraken_Bot:Proxy_Mega_Bot). [Default: No path name]
    -c, --compact [groupSize]                Do not draw row lines. Optional set the number of rows after which a line is drawn. [Default: 0]
    -s, --small                              Reduce columns for small screens
    -d, --digits <digits>                    Amount of digits for all numbers. Min = 0, max = 10. [Default: 4]
    -r, --refresh <seconds>                  Seconds between table refresh. Min = 1, max = 600. [Default: 60]
    -m, --markets <markets>                  Filter of markets to show. Separate multiple markets with ":" (like: -m poloniex:kraken) [Default: all]
    -P, --profit                             Use to activate the parsing of the profit. NOT WORKING CORRECTLY!
    -H, --hide-inactive <hours>              Hides trading pairs which last log entry is older than given hours. Min = 1, max = 854400. [Default: 720]
    -C, --connections-check-delay <seconds>  Seconds between netstats checks. Higher numbers result in more inaccurate statistics but reduce cpu usage. Min = 1, max = 600. [Default: 1]


Path option "-p"

To run gmon outside of your Gunbot folder, use the `-p` option to specify the path where Gunbot is installed:

Code: [Select]
gmon -p /path/to/gunbot
If you have multiple Gunbots running, you can use the `-p` option to specify all paths to your Gunbots:

Code: [Select]
gmon -p /path/to/AAA_bot:/path/to/BBB_bot

Path name option "-N"

When using `-p` option you can set names for your different Gunbots:

Code: [Select]
gmon -N Kraken-Bot-tssl:Bittrex-emo

Compact mode "-c"

With this option, gmon will not draw row lines to separate the rows:

Code: [Select]
gmon -c
Optional set the number of rows after which a line should be drawn to have a little visual guide:

Code: [Select]
gmon -c 4

Small mode "-s"

With this option, gmon will not draw the columns *OO?*, *# Coins*, *1 6 h d +* to support smaller screens:

Code: [Select]
gmon -s

Digits option "-d"

When using `-d` option you can set the number of displayed digits. Set to a lower number on small screens:

Code: [Select]
gmon -d 3

Refresh option "-r"

This option allows you to set the time in seconds how long gmon waits until it checks all values again.

⚡️ Please check your server when setting `-r` to low numbers! ⚡️ Faster updates mean more work for your server.

Code: [Select]
gmon -r 90

Market filter "-m"

With option `-m` you are able to define specific markets you want to see in the output:

Code: [Select]
gmon -m kraken:bitfinex # This will only show pairs on those exchanges

Profit option "-P"

Now working at the moment.


Hide inactive pairs "-H"

gmon will show all trading pairs inside a folder, as long as there is a `state.json` file. If you disable a pair you can set this option `-H` to hide inactive trading pairs when there last update is older than the set number.

Code: [Select]
gmon -H 2

Connections check delay "-C"

Set the time interval in seconds how often the number of open connections to the exchanges should be checked. Higher numbers result in more inaccurate statistics but reduce cpu usage.

Code: [Select]
gmon -C 10


How to read gmon's output

ColumnDescription
**Name**Market name and trading pair name
**Str**Buy and sell strategy
**LL**Last Log - seconds since the last log update of this trading pair 
**OO?**Open Order? - says "yes" if there is an open order on the market
-
**# Coins**Amount of coins of the quote currency
**in BTC**Value of the quote currency in BTC (or other base currency)
**Diff since buy**Indicator how much the value of the holding quote currency has changed in BTC (or other base currency)
-
**Buy/Bought**If numbers are white: Price which needs to be reached till the bot will buy quote currency (if **# Coins** == 0)
If numbers are yellow: Price the bot paid to buy the quote currency"
**Sell**Price which needs to be reached till the bot will sell the holding quote currency (if **# Coins** > 0)
**Last Price**Current market price for the quote currency
**Price diff**Difference between Last Price and the Buy/Bought if waiting to buy
or difference between Last Price and the Sell if waiting to sell.
If something is not correct (the log does not contain all needed prices) it shows an error hint
-
**# Buys**Number of total buys - How often did the bot buy this quote currency and time since the last buy
**1 6 h d +**Number of buys in the last 1 hour / 6 hours / 12 hours / 24 hours / more than 24 hours.
**# Sells**Number of total sells - How often did the bot sell this quote currency and time since the last sell
**1 6 h d +**Number of sells in the last 1 hour / 6 hours / 12 hours / 24 hours / more than 24 hours



Windows issues

Do yourself a favor and use a console emulator like cmder.



Wishlist

https://github.com/BeerK0in/gunbot-monitor/issues/15



Thanks

Thanks to your feedback so for and thanks to
https://github.com/toSvenson
https://github.com/jbogatay
for contributing!



Support & Tips

You like gmon and it helps you earning money?

- Report bugs in this forum thread or via the Telegram group t.me/beercrypto.
- Support gmon and send a tip to BTC wallet: 1GJCGZPn6okFefrRjPPWU73XgMrctSW1jT


BK

3
What is the preferred way to handle bots stuck in waiting orders?
GUNBOT v3.2 Patch 2022

My STRAT bot has placed a buy order in the moment the price went up again. The buy order is still in Poloniex and the bot is waiting.

Log of buying event:

Code: [Select]
2017/05/19 00:59:18 [ --2017/05/19 00:59:18--poloniex--BTC_STRAT  --  Gunbot v3.2 cycle #43 --------------- ]
2017/05/19 00:59:18 ::::: collecting market data...
2017/05/19 00:59:18 ***************************************************
2017/05/19 00:59:18 Low BB:0.00073482 - High BB:0.00076516
2017/05/19 00:59:18 ***************************************************
2017/05/19 00:59:19 LP 0.00072208  Bal.BTC 0.13207573  Bal.STRAT 0(0)
2017/05/19 00:59:19 No open orders
2017/05/19 00:59:19 boughtPrice 0.00070175
2017/05/19 00:59:19 price  falls (-1)
2017/05/19 00:59:19 PriceToBuy,7.2749,priceToSell,7.3684
2017/05/19 00:59:19 LP 7.2208000,<=,prBuy 7.2748799  secMargin 0.0002909951961904762  grows yes
2017/05/19 00:59:19 no altcoins: 0
2017/05/19 00:59:19 price to buy: 0.0007274879904761904
2017/05/19 00:59:19 price is sweet to buy
2017/05/19 00:59:19 price is growing
2017/05/19 00:59:19 Buying on poloniex 55.396024041657434 of STRAT for 0.00072208
2017/05/19 00:59:21
2017/05/19 00:59:21 *** MARKET CALLBACK | buy 55.396024041657434 STRAT for 0.00072208 BTC
2017/05/19 00:59:21 Gunbot callback at 2017/05/19 00:59:21 cycle # 43
2017/05/19 00:59:21 Callback:
2017/05/19 00:59:21 ---------
2017/05/19 00:59:21 buy 55.396024041657434 STRAT for 0.00072208 BTC
2017/05/19 00:59:21 next delay will be 111s


The output for the next hours is "Waiting for orders: 0 STRAT":

Code: [Select]
2017/05/19 01:01:12 [ --2017/05/19 01:01:12--poloniex--BTC_STRAT  --  Gunbot v3.2 cycle #44 --------------- ]
2017/05/19 01:01:12 ::::: collecting market data...
2017/05/19 01:01:12 ***************************************************
2017/05/19 01:01:12 Low BB:0.00073210 - High BB:0.00076657
2017/05/19 01:01:12 ***************************************************
2017/05/19 01:01:16 LP 0.00072772  Bal.BTC 0.09207537  Bal.STRAT 0(0)
2017/05/19 01:01:16 Open orders
2017/05/19 01:01:16 boughtPrice 0.00072208
2017/05/19 01:01:16 price  steady (0)
2017/05/19 01:01:16 PriceToBuy,7.2686,priceToSell,7.5818
2017/05/19 01:01:16 Gunbot callback at 2017/05/19 01:01:16 cycle # 44
2017/05/19 01:01:16 Callback:
2017/05/19 01:01:16 ---------
2017/05/19 01:01:16 Waiting for orders: 0 STRAT
2017/05/19 01:01:16 next delay will be 111s


6 hours later it looks like the bot want's to cancel the buy order "--canceling buy orders". But it did not work, the order is still in Poloniex:

Code: [Select]
2017/05/19 07:11:43 [ --2017/05/19 07:11:43--poloniex--BTC_STRAT  --  Gunbot v3.2 cycle #241 --------------- ]
2017/05/19 07:11:43 ::::: collecting market data...
2017/05/19 07:11:43 ***************************************************
2017/05/19 07:11:43 Low BB:0.00072023 - High BB:0.00080285
2017/05/19 07:11:43 ***************************************************
2017/05/19 07:11:45 --canceling buy orders
2017/05/19 07:11:45 LP 0.000795  Bal.BTC 0.13971585  Bal.STRAT 0(0)
2017/05/19 07:11:45 Open orders
2017/05/19 07:11:45 boughtPrice 0.00072208
2017/05/19 07:11:45 price  grows (4)
2017/05/19 07:11:45 PriceToBuy,7.3869,priceToSell,7.5818
2017/05/19 07:11:45 Gunbot callback at 2017/05/19 07:11:45 cycle # 241
2017/05/19 07:11:45 Callback:
2017/05/19 07:11:45 ---------
2017/05/19 07:11:45 Waiting for orders: 0 STRAT
2017/05/19 07:11:45 next delay will be 111s
2017/05/19 07:11:45 Open buy orders: ,0
2017/05/19 07:11:45


So till now the bot is waiting.



What is the recommended way to handle this? :)

1) Restart the bot and have CANCEL_BUY_ORDERS_ON_START: false
2) Restart the bot and have CANCEL_BUY_ORDERS_ON_START: true
3) Let the bot run and cancel the order manually at Poloniex
4) Stop the bot, cancel the order manually, start the bot
5) Something completely different  :D










4
Hello everybody.

Working with version 3.3.2

First of all: Thanks a lot for all the tutorials in this forum, they helped me a lot! And of course thanks to Gunthar for this nice bot!

To have a better understanding of the GUNBOT and to have an easy start using it, I created
1. an installer to only use one command to setup GUNBOT 3.3.2 on a fresh virtual server and
2. a generator to init and start all the trade pair configs I want to use.

From creating a new server at DigitalOcean to let the bot start trading it takes less than 5 min.  :D

But:
I'm new to GUNBOT. So my approach has some downsides - for now ;)

Installer:
1. The installer only works on Debian / Ubuntu (Choose Ubuntu 16.04.)
2. You need to be root user
3. I recommend a fresh virtual server

Generator:
1. Only supports trade pairs BTC to XXX
2. You can only change a few settings of the trade pair config
3. The other settings are predefined and very likely not perfect - but a good start


How does it work

Installer

The installer is basically a bash script. That script will

- update the system (apt upgrade),
- install node 6.x (for the generator and pm2),
- install required tools (yo, pm2, unzip),
- install the GUNBOT 3.3.2,
- creates some handy aliases,
- install the generator

You can view the whole script here: https://github.com/BeerK0in/generator-gunbot/blob/master/install.sh

Generator

The generator is using a tool called yeoman to create the trade pair config files and optionally starts the GUNBOT for the pairs.
It will ask you some questions you need to answer. Like:

- What market do you want to setup (poloniex, bittrex or kraken)
- Your Market API key
- Your Market API secret
- Max amount of BTC used by each pair per trade
- What BUY strategy do you want to use
- What SELL strategy do you want to use
- Questions about the selected strategies
- Your Delays of the Gunbot
- Select the currencies you want to trade
- Select the trade pair currencies you want to automatically start

And than it creates the config files and starts GUNBOT using pm2.

Aliases

The installer also sets up some aliases to do more with less. :)

- gcd: Go to the folder GUNBOT is installed
- gadd: Use the generator to add a new pair (*)
- gl: Get a list of all running GUNBOTs
- glog [botname or id]: Shows the log of the selected bot (botname = BTC_XXX, use gl to get id)
- gstop [botname or id]: Stops a running bot (botname = BTC_XXX, use gl to get id)
- gstart [botname or id]: Starts a stopped bot (botname = BTC_XXX, use gl to get id)

(*) For now gadd will use the same settings as defined in the first run of the generator. A next version will allow you to set specific strategies for new trade pairs.


Let's do it

1. New VPS. (optional)

I use DigitalOcean a lot, so I can give a brief tutorial:
- Login
- Create Droplet
- Select Ubuntu
- Select the 512MB RAM option for ~3 running trade pairs, 1GB for ~8 pairs or 2GB for ~17 pairs
- Choose San Francisco 2 as location
- Give it a name like 'my-gunbot'
- Click create

Here is an image of the whole creation page: https://i.imgur.com/4uxqjBJ.png
Next you get an email with the IP address of the new server and a password. Looks like this: https://i.imgur.com/LTxIos9.png
Use SSH to connect to this new server:

Code: [Select]
ssh root@123.123.123.123
- Accept the authenticity of the host (enter "yes")
- Set a new root password
- Done

Looks like this: https://i.imgur.com/lpsPoYS.png

If you want to create a VPS at DigitalOcean, you can use this affiliate link to get $10 credit at DigitalOcean: https://m.do.co/c/fade3d3435ba
Of course you can use any server you like.


2. Installer

After you connected via ssh to your new server (must be running Debian or Ubuntu) just run this command:

Code: [Select]
curl -qsL https://raw.githubusercontent.com/BeerK0in/generator-gunbot/master/install.sh | bash -- && exec bash
Two minutes later the installer is done.

3. Generator

Now run this command:

Code: [Select]
ginit
Enter your Poloniex API key and the secret, answer the questions and you are done.
Hint for 3.3.2: on a machine with 1GB start 8 or less bots.

You can run 'gl' to see all GUNBOTs.

=> That's it.  :)

Here a screen how it looks like. Depending on your selected strategy and trade pairs, it will look a little bit different.




To access the log of a bot simply enter

Code: [Select]
glog BTC_LTC
Or the id of that bot. In my example I could also just run 'glog 2'.



Maybe this helps some people to get into the GUNBOT.


Additional scripts

"gstop all" and "gstart all" will likely cause 422 or 429 errors on Kraken and Poloniex, so user cw was so kind and wrote two scripts that nicely and safely start and stop all the bots.
You should use them. Please read his post in this thread to add them to your system: https://gunthy.org/index.php?topic=277.msg2110#msg2110
Thanks cw!


Known Errors

Quote
ERROR! - There was an error starting GUNBOT for BTC_EXP:
1

There are 2 possible issues.

The easy one

Type 'gl' and check if the pair you want to start is already running. Would look like this:


If it is in that list and its state is online, type 'gstop BTC_XXX' to stop it before you run 'ginit'.

The nasty one

Sometimes the PM2 God Deamon got detached from your (root-)user and you will see an empty list if you enter 'gl' BUT if you run 'pgrep -f BTC_XXX' you will see a id a result.

So the Gunbot is running but pm2 does not want to see it.

You need to kill the PM2 God Deamon, and remove the content in ~/.pm2/:

Code: [Select]
pgrep -f PM2 | xargs kill -9
Wait like 2 to 5 min till all Gunbots also stopped.
Check if there are running Gunbots
Code: [Select]
pgrep -f gunthyIf the dont stop, also kill them
Code: [Select]
pgrep -f gunthy | xargs kill -9
Now remove the content of ~/.pm2/
Code: [Select]
rm -r ~/.pm2/*
And run run 'ginit' again.



BK












Pages: [1]