We present time-resolved 10.4-m GTC and 4.2-m WHT intermediate resolution spectroscopy of the X-ray transient MAXI J1820+070 (=ASASSN-18ey) obtained during its decline to the quiescent state. Cross-correlation of the 21 individual spectra against late-type templates reveals a sinusoidal velocity modulation with a period of 0.68549 ± 0.00001 d and semi-amplitude of 417.7 ± 3.9 km s −1 . We derive a mass function f(M)=5.18 ± 0.15 M , dynamically confirming the black hole nature of the compact object. Our analysis of the stellar absorption features supports a K3 − 5 spectral classification for the donor star, which contributes ≈ 20% of the total flux at 5200-6800Å. The photometric 0.703 ± 0.003 d periodicity observed during outburst is 2.6 % longer than the orbital period supporting the presence of a superhump modulation in the outburst light curves. In line with this interpretation, we constrain the binary mass ratio to be q 0.12. In addition, we observe a sharp increase in the Hα emission line equivalent width during inferior conjunction of the donor star that we interpret as a grazing eclipse of the accretion disc and allows us to constrain the binary inclination to i 69 • . On the other hand, the absence of X-ray eclipses during outburst imply i 77 • . These inclination limits, together with our dynamical solution, lead to a black hole mass in the range 7-8 M . We also measure a systemic velocity γ = −21.6 ± 2.3 km s −1 which, combined with the Gaia DR2 proper motion and parallax, implies a large peculiar velocity ∼100 km s −1 .