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
import config import ccxt exchanges = {} ######## # bitbay # ######## exchanges['bitbay'] = {} exchanges['bitbay']['init'] = ccxt.bitbay(config.bitbay) exchanges['bitbay']['limit'] = 100 exchanges['bitbay']['currency'] = 'pln' exchanges['bitbay']['name'] = 'bitbay' exchanges['bitbay']['name_trader'] = 'bitbay' ############### # indodax # ############### exchanges['indodax'] = {} exchanges['indodax']['init'] = ccxt.indodax(config.indodax) exchanges['indodax']['limit'] = 500 exchanges['indodax']['currency'] = 'idr' exchanges['indodax']['name'] = 'indodax' exchanges['indodax']['name_trader'] = 'indodax' ############### # Coinbasepro GBP # ############### exchanges['coinbasepro_gbp'] = {}
'exchangeName': "btcturk", 'database': btcturk_db }) hitbtc = ccxt.hitbtc2({ 'rateLimit': 3000, 'enableRateLimit': True, # 'verbose': True, 'exchangeName': "hitbtc" , 'database': hitbtc_db }) bitbay = ccxt.bitbay({ 'rateLimit': 3000, 'enableRateLimit': True, # 'verbose': True, 'exchangeName': "bitbay", 'database': bitbay_db }) bl3p = ccxt.bl3p({ 'rateLimit': 3000, 'enableRateLimit': True, # 'verbose': True, 'exchangeName': "bl3p" , 'database': bl3p_db }) btcmarkets = ccxt.btcmarkets({ 'rateLimit': 3000, 'enableRateLimit': True,
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
import time import ccxt import pandas as pd from IPython.display import display gateio = ccxt.gateio() gdax = ccxt.gdax() # kraken = ccxt.kraken() binance = ccxt.binance() bitbank = ccxt.bitbank() bit2c = ccxt.bit2c() bitbay = ccxt.bitbay() exchanges = { gateio: ['ETH/BTC', 'LTC/BTC'], gdax: ['ETH/BTC', 'LTC/BTC', 'BTC/USD'], # kraken: ['ETH/BTC', 'LTC/BTC', 'BTC/USD'], binance: ['ETH/BTC', 'LTC/BTC'], bitbank: ['ETH/BTC', 'LTC/BTC'], bit2c: ['BTC/NIS', 'LTC/NIS'], bitbay: ['ETH/BTC', 'LTC/BTC'] } def get_top_of_book(exchange, symbol): book = exchange.fetch_order_book(symbol) best_bid_price = book['bids'][0][0] best_ask_price = book['asks'][0][0] return best_bid_price, best_ask_price
import ccxt 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(),