  The process $e^+e^- \to K^+K^-$ has been studied using $1.7 \times 10^6$
events from a data sample corresponding to an integrated luminosity of 5.7
pb$^{-1}$ collected with the CMD-3 detector in the center-of-mass energy range
1010--1060 MeV. The cross section measured with an about 2\% systematic
uncertainty and it is used to calculate the contribution to the anomalous
magnetic moment of the muon $a_{\mu}^{K^+K^-} = (19.33 \pm 0.40) \times
10^{-10}$, and to obtain the $\phi(1020)$ meson parameters. We consider the
relationship between the $e^+e^- \to K^+K^-$ and $e^+e^- \to K^0_SK^0_L$ cross
sections and compare it to the theoretical expectations.
