With the technical growth and the reduction of deployment cost for distributed energy resources (DERs), such as solar photovoltaic (PV), energy trading has been recently encouraged to energy consumers, which can sell energy from their own energy storage system (ESS). Meanwhile, due to the unprecedented rise of greenhouse gas (GHG) emissions, some countries (e.g., Republic of Korea and India) have mandated using a renewable energy certificate (REC) in energy trading markets. In this paper, we propose an energy broker model to boost energy trading between the existing power grid and energy consumers. In particular, to maximize the profits of energy consumers and the energy provider, the proposed energy broker is in charge of deciding the optimal demand and dynamic price of energy in an REC-based energy trading market. In this solution, the smart agents (e.g., IoT intelligent devices) of consumers exchange energy trading associated information, including the amount of energy generation, price and REC. For deciding the optimal demand and dynamic pricing, we formulate convex optimization problems using dual decomposition. Through a numerical simulation analysis, we compare the performance of the proposed dynamic pricing strategy with the conventional pricing strategies. Results show that the proposed dynamic pricing and demand control strategies can encourage energy trading by allowing RECs trading of the conventional power grid.