The penetration of renewable resources and electric vehicles has increased in recent years due to various benefits such as reducing environmental pollution. This paper optimizes the energy management of a microgrid integrated with battery charging and swapping stations in the presence of renewable resources and crypto-currency miners as an emerging critical load with high energy consumption. In such structures, the fluctuation of renewable energies decreases reliability and increases energy market trading. Hence, the conditional value-at-risk index is utilized to analyze the risk of uncertainties. Furthermore, the influence of responsive local loads and incoming vehicles into the stations is investigated using demand response programs. In order to implement the presented programming, a real distribution network in Kermanshah, Iran, is selected as the case study. The results show that the risk-averse strategy with α = 0.85 and β = 0.8, reduces the expected revenue by about 636.355 $ compared to the risk-neutral strategy. In addition, the swapping station can be used as a bulk storage, where it stores about 43.56 MWh in low-price times and injects about 20.04 MWh in high-price times to support the local system. The demand side management also increases the revenue even under the worst-case conditions by about 79.623 $