Between the 1st and the 19th of March, you can buy fireworks in Valencia. This is the period of the Fallas festival.
Obviously there are rules for setting of fireworks. The police will act strictly when necessary. Just behaive and setting of your fireworks at the designated areas.
This list of firework shops is updated: March 20th 2016.