Ejemplo n.º 1
0
def get_exchange_holdings_per_symbol():
    holdings_per_symbol = {}
    for exchange_manager in interfaces_util.get_exchange_managers():
        if trading_api.is_trader_existing_and_enabled(exchange_manager):
            portfolio = trading_api.get_portfolio(exchange_manager)
            _add_exchange_portfolio(portfolio, trading_api.get_exchange_name(exchange_manager), holdings_per_symbol)
    return holdings_per_symbol
Ejemplo n.º 2
0
def get_exchanges_load():
    return {
        trading_api.get_exchange_name(exchange_manager): {
            "load": trading_api.get_currently_handled_pair_with_time_frame(exchange_manager),
            "max_load": trading_api.get_max_handled_pair_with_time_frame(exchange_manager),
            "overloaded": trading_api.is_overloaded(exchange_manager),
            "has_websocket": trading_api.get_has_websocket(exchange_manager)
        }
        for exchange_manager in interfaces_util.get_exchange_managers()
    }
Ejemplo n.º 3
0
def get_initializing_currencies_prices_set():
    initializing_currencies = set()
    for exchange_manager in interfaces_util.get_exchange_managers():
        initializing_currencies = initializing_currencies.union(
            trading_api.get_initializing_currencies_prices(exchange_manager))
    return initializing_currencies
Ejemplo n.º 4
0
def _get_first_exchange_identifiers():
    for exchange_manager in interfaces_util.get_exchange_managers():
        return exchange_manager, trading_api.get_exchange_name(
            exchange_manager), trading_api.get_exchange_manager_id(
                exchange_manager)
    raise KeyError("No exchange to be found")