Gunthy

GUNBOT: The automatic profit generator => Technical Support & Development => Topic started by: leeview on June 05, 2017, 03:37:10 PM

Title: Get RANDOM api key and secret in GunBot (+3.3)
Post by: leeview on June 05, 2017, 03:37:10 PM
(http://i.imgur.com/ioExoao.png)

// * 1. GENERATE API KEYS IN POLONIEX
// * 2. GIVE GUNTHAR THE NEW API KEYS (public key / not secret key)
// * 3. ADD THE FOLLOWING LINES TO ALLPAIRS-params.js

/////////////////////////////////////////////////////////////////////////////////////////////////////////

// *** IN THE TOP of ALLPAIRS-params.js
var randrreturn = ['api1', 'api2', 'api3', 'api4','api5'][Math.floor(Math.random() * 5)]
var objapilist = {
    'api1' : {
        'api' : 'API-KEY-1',
        'secret' : 'API-SECRET-GOES-HERE'
    },
    'api2' : {
        'api' : 'API-KEY-2',
        'secret' : 'API-SECRET-GOES-HERE'
    },
    'api3' : {
        'api' : 'API-KEY-3',
        'secret' : 'API-SECRET-GOES-HERE'
    },
    'api4' : {
        'api' : 'API-KEY-4',
        'secret' : 'API-SECRET-GOES-HERE'
    },
    'api5' : {
        'api' : 'API-KEY-5',
        'secret' : 'API-SECRET-GOES-HERE'
    }
};
/////////////////////////////////////////////////////////////////////////////////////////////////////////

// *** IN THE var config = { ADD the following lines

    //---POLONIEX RANDOM API key and secret
    POLONIEX_KEY: objapilist[randrreturn]["api"],
    POLONIEX_SECRET: objapilist[randrreturn]["secret"],
Title: Re: Get RANDOM api key and secret in GunBot (+3.3)
Post by: BitFlipp4r on June 05, 2017, 05:04:02 PM
Is this to fix 422 Errors? How many are we supposed to make for lets say 15 pairs?
Title: Re: Get RANDOM api key and secret in GunBot (+3.3)
Post by: leeview on June 05, 2017, 05:06:13 PM
people said that having multiple api keys can reduce the 422/429 erros that come from Polo ..

From my experience this is FALSE as it is all related to the IP and requests per IP .. but to let people test it out, i wrote that code for Random Api Keys.
Title: Re: Get RANDOM api key and secret in GunBot (+3.3)
Post by: CoinKombinat on June 05, 2017, 05:15:36 PM
I am testing it atm, causes IP nor API the trouble. For connections > 7/sec = no doubt, dont do it  ;D

@liviuv : did u tested same API Key with different IP's?

BTW i am testing socks proxies but results are not clear yet.
Title: Re: Get RANDOM api key and secret in GunBot (+3.3)
Post by: BitFlipp4r on June 05, 2017, 05:26:08 PM
Well I did fix a 422-loop with a lending bot once by using a new api key.
So I will try this.
Title: Re: Get RANDOM api key and secret in GunBot (+3.3)
Post by: BitFlipp4r on June 06, 2017, 02:19:29 PM
I definitely get less 422 errors using multiple keys.
Now using 6 keys for 18 pairs. 280s delay. 220s error delay.
Title: Re: Get RANDOM api key and secret in GunBot (+3.3)
Post by: leeview on June 06, 2017, 04:21:07 PM
I am testing it atm, causes IP nor API the trouble. For connections > 7/sec = no doubt, dont do it  ;D

@liviuv : did u tested same API Key with different IP's?

BTW i am testing socks proxies but results are not clear yet.

I did try to use a VPN with USA IP's, on my windows VPS ... but nothing seems to change sadly ..
Title: Re: Get RANDOM api key and secret in GunBot (+3.3)
Post by: cryptopesa on June 18, 2017, 06:50:54 PM
What is the logic of this random API?

1. once a pair has been locked into a certain API does it lock-in indefinitely?
2. does it try a new one if current fails?
3. does it try to equally distribute to all keys?

Thanks.
Title: Re: Get RANDOM api key and secret in GunBot (+3.3)
Post by: allanster on June 30, 2017, 10:17:53 AM
They are rolling keys. See link I posted here... https://gunthy.org/index.php?topic=551.0 (https://gunthy.org/index.php?topic=551.0), it is Coinigy's blog explaining and they seem to think it does help.