Energy demand is increasing ubiquitously, and as cities grow larger they become more industrialized and more connected. Therefore new energy solutions that take advantage of today's smart cities capabilities (like intelligent infrastructure, sensors, actuators and citizen engagement) should be deployed. This work studies some aspects of the energy markets as part of the solution to the efficient procurement and management of energy in smart cities. Specifically, we present COLD Power, an autonomous broker agent which understands three types of local markets: a wholesale market, a tariff (retail) market and a balancing market. We show how this agent performed in this year's PowerTAC competition, which is an international smart energy simulated brokerage competition, and present an analysis of the results. Finally, we present some recommendations for designing autonomous broker agents.