Пример #1
0
def update_trader_details(i):
    # order_reader.move_on()
    if i is None:
        return ''
    return get_trader_detail_figures(trader_domain=trader_domains[i],
                                     account_reader=account_readers[i],
                                     order_reader=order_readers[i])
Пример #2
0
def update_trader_details(n, i):
    if i is None or n < 1:
        return ''

    return get_trader_detail_figures(trader_domain=trader_domains[i],
                                     account_reader=account_readers[i],
                                     order_reader=order_readers[i])
Пример #3
0
def update_trader_details(n, trader_name):
    if trader_name is not None:
        if trader_name in account_readers:
            account_readers[trader_name].move_on(timeout=1)
            order_readers[trader_name].move_on(timeout=1)
            return get_trader_detail_figures(account_readers[trader_name], order_readers[trader_name])
    return html.Label('trader details')
Пример #4
0
def update_trader_details(i):
    # order_reader.move_on()
    if i is None:
        return html.Div('please select one trader to view')
    return get_trader_detail_figures(trader_domain=trader_domains[i],
                                     account_reader=account_readers[i],
                                     order_reader=order_readers[i])
Пример #5
0
def serve_layout():
    layout = html.Div([
        daq.LEDDisplay(id='current_price',
                       label="EOS/USDT current price",
                       value=price_reader.get_data_df()['price'][-1],
                       color="#FF5E5E"),
        html.Div(id='trader-details',
                 children=get_trader_detail_figures(
                     trader_domain=trader_domain,
                     account_reader=None,
                     order_reader=order_reader)),
        dcc.Interval(
            id='interval-component',
            interval=20 * 1000,  # in milliseconds
            n_intervals=0),
        dcc.Interval(
            id='interval-component1',
            interval=3 * 1000,  # in milliseconds
            n_intervals=0)
    ])

    return layout
Пример #6
0
def update_trader_details(n):
    # order_reader.move_on()
    return get_trader_detail_figures(trader_domain=trader_domain,
                                     account_reader=None,
                                     order_reader=order_reader)
Пример #7
0
def update_trader_details(n):
    account_reader.move_on()
    order_reader.move_on()
    return html.Div(get_trader_detail_figures(account_reader, order_reader, provider='ccxt'))