Context. Star formation occurs via fragmentation of molecular clouds, which means that the majority of stars born are members of binary systems. There is growing evidence that planets might form in circumprimary disks of medium-separation (<= 50 AU) binaries. The tidal forces caused by the secondary generally act to distort the originally circular circumprimary disk to an eccentric one. Since the disk eccentricity might play a major role in planet formation, it is of great importance to understand how it evolves. Aims. We investigate disk eccentricity evolution to reveal its dependence on the physical parameters of the binary system and the protoplanetary disk. To infer the disk eccentricity from high-resolution near-IR spectroscopy, we calculate the fundamental band (4.7 mu m) emission lines of the CO molecule emerging from the atmosphere of the eccentric disk. Methods. We model circumprimary disk evolution under the gravitational perturbation of the orbiting secondary using a 2D grid-based hydrodynamical code, assuming a-type viscosity. The hydrodynamical results are combined with our semianalytical spectral code to calculate the CO molecular line profiles. Our thermal disk model is based on the double-layer disk model approximation. We assume LTE and canonical dust and gas properties for the circumprimary disk. Results. We find that the orbital velocity distribution of the gas parcels differs significantly from the circular Keplerian fashion. The line profiles are double-peaked and asymmetric in shape. The magnitude of asymmetry is insensitive to the binary mass ratio, the magnitude of viscosity (a), and the disk mass. In contrast, the disk eccentricity, thus the magnitude of the line profile asymmetry, is influenced significantly by the binary eccentricity and the disk geometrical thickness. Conclusions. We demonstrate that the disk eccentricity profile in the planet-forming region can be determined by fitting the high-resolution CO line profile asymmetry using a simple 2D spectral model that accounts for the velocity distortions caused by the disk eccentricity. Thus, with our novel approach the disk eccentricity can be inferred from high-resolution near-IR spectroscopy data acquired prior to the era of high angular resolution optical (ELT) or radio (ALMA, E-VLA) direct-imaging. By determining the disk eccentricity in medium-separation young binaries, we might be able to constrain the planet formation theories.