Username: Password:

Author Topic: Initial amount of counter currency confuses Gunbot  (Read 7455 times)

Offline woky

  • Rookie
  • *
  • Posts: 2
    • View Profile
Initial amount of counter currency confuses Gunbot
« on: May 05, 2018, 05:44:01 PM »
Hello. Recently Bittrex rolled up new design and along with that change deposit and trade history was cleared. I'd like to keep trading on BTC-ETH market with Gunbot, but I already have some positive amount of BTC and ETH. Apparently, Gunbot can't cope with non-zero ETH amount without deposit or trade history and it keeps saying the following on every round:

WARNING: we couldnt get a BOUGHT PRICE for BTC-ETH, Please manually override it using config.js

I understand what Gunbot is advising me to do but I don't understand the reason and I fear the consequences. Why does Gunbot need to know the bought price? I'd like Gunbot to not touch the existing amount and start with the buy.

Ideally, there'd be an option akin to FUNDS_RESERVE for counter currency. Sadly, I couldn't find anything like that.

Offline sloaleks

  • Contributor
  • **
  • Posts: 610
    • View Profile
Re: Initial amount of counter currency confuses Gunbot
« Reply #1 on: May 06, 2018, 07:49:13 AM »
Hello. Recently Bittrex rolled up new design and along with that change deposit and trade history was cleared.
WARNING: we couldnt get a BOUGHT PRICE for BTC-ETH, Please manually override it using config.js

This is exatly why. It neds to sell all ETH before starting normal trading again. It won't sell if you don't manually insert the bought price of ETH (which the bot can't retrieve because of deleted history).
If you don't know at which price ETH was bought anymore, just pick the nearest number - or one that makes you comfortable.

Offline woky

  • Rookie
  • *
  • Posts: 2
    • View Profile
Re: Initial amount of counter currency confuses Gunbot
« Reply #2 on: May 06, 2018, 04:55:18 PM »
I don't get it. Why does it need to sell the ETH first? Why don't it just buy high and sell low (ideally) ignoring what's deposited in my wallet? Doesn't the cycle start with the buy?

What if I don't want Gunbot to sell what I have in wallet? Please, explain to me how the trading strategy, that requires to deplete existing funds first, works.

Offline sloaleks

  • Contributor
  • **
  • Posts: 610
    • View Profile
Re: Initial amount of counter currency confuses Gunbot
« Reply #3 on: May 07, 2018, 06:49:26 AM »
I don't get it. Why does it need to sell the ETH first? Why don't it just buy high and sell low (ideally) ignoring what's deposited in my wallet? Doesn't the cycle start with the buy?

What if I don't want Gunbot to sell what I have in wallet? Please, explain to me how the trading strategy, that requires to deplete existing funds first, works.

"Gunbot will always sell all assets when selling, and will buy according to your set trading limit." From the wiki. That's how the bot is built, it can't ignore deposited assets.

So it needs a bought price for an existing asset (and it will sell everything in the immediate next sale if you manually buy some more of the asset during a trade). And, the moment it is provided with a bought price, it will look to sell the account first, with two exceptions: if you have activated double up and the asset has fallen in value in regard to the provided bought price, then it will buy more of the asset (if within set parameters of double up) OR if sell enabled is set to false. If you have reversal trading activated it will also immediately sell (if within set parameters of reversal trading).

You could circumvent this issue for a small sum of an asset with the min volume to buy and min volume to sell settings, so a small amount of your asset can be kept in your account. But I don't know how much of ETH you intend of keeping, so this may or may not be practical for your specific issue, as these settings are meant more to make the bot ignore the dust in your asset wallet(s).

If you want to keep a coin which is not your base currency, you best move it to a separate account if your exchange allows multiple accounts (some do) - or don't trade it. There might by a third party plugin which enables what you wish (I don't use any, so any help from other users would be very welcome here), but not the bot's original features.

You could keep ETH in your wallet if ETH was your base currency (there's a bot setting on how much of base you keep as your reserve). In your described case you are trading ETH against your base BTC, in which case you can keep only BTC in reserve.
« Last Edit: May 07, 2018, 07:08:51 AM by sloaleks »

Offline cryptosticks

  • Contributor
  • **
  • Posts: 229
    • View Profile
Re: Initial amount of counter currency confuses Gunbot
« Reply #4 on: May 07, 2018, 08:14:16 AM »
The GunBot wasn't able to retrieve the BOUGHT_PRICE from the API.   Normally GunBot can retrieve it automatically via a simple API call.

No BOUGHT_PRICE means the GunBot can't decide when to sell for profit.

Some of the reasons why it can't be retrieved are:

* Old coins, after 30 days Bittrex stops handing out the BOUGHT_PRICE via the API.  Other exchanges have other time limits.

* Coins that were TRANSFERRED into the exchange NOT bought at the exchange.  i.e. if you sent some ETH or BTC into the exchange the API won't send you a BOUGHT_PRICE because you didn't buy it.  The exchange has no idea what the BOUGHT_PRICE is for what you sent to your exchange wallet.


Anyway, two easy ways to resolve the issue:

1) do a quick BUY and SELL (small amount) on the exchange and GunBot can then retreive the BOUGHT_PRICE

2) add a BOUGHT_PRICE override to the config.  But if you do this it is strongly recommended you also add BUY_ENABLED: false,  to stop problems.  Remember to REMOVE the BOUGHT_PRICE override once the pair has sold.