Username: Password:

Author Topic: GUNBOT V3 FOR MAC OS X  (Read 29416 times)

Offline ELECTRIC_WIZARD

  • Rookie
  • *
  • Posts: 10
    • View Profile
GUNBOT V3 FOR MAC OS X
« on: June 05, 2017, 01:28:34 AM »
GUNBOT V3 FOR MAC OS X

INITIAL SETUP

Ideally you will want to use a dedicated exchange account for running your Gunbot on, this way you can keep your Gunbot trades separate from your manual trades, thereby reducing interference. One strategy members of the group use is to transfer bags (coins bought during a crash, dump or price drop) to their manual account, so that Gunbot can continue to run on the new price level.

For trading on Poloniex, make sure you have your API key and Secret available. You should have 2FA set up to view your secret, if not, I recommend you set that up for poloniex using the google authenticator app. You will need to share this API key with Gunthar for him to validate your license. You will not want to share your secret with anyone however, Gunthar, myself, or anyone else included, so if you accidentally post it anywhere where others can view it, you will want to renew your API key so it can remain secret. Also of importance, for Bittrex, you will only be shown your secret once, so take note of it while you can.

For the latest Gunbot releases, either use the link Gunthar provided in your welcome package, or visit the following link:

https://github.com/GuntharDeNiro/BTCT/releases

Now find the unzipped folder in your downloads and move it into the location you want to operate it from. For Gunbot Version 3.3.2 (latest as of 5th of June 2017) you will find a pre-prepared currency pairing for Poloniex.

CONFIGURATION

Open with the text editor of your choice the file poloniex-BTC_XYZ-config.js.

A word of warning for Mac users here, I use Atom text editor, but if you want to use Mac's standard text editor, you will want to open preferences for that application and turn off 'smart quotes', or else every time you edit parameters in the config file, curly quotes will wreak havoc on your Terminal prompts, returning red syntax error after syntax error. All quotation marks must read as ' or '' or else. If you have syntax errors later on, always check this, and ensure the config line ends in a comma!

For now, you will want to alter a few things in this config file, first of all the name of the file itself. For Bitcoin to Ethereum, you will want to name the file: poloniex-BTC_ETH-config.js

Now, for Poloniex, you will want to find the lines:

//---POLONIEX
POLONIEX_KEY: 'xxx',
POLONIEX_SECRET: 'xxx',

You will want to replace these 'xxx's with the relevant information.

You will want to also alter the following lines DEFAULT_CURRENCY_PAIR to 'BTC_ETH', And then you will want to choose a strategy, to start I recommend BUY_STRATEGY: 'BB' and the same for SELL_STRATEGY: 'BB', and keep LOW_BB and HIGH_BB at 25. You will want to eventually learn how these strategies actually operate, and for that the forum and telegram group are your friends. Here is a start: https://gunthy.org/index.php?topic=193.0

You will also want to adjust BTC_TRADING_LIMIT depending on the size of your capital, balls, or ego. I recommend keeping it low until you know what you are doing. Nobody wins the lottery on their first ticket.

Ok, now you have your first currency pairing complete, and I should tell you that this is the exact same process you will want to replicate for any additional currency pairings with one caveat. For trading in ETH, XMR, or USDT, the BTC_TRADING_LIMIT remains as is, it is NOT ETH_TRADING_LIMIT, so don't change it, the number will substitute for that respective currency, so if you want your trading limit per trade as 1 Ethereum, then leave it as 1, but if you leave this as 1 for USDT, don't be surprised to find you have a max trading limit of $1. I don't need to remind all you who are late to the party that 1 BTC is no longer 1 USDT, so this value is important, so find your own limit that suits your own style and expectations; the larger the limit; the larger the reward; the larger the risk. The choice is yours.

In your Gunbot folder you will also find a file called ALLPAIRS-params.js and yes, these settings will affect all your pairs.

I recommend you include the following lines between the curly-braces (that is these: {   }):

BOT_SLEEP_DELAY: ((1001)*90*(Math.random()*0.3+0.7)),
BOT_MAX_LIFETIME:999999999,// overall bot lifetime(koef*min),
BOT_ON_FAIL_DELAY:((1001)*120*(Math.random()*0.3+0.7)),

