This paper presents the design of an event-driven energy trading system among microgrids. Each microgrid can be either a provider or a consumer depending on the status of its energy generation and local demands. Under this approach, an aperiodic market model is newly proposed such that trading occurs when one of the consumers requests energy from the trading market. To promote the trading system, a consumer-side reward concept is introduced. The consumer makes a decision on the size of the posted reward to procure energy depending on its required energy level. Providers then react to this posted reward by submitting their energy bid. Accordingly, the posted reward is allocated to the providers in proportion to their energy bids. Moreover, for practical concerns, a transmission and distribution loss factor is considered as a heterogeneous energy trading system. The problem is then formulated as a non-cooperative Stackelberg game model. The existence and uniqueness of Stackelberg equilibrium (SE) are shown and the closed-form of the SE is derived. Using the SE, an optimal trading algorithm for microgrids is provided. The stability of the energy trading system is verified due to the unique SE. In this approach, no expected waiting time for trading is required for sustaining an energy trading market.