예제 #1
0
    def _createExchangeObject(self, exchange):
        ''' Depricated ... now instantiating class using "eval" in __init__'''
        if exchange == "Binance":
            exchange = ccxt.binance()
        elif exchange == "Bitfinex":
            exchange = ccxt.bitfinex2()
        elif exchange == "Bitmex":
            exchange = ccxt.bitmex()
        elif exchange == "BitStamp":
            exchange = ccxt.binance()
        elif exchange == "Bittrex":
            exchange = ccxt.binance()
        elif exchange == "Bithumb":
            exchange = ccxt.bithumb()
        elif exchange == "CCTX":
            exchange = ccxt.cctx()
        elif exchange == "GDAX":
            exchange = ccxt.gdax()
        elif exchange == "HitBC":
            exchange = ccxt.hitbc()
        elif exchange == "Huobipro":
            exchange = ccxt.huobipro()
        elif exchange == "Kraken":
            exchange = ccxt.kraken()
        elif exchange == "OKEx":
            exchange = ccxt.okex()
        else:
            raise "Exception ExchangeCCXT::_createExchangeObject - ccxt Exchange not valid"

        return exchange
예제 #2
0
    def __init__(self, config, debug=True):
        key_config = config['apikey']
        self.debug = debug
        self.exchanges = {
            'zb': Zb(key_config['zb']['key'], key_config['zb']['secret']),
            'okex': Okex(key_config['okex']['key'],
                         key_config['okex']['secret']),
            'weex': Weex(key_config['weex']['key'],
                         key_config['weex']['secret']),
            # 'huobipro': Huobipro(key_config['huobipro']['key'], key_config['huobipro']['secret']),
            'bithumb': ccxt.bithumb(),
            'binance': ccxt.binance(),
            'bitflyer': ccxt.bitflyer(),
            'hitbtc': ccxt.hitbtc(),
            'coincheck': ccxt.coincheck(),
            "quoinex": ccxt.quoinex(),
            "bitfinex": ccxt.bitfinex(),
            "hitbtc": ccxt.hitbtc(),
        }

        self.engine = MysqlEngine(config['db']['url'])
        self.pool = ThreadPoolExecutor(
            3)  # for many urls, this should probably be capped at some value.

        self. async = False
예제 #3
0
def exchangeObject(exchange_in):
    exchanges = [ccxt.acx(),ccxt.bitbay(),ccxt.bitfinex(),ccxt.bitflyer(),ccxt.bithumb(),ccxt.bitlish(),ccxt.bitmarket(),ccxt.bitmex(),ccxt.bitso(),
                         ccxt.bitstamp(),ccxt.bitstamp1(),ccxt.bittrex(),ccxt.bl3p(),ccxt.bleutrade(),ccxt.btcbox(),ccxt.btcchina(),ccxt.btcexchange(),ccxt.btcmarkets(),ccxt.btctradeua(),ccxt.btcturk(),
                         ccxt.btcx(),ccxt.bxinth(),ccxt.ccex(),ccxt.cex(),ccxt.chbtc(),ccxt.chilebit(),ccxt.coincheck(),ccxt.coinfloor(),ccxt.coingi(),ccxt.coinmarketcap(),ccxt.coinmate(),
                         ccxt.coinsecure(),ccxt.coinspot(),ccxt.cryptopia(),ccxt.dsx(),ccxt.exmo(),ccxt.flowbtc(),ccxt.foxbit(),ccxt.fybse(),ccxt.fybsg(),ccxt.gatecoin(),ccxt.gateio(),ccxt.gdax(),
                         ccxt.gemini(),ccxt.getbtc(),ccxt.hitbtc(),ccxt.huobi(),ccxt.huobicny(),ccxt.independentreserve(),ccxt.itbit(),ccxt.jubi(),ccxt.kraken(),ccxt.kucoin(),
                         ccxt.kuna(),ccxt.lakebtc(),ccxt.liqui(),ccxt.livecoin(),ccxt.luno(),ccxt.mercado(),ccxt.mixcoins(),ccxt.nova(),ccxt.okcoincny(),ccxt.okcoinusd(),ccxt.okex(),ccxt.paymium(),
                         ccxt.poloniex(),ccxt.qryptos(),ccxt.quadrigacx(),ccxt.southxchange(),ccxt.surbitcoin(),ccxt.therock(),ccxt.tidex(),ccxt.urdubit(),ccxt.vaultoro(),ccxt.vbtc(),
                         ccxt.virwox(),ccxt.wex(),ccxt.xbtce(),ccxt.yobit(),ccxt.yunbi(),ccxt.zaif(),ccxt.zb()]

    for count, exchange in enumerate([str(x) for x in exchanges]):
            if exchange_in.lower() in exchange:
                return exchanges[count]
                break
