The integration of electricity and heat networks provides significant benefits by enhancing system flexibility and improving overall energy efficiency. Energy hubs play an important role in these interconnected systems, facilitating the production, conversion, and storage of energy across different forms. Potential flexible loads that may exist in an energy hub can further optimize its resource utilization and operational stability. In this respect, this paper addresses the day-ahead energy management of a residential complex modeled as an energy hub, incorporating medium-scale generation and storage units, as well as must-run and flexible loads. We also consider energy hub operator’s energy transactions in power distribution system and district heating and aim to obtain the optimal bidding strategy of this profit-driven agent. The negotiations among the energy hub operator, distribution system operator, and district heat network operator are modeled as a single-leader multi-follower Stackelberg game. A Nash Equilibrium of this game can be obtained by modeling the interactions among players as a bi-level optimization problem. The lower-level problems account for multi-period optimal power flow, modeled as an exact AC optimal power flow, and multi-period optimal thermal flow. The upper-level problem models the energy management of the energy hub. Replacing the lower-level problems with their optimality conditions, the optimal bidding of the energy hub operator can be obtained by solving the resulted mixed-integer linear programming problem as a mathematical program with equilibrium constraints. Finally, we numerically evaluate the proposed framework in a case study for a large residential complex participating in a power distribution and a heat network.