Example #1
0
def context_processor():
    return dict(
        version=__version__,
        ga_tracking_id=current_app.config["GA_TRACKING_ID"],
        current_year=datetime.utcnow().year,
        frequencies=g.HISTORY_FREQUENCY,
        pairs=get_pairs(g.SYMBOLS_PER_EXCHANGE),
        tokens=get_coin_tokens(g.SYMBOLS_PER_EXCHANGE),
    )
Example #2
0
def context_processor():
    return dict(
        application_server_key=current_app.config["APPLICATION_SERVER_KEY"],
        version=__version__,
        ga_tracking_id=current_app.config["GA_TRACKING_ID"],
        current_year=datetime.utcnow().year,
        frequencies=g.HISTORY_FREQUENCY,
        pairs=get_pairs(g.SYMBOLS_PER_EXCHANGE),
        tokens=get_coin_tokens(g.SYMBOLS_PER_EXCHANGE, show_all=True),
    )
Example #3
0
def context_processor():
    return dict(
        socket_base_url=current_app.config["SOCKET_BASE_URL"],
        version=__version__,
        ga_tracking_id=current_app.config["GA_TRACKING_ID"],
        current_year=datetime.utcnow().year,
        frequencies=g.HISTORY_FREQUENCY,
        pairs=get_pairs(g.SYMBOLS_PER_EXCHANGE),
        tokens=get_coin_tokens(g.SYMBOLS_PER_EXCHANGE),
        attributes={"price_usdt": "Price USDT"},
    )
Example #4
0
def context_processor():
    return dict(
        socket_base_url=current_app.config["SOCKET_BASE_URL"],
        socket_books_url=current_app.config["SOCKET_BOOKS_URL"],
        version=__version__,
        ga_tracking_id=current_app.config["GA_TRACKING_ID"],
        current_year=datetime.utcnow().year,
        frequencies=g.HISTORY_FREQUENCY,
        pairs=get_pairs(g.SYMBOLS_PER_EXCHANGE),
        tokens=get_coin_tokens(g.SYMBOLS_PER_EXCHANGE, show_all=True),
    )
Example #5
0
def spotlight_search():
    rows = []

    for coin_or_token in g.COINS_OR_TOKENS_REFERENCE:
        url = url_for(
            "ticker.token_frequency",
            coin_or_token=coin_or_token,
            frequency=g.HISTORY_FREQUENCY[0],
        )
        rows.append(dict(label=coin_or_token, value=coin_or_token, url=url))

    for pair in get_pairs(g.SYMBOLS_PER_EXCHANGE):
        url = url_for("ticker.pair_frequency",
                      pair=pair,
                      frequency=g.HISTORY_FREQUENCY[0])
        rows.append(dict(label=pair, value=pair, url=url))

    url = url_for("tools.fear_and_greed")
    rows.append(dict(label="Fear and Greed", value="Fear and Greed", url=url))

    url = url_for("tools.twitter", frequency="1d")
    rows.append(dict(label="Twitter", value="Twitter", url=url))

    url = url_for("tools.tether", coin_or_token="BTC")
    rows.append(dict(label="Tether", value="Tether", url=url))

    # Auth
    url = url_for("ticker.favourites", frequency="1d")
    rows.append(dict(label="Favourites", value="Favourites", url=url))

    url = url_for("portfolio.index")
    rows.append(dict(label="Portfolio", value="Portfolio", url=url))

    url = url_for("notification.index")
    rows.append(dict(label="Notifications", value="Notifications", url=url))

    return dict(count=len(rows), rows=rows)