Context : Aims : The aim of this paper is to provide a measurement of the mass accretion rate in a large , complete sample of objects in the core of the star forming region \rho  Oph . Methods : The sample includes most of the objects ( 104 out of 111 ) with evidence of a circumstellar disk from mid-infrared photometry ; it covers a stellar mass range from about 0.03 to 3 M _ { \odot }  and it is complete to a limiting mass of \sim 0.05 M _ { \odot } . We used J and K-band spectra to derive the mass accretion rate of each object from the intensity of the hydrogen recombination lines , Pa \beta  or Br \gamma . For comparison , we also obtained similar spectra of 35 diskless objects . Results : The results show that emission in these lines is only seen in stars with disks , and can be used as an indicator of accretion . However , the converse does not hold , as about 50 % of our disk objects do not have detectable line emission . The measured accretion rates show a strong correlation with the mass of the central object ( \dot { M } _ { acc } \propto M _ { \star } ^ { 1.8 \pm 0.2 } ) and a large spread , of two orders of magnitude at least , for any interval of M _ { \star } . A comparison with existing data for Taurus shows that the objects in the two regions have similar behaviour , at least for objects more massive than \sim 0.1 M _ { \odot } . The implications of these results are briefly discussed . Conclusions :