We present 5 yr of optical and infrared data of the black hole candidate MAXI J1659−152 covering its 2010 outburst, decay, and quiescence. Combining optical data taken during the outburst decay, we obtain an orbital period of 2.414 ± 0.005 h, in perfect agreement with the value previously measured from X-ray dips. In addition, we detect a clear H α excess in MAXI J1659−152 with data taken during the outburst decay. We also detect a single hump modulation most likely produced by irradiation. Assuming that the maximum occurs at orbital phase 0.5, we constrain the phase of the X-ray dips to be ∼0.65. We also detect the quiescent optical counterpart at r′ = 24.20 ± 0.08, I = 23.32 ± 0.02, and H = 20.7 ± 0.1. These magnitudes provide colour indices implying an M2–M5 donor star assuming 60 per cent contribution from a disc component in the r′ band.