Trigger Slider event

I am using the basic slider example to show my scatterplots with time slider.
Is there a way to capture the events on slider change ? I would like to call my APIs and do some other operations (not related to plotly chart).
Have seen solutions adding new trace, but my problem is much simpler that I need to call my function on slider change event.

Regards,
Rizwan

You can try something as follows:

Plotly.newPlot(plottingDiv, dataToPlot, plottingLayout)
plottingDiv.on(‚Äėplotly_sliderchange‚Äô, function (e) {
var stepLabel = e.step.label
// do other things needed
}
)