This randomizes your pairs so to minimize them all calling Polo at once, which will reduce your '422' and '429' error codes at times of peak server traffic. If you are suffering from these, you will want to increase the numbers between the asterisks, so perhaps 90 becomes 120 and 120 becomes 180, or you can experiment like the newly-weds you are until you find what works best for you.

TERMINAL

Ok, now you're ready to open a new Terminal shell (you can find this in a spotlight search if you don't already know).

Instal Homebrew if you haven't already at https://brew.sh

So for example, it will ask you to paste the following (as of 5th June, but check website for latest update) into a Terminal prompt:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

It should install... Next you will want to install node... Type the following into your terminal shell:

brew install node

And it should install...

Now, in terminal you want to change directories to where you have located your Gunbot folder. The simplest way to do this is to right click and copy the folder, then paste it into Terminal preceded by 'cd'.

It should look something like this:

cd /Applications/Gunbot/Gunbot\ 3.3

Now you are ready to setup your first currency pairing.

GUNBOT LOCK AND LOADED

First, if you are curious as to which currencies to choose (if you do not have the currencies.js file in your Gunbot folder as it was phased out with 3.2, you can download it by clicking here: https://gunthy.org/index.php?action=dlattach;topic=394.0;attach=183) - If this is not working for you, then you can download the .zip from Gunther's Github for Version 3.1 which will have the currencies.js file attached, you can then copy this one file into your latest update Gunbot folder. Some people have been having difficulties with this stage, and this could be a dependencies issue, which this simple guide could help you to solve https://treehouse.github.io/installation-guides/mac/node-mac.html, also it is possible that installing Xcode could help, it is available for free download from the App Store in their 'essentials' section (https://itunes.apple.com/gb/app/xcode/id497799835?mt=12).

You can then type the following into a new terminal shell, (remember to first cd to your Gunbot folder as above, where you have moved the currencies.js file to):

node currencies.js

And the shell will show recommended currencies to trade, updating every hour. However, the trick is to find entries before they show up here, and the rules here are similar to the logic with manual trades. The higher the price increase, the larger the coin volatility, the larger the Bollinger bands, the greater the risk of you getting burnt. And you'll wish you had listened to me when I told you to use a small trading limit value until you were better acquainted with your Gunbot.

Anyway, enough with the pontifications,

Open a new shell, cd to your gunbot folder if you haven't already, and, in the case of our example of BTC to ETH, type in the following command:

./gunthy-macos BTC_ETH poloniex

And it should work every time, and when it works, and you are ready for your next pair, the same as above applies, you will want to create a new config file in your gunbot folder, let's say we want ETH_ETC this time, your file should read poloniex-ETH_ETC-config.js and you will want to alter your trading limit to your desired value, and then you are ready to open your new terminal shell, cd to your gunbot folder if you haven't already, and prompt:

./gunthy-macos ETH_ETC poloniex

And a word of advice, you will want a second Poloniex account for trading ETH and XMR from, or USDT. It will make life simpler, and it'll mean you can trade the same pairs with those currencies as you do with your BTC, without the bots battling each other. The time for arbitrage will come, but this bot isn't the one.

GUNBOT MONITOR

Now you have all your bots up and running, you may like to see what they're all up to, and beer-k0in has developed a tool for you here: https://gunthy.org/index.php?topic=319.0

To instal, in a new Terminal shell enter the prompt:

npm install -g gunbot-monitor

To run it, prompt:

gmon [options]

COMMUNITY POLONIEX PROXY

The Gunbot Community Proxy is intended to mitigate against 422 and 429 errors on Poloniex, this will allow you to run reduced delay times without running into API call errors.

As the community continually expands so does the help and support provided by our peers. I have to thank Max and Taniman (Telegram: @meeehx and @Elroy) for respectively providing us with both the resources required to write this proxy guide and the proxy itself.

This guide will mirror the tutorial found here, and so a credit of thanks is also due to Mr Cryptobot for his work: https://thecryptobot.com/2017/07/05/gunbot-proxy-community-edition-install/

Ok, let's get down to it...

Did you install Homebrew at https://brew.sh? I hope you did, but if you didn't, go open up a new terminal shell and paste the following (as of 5th June, but check website for latest update) into a fresh Terminal shell:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

It should install... Next you will want to install Java 8... So paste the following (as of 11th July, but check online for latest versions if you so please) into a terminal shell:

brew cask install java

It should install... Did I say patience is a virtue?

Now you will want to download the Community Proxy from https://github.com/taniman/gunbotproxycommunity/releases

You will want to download both application.properties and GunbotProxyCommunity-x.x.x.jar (x.x.x. refers to latest release, which as of 11th June is 0.9.7.)

Now transfer these two files into your designated Gunbot folder.

Now you will want to edit the relevant ALLPAIRS-params.js file to include the line:

process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";

But where do I paste this I hear you (forget to) ask? After "module.exports = config;" and then save the file.

Now generate two new API Keys and register them with Gunther, you will want to leave the Trusted IPs setting as default, so you are met with the fear inducing message: "Any IP address can use this API key to access your account. This is not recommended if you ever want that Lamborghini the snakeskin oil salesmen promised."

But you're not that guy, you're stronger than that, you know you can make do with a Tesla Model 3 eventually, and you know it is recommended for this installation, and you think you will be safe, so long as you keep your API secret to yourself, speaking of which, as this stage you will want to note down along with your two new API keys.

Now open up your applications.properties file, which I hope you moved into your gunbot folder. Now search for "gunbot.location = file://" in the text and insert your gunbot folder location, so for example, if you recall from before, my Gunbot folder is located thus: /Applications/Gunbot/Gunbot\ 3.3 and so it should look like this:

gunbot.location     = file://C:/Applications/Gunbot/Gunbot\ 3.3

But if you are lazy/ haven't yet developed OCD like me, then it might look something like this: gunbot.location     = file://C:/Users/admin/Downloads/GUNBOT

And if you run your Gunbot from your downloads folder, then it will work fine. Just as you can still sleep in your bedroom with its carpet of crumpled clothes.

Now, insert your first API key and secret into "default_apiKey" and "default_apiSecret" and then your second API key and secret into "apiKey1" and apiSecret1"

Now, search for "doubleBuyProtection=true" and add this piece of code after the above line: "logging.level.nl.komtek=INFO" and it should look like this:

doubleBuyProtection=true
logging.level.nl.komtek=INFO

Ain't that something cute? When did I become such a fucking nerd? Do girls actually like nerds? Surely they'll like my Lambo though? When will he stop saying that word... Save the file...

Now open a new terminal shell, type sudo nano /etc/hosts and then hit enter. Check if your girlfriend, or mother, is looking over your shoulder and enter your administrator password.

You are now using Nano Editor for your Host File. How does that make you feel? Empty?

Move your cursor to an empty line and insert 127.0.0.1 poloniex.com

As you wonder how you ever got here in the first place and why did Poloniex have to crush your inter-stellar rippled dreams you push

Control-O, then hit ENTER to save changes, then Control-X to exit Nano Editor

And as you wonder whether you're like all the other Lambo boys who despite their beliefs and rabbit hole denialism will barely be ably to buy a Lamborghini Tractor yet alone a Huracan by the end of all this (yes, building tractors is where Ferruccio Lamborghini began, and buying them is where you'll likely end if you're lucky)

And as you wonder how it got to this, you remember four-twenty-two isn't a rap song, but just another experience from your painful past, and you're here and you're finally ready to run the community proxy for the first time, so before we all revert to an Italian agrarian reformation because the idea of a Lamborghiniless future is too futile an existence for your fickle fortress of a soul, you open a new terminal shell and type:

java -jar GunbotProxyCommunity-x.x.x.jar

And if that didn't work, you haven't been paying attention well enough, and as you feel that Lamborghini slipping even further away into a tragic case of transmogrification; becoming tractor; becoming rust; becoming dust just like you, you remember you forgot to change x.x.x. to the relevant version.

And if you are successful, you should see lines like these:
2017-07-08 20:03:56,264 [pool-2-thread-3] INFO GunbotProxyService - ticker updated
2017-07-08 20:03:59,149 [pool-2-thread-3] INFO GunbotProxyService - ticker updated
2017-07-08 20:04:02,040 [pool-2-thread-3] INFO GunbotProxyService - ticker updated
2017-07-08 20:04:04,949 [pool-2-thread-2] INFO GunbotProxyService - ticker updated
2017-07-08 20:04:07,834 [pool-2-thread-5] INFO GunbotProxyService - ticker updated

Now open a web browser and go to: http://localhost:8081/public/
You should see: Intercepted

And you will have successfully installed Community Proxy

And you can welcome yourself to the Community's telegram group: https://t.me/joinchat/FWYlMkKK-mkrSuj836ehug

But, if after all you decide to follow this dream with the same fervor as all those others you abandoned previously, and you decide, you know what? This divine sense of dissatisfaction can stay, it's only one more discarded dream anyway, and I live in the United States of Amnesia still, so while a Huracan would be nice, a tractor will suffice, well then... You can go ahead and uninstall the proxy thus:

1. Stop the Java process from running (do a Control-C in the Terminal box)
2. Delete the additional line from allpairs-params.js (or you can just comment it out with a "//")
3. Delete the additional line from HOSTS file (or you can just comment it out with a "#")
4. Delete application.properties AND GunbotProxyCommunity-x.x.x.jar from your Gunbot folder
5. You have uninstalled the Community Proxy from Gunbot

ANYTHING ELSE?

Now you have all you need, but there are further options to facilitate your operations. The forums are your friend, and there are many posts related to plugins and add-ons and various methods and strategies. PM2 for example can help to start, restart, and adjust all your pairs at once, and perhaps I'll return to provide a tutorial for that on Mac in the future if you can endure it. But for now that's more than enough to get you running.

Furthermore, there is little that cannot be learnt through either the search function on the Gunbot Telegram group or this forum, however, if you need any further assistance, do not hesitate to post here, or contact me on Telegram, where you can find me as Electric Wizard.

Also, if you have any additions of your own for our fellow Mac OS X community members, I would greatly appreciate if you share them in this space.

For now, thank you and...



If this post has helped send a beer to my BTC tip jar and it will be greatly appreciated:
1MXpYZaCVU3fqZAsHP6H2BbuFz8rADk8D3
« Last Edit: July 21, 2017, 01:46:33 AM by ELECTRIC_WIZARD »

Offline JPRodgers

  • Rookie
  • *
  • Posts: 1
  • CryptoPlasmic
    • View Profile
Re: GUNBOT V3 FOR MAC OS X
« Reply #1 on: June 08, 2017, 02:15:55 AM »
Great info and not just for mac os x :)

Offline drakard

  • Rookie
  • *
  • Posts: 1
    • View Profile
Re: GUNBOT V3 FOR MAC OS X
« Reply #2 on: June 11, 2017, 08:16:23 PM »
Thx mate, this Mac OS setup helped me a lot!

I installed it yesterday, Gunbot 3.3.2. In this Version the currencies.js is not avaible anymore. But I found it in an older version. So if you like to use currencies.js (I'm finding it very useful), just download GUNBOT_v3.1_GUI_edition_all_CPU.zip and you will find it.

Offline ELECTRIC_WIZARD

  • Rookie
  • *
  • Posts: 10
    • View Profile
Re: GUNBOT V3 FOR MAC OS X
« Reply #3 on: June 12, 2017, 04:12:22 PM »
Thx mate, this Mac OS setup helped me a lot!

I installed it yesterday, Gunbot 3.3.2. In this Version the currencies.js is not avaible anymore. But I found it in an older version. So if you like to use currencies.js (I'm finding it very useful), just download GUNBOT_v3.1_GUI_edition_all_CPU.zip and you will find it.

Thank you for this, and glad to see you've found a solution. I will attach what I believe to be the relevant file to this thread! For all others, just copy into your Gunbot folder, and the terminal prompt should work.

Offline rattebruecke

  • Rookie
  • *
  • Posts: 1
    • View Profile
Re: GUNBOT V3 FOR MAC OS X
« Reply #4 on: June 17, 2017, 10:50:56 AM »
It should look something like this:

cd /Applications/Gunbot/Gunbot\ 3.3


Im stuck at this part. It tells me theres no such file or directory when i paste the folder in the terminal.

Offline ash2323

  • Rookie
  • *
  • Posts: 1
    • View Profile
Re: GUNBOT V3 FOR MAC OS X
« Reply #5 on: June 18, 2017, 02:27:27 AM »
Hey did you copy the gunbot folder to the application folder?  If not it won't work.  What you can do as suggested is copy the gunbot folder where it is located... then type cd and then Cmd v to paste the gunbot folder location.

Offline ELECTRIC_WIZARD

  • Rookie
  • *
  • Posts: 10
    • View Profile
Re: GUNBOT V3 FOR MAC OS X
« Reply #6 on: June 21, 2017, 05:49:16 PM »
One other trick you can use, is to actually open a new Terminal shell, type in cd, and then leave a space, and drag the gunbot folder into it, that will effectively cd for you! Don't forget to hit enter too!

And it'll look the same if done correctly, so if like me you have your gunbot folder in your applications folder, it'll look like this:

cd /Applications/Gunbot/Gunbot\ 3\ Bittrex

(a note here so you don't get confused... In my Gunbot folder I have two separate Gunbot folders, one for poloniex and one for bittrex... But do note that the word Bittrex or Poloniex doesn't have to be in your folder name, you can call that whatever you please... It's only important for the naming of the config files inside of the folder itself!)
« Last Edit: June 22, 2017, 03:28:06 PM by ELECTRIC_WIZARD »

Offline CryptoMktWizard

  • Rookie
  • *
  • Posts: 1
    • View Profile
Re: GUNBOT V3 FOR MAC OS X
« Reply #7 on: June 24, 2017, 12:25:18 AM »
I recently purchased a 3.3.2 which didn't come with currencies.js. Is there a download link available perhaps I could download from?

Thanks.

Offline ELECTRIC_WIZARD

  • Rookie
  • *
  • Posts: 10
    • View Profile
Re: GUNBOT V3 FOR MAC OS X
« Reply #8 on: June 24, 2017, 05:34:31 PM »
I recently purchased a 3.3.2 which didn't come with currencies.js. Is there a download link available perhaps I could download from?

Thanks.

Sure, here's the link: https://gunthy.org/index.php?action=dlattach;topic=394.0;attach=183

I have now updated the guide to include this link in the main text.

Thanks!

Offline Ale88

  • Rookie
  • *
  • Posts: 1
    • View Profile
Re: GUNBOT V3 FOR MAC OS X
« Reply #9 on: June 25, 2017, 02:44:02 AM »
Electric, will you ever make a video about all this? I use Mac and I didn't think there would be all these stuff to set up compared to the Windows version...  :o

Offline djkaltenudel

  • Rookie
  • *
  • Posts: 2
    • View Profile
Re: GUNBOT V3 FOR MAC OS X
« Reply #10 on: June 25, 2017, 03:53:58 PM »
Electric, will you ever make a video about all this? I use Mac and I didn't think there would be all these stuff to set up compared to the Windows version...  :o

Just follow step by step the tutorial. I just did it and it worked fine :) Would like a GUI for OSX as well but right now this works too. Where do you need help?

Offline allanster

  • Contributor
  • **
  • Posts: 128
  • lux ex tenebris
    • View Profile
Re: GUNBOT V3 FOR MAC OS X
« Reply #11 on: June 30, 2017, 08:43:43 AM »
Awesome info. Thanks so much! I'm brand new to all of this and you've helped piece some of this together for me.

Does your random timing affect profitability?
« Last Edit: June 30, 2017, 09:43:41 AM by allanster »
more human than human

Offline leeview

  • Rookie
  • *
  • Posts: 36
  • Gunbot Reseller & Support
    • View Profile
    • Buy Gunbot
Re: GUNBOT V3 FOR MAC OS X
« Reply #12 on: July 03, 2017, 08:40:28 AM »
We need a visual confirmation / screenshot of GunBot working with WINE or any other emulation software .

If not, this guide is still the best for running GunBot on a Mac / OS x .

 :o
« Last Edit: July 03, 2017, 06:45:38 PM by liviuv »

Offline ELECTRIC_WIZARD

  • Rookie
  • *
  • Posts: 10
    • View Profile
Re: GUNBOT V3 FOR MAC OS X
« Reply #13 on: July 03, 2017, 04:51:27 PM »
Awesome info. Thanks so much! I'm brand new to all of this and you've helped piece some of this together for me.

Does your random timing affect profitability?

Random timing is to aid with 422 errors on Poloniex, it is to stagger the delays between pairs so that they don't clash their API calls...

For Bittrex however, where 422 problems don't occur, I use 3 second delays, and they are not randomly generated. I also run 5 minute candles and the appropriate parameter changes. I am yet to test if this works better than the previous settings due to the recent bearish reversal trends, for which I am compensating for with increased SG buy levels, however I will keep people updated with my results.

Offline ELECTRIC_WIZARD

  • Rookie
  • *
  • Posts: 10
    • View Profile
Re: GUNBOT V3 FOR MAC OS X
« Reply #14 on: July 03, 2017, 04:59:41 PM »
did anybody try to run GUNBOT.exe in OSx using software WINE ??

does it work ?

I have attached a screenshot of Winebottler on Mac, if anyone with the relevant knowledge could enlighten us as to the 'winetricks' required to create a prefix template which we can use and share, that would be greatly appreciated. I have tried a few variations so far, although to little effect.

Thanks!

Offline allanster

  • Contributor
  • **
  • Posts: 128
  • lux ex tenebris
    • View Profile
Re: GUNBOT V3 FOR MAC OS X
« Reply #15 on: July 03, 2017, 05:15:47 PM »
Awesome info. Thanks so much! I'm brand new to all of this and you've helped piece some of this together for me.

Does your random timing affect profitability?

Random timing is to aid with 422 errors on Poloniex, it is to stagger the delays between pairs so that they don't clash their API calls...

For Bittrex however, where 422 problems don't occur, I use 3 second delays, and they are not randomly generated. I also run 5 minute candles and the appropriate parameter changes. I am yet to test if this works better than the previous settings due to the recent bearish reversal trends, for which I am compensating for with increased SG buy levels, however I will keep people updated with my results.

When you say appropriate parameter changes, could you be more specific like what sma/ema1/ema2 is appropriate for 5 min candles?
more human than human

Offline maxime

  • Rookie
  • *
  • Posts: 3
    • View Profile
Re: GUNBOT V3 FOR MAC OS X
« Reply #16 on: July 03, 2017, 05:58:47 PM »
Hi, I have 2 questions

1. When running multiple pairs, do you really manually open 10 command prompts and launch each of them one by one?
2. When trying to run node currencies.js, I get the following error, any idea? (I have no config.js at all.)
Code: [Select]
max@home ~/D/Gunbot> node currencies.js
module.js:487
    throw err;
    ^

Error: Cannot find module './config.js'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/maxaudet/Downloads/Gunbot/currencies.js:1:13926)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)

Thanks,

Offline maxime

  • Rookie
  • *
  • Posts: 3
    • View Profile
Re: GUNBOT V3 FOR MAC OS X
« Reply #17 on: July 03, 2017, 06:33:31 PM »
Follow-up from previous post.

For currencies, I ended up downloading and running currencies from 3.1 release instead of only copying the currencies.js file.
I used this one https://github.com/GuntharDeNiro/BTCT/releases/download/Win3.1patched/GUNBOT_v3.1_GUI_edition_all_CPU.zip

Works good now. I'll try to see what I need to copy to 3.3 for it to work there.

Offline allanster

  • Contributor
  • **
  • Posts: 128
  • lux ex tenebris
    • View Profile
Re: GUNBOT V3 FOR MAC OS X
« Reply #18 on: July 06, 2017, 12:47:34 PM »
Please update us with this news. I've never got to try it and honestly not sure even what it is.
more human than human

Offline derejrcar

  • Rookie
  • *
  • Posts: 2
    • View Profile
Re: GUNBOT V3 FOR MAC OS X
« Reply #19 on: July 09, 2017, 11:00:50 PM »
Hello I'd like to buy a copy for Poloniex MacOS - please reply here or my telegram is @thekingofpumps (I cannot message you at the moment)