I can’t talk about the UK but in Austria you need an hourly contract and a smart meter. If you have a PV system and you want to min/max electricity you need some smart systems to regulate self consumption vs. feeding back.
As others have said you need a tariff that's hourly, be warned though people got bitten with this when prices soared to many pounds per kW/h, it's not always this low.
The most common tariff that offers these prices is capped at 100p/kWh (about 3-4x higher than the standard price). I've been on it for about 3 months and I never saw anything higher than the standard price.
You need to be on a tariff that tracks wholesale prices like the Octopus Agile one.