Updating Dash Table in realtime with async tick data?

I want to know if the following is possible with Dash:

I want to present a simple table where the rows are instrument names such as currency pairs e.g. EURUSD, USDJPY, GBPUSD, USDCHF and the columns are values like BID,ASK, CHANGE, TIME, CONTRIBUTOR

I have looked at your web-trader example which reads the values from a CSV and updates the prices at timed intervals.

However, I want to update the prices in real time - as I receive tick updates from my realtime feed asynchronously - not at a time interval.

Is the above possible easily e.g. by just updating the relevant cell in a dataframe and thereby updating the Dash table entry for that particular value?

The feed I plan to get the data from is bandwidth optimises so only a few updates a second are received - so not too worried about performance.

Or am I going to have to update the dataframe as and when ticks arrive - but continue to update the data table at time intervals - so there may be a delay between a tick and the tick being reflected in the data table?

Thank you!

Right now we don’t have any sort of push updates, nor do we have a way to update just part of a DataTable. You can have a fast Interval that raises PreventUpdate (or returns dash.no_update) when there are no changes.

BTW we’ve worked hard to keep the dash back end stateless, so multiple users can be viewing the same app simultaneously. This can be done with a system like this that’s pushing updates, but it requires having an input to the callback that tells you which updates this particular client has received, like a hash or a timestamp.

1 Like

To reiterate alexcjohnson’s post, a fast enough refresh rate (~1ms., or as fast as Dash will empirically let you go), that is efficient, could you get you close to a real-time update. Have you tried to implement this yet? If you have, how did it go?