예제 #4
0
    def __init__(self, config, debug=True):
        key_config = config['apikey']
        self.debug = debug
        self.exchanges = {
            'zb': Zb(key_config['zb']['key'], key_config['zb']['secret']),
            'okex': Okex(key_config['okex']['key'], key_config['okex']['secret']),
            'weex': Weex(key_config['weex']['key'], key_config['weex']['secret']),
            # 'huobipro': Huobipro(key_config['huobipro']['key'], key_config['huobipro']['secret']),
            'bithumb': ccxt.bithumb(),
            'binance': ccxt.binance(),
            'bitflyer': ccxt.bitflyer(),
            'hitbtc': ccxt.hitbtc(),
            'coincheck': ccxt.coincheck(),
            "quoinex": ccxt.quoinex(),
            "bitfinex": ccxt.bitfinex(),
            "hitbtc": ccxt.hitbtc(),
        }

        self.engine = MysqlEngine(config['db']['url'])
        self.pool = ThreadPoolExecutor(3)  # for many urls, this should probably be capped at some value.

        self.async = False
예제 #5
0
import ccxt
import numpy as np
import pandas as pd
import time
import json

bitmex = ccxt.bitmex()
bithumb = ccxt.bithumb()
okex = ccxt.okex()
binance = ccxt.binance()
huobi = huobi = ccxt.huobipro()
bitforex = ccxt.bitforex()
bittrex = ccxt.bittrex()
kraken = ccxt.kraken()
gdax = ccxt.gdax()
bitfinex = ccxt.bitfinex2()

exchange_names = ['bithumb']
exchanges = [bithumb]

bithumb.load_markets()


def load_pairs():
    pairs = {}
    for index, exchange in enumerate(exchange_names):
        pairs[exchange] = list(exchanges[index].load_markets().keys())
    return pairs


