예제 #1
0
    def __init__(self):
        super().__init__()

        self.clients = {
            "HaobtcCNY":
            haobtccny.PrivateHaobtcCNY(config.HAOBTC_API_KEY,
                                       config.HAOBTC_SECRET_TOKEN),
            "BrokerCNY":
            brokercny.PrivateBrokerCNY(),
        }

        self.taker_fee = 0.002

        self.bid_fee_rate = config.bid_fee_rate
        self.ask_fee_rate = config.ask_fee_rate
        self.bid_price_risk = config.bid_price_risk
        self.ask_price_risk = config.ask_price_risk
        self.peer_exchange = self.hedger

        try:
            os.mkdir(self.out_dir)
        except:
            pass

        t = threading.Thread(target=self.msg_server)
        t.start()
        logging.info('HedgerBot Setup complete')
예제 #2
0
    def __init__(self):
        super().__init__()

        self.clients = {
            # TODO: move that to the config file
            "HaobtcCNY": haobtccny.PrivateHaobtcCNY(config.HAOBTC_API_KEY, config.HAOBTC_SECRET_TOKEN),
        }
        
        self.trade_timeout = 10  # in seconds

        self.cny_balance = 0
        self.btc_balance = 0
        self.cny_total = 0
        self.btc_total = 0

        self.bid_fee_rate = config.bid_fee_rate
        self.ask_fee_rate = config.ask_fee_rate
        self.bid_price_risk = config.bid_price_risk
        self.ask_price_risk = config.ask_price_risk

        self.peer_exchange ='OKCoinCNY'
        # self.peer_exchange ='HuobiCNY'

        try:
            os.mkdir(self.out_dir)
        except:
            pass

        self.clients[self.exchange].cancel_all()

        logging.info('MarketMaker Setup complete')
예제 #3
0
    def __init__(self):
        self.clients = {
            # TODO: move that to the config file
            "HaobtcCNY": haobtccny.PrivateHaobtcCNY(),
            "OKCoinCNY": okcoincny.PrivateOkCoinCNY(),
            "HuobiCNY": huobicny.PrivateHuobiCNY(),
        }

        self.profit_thresh = config.profit_thresh
        self.perc_thresh = config.perc_thresh
        self.trade_wait = 120 * 1  # in seconds
        self.last_trade = 0
 def __init__(self):
     self.haobtc = haobtccny.PrivateHaobtcCNY()
     self.okcoin = okcoincny.PrivateOkCoinCNY()
     self.clients = {
         "HaobtcCNY": self.haobtc,
         "OkCoinCNY": self.okcoin,
     }
     self.profit_percentage_thresholds = {  # Graph
         "HaobtcCNY": {"OkCoinCNY": 3.5},
         "OkCoinCNY": {"HaobtcCNY": 1},
     }
     self.trade_wait = 60 * 5  # in seconds
     self.last_trade = 0
     self.potential_trades = []
    def __init__(self):
        self.haobtc = haobtccny.PrivateHaobtcCNY(config.HAOBTC_API_KEY,
                                                 config.HAOBTC_SECRET_TOKEN)

        self.okcoin = okcoincny.PrivateOkCoinCNY(config.OKCOIN_API_KEY,
                                                 config.OKCOIN_SECRET_TOKEN)

        self.clients = {
            "HaobtcCNY": self.haobtc,
            "OkCoinCNY": self.okcoin,
        }
        self.profit_percentage_thresholds = {  # Graph
            "HaobtcCNY": {"OkCoinCNY": 3.5},
            "OkCoinCNY": {"HaobtcCNY": 1},
        }
        self.trade_wait = 60 * 5  # in seconds
        self.last_trade = 0
        self.potential_trades = []
예제 #6
0
    def __init__(self):
        self.clients = {
            # TODO: move that to the config file
            "HaobtcCNY":
            haobtccny.PrivateHaobtcCNY(config.HAOBTC_API_KEY,
                                       config.HAOBTC_SECRET_TOKEN),
            "OKCoinCNY":
            okcoincny.PrivateOkCoinCNY(config.OKCOIN_API_KEY,
                                       config.OKCOIN_SECRET_TOKEN),
            "HuobiCNY":
            huobicny.PrivateHuobiCNY(config.HUOBI_API_KEY,
                                     config.HUOBI_SECRET_TOKEN),
        }

        self.profit_thresh = config.profit_thresh
        self.perc_thresh = config.perc_thresh
        self.trade_wait = 10 * 1  # in seconds
        self.last_trade = 0
예제 #7
0
    def __init__(self):
        self.clients = {
            # TODO: move that to the config file
            "HaobtcCNY":
            haobtccny.PrivateHaobtcCNY(config.HAOBTC_API_KEY,
                                       config.HAOBTC_SECRET_TOKEN),
        }

        self.cny_balance = 0
        self.btc_balance = 0
        self.cny_frozen = 0
        self.btc_frozen = 0
        self.cny_total = 0
        self.btc_total = 0

        try:
            os.mkdir(self.out_dir)
        except:
            pass
예제 #8
0
    def __init__(self):
        self.clients = {
            # TODO: move that to the config file
            "HaobtcCNY": haobtccny.PrivateHaobtcCNY(config.HAOBTC_API_KEY, config.HAOBTC_SECRET_TOKEN),
            "OKCoinCNY": okcoincny.PrivateOkCoinCNY(config.OKCOIN_API_KEY, config.OKCOIN_SECRET_TOKEN),
            "HuobiCNY": huobicny.PrivateHuobiCNY(config.HUOBI_API_KEY, config.HUOBI_SECRET_TOKEN),
        }

        self.profit_thresh = config.profit_thresh
        self.perc_thresh = config.perc_thresh
        self.trade_wait = 10 * 1  # in seconds
        self.last_trade = 0
        self.cny_balance = 0
        self.btc_balance = 0
        self.cny_frozen = 0
        self.btc_frozen = 0
        self.cny_total = 0
        self.btc_total = 0
       
        try:
            os.mkdir(self.out_dir)
        except:
            pass