def __init__(self, name, public_key, private_key, poll_time_s=5, tick_tock=True): Exchange.__init__(self, name) self.pending_cancel = {} self.client = Qryptos(public_key, private_key) self.client.API_URL = 'https://api.liquid.com' self.internal_to_external_id = {} self.external_to_internal_id = {} self.open_orders_by_exchange_id = {} self.symbol_to_product = {} self.markets_following = {} product_list = self.client.get_products() for product in product_list: if 'product_type' in product and product[ 'product_type'] == 'CurrencyPair': self.symbol_to_product[ product['currency_pair_code']] = product['id'] self.poll_time_s = poll_time_s self.tick_tock = tick_tock self.name = name if tick_tock is True: threading.Timer(self.poll_time_s, self.on_tick).start()
def __init__(self, name, public_key, private_key): Exchange.__init__(self, name) #Keep as separate instance self.CCXT = CCXT_Interface() self.is_authenticated = self.CCXT.exchange_connect(name) #Default info load: self._load_markets()
def __init__(self, name, public_key=None, private_key=None): Exchange.__init__(self, name) TransferService.__init__(self) self.client = Client(public_key, private_key) self.user_data_service = UserDataService(self.client, self.notify_callbacks, name) self.is_authenticated = (public_key is not None) and (private_key is not None) self.order_book_services = {} self.callbacks = {}
def __init__(self, name, public_key, private_key): Exchange.__init__(self, name) self.ob_ws = OrderBookSocket(self) self.ex_ws = ExecutionsSocket(self) self.ex_ws.authenticate(public_key, private_key) self.markets_following = {} self.open_orders = [] self.rest_client = Bittrex(public_key, private_key, api_version=API_V1_1)
def __init__(self, name, public_key, private_key, poll_time_s=5, tick_tock=True): Exchange.__init__(self, name) self.open_orders_by_exchange_id = {} self.external_to_internal_id = {} self.internal_to_external_id = {} self.poll_time_s = poll_time_s self.tick_tock = True self.markets_following = {} self.client = Api(public_key, private_key) self.open_orders = [] if tick_tock is True: threading.Timer(self.poll_time_s, self.on_tick).start()
def __init__(self, name, public_key, private_key): Exchange.__init__(self, name) self.order_book_socket = OrderBookSocket() self.markets_following = {} self.rest_client = RestClient(public_key, private_key) self.open_orders = []
def __init__(self, api_key, api_secret): Exchange.__init__(self, api_key, api_secret) self.initialize_headers()
def __init__(self, api_key, api_secret): Exchange.__init__(self, api_key, api_secret)
def __init__(self, name, public_key, private_key): Exchange.__init__(self, name)
def __init__(self, key: str, secret: str): Exchange.__init__(key, secret) self.name = self.__class__.__name__ self.client = CoinGeckoAPI()