コード例 #1
0
    from urllib import urlencode as OO00OO00O00O0O000
    from urlparse import urljoin as OO0OOOOO0000O000O
except ImportError:
    from urllib.parse import urlencode as OO00OO00O00O0O000
    from urllib.parse import urljoin as OO0OOOOO0000O000O

import configparser as OO00OO0OOOO0O0O00, sys as OO0O00O00000000O0
OO0O00O00000000O0.setrecursionlimit(10000)
config = OO00OO0OOOO0O0O00.ConfigParser()
config.readfp(open('config.txt'))
key = config.get('Yobit', 'Key')
secret = config.get('Yobit', 'Secret')
secret = bytes(secret, 'utf8')
BuyPercent = config.get('PriceLip', 'BuyPercent')
SellPercent = config.get('PriceLip', 'SellPercent')
BuyPercent, SellPercent = OOOO0OOOOO0OO00OO.percentageFix(BuyPercent, SellPercent)

def nonceHandler():
    OOOO0O0OO0O0O00O0 = open('nonce.txt')
    OOOOO0O00OOO00O00 = OOOO0O0OO0O0O00O0.readlines()
    OOOO0O0OO0O0O00O0.close()
    O000O0OO00O0OOOOO = int(OOOOO0O00OOO00O00[0]) + 1
    OOOOOO0000OO00000 = open('nonce.txt', 'w+')
    OOOOOO0000OO00000.write(str(O000O0OO00O0OOOOO))
    OOOOOO0000OO00000.close()
    return O000O0OO00O0OOOOO


def generate_nonce(length=9):
    """"""
    return ('').join([str(O00000OO0O0O000OO.randint(0, 9)) for O0000O000OO0O00OO in range(length)])
コード例 #2
0
ファイル: CryptopiaBot.py プロジェクト: kcb0126/PumpBot
OOO000000OOO0OOOO = __import__('urllib.parse', globals(), locals())  #line:12
import datetime as O00OO0OO00OO0000O  #line:13
import base64 as OOO00OOOOOOO0000O  #line:14
import configparser as O00O000O0OOOO0OO0  #line:15
import sys as O0OO00O0O0000OO0O  #line:16
import CryptopiaApiManager as ApiManager
config = O00O000O0OOOO0OO0.ConfigParser()  #line:17
config.readfp(open('config.txt'))  #line:18
key = config.get('Cryptopia', 'Key')  #line:19
secret = config.get('Cryptopia', 'Secret')  #line:20
manager = ApiManager.Api(key, secret)
lastPrice = 0
currentSellOrderId = -1
BuyPercent = config.get('PriceLip', 'BuyPercent')  #line:21
SellPercent = config.get('PriceLip', 'SellPercent')  #line:22
BuyPercent, SellPercent = OOO00O0O0O000000O.percentageFix(
    BuyPercent, SellPercent)  #line:23


def make_nonce():  #line:26
    return str(OOOO0OOOO0OO00O00.randint(0, 100000000))  #line:27


# get price to buy
def getTicker(OOOOOOOOOO00O0OO0):  #line:29
    O0OOO0O0000000000 = 'https://www.cryptopia.co.nz/api/GetMarket/' + OOOOOOOOOO00O0OO0 + '_BTC'  #line:30
    O00O00OOO0O00000O = O00OO0000O0O0O0O0.get(O0OOO0O0000000000)  #line:31
    O0000OO0000O00O0O = OO0OOO0O00OO00OOO.loads(
        O00O00OOO0O00000O.text)  #line:32
    while O0000OO0000O00O0O['Data'] == None:  #line:33
        O00O00OOO0O00000O = O00OO0000O0O0O0O0.get(O0OOO0O0000000000)  #line:34
        O0000OO0000O00O0O = OO0OOO0O00OO00OOO.loads(
コード例 #3
0
ファイル: YobitBot.py プロジェクト: kcb0126/PumpBot
    from urlparse import urljoin as O0OOO000O0OO0O000  #line:23
except ImportError:  #line:24
    from urllib.parse import urlencode as OO0OO000OOO000OOO  #line:25
    from urllib.parse import urljoin as O0OOO000O0OO0O000  #line:26
import configparser as O000O0O0OOOO00O00  #line:28
import sys as O00OO000000OOO00O  #line:29
O00OO000000OOO00O.setrecursionlimit(10000)  #line:30
config = O000O0O0OOOO00O00.ConfigParser()  #line:31
config.readfp(open('config.txt'))  #line:32
key = config.get('Yobit', 'Key')  #line:33
secret = config.get('Yobit', 'Secret')  #line:34
manager = YobitApiManager.YoBit(key, secret)
secret = bytes(secret, 'utf8')  #line:35
BuyPercent = config.get('PriceLip', 'BuyPercent')  #line:36
SellPercent = config.get('PriceLip', 'SellPercent')  #line:37
BuyPercent, SellPercent = O0OO0OO0O0O00O000.percentageFix(
    BuyPercent, SellPercent)  #line:38
lastNonce = int(O00O00OOOOO0O0O0O.time())


def nonceHandler():  #line:40
    global lastNonce
    while True:
        nonce = int(O00O00OOOOO0O0O0O.time())
        if nonce != lastNonce:
            break
        O00O00OOOOO0O0O0O.sleep(1)
    lastNonce = nonce
    return lastNonce


def generate_nonce(length=9):  #line:51
コード例 #4
0
    from urlparse import urljoin
except ImportError:
    from urllib.parse import urlencode
    from urllib.parse import urljoin

import configparser
import sys
sys.setrecursionlimit(10000)
config = configparser.ConfigParser()
config.readfp(open('config.txt'))
key = config.get('Yobit', 'Key')
secret = config.get('Yobit', 'Secret')
secret = bytes(secret, 'utf8')
BuyPercent = config.get('PriceLip', 'BuyPercent')
SellPercent = config.get('PriceLip', 'SellPercent')
BuyPercent, SellPercent = utils.percentageFix(BuyPercent, SellPercent)


def nonceHandler():
    f = open('nonce.txt')
    nonce = f.readlines()
    f.close()
    newnonce = int(nonce[0]) + 1
    file = open('nonce.txt', 'w+')
    file.write(str(newnonce))
    file.close()
    return newnonce


def generate_nonce(length=9):
    """Generate pseudo-random number."""