The hardness of the X-ray spectra of intermediate polars (IPs) is determined mainly by the white dwarf (WD) compactness (mass-radius ratio, M/R) and, thus, hard X-ray spectra can be used to constrain the WD mass. An accurate mass estimate requires the finite size of the WD magnetosphere R m to be taken into the account. We suggested to derive it either directly from the observed break frequency in power spectrum of X-ray or optical lightcurves of a polar, or assuming the corotation. Here we apply this method to all IPs observed by NuSTAR (10 objects) and Swift/BAT (35 objects). For the dwarf nova GK Per we also observe a change of the break frequency with flux, which allows to constrain the dependence of the magnetosphere radius on the mass-accretion rate. For our analysis we calculated an additional grid of twoparameter (M and R m /R) model spectra assuming a fixed, tall height of the accretion column H sh /R = 0.25, which is appropriate to determine WD masses in low mass-accretion IPs like EX Hya. Using the Gaia Data Release 2 we obtain for the first time reliable estimates of the mass-accretion rate and the magnetic field strength at the WD surface for a large fraction of objects in our sample. We find that most IPs accrete at rate of ∼ 10 −9 M yr −1 , and have magnetic fields in the range 1-10 MG. The resulting WD mass average of our sample is 0.79 ± 0.16 M , which is consistent with earlier estimates.