Beispiel #1
0
 def setup_clients(self):
     self.exchanges['Bittrex'] = ccxt.bittrex({
         'apiKey':
         self.meta['Bittrex']['public'],
         'secret':
         self.meta['Bittrex']['secret'],
     })
     self.exchanges['Poloniex'] = ccxt.poloniex({
         'apiKey':
         self.meta['Poloniex']['public'],
         'secret':
         self.meta['Poloniex']['secret'],
     })
     self.exchanges['YoBit'] = ccxt.yobit({
         'apiKey':
         self.meta['YoBit']['public'],
         'secret':
         self.meta['YoBit']['secret'],
     })
     self.exchanges['HitBTC'] = ccxt.hitbtc2({
         'apiKey':
         self.meta['HitBTC']['public'],
         'secret':
         self.meta['HitBTC']['secret'],
     })
     self.exchanges['Tidex'] = ccxt.tidex({
         'apiKey':
         self.meta['Tidex']['public'],
         'secret':
         self.meta['Tidex']['secret'],
     })
     self.exchanges['Binance'] = ccxt.binance({
         'options': {
             'adjustForTimeDifference': True
         },
         'apiKey':
         self.meta['Binance']['public'],
         'secret':
         self.meta['Binance']['secret'],
     })
     self.exchanges['Bitfinex'] = ccxt.bitfinex({
         'apiKey':
         self.meta['Bitfinex']['public'],
         'secret':
         self.meta['Bitfinex']['secret'],
     })
    'exchangeName': "coinfloor",
    'database': coinfloor_db
})

gemini = ccxt.gemini({
    'rateLimit': 3000,
    'enableRateLimit': True,
    # 'verbose': True,
    'exchangeName': "gemini",
    'database': gemini_db
})

tidex = ccxt.tidex({
    'rateLimit': 3000,
    'enableRateLimit': True,
    # 'verbose': True,
    'exchangeName': "tidex",
    'database': tidex_db
})

cex = ccxt.cex({
    'rateLimit': 3000,
    'enableRateLimit': True,
    # 'verbose': True,
    'exchangeName': "cex",
    'database': cex_db
})


def koineks_ticker(currency):
    # To use this function, instead of calling a currency pair, just use BTC, ETH, XLM, LTC, DASH,XRP,DOGE
Beispiel #3
0
    #     'secret': BINANCE_SECRET,
    # }), 'https://www.binance.com/trade.html?symbol={0}_{1}'),
    # # 16. WEX
    # (ccxt.wex(), 'https://wex.nz/exchange/{0}_{1}'),
    # # 21. CEX.IO
    # (ccxt.cex(), 'https://cex.io/{0}-{1}'),
    # 22. YoBit
    (ccxt.yobit(), 'https://yobit.net/en/trade/{0}/{1}'),
    # # 24. Gatecoin
    # (ccxt.gatecoin(), 'https://gatecoin.com/marketData'),
    # 25. Liqui
    (ccxt.liqui(), 'https://liqui.io/#/exchange/{0}_{1}'),
    # # 26. OKEx
    # (ccxt.okex(), 'https://www.okex.com/'),
    # 43. Tidex
    (ccxt.tidex(), 'https://tidex.com/exchange/{0}/{1}'),
    # 52. Cryptopia
    (ccxt.cryptopia(), 'https://www.cryptopia.co.nz/Exchange/?market={0}_{1}'),
]


def main():
    now = datetime.now()

    # Get all markets
    res = requests.get('https://api.coinmarketcap.com/v1/ticker/')
    markets = res.json()
    print('Number of markets={}'.format(len(markets)))
    # Pop base currency and USDT (Tether)
    symbols = ['{}/{}'.format(x['symbol'], BASE_CURRENCY) for x in markets if x['symbol'] not in (BASE_CURRENCY, 'USDT')]
    print(symbols)
Beispiel #4
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.bxinth(),
        ccxt.ccex(),
        ccxt.cex(),
        ccxt.chbtc(),
        ccxt.chilebit(),
        ccxt.coincheck(),
        ccxt.coinfloor(),
        ccxt.coingi(),
        ccxt.coinmarketcap(),
        ccxt.coinmate(),
        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.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
Beispiel #5
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
Beispiel #6
0
    ccxt.liqui(),
    ccxt.livecoin(),
    ccxt.luno(),
    ccxt.lykke(),
    ccxt.mercado(),
    ccxt.mixcoins(),
    ccxt.negociecoins(),
    ccxt.nova(),
    ccxt.okcoincny(),
    ccxt.okcoinusd(),
    ccxt.okex(),
    ccxt.paymium(),
    ccxt.poloniex(),
    ccxt.qryptos(),
    ccxt.quadrigacx(),
    ccxt.quoinex(),
    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()
]