Updating plasmoid on sleep wake

Hello,
I’m looking for a way to use a login or sleep wake as a trigger. I’ve got my widget updating from an API at regular intervals with Timer but that often leads to the widget being out of date for several minutes after waking from sleep. I’m trying to avoid unnecessarily frequent calls since the API is free and the data changes fairly slowly.

Sorry if any of the terminology is a little muddled here, I’m new to all these things.