First off, in the case of gravitational systems, there are ONLY attractive forces as opposed to electromagnetic interactions which have both attraction and repulsion.
The various interactions in a gravitational system are:
the Kinetic Energy of the individual planet
the Potential energy due to attractions from other planets
the potential energy due to attraction between the Sun and the particular planet.
In actuality the Sun has a slight wobble due to Jupiter’s revolution but we can use Born-Oppenheimer approximation to presume that the Sun is unmoving.