The serious problem of climate change has led the energy sector to modify its generation resources from fuel-based power plants to environmentally friendly renewable resources. However, these green resources are highly intermittent due to weather dependency and they produce increased risks of stability issues in power systems. The deployment of different flexible resources can help the system to become more resilient and secure against uncertainties caused by renewables. Flexible resources can be located at different levels in power systems like, for example, at the transmission-level (TSO), distribution-level (DSO) and customer-level. Each of these levels may have different structures of flexibility trading as well. This paper conducts a comprehensive review from the recent research related to flexible resources at various system levels in smart grids and assesses the trading structures of these resources. Finally, it analyzes the application of a newly emerged ICT technology, blockchain, in the context of flexibility trading.