Display a text variable that periodically changing

Hi,

I am trying to build a stock related app using streamlit, and I am using websocket to get stock real-time price data. I want to add a line to show continuously changing price, is there any simple way to do so?

Thank you so much

I aslo need the solution.
The information is changing.
We need the changing information is showed in range of one line rather than generate a new line.

1 Like

I have a simple solution rn.
You can use streamlit.empty() to generate a container, then every time the update changing you change the content of this container.
The code will be like:

t = streamlit.empty()
def on_update():
    data = getNewData()
    t.text(data)
1 Like