We show how one can estimate the multipole moments of the space–time, assuming that the quasi-periodic modulations of the X-ray flux (quasi-periodic oscillations), observed from accreting neutron stars or black holes, are due to orbital and precession frequencies (relativistic precession model). The precession frequencies Ωρ and Ωz can be expressed as expansions on the orbital frequency Ω, in which the moments enter the coefficients in a prescribed form. Thus, observations can be fitted to these expressions in order to evaluate the moments. If the compact object is a neutron star, constraints can be imposed on the equation of state. The same analysis can be used for black holes as a test for the validity of the no-hair theorem. Alternatively, instead of fitting for the moments, observations can be matched to frequencies calculated from analytic models that are produced so as to correspond to realistic neutron stars described by various equations of state. Observations can thus be used to constrain the equation of state and possibly other physical parameters (mass, rotation, quadrupole, etc.). Some distinctive features of the frequencies, which become evident by using the analytic models, are discussed.