Exemplo n.º 1
0
def load_exchange_pair_mapping(exchange: str):
    if exchange in {BITMEX, DERIBIT, KRAKEN_FUTURES}:
        return
    mapping = gen_pairs(exchange)
    for std, exch in mapping.items():
        _exchange_to_std[exch] = std
        if std in _std_trading_pairs:
            _std_trading_pairs[std][exchange] = exch
        else:
            _std_trading_pairs[std] = {exchange: exch}
Exemplo n.º 2
0
def load_exchange_pair_mapping(exchange):
    if exchange == BITMEX:
        return
    mapping = gen_pairs(exchange)
    for std, exch in mapping.items():
        _exchange_to_std[exch] = std
        if std in _std_trading_pairs:
            _std_trading_pairs[std][exchange] = exch
        else:
            _std_trading_pairs[std] = {exchange: exch}
Exemplo n.º 3
0
def get_exchange_info(exchange: str):
    mapping = gen_pairs(exchange)
    info = dict(_exchange_info.get(exchange, {}))
    return mapping, info
Exemplo n.º 4
0
def get_exchange_info(exchange: str, key_id=None):
    mapping = gen_pairs(exchange, key_id=key_id)
    info = dict(_exchange_info.get(exchange, {}))
    return mapping, info
Exemplo n.º 5
0
 def get_sym_list(self, verbose=False):
     self.syms_in_market = gen_pairs(self.market_function)
     if verbose: print(self.syms_in_market)
Exemplo n.º 6
0
    def __init__(self, config):
        super(MainWindow, self).__init__()
        self.config = self._read_config(f'{root}\\conf\\{config}')
        self.markets = {
            'binance': gen_pairs(BINANCE),
            'bitfinex': gen_pairs(BITFINEX),
            'bitstamp': gen_pairs(BITSTAMP),
            'bybit': gen_pairs(BYBIT),
            'coinbase': gen_pairs(COINBASE),
            'coinbene': gen_pairs(COINBENE),
            'exx': gen_pairs(EXX),
            'ftx': gen_pairs(FTX),
            'gemini': gen_pairs(GEMINI),
            'hitbtc': gen_pairs(HITBTC),
            'huobi': gen_pairs(HUOBI),
            'kraken': gen_pairs(KRAKEN),
            'okcoin': gen_pairs(OKCOIN),
            'okex': gen_pairs(OKEX),
            'poloniex': gen_pairs(POLONIEX)
        }
        # windows
        self.central_widget = None
        self.exchange_window = None
        self.contracts_window = None

        # 1. set up gui windows
        self.setGeometry(50, 50, 600, 400)
        self.setWindowTitle('ConfigUI')
        self.init_menu()
        self.init_central_area()