In cognitive radio networks, one key feature of spectrum trading is its short term or, even, real time, since the spectrum availability, quality, and price keep changing over time. Therefore, a spectrum pricing policy should be dynamically optimal. In this work, we address the real-time optimal pricing problem for primary users. Based on differential game model, we analyze the optimal pricing strategy for QoS-aware dynamic networks in which the secondary users' number and primary users' QoS level keep changing over time. Nash equilibrium is derived and an optimal pricing and QoS setting policy is formulated. Since the Nash equilibrium of our differential game based model deals with optimal pricing in each time instance, the real-time optimal pricing characteristic can be realized.