Username: Password:

Author Topic: Get RANDOM api key and secret in GunBot (+3.3)  (Read 24508 times)

Offline leeview

  • Rookie
  • *
  • Posts: 36
  • Gunbot Reseller & Support
    • View Profile
    • Buy Gunbot
Get RANDOM api key and secret in GunBot (+3.3)
« on: June 05, 2017, 03:37:10 PM »

// * 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"],
« Last Edit: June 05, 2017, 05:10:46 PM by liviuv »

Offline BitFlipp4r

  • Rookie
  • *
  • Posts: 23
    • View Profile
Re: Get RANDOM api key and secret in GunBot (+3.3)
« Reply #1 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?

Offline leeview

  • Rookie
  • *
  • Posts: 36
  • Gunbot Reseller & Support
    • View Profile
    • Buy Gunbot
Re: Get RANDOM api key and secret in GunBot (+3.3)
« Reply #2 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.

Offline CoinKombinat

  • Rookie
  • *
  • Posts: 11
  • BTC - Birth of independent people of the future
    • View Profile
Re: Get RANDOM api key and secret in GunBot (+3.3)
« Reply #3 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.

Offline BitFlipp4r

  • Rookie
  • *
  • Posts: 23
    • View Profile
Re: Get RANDOM api key and secret in GunBot (+3.3)
« Reply #4 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.

Offline BitFlipp4r

  • Rookie
  • *
  • Posts: 23
    • View Profile
Re: Get RANDOM api key and secret in GunBot (+3.3)
« Reply #5 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.

Offline leeview

  • Rookie
  • *
  • Posts: 36
  • Gunbot Reseller & Support
    • View Profile
    • Buy Gunbot
Re: Get RANDOM api key and secret in GunBot (+3.3)
« Reply #6 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 ..

Offline cryptopesa

  • Rookie
  • *
  • Posts: 13
    • View Profile
Re: Get RANDOM api key and secret in GunBot (+3.3)
« Reply #7 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.

Offline allanster

  • Contributor
  • **
  • Posts: 128
  • lux ex tenebris • deuro mea umbra absens
    • View Profile
Re: Get RANDOM api key and secret in GunBot (+3.3)
« Reply #8 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, it is Coinigy's blog explaining and they seem to think it does help.
« Last Edit: June 30, 2017, 10:21:31 AM by allanster »
more human than human