Telegram support in Gunbot has changed…

For those using the new and latest versions, (12.9.8, 12.9.9), just know that CryptoSight is now built-into Gunbot and also changes the Telegram (TG) functionally quite a bit. This article reviews some tips on getting it to work.
To access this post, you must purchase a GBU Membership that provides access, or one of our products that includes membership. Learn more about our memberships at

Catch-22 when handling license swap with only one license

Several customers are running into an issue with the new GUNTHY token license system where even though they have a new functionality to swap exchange license keys on the "Swap Exchange" page, since Gunbot *must* run without API error, customers cannot access the "Swap Exchange" page sufficiently to make the change itself. This article tells you how to get around the limitation and fix the exchange key correctly.
To access this post, you must purchase a GBU Membership that provides access, or one of our products that includes membership. Learn more about our memberships at

Binance wiped all API keys – action required

Hello GBU Subscriber –

Yesterday, Binance sent a tweet that let us know they had stopped all trading with API’s:

The tweet directed readers to a support announcement that stated the following:

Due to irregular trading on some APIs, Binance will remove all existing API keys as a precautionary security measure. All API users are requested to recreate their API keys.

We apologize for any inconvenience caused, and thank you for your patience.

This is cause for immediate action for all Gunbot users who use Binance – this immediate stops all Gunbot activities, and also impacts any other software or service that uses Binance API’s – CoinTracking, CryptoSight, Zeno GUI, CryptoGramBot, etc.

In short, in order to resume trading with Gunbot, you must do the following:

  1. Create new API Key(s) at Binance
  2. Get the Key activated with your reseller
  3. Enter the Key(s) into Gunbot
  4. Resume Gunbot

GBU Customers: If you purchased your Gunbot license from GBU, and you are licensed with Binance, you can contact Master Teacher Poy or Professor CryptoWally on Slack or Telegram, email or fill out the form at – we will need your old API key and the new API key you create as master (see below for full details).

There’s more detail to the above steps to do this correctly and with less drama, cost and headache down the road, so I will detail them now.

Create New Keys at Binance

Binance wiped out all the API keys in their system.  That means you must create new ones.  Your Gunbot and any other software that hasn’t been updated or shut off is hammering Binance’s server(s) with a key that does not exist.

It is highly recommended, and is considered Best Practice that you create two keys for Gunbot – one for licensing and activation (this is called the “Master key”) and one for Gunbot to actually use for day to day use.  The reason for this is that by using a key for day to day use, the key is at risk of being invalidated, lost, banned, or compromised.

Important: If an API key is invalidated, lost, banned or compromised, then the cost to get a new one from your reseller (at time of writing) is 0.01 BTC.  If this has happened to you, and you need this service, you can purchase it from the GBU Store.  If the API is wiped out due to no fault of your own, such as Binance wiping out all API keys, then traditionally there is no cost to you. (Note: this is subject to change, and GBU does not control the costs handed down by Gunbot’s authors)

By creating a Master Key that is never used for day to day use, and is only used for licensing, then you reduce the risk of having it invalided, lost, banned or compromised.

So, to help save you heartache down the road, create two keys.  Name them something like “gb-master” and “gb-primary”.

ALWAYS COPY YOUR SECRET BEFORE THE PAGE GOES AWAY since Binance only shows you the page once.

Get the Key Activated with Your Reseller

Activate the key you called “gb-master”.  You do not need to activate the “gb-primary” key.  If you ever run a second Gunbot on the same account, you don’t need to activate that key either.  If you compromise the gb-primary key, or Binance wipes it out due to a NONCE issue, or you move to a different time zone, it’s ok. You just create a new gb-primary key and put it into Gunbot and you’re good to go – just don’t ever delete gb-master.  You don’t need to talk to your reseller about the gb-primary keys.

When you communicate to your reseller, help them out by providing your old API key and your new API key.  They must validate your old key to ensure you had a valid key, so don’t just bombard them with a new key.  That will just take them longer, or they’ll just turn around and require that you provide it anyway.  Save yourself some time, copy the old key while you’re in there, and when you politely ask for the API key swap, say something like this:

Hello – I was impacted by the Binance security API wipe.  Here is my old and new key. Can you swap me out at your earliest convenience?  I would send you cookies if I knew where you were.  How is your day?

old key: ****
new key: ***

thank you.

Also, please note that only your reseller should be the one to swap out your key.  If GBU is your provider for subscription services, such as Master, Bachelor or Associates, but we did not sell you your Gunbot license, we cannot help you with your API key swap.

Your reseller will get back to you once the old key was validated and the new key was activated.

Enter the Keys into Gunbot

The two keys get entered into gunbot as masterkey and key.

Here’s how it looks in the config.js file if you are using Gunbot Core – aka, from the command line, when you run gunthy-linx64 or gunthy.exe.