pairs = load_pairs()
예제 #6
0
def init_supported_exchanges():
    objects = {
        "acx": ccxt.acx(),
        "aofex": ccxt.aofex(),
        "bequant": ccxt.bequant(),
        "bibox": ccxt.bibox(),
        "bigone": ccxt.bigone(),
        "binance": ccxt.binance(),
        "bitbank": ccxt.bitbank(),
        "bitbay": ccxt.bitbay(),
        "bitfinex": ccxt.bitfinex(),
        "bitflyer": ccxt.bitflyer(),
        "bitforex": ccxt.bitforex(),
        "bithumb": ccxt.bithumb(),
        "bitkk": ccxt.bitkk(),
        "bitmax": ccxt.bitmax(),
        "bitstamp": ccxt.bitstamp(),
        "bittrex": ccxt.bittrex(),
        "bitz": ccxt.bitz(),
        "bl3p": ccxt.bl3p(),
        "bleutrade": ccxt.bleutrade(),
        "braziliex": ccxt.braziliex(),
        "btcalpha": ccxt.btcalpha(),
        "btcbox": ccxt.btcbox(),
        "btcmarkets": ccxt.btcmarkets(),
        "btctradeua": ccxt.btctradeua(),
        "bw": ccxt.bw(),
        "bybit": ccxt.bybit(),
        "bytetrade": ccxt.bytetrade(),
        "cex": ccxt.cex(),
        "chilebit": ccxt.chilebit(),
        "coinbase": ccxt.coinbase(),
        "coinbasepro": ccxt.coinbasepro(),
        "coincheck": ccxt.coincheck(),
        "coinegg": ccxt.coinegg(),
        "coinex": ccxt.coinex(),
        "coinfalcon": ccxt.coinfalcon(),
        "coinfloor": ccxt.coinfloor(),
        "coinmate": ccxt.coinmate(),
        "coinone": ccxt.coinone(),
        "crex24": ccxt.crex24(),
        "currencycom": ccxt.currencycom(),
        "digifinex": ccxt.digifinex(),
        "dsx": ccxt.dsx(),
        "eterbase": ccxt.eterbase(),
        "exmo": ccxt.exmo(),
        "exx": ccxt.exx(),
        "foxbit": ccxt.foxbit(),
        "ftx": ccxt.ftx(),
        "gateio": ccxt.gateio(),
        "gemini": ccxt.gemini(),
        "hbtc": ccxt.hbtc(),
        "hitbtc": ccxt.hitbtc(),
        "hollaex": ccxt.hollaex(),
        "huobipro": ccxt.huobipro(),
        "ice3x": ccxt.ice3x(),
        "independentreserve": ccxt.independentreserve(),
        "indodax": ccxt.indodax(),
        "itbit": ccxt.itbit(),
        "kraken": ccxt.kraken(),
        "kucoin": ccxt.kucoin(),
        "lakebtc": ccxt.lakebtc(),
        "latoken": ccxt.latoken(),
        "lbank": ccxt.lbank(),
        "liquid": ccxt.liquid(),
        "livecoin": ccxt.livecoin(),
        "luno": ccxt.luno(),
        "lykke": ccxt.lykke(),
        "mercado": ccxt.mercado(),
        "oceanex": ccxt.oceanex(),
        "okcoin": ccxt.okcoin(),
        "okex": ccxt.okex(),
        "paymium": ccxt.paymium(),
        "poloniex": ccxt.poloniex(),
        "probit": ccxt.probit(),
        "southxchange": ccxt.southxchange(),
        "stex": ccxt.stex(),
        "surbitcoin": ccxt.surbitcoin(),
        "therock": ccxt.therock(),
        "tidebit": ccxt.tidebit(),
        "tidex": ccxt.tidex(),
        "upbit": ccxt.upbit(),
        "vbtc": ccxt.vbtc(),
        "wavesexchange": ccxt.wavesexchange(),
        "whitebit": ccxt.whitebit(),
        "yobit": ccxt.yobit(),
        "zaif": ccxt.zaif(),
        "zb": ccxt.zb()
    }
    return objects
예제 #7
0
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Dec 20 11:50:15 2017

@author: DanWang
"""
import ccxt
bithumb1 = ccxt.bithumb()
bithumb1.apiKey = '8c53afc7449b4bd8c4a9654aa0a2480b'
bithumb1.secret = '5d6c3ddee73deefc46d93fb3774e73f7'
balance = bithumb1.fetch_balance()
btc = balance['info']['data']['total_btc']
print(btc)
bithumb1.create_market_buy_order('LTC/KRW', 1, {'trading_agreement': 'agree'})
#bithumb1.fetchMyTrades (symbol = undefined, since = undefined, limit = undefined,params = {})
예제 #8
0
exchanges = [
    ccxt._1broker(),
    ccxt._1btcxe(),
    ccxt.acx(),
    ccxt.allcoin(),
    ccxt.anxpro(),
    ccxt.bibox(),
    ccxt.binance(),
    ccxt.bit2c(),
    ccxt.bitbank(),
    ccxt.bitbay(),
    ccxt.bitfinex(),
    ccxt.bitfinex2(),
    ccxt.bitflyer(),
    ccxt.bithumb(),
    ccxt.bitkk(),
    ccxt.bitlish(),
    ccxt.bitmarket(),
    ccxt.bitmex(),
    ccxt.bitso(),
    ccxt.bitstamp(),
    ccxt.bitstamp1(),
    ccxt.bittrex(),
    ccxt.bitz(),
    ccxt.bl3p(),
    ccxt.bleutrade(),
    ccxt.braziliex(),
    ccxt.btcbox(),
    ccxt.btcchina(),
    ccxt.btcexchange(),