in src/backend/entrypoints/streamlit_frontend/state.py [0:0]
def add_symbol_button_callback(symbol, exchange):
provider = data_providers[st.session_state["data_provider"]]
full_symbol = provider.build_ticker_for_lookup(symbol, exchange)
special_symbols = ["/"]
if (
symbol
and symbol[0].isdigit()
or exchange
and exchange[0].isdigit()
or any([i in symbol for i in special_symbols])
or any([i in exchange for i in special_symbols])
):
full_symbol = '"' + full_symbol + '"'
if st.session_state.tradable_symbols_prompt == "":
st.session_state.tradable_symbols_prompt = st.session_state.tradable_symbols_prompt + full_symbol
else:
st.session_state.tradable_symbols_prompt = st.session_state.tradable_symbols_prompt + ", " + full_symbol
st.session_state.add_ticker_buttons.append(True)