Motivated by the markets operating on fast time scales, we present a framework for online coalitional games with time-varying coalitional values and propose real-time payoff distribution mechanisms. Specifically, we design two online distributed algorithms to track the Shapley value and the core, the two most widely studied payoff distribution criteria in coalitional game theory. We show that the payoff distribution trajectory resulting from our proposed algorithms converges to a neighborhood of the time-varying solutions. We adopt an operatortheoretic perspective to show the convergence of our algorithms. Numerical simulations of a real-time local electricity market and cooperative energy forecasting market illustrate the performance of our algorithms: the difference between online payoffs and static payoffs (Shapley and the core) to the participants is little; online algorithms considerably improve the scalability of the mechanism with respect to the number of market participants.