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 \pm 0.00001 d and semi-amplitude of 417.7 \pm 3.9 km s ^ { -1 } . We derive a mass function f ( M ) = 5.18 \pm 0.15 M _ { \odot } , dynamically confirming the black hole nature of the compact object . Our analysis of the stellar absorption features supports a K 3 - 5 spectral classification for the donor star , which contributes \approx 20 \% of the total flux at 5200-6800 Å . The photometric 0.703 \pm 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 \simeq 0.12 . In addition , we observe a sharp increase in the H \alpha 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 \gtrsim 69 ^ { \circ } . On the other hand , the absence of X-ray eclipses during outburst imply i \lesssim 77 ^ { \circ } . These inclination limits , together with our dynamical solution , lead to a black hole mass in the range 7–8 M _ { \odot } . We also measure a systemic velocity \gamma = -21.6 \pm 2.3 km s ^ { -1 } which , combined with the Gaia DR2 proper motion and parallax , implies a large peculiar velocity \sim 100 km s ^ { -1 } .