"exchanges": {
  "binance": {
    "masterkey": "gb-master-key",
    "mastersecret": "gb-master-secret",
    "key": "gb-primary-key",
    "secret": "gb-primary-secret"

The Official Gunbot Wiki has more information on API keys for the different Exchanges –

In the GUI, you enter in the Master key separate from the Primary key.  There should be two different entries in the GUI in order to get the config file to store them.

Be sure to save your configuration.

Resume Gunbot

After making your changes, start Gunbot up again and make sure it starts.

Other services

There are other accessories that use Binance API keys, such as CoinTracking, ZENO GUI and CryptoSight that will need to be updated as well.  Check our Slack Community for updates, or those product’s support channels for further updates



Know Your Limits

Know your limits

Configuring Gunbot can be an art, and it can be a science.  One of the most basic configuration elements is setting the proper limits to tell Gunbot how much to trade.  This article explains those basics and then some tips on how to avoid mistakes.

Know your limits

What’s Going On

Gunbot needs to be told what to do.  It needs to know what pairs you want to run, what strategies to run on those pairs, what Telegram account to notify of massive profits, and so much more.

One of the most fundamental pieces of information Gunbot needs to know is your budget.  Some people trade with very low amounts… skirting with the minimum order size that the Exchange will allow, and others trade with amounts that would make most people’s head spin.

In order to tell Gunbot your budget, you don’t tell it the total amount you have to play with, nor will it assume all the crypto you have in your account is fair game and auto-budget itself. It must be told how big each trade should be, and needs to know how to tell if an amount is too small to care about.  These small amounts, also called “dust”, might prevent Gunbot from trading if it’s not told to ignore them.

Limits Explained

Like with any configuration element, your first trip to learn about it should be the official Gunbot wiki.  That’s where the latest intel resides about variables, default settings, strategies and what’s latest in the most recent version.

Let’s see what the wiki has to say about these limits (the wiki, like Gunbot, has evolved over time):

ParameterDefault valueDescription
TRADING_LIMITStrategy dependentValues: numerical – represent an amount in base currency.


This value defines the trading limit for each buy order. Make sure to always set this higher than MIN_VOLUME_TO_BUY & MIN_VOLUME_TO_SELL.

When you set this to 0.1 and trade BTC-x pairs, Gunbot will place a buy order worth 0.1 BTC each time it buys. When trading a fiat pair like USDT-x, set a whole number like 100 as TRADING_LIMIT.

GBU NOTE: On Gunbot version 10 and earlier, only use whole numbers for fiat pairs.

MIN_VOLUME_TO_BUYStrategy dependentValues: numerical – represents the total value of a coins holdings in base currency.


Sets a threshold for buy orders. Prevents orders from being placed when TRADING_LIMIT is lower than this value. Set this at least to the minimum trade size of your exchange. When trading a fiat pair like USDT-x, set a whole number like 10 as MIN_VOLUME_TO_BUY.

GBU NOTE: On Gunbot version 10 and earlier, only use whole numbers for fiat pairs.

MIN_VOLUME_TO_SELLStrategy dependentValues: numerical – represents the total value of a coins holdings in base currency.


Sets a threshold for sell orders lower than the exchange minimum trade size. If you own less than the set amount, sell orders will not be placed and Gunbot goes into buying mode. Set this at least to the minimum trade size of your exchange.When trading a fiat pair like USDT-x, set a whole number like 10 as MIN_VOLUME_TO_SELL.

When you hold 0.006 (in base currency) of a coin and have set MIN_VOLUME_TO_SELL to 0.01, Gunbot will not try to sell your current 0.006 balance because it is below the set threshold of 0.01, instead it will place another buy order first as soon as buying are met.

GBU NOTE: On Gunbot version 10 and earlier, only use whole numbers for fiat pairs.

What does this mean?

So, the first thing we learn is that TRADING_LIMIT does not represent your entire budget – it’s the amount Gunbot will trade per pair.  This is important, because every new pair you add to a Gunbot instance can possibly spend at least TRADING_LIMIT amount of your funding currency.

Use funding currency terms

Speaking of funding currency, that’s the second thing we need to know about TRADING_LIMIT  The amount you put as this value needs to be expressed in the same coin as you are using as the funding currency.  In Gunbot, this is the first coin of the pair.  For example, if the pair you run is BTC-OMG , then “BTC” is the Funding Currency (aka “base”) and OMG is the coin you want to buy (aka “quote”).  If your pair is ETH-LTC then Ethereum is your base and LiteCoin is your quote.  In Gunbot’s terms, the base comes first and quote comes second.

Note: As of Gunbot v7, all pairs are denoted in “BASE-QUOTE” format with a dash in the middle, regardless of how the Exchange expresses or denotes the format.  For example, Cryptopia might say “ETH/BTC” with a slash, or Kraken might put it backwards and use “XLTCXXBT” with an extra “X” in front of each asset, but only some, but Gunbot’s notation would be ETH-BTC for the Cryptopia example and BTC-LTC for the Kraken example.

So, put the TRADING_LIMIT in the same terms of the base.  If you run BTC-xxx pairs, then you should put the limit in as a Bitcoin amount.  ETH-xxx pairs need Ethereum values as the limit.

FIAT is “special”

There’s a special case for FIAT pairs (USD, EUR, USDT, TUSD, etc) where not only do you need to put the amounts in FIAT terms (100 for $100, for example instead of 0.001 BTC for a $10k bitcoin value), but in versions 10 and earlier, you also need to not use any decimals.  WHOLE NUMBERS ONLY (this is reported to be “fixed” in later versions, although I have not tested it).






This goes for all “currency value” settings: TRADING_LIMIT, MIN_VOLUME_TO_BUY, MIN_VOLUME_TO_SELL, and FUNDS_RESERVE.   It also applies to Ping Pong Strategy variables PP_BUY and PP_SELL.

The reason you want to not use decimals in FIAT is that — if there are decimals present, the most likely reason is that you didn’t change it from defaults, and you’re probably using minuscule amounts like 0.002.  You do not want this.

MVTB and MVTS – what are they?

The other two main configuration elements regarding actual money values are MIN_VOLUME_TO_BUY (MVTB) and MIN_VOLUME_TO_SELL (MVTS).  These help Gunbot understand when to buy and when to sell.

Dust explained

“Dust” is a term crypto traders use to describe very small amounts of crypto in an account.   Just like when you use a saw to cut some wood, the action of sawing not only gives the intended result (wood that is cut), but it also produces material as a side effect of performing the sawing — namely, dust.

Dust is important to understand, because you can accumulate dust in many ways in the crypto world.

For one, if you have, say 10.05634 EOS coins in your account, and you are only able to sell 10 of them, you will have 0.05634 EOS left in your account.  This might happen because your sell order couldn’t be matched up to an exact sell order that filled all 10.  Maybe your order was matched up to two buy orders – one for 6 EOS and one for 4 EOS.  Then when it came to try and get rid of the remaining amount, the order would be too small for the exchange to honor.

Another way you might get dust is from small micro-deposits, such as from Binance’s referral program.  Binance gives fee commissions for anyone you refer. It started off at 50% and is currently 20%.  So when someone you refer makes a trade, they have to pay a fee on that trade.  You get 20% of that fee.  The fee is already small – usually 0.1% if no BNB is used and 0.05% if BNB is used.   Therefore you’d be getting 0.02% or 0.01% of their trade, which is almost guaranteed to be a minuscule amount.  This becomes dust in your account.

Binance has since updated their referral program to allow double commissions if you own 500 BNB tokens in your account.  Please see those program specifics for most updated rules and conditions.


This setting allows Gunbot to avoid dust.  Normally, dust clogs up Gunbot and prevents it from trading.  Basically, it won’t initiate a trade if you already own some value of the coin.  However, since “dust” needs to be ignored, Gunbot needs to know what you consider “dust” vs “substantial enough to notice”.

Once you have at least MVTB amount of coins in your account, Gunbot goes into sell mode.  If you have less than MVTB coins, Gunbot is in buy mode.


After reading the wiki entry for MVTS, you might think it’s basically the same as MVTB, since it says “threshold for sell orders”.

However, there’s a difference between when Gunbot should be in a Buying mood (crypto amount is less than MVTB) and when Gunbot should be allowed to sell (crypto amount is more than MVTS).

There’s also a difference between Gunbot being in a selling mood and Gunbot being allowed to sell.

How to Set Appropriate Limits

Now that we’ve reviewed a ton of detail on each of the settings, you might just be asking “ENOUGH ALREADY!  WHAT DO I PUT HERE?!?!?!”

Here are some tips on how to set the right amount:

Rule #1: MVTB should be less than or equal to TRADING_LIMIT.

Rule #2: MVTB and MVTS should be greater than or equal to the Exchange’s Minimum Order Size.

If you set this too low, then Gunbot will attempt to make orders, but the Exchange will kick them back.  It’s not like Gunbot is going to auto-increase the values for you – it is your money after all.

Rule #3: It’s ok and common for MVTB and MVTS to be the same

You can set MVTS higher, but be careful that you don’t make Gunbot stop selling while it’s unable to buy.  Most commonly, these two values will be the same amount.

Rule #4: It is highly recommended that TRADING_LIMIT be higher than MVTB  to avoid the “Double Buy Exploit“.  Target would be 3x to 4x, but it’s usually enough to make it 1.5 to 2x.

Many people, and the defaults in previous versions of Gunbot helped with this, use the same amount for `TRADING_LIMIT` and `MVTB`.  However, if you do this, then you are subject to experiencing the “Double Buy Exploit”.  It’s not an actual exploit from a security perspective, and it’s not a bug in any way.  It’s just a consequence of Gunbot doing exactly what you told it to do.

Rule #5: If you’re too Greedy, you’ll suffer in bear markets

Many beginner crypto traders, and especially Gunbotters, look to their right and see someone who has tripled their money with amazing trades.  They look to their left and see another person who’s made 10X gains and brags about the constant profits.

So, naturally, they think that’s what crypto is, so they set Gunbot running and give all their BTC to Gunbot.  It might work for a little while, but eventually the bear cycle comes around and BAGS happen.  And because they were greedy and gave all their BTC to Gunbot, Gunbot did exactly what it was told to do, and pretty soon, all the BTC is gone and all the trader has is a bunch of heavy bags that have lost value.  Instead of blaming themselves and their greedy nature, or their rush to use a tool they didn’t understand, or their tendency to believe those people who claimed 10x gains and didn’t disclose the losses (who brags about the realities?), they blame Gunbot.

We at GBU recommend you use much less than all your BTC when botting.  First, you need room to handle your bags.  Bags happen to everyone and there is no magic formula to eliminate all of them fast, cheap, and cleanly.  You should always keep dry powder, and use much less budget than you think.

When I started off, I used the lowest amount both I and the exchange could stand, and only ran enough pairs that I used 10-20% of my available BTC.  This gave me enough room to learn Gunbot’s settings, to make sure I didn’t make wild mistakes, and when the bear market came, I had plenty of BTC to move to other pairs, use Double Up or move my bags off to another wallet.

With the above guidelines, you should be good to start with what is good for your risk profile, your preferences and your specific situation.

Double Buy Exploit

Example: let’s say you run BTC-ETH pair and have 0.002 set for both TRADING_LIMIT and MVTB.  This means when you have less than 0.002 BTC worth of ETH in your account, Gunbot feels like buying.

Then, ETH becomes tasty and Gunbot buys some.  It buys 0.002 worth and it’s now in your account.

Well, Gunbot usually buys on a downtrend, if it’s configured like most people want.  If ETH value continues to drop after Gunbot purchases it, then you will have, say 0.00195 BTC worth of ETH in your account.

If this value stays there for the next cycle, and Gunbot has a low TRADES_TIMEOUT and isn’t using the safety switch, then, per the rules you have configured, 0.00195 BTC worth of ETH is now considered “dust”.  It’s free to buy again!  If the conditions are still ripe for buying, Gunbot will then purchase another TRADING_LIMIT amount of ETH (0.002) and it will be added to the wallet.

Now you have 0.00395 BTC worth and that amount is greater than MVTB, so it won’t buy again.

This shows up as a “double buy” in your trading history, because it will show two purchases of 0.002 close together. You might think Gunbot is double-buying by mistake, but it’s doing what you told it to do.

Exchange Minimum Order Size

At time of writing, here are the different Gunbot-supported Exchange minimums:

Binance0.001Binance used to be 0.001, then changed to 0.002 and is now back to 0.001.  It also has additional minimum requirements more than just order size, such as minimum number of coins. Also, many coins must be purchased in whole numbers and not fractions (this doesn’t impact TRADING_LIMIT, however – Gunbot will automatically round the order to a whole number when needed). Binance also publishes their Trading Rules online.
Bittrex0.001Bittrex used to have a 0.0005 limit and then issued an announcement in November 2017 where they said the new limit is 0.001.  However, we’ve seen that we can still place orders for 0.0005 for many coins, if not all of them. Maybe Bittrex is slow in implementing and enforcing the rules, but GBU recommends following the published guidelines.
Poloniex0.0001Polo’s minimum is the same for all the funding currencies – BTC, ETH, XMR and USDT.
Kraken0.002Kraken’s minimum orders vary by currency – 0.002 is the BTC minimum.  You can view all the details on Kraken’s article about the topic.
Cryptopia0.0005This is from experience and forum posts vs an official post by the company.  It used to be 0.0001.
Bitfinex<varies>The official Bitfinex post about exchange minimum order size states:  “The minimum order sizes for each trading pair is periodically adjusted to maintain order sizes that are reasonably proportioned to their values. The ultimate goal is to keep the minimum order size between 10-25 USD equivalent value while limiting the changes to the minimum order sizes to useful incremental values.<varies>
According to CEX.IO’s guidance posted on their website, they say:
“Trading on CEX.IO is flexible in terms of order placement, however, there are certain limitations.You can always check them by typing in into your address line.”BTC is listed at 0.002.  Other currencies have their respective limits.
GDAX 0.001 GDAX publishes their minimums for trading, withdrawals and deposits on their support site.


  1. Make MIN_VOLUME_TO_BUY and MIN_VOLUME_TO_SELL at least as big as the Exchange’s minimum order size.
  2. Make TRADING_LIMIT higher than MIN_VOLUME_TO_BUY.
  3. Make TRADING_LIMIT  as low as you and the exchange can stand while you learn how to configure Gunbot and learn the market cycles.
  4. (Gunbot 10 and lower) When using FIAT pairs, use whole numbers only (no decimals).

Binance Fees Explained

If you use Binance, you might wonder about how differently they handle fees, and their BNB coin, and what you can do about it..

What’s Going On

At time of writing, Binance is the top fee-based CryptoCurrency exchange on the market.  By a huge margin.  They offer many pairs, lots of volume, have a decent interface and the API works most of the time.  It’s one of the top exchanges used by Gunbotters everywhere due to the profits gained.  Professor Bitlion wrote a series on “The Best Exchange of Them All” (GBU premium content) where he helps people choose which exchange would best work for them.

Binance introduced something revolutionary when they launched – they have their own cryptocurrency token, called BNB, that can be used for paying Trading Fees.  A Trading Fee is what all centralized exchanges charge for making or taking trades.  Some exchanges have a flat fee for all trades; others charge a different fee for makers and takers (the maker is the one who places a new order on the order book and the taker is the one who fills an existing order on the order book), and still others charge a sliding scale of fees based on volume, such as how much volume in the last 30 days.

In most if not all of those exchanges charging fees, they usually take their fee from one of the coins in the transaction.  For example, if buying LTC (LiteCoin) with BTC (Bitcoin) on Bittrex, then Bittrex takes 0.25% out of the trade from BTC.

Binance still supports that style of trading fees – the fee can be taken out of the purchased coin (not the funding coin).  But if the trader has BNB coin in their account, and has enabled the function “Use BNB for Fees”, then the fee is paid from the BNB coin instead of either the funding or the purchased coin.  This is what is new and different from the other exchanges.

The Good Points

As a Gunbotter or Day Trader or even a casual hobbyist, there are several positive traits of using a 3rd currency such as BNB to handle fees.  In fact, if someone is Gunbotting, it’s essential they understand what BNB can do for them, so they avoid losing out on the benefits.

Trading Fee Discounts

First, Binance currently offers a major discount on fees if you pay for fees with BNB.  For the first year, fees paid with BNB enjoy a 50% discount.  Binance fees are already some of the lowest around, with 0.1% being what they charge.  Compare this to Bittrex’ 0.25% and you have my attention.

The fee discount is on a schedule:

This notice was published around July 2017 so we still have some time to enjoy the 50% discount.  Then it will drop to 25% discount, and so on.

This means that instead of paying 0.25% + 0.25% at Bittrex for a normal trade – buying something and then selling it later – for a total of 0.5%, you can pay just 0.1% total (0.05% + 0.05%) for the same trade.

An 80% savings in fees is incredible, especially for Gunbotters who generate a flurry of trades 24×7.

Keeping Coins Whole

The second major reason for using BNB, especially when you use Gunbot and make a lot of trades, is that the coin you buy and the coin you buy with are both kept whole.  Since Binance requires most coins to be transacted in whole amounts, or on some coins only allowing one or two decimals, this becomes increasingly important.

Here’s an example of a typical trade without BNB:

  1. You configure Gunbot to run on BTC-EOS pair with a typical minimum TRADING_LIMIT of 0.001.
  2. Gunbot buys 0.001 BTC worth of EOS.  It has to buy them in whole number increments, so it buys 2.00 EOS
  3. The fee (0.1%) is calculated from the value of the trade and then the fee is paid with the bought coin (EOS).  So, EOS is re-evaluated in BTC terms and 0.1% of the value is deducted from the resulting EOS you receive.
  4. You are now the proud holder of 1.998 EOS
  5. Imagine the value of EOS went up.  CHA-CHING!
  6. Gunbot sees the price has gone up according to the strategy you run.  It goes to sell the EOS, and sees that it has 1.998 EOS to sell.  However, Binance requires whole numbers, so it rounds down to 1.0 EOS
  7. It tries to place a sell order for 1.0 EOS, but that is less than 0.001 BTC worth.  Binance kicks back the order, saying “your order needs to be at least THIS big to tradeGo home, kid.
  8. You are now stuck with this EOS bag until the coin doubles or you manually fix it by buying more EOS at the current price.

Now, here’s the same trade, but with the trader owning BNB:

  1. You configure Gunbot to run on BTC-EOS pair with a typical minimum TRADING_LIMIT of 0.001.
  2. Gunbot buys 0.001 BTC worth of EOS.  It has to buy them in whole number increments, so it buys 2.00 EOS
  3. The fee (0.1%) is calculated from the value of the trade and then a discount is applied (50%), so the fee ends up being 0.05%.  The fee is paid with the BNB coin.
  4. You are now the proud holder of 2.0 EOS
  5. Imagine the value of EOS went up.  CHA-CHING!
  6. Gunbot sees the price has gone up according to the strategy you run.  It goes to sell the EOS, and sees that it has 2.0 EOS to sell.  It knows Binance requires whole numbers, so this is fine.
  7. It tries to place a sell order for 2.0 EOS, and the order goes through because it meets the minimum order size.
  8. You have now profited.  Continue the cycle again, because that was fun!

Result: Using BNB for fees keeps your purchases whole so that you can more easily sell them.

It also helps tremendously with profit calculations since the fee is actually a separate transaction.

The Catch

We’ve gone over a couple major benefits to using BNB for fees. However, there is a catch to trading at Binance that should be pointed out.

As mentioned briefly in the example above, Binance disallows fractional trading on most coins, and on the other coins, it allows it but only to 1 or 2 or 3 decimals, depending on how expensive the coin is.  Said another way – at Bittrex, I can sell 1.99988882 EOS without a problem.  At Binance, I cannot sell 1.99988882 EOS – I have to sell 1 or 2 or some whole number.

This means that for many trades, you collect “dust” – which is a small amount of a coin left over or hanging around in your balance – that you cannot sell!

You don’t just collect dust from trades made without BNB token to pay the fees.

Dust from Binance referrals

Dust can also collect if you participate in Binance’s referral program.

Binance rewards affiliates by giving participants a percentage of the fees their referral pays.  This results in tiny micro-deposits of all sorts of coins, and the more you refer, and the more active they are, the more deposits you receive.

If someone you referred bought LTC with BTC, then they will pay 0.1% fee in LTC, and you will receive a percentage of that fee.  A tiny amount of LTC will just magically show up in your account.  And you cannot sell a tiny amount of LTC for BTC.

How to handle Binance dust

If you can’t sell a tiny amount of LTC for BTC, how do you handle it?  Is Binance tricking us all?

Well, this is the other use of BNB coin.   There are several coins on the BNB pair list.  You can’t sell a tiny amount of LTC for BTC, but you can sell a tiny amount of LTC for BNB.

Not every coin at Binance has a BNB pair.  For example, at time of writing, EOS doesn’t have a BNB pair.  So if you find yourself with a fractional amount of EOS, you are stuck with it until you collect more dust to fill in the gap to the next whole number.

But there are plenty of pairs that do provide a BNB option… and this is where you can periodically sell off your dust, or more likely for Gunbotters – purchase the dust you need to top off the coin to a whole number.

So, if you find yourself botting BTC-IOTA and then all of a sudden you have 0.8 IOTA you can’t get rid of, you can go sell it on the BNB-IOTA pair (IOTA/BNB in Binance terms).

The Bad Points

You probably thought “The Catch” was all there was.  Nope – there’s another catch.  And that’s if you use or other sites that pull trade history via API.

GBU gunbot university cointracking referral link discount

Normally, when CoinTracking pulls in trades from an exchange, it is able to discern the fee and includes this on the actual transaction.  For example, if you bought LTC with BTC, then this transaction would be one transaction in CoinTracking showing the purchase price and amount, the funding price and the amount, and then a fee and specify which coin was used for the fee.

However, with Binance, these fees are not associated correctly.  At time of writing, CoinTracking‘s recommendation is to create an additional transaction as [OUT] Lost for the fee.  That can result in a LOT of transactions for active Gunbotters.  Many Gunbotters have hundreds of transactions a day, so a manual correction is not feasible.

One would expect a more automated tool to address this in the future, either CoinTracking calculating it correctly, or a 3rd party tool to help run a report, find the fees and then insert the appropriate information into CoinTracking. I don’t know if a second transaction is feasible, but I can see a group-by-day or a group-by-week or a group-by-month offset transaction being entered to keep the BNB balance correct as well as appropriately handling fees for tax reporting purposes.


  1. Using BNB can result in non-trivial discount on trading fees.
  2. Binance disallows fractional trading on many coins, which can clog up Gunbot.
  3. Paying fees with BNB can keep coins whole so you can easily sell what you bought and preserve profits.
  4. BNB coin pairs help A) sell off dust to reclaim stuck profit or B) purchase dust to make a coin’s balance whole enough to sell.
  5. Binance’s referral program creates dust, and must be handled manually.
  6. Tracking BNB Fees in services like can be difficult or inaccurate.

How to change port of Gunbot’s GUI for better security

As of Gunbot v8.0.3, Gunbot’s GUI (gunthy-gui) defaults to port 5000 and for security reasons, you might want to change it. (the default for

What’s Going On

Gunbot v8 and later (XT, CS and RT) can run in two modes – by itself on the command-line (aka “Gunbot Core”) or with a GUI (aka “Gunbot GUI”).

Gunbot v8, v9: Gunbot itself is the “gunthy” executable (named either gunthy.exe, gunthy-linx64, gunthy-macos, or gunthy-arm) and is what runs in both modes.  The GUI is optional.  The GUI (named gunthy-gui) presents a friendly interface for configuration, control and surface-level monitoring, and then runs the gunthy executable for you.

Gunbot v10 and later: Gunbot executable is just one file, and based on your configuration file (config.js), it will either run in “Gunbot Core” mode or “Gunbot GUI” mode.  This is in the “GUI” section of the config file.

“enabled”: [true | false]
“start”: [true | false]
“port”: 5000

In Gunbot v10 and up, if “enabled” is true, then the GUI will run on the “port” specified.  “start” indicates whether or not Gunbot Core should automatically start when Gunbot runs.

Both gunthy and gunthy-gui use what’s known as a network port to communicate with itself or other components.  For Gunbot, this is configured in the “ws” section of the config.js file and contains “port” and “clientport” settings. For the GUI, this is an HTTP port (not configurable from the config.js file in Gunbot versions before v10) and is part of the URL you can use to access the GUI, both locally on the box and from an external system.

Default port

The default port that Gunbot GUI runs on is 5000.  This means you would access “http://localhost:5000” when you’re actually accessing the system that runs Gunbot directly, or “http://<ip address>:5000” when accessing the system remotely.  If you have a DNS server or hosts file, you can configure those to point a user-friendly name to the IP address, such as  If you do that, you would still add the “:5000” at the end so the full URL is  Without the “:5000” at the end, then your browser tries to connect to port 80 (http) or port 443 (https) and this won’t work.

Why Security is Important to Some

If you leave the Gunbot GUI settings at default and use the default port of 5000, then you run the risk of being too-easily discovered by remote systems.  Once it’s known that the default port is 5000 for Gunbot, there are hackers, crawlers and systems such as that can collect data and tell others that you’re running Gunbot.  Shodan even has a gunbot query already set up so that you can search for Gunbots on the network.

I don’t know about you, but I’d rather my Gunbot GUI not be so easily found.  It won’t be long before we hear of some Gunbotter whose system was hacked, DDOS’ed or otherwise compromised and losses occur.

The first step in making your Gunbot more secure is to change from the default port.  There are other steps you can take, such as using a VPN to access your GUI, limiting the IP addresses that can talk to your server, on these ports, and adding SSL certificates (Gunbot v8, v9 require a reverse proxy; Gunbot v10 and up can have SSL natively supported if you have a certificate).  Those steps are not covered in this guide.

How to Fix

Change your port number

How to change your port number is different with various Gunbot versions.  You want to pick a port number that makes sense and will work:

  1. Well known ports are ports 0 – 1023. You should not pick these ports unless you know what you’re doing and have taken appropriate security precautions.
  2. Registered ports are 1024 – 49151.  It’s ok to pick a port in this range, as long as you don’t pick a port that conflicts with something else running on your machine.  You may or may not want to use common registered ports that systems frequently search for, like 8000, 8080
  3. Make sure you do not pick the same port that’s listed in config file under ws:port.  or clientport.  Generally, this means avoiding 5001 and 3000.
  4. Dynamic / private ports are those from 49152 to 65535.

Gunbot v10 and later:

In the `config.js` file, Change the “GUI”: port parameter from something other than port 5000.

"GUI": {
   "enabled": true,
   "start": false,
   "port": 5000, <--- change this

For example, if you change it to 5158, then you would access Gunbot GUI at http://<your IP address>:5158

Gunbot v8, v9:

In order to change the default port that gunthy-gui uses, you need to set an “environment variable” called PORT to the port number you want the GUI to use.  Depending on what operating system you use, how you change this varies.

For Windows users, you set the port before you run the command:

set PORT=5003

This should now make the GUI respond to URL with :5003 at the end instead of :5000.

You can also make a batch file to launch Gunbot GUI:

@echo off
set PORT=5003
start /d gunthy-gui.exe

For Linux/MAC/ARM users, you can do it all on one line.  From the directory gunbot is installed, running the following will launch the GUI and use port 5003:

env PORT=5003 ./gunthy-gui

If you use pm2, you can do the same thing on one line:

env PORT=5003 pm2 start ./gunthy-gui --name binance

Then use your normal pm2 list all and pm2 info binance and other commands to manage the gunthy-gui process.

Websocket port

It’s important to note that the PORT that the GUI uses to speak HTTP is not the “clientport” in the config file.

"ws": {
"port": 5001,
"clientport": 3000,
"hostname": ""

In Gunbot v8, websockets were important and it impacted how clients talked with graphs and such on the GUI.  This is less so in later versions and supposedly websockets are not used at all.  However, both of these ports *are* used.

This 5001 port here can be changed as well, but it needs to NOT conflict with any other port being used on the system.  You cannot use the same port for ws:port and PORT=xxxx.  They must be different ports.

Multiple instances on same device

Most of the time, you don’t need to change ws: port setting.  However, if you run multiple Gunbot instances on the same machine manually, then each port needs to be unique.

For example, the first time you install Gunbot on a machine, it can run with port:5000 for the GUI and port:5001 for ws:port.  If you put a second Gunbot instance in another folder and want to run it, you need to change ws:port from 5001 to something else, like 5003.  If you also wanted a second GUI running, you would use the changes described earlier, and maybe use 5002 for that.

Also, if you are accessing your Gunbot GUI from a remote system, you will want to change the hostname setting inside of ws to be the IP address or FQDN (fully-qualified domain name) of the machine running Gunbot GUI.  For example, if you’re using a VPS, you would put in the IP of the VPS. Otherwise, in Gunbot 8.0.3 and earlier, the GUI will be slow and open up a lot of websocket connections to a box that won’t respond (again, this was much more the case in Gunbot v8 than later versions, but I still highly recommend changing hostname anyway)

For example:

"ws": {
"port": 5021,
"clientport": 3000,
"hostname": ""


"ws": {
"port": 5021,
"clientport": 3000,
"hostname": ""

Gunbot version 9 no longer uses websockets and doesn’t officially require the hostname update, although GBU still recommends the change.

Note: in previous versions, running multiple GUIs, even when changing the port, didn’t work well for me.  I haven’t tested it in version 8.  Instead, I just spin a new VPS for another instance so that I’m not subject to any IP address problems, resource constraints, or interoperability issues.  As of version 10, there aren’t any known issues with this.


  1. If you keep default settings for things like what port the GUI listens to, you increase your risks.
  2. It’s fairly trivial to change the GUI port so you’re not so easily found.
  3. While the instructions differ for older versions, the port can be configured in the config.js file under the GUI: port setting.


Help me understand Gunbot’s MFI – Money Flow Index

Do you want to know more about Gunbot’s Money Flow Index, or MFI?  Here are some things you will want to know.

What’s going on

The BTC/USD money flow index (MFI) is calculated by Gunbot looking at the ASK book of BTC/USD and takes both price and volume information. It’s supposed to help indicate overbought or oversold conditions, much like RSI (Relative Strength Index) does. However, RSI indicator is price-only, and the benefit of the MFI is that it uses volume as well. Volume can help predict a pump or dump.

So, MFI is a volume-weighted RSI-type metric. If BTC/USD is oversold, the MFI number goes lower and lower. The idea is that oversold BTC/USD means the volume is growing on the ASK book, and that means there may be a pump of BTC soon.

MFI is a volume-weighted RSI-type metric

Why MFI is important to some

Anyone who’s been around crypto a while knows that pumping of BTC price might mean the altcoin’s value will drop in contrast. So, OKKIES_MODE is a feature Gunbot offers that allows you to temporarily stop Gunbot from trading if it senses a BTC pump coming up.

For a long time in crypto, when BTC “mooned” (shot up in value quickly), the altcoins bled in the streets.  There wasn’t enough liquidity or ability to buy alts with anything but BTC.  But as the market grew, and more ETH pairs, BCH pairs, XMR pairs, USDT/TUSD/USD pairs came online, there were more ways to buy altcoins than just with BTC.  For this reason, it’s more and more common that when BTC moons, so will several altcoins, which is different than it was for many years.

The original scenario of “BTC rises signals ALTs demises” is still valid for many pairs much of the time.  Because of this, if BTC rises and ALTs drop, Gunbot would normally see a price drop of an ALT as a buying opportunity.  It would buy the ALT and then be left with a bag because BTC kept rising and rising, and then set a new high and sit there.  The likelihood of the ALT price recovering any time soon was not very high.

OKKIES_MODE was created to help Gunbot prevent getting into a bag situation.

But more recently, it has indicated the opposite, so it’s not as hard and fast of a rule as it used to be.  For this reason, the savvy Gunbotter won’t just blindly turn this on or off – it doesn’t always mean it will protect against bags all the time.  It is recommended that Gunbotters review pair-by-pair what that specific coin pair’s likelihood is of tanking when BTC goes up.  You can use Allanster’s backtesting tuners on Trading View for help with that.  Check out the tuners on Trading View or two posts on Gunthy Forums: here and here.

How it’s Used

BTC_MONEY_FLOW is the setting in the config you want it to use as a threshold to decide whether to make trades or not.  OKKIES_MODE is what you set to true or false as to whether or not you want Gunbot to collect (v8) or care (v8 and v9) about this metric.

Default setting:

Most strategies come with default setting of “true” and “35” in Gunbot version 8.0.3.  TSSL Strategy uses default of “false” and “32”.

"OKKIES_MODE": true,

On some exchanges, the MFI isn’t calculated easily or consistently.  Be sure to review console logs for the MFI values and make sure they are coming across, if you have OKKIES_MODE turned on.  In Gunbot version 8.0.3, if OKKIES_MODE is false, then the Money Flow Index values will show “undefined”.

When MFI has prevented Gunbot XT from buying, you will see a message that says

There is too much enthusiasm… waiting to buy


  1. If Gunbot produces bags for you when BTC price pumps, consider enabling OKKIES_MODE and setting the `BTC_MONEY_FLOW` to 35 or lower.
  2. If your exchange or pair produces “undefined” results for MFI when you have `OKKIES_MODE` enabled, disable it.
  3. Before blindly setting this variable, research a coin pair’s history of reaction to BTC pumps.




How do I fix Telegram api – make sure that only one bot instance is running errors?

originalHost: ‘’,
originalHostHeaderName: ‘host’,
responseContent: [Circular],
_destdata: true,
_ended: true,
_callbackCalled: true },
toJSON: [Function: responseToJSON],
caseless: Caseless { dict: [Object] },
read: [Function],
{ ok: false,
error_code: 409,
description: ‘Conflict: terminated by other getUpdates request; make sure that only one bot instance is running’ } } }

You might see this error in your err.log or console log or in the GUI.

What’s going on

Gunbot version 8 added direct Telegram support.  Whenever there are buys or sells, Gunbot can connect to the Telegram API and send you a message.  It requires a chatbot token, your Telegram id and an arbitrary label.

If you’re running just one bot, you might not see this very often.  However, if you run multiple bots (or the one bot is very busy), you may see this error.

First, don’t worry.  This error doesn’t mean there’s anything wrong with Gunbot, or your trades aren’t happening.  It only means you are missing out on a few Telegram Notifications about buys and sells.

Second, Gunbot caches the missed telegram notifications.  So, if it had a problem trying to send you a notification yesterday, it’s going to KEEP TRYING to send the notification, but it will most likely keep getting this error.  So, you will continue to see the error until you restart Gunbot.

How to Fix It

For Gunbot Version 8, there’s not much you can do to permanently fix the problem other than creating a different chatbot for each Gunbot instance.  And even that won’t 100% fix the problem.

According to several reports, such as this one, this problem is caused by an outdated set of code.  It’s most likely that Gunbot has this older node_modules compiled into it, and will continue to have the problem until the next version.  It is rumored that Gunbot v9 no longer has the problem, so GBU’s guess is that the newer node_modules was compiled into Gunbot v9.

In order to stop getting errors for the telegram notifications it’s continuing to retry, you need to restart Gunbot.  That clears the cache of missed notifications and it will stop retrying.  You’ll be good until the next notification that fails.

So, in summary:

  1. In Gunbot Version 8, make a different chat bot for each instance.
  2. Restart Gunbot to clear out old notification retries
  3. Wait for Gunbot Version 9, which supposedly fixes the issue.




How do I fix Cannot read property ‘askPrice’ of undefined error?

TypeError: Cannot read property ‘askPrice’ of undefined
at Binance.parseOrderBook (C:\snapshot\Gunbot-master\ctx\js\binance.js:0:0)
at module.exports.fetchOrderBook.Promise.binance.allBookTickers (C:\snapshot\Gunbot-master\ctx\js\binance.js:0:0)
at Request.module.exports._makeRequest.request [as _callback] (C:\snapshot\Gunbot-master\ctx\helper\binance\binance-api.js:0:0)
at Request.init.self.callback (C:\snapshot\Gunbot-master\node_modules\request\request.js:186:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request. (C:\snapshot\Gunbot-master\node_modules\request\request.js:1163:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage. (C:\snapshot\Gunbot-master\node_modules\request\request.js:1085:12)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1056:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9

You might be getting this error and wondering “what did I do wrong?”  “How do I fix it?”  “Why does botting hate me?”

This error message – keyed on the TypeError: Cannot read property askprice of undefined tagline – usually means one MAJOR thing is wrong with your configuration.

One of your pairs is wrong.

“But, my pairs are right!” I can hear you saying.  Check again, I say.

Gunbotting isn’t a science – it’s an art.  Go through your pairs and actually check on the exchange if they exist. Gunbot does what you tell it to do, even if it’s wrong.

For example, if you’re running Binance, and you didn’t correct the typo in the default config, you might be running BTC-IOT instead of BTC-IOTA.

If you use the GUI, and gunbot and Trading View support the exchange, then the graph will show you if the pair is good or not.  If you see an actual graph, then your pair is for sure good.

However, if you see “Invalid Symbol” then that’s telling you that the pair is no good.  Remove it.

invalid symbol

If you’re sure the pair name is correct, then it could be an API error, or, in some cases, the Exchange allows the coin to be traded normally (ie, through the web interface) but the Exchange doesn’t allow API trading.

Other things to check if all else fails:

  • Ensure your API key is valid on the Exchange.
  • Ensure your time is synced properly
  • Make sure you’re not banned from the Exchange on a temporary IP ban or a permanent ban.