In this study, we analyze the accuracy of the stellar occultation technique to detect the oxygen number density and temperature in near space. Based on the validation of the algorithm related to stellar occultation using a single wavelength of 762 nm, the simulation and inversion are performed using the oxygen absorption A-band, and the results are compared with SABER observations to calculate the deviation. Then, the distribution of the detection accuracy with wavelength, latitude, and altitude is analyzed. The results show that the radiant transmittance of the basic observation varies significantly with wavelength and altitude, and it is not sensitive to a change of latitude. The inversion results of each wavelength at different latitudes can be combined, and it can be seen that the 754–769 nm band is preferred for oxygen and temperature detection. Therefore, analyzing the accuracy results of the specific wavelength 757.84 nm at different latitudes, the temperature accuracy can reach 0.1 K in the stratosphere at both low and high latitudes and 0.6–34 K at middle latitudes. The temperature detection accuracy in the mesosphere at each latitude reaches about a dozen K. The deviation of the inversion results at middle latitudes is larger in the thermosphere, and at the other two latitudes, it is about a few dozen K. From the analysis of relative deviation, excluding the deviation of 95–100 km, the deviation of other altitudes is within the ideal range, and the minimum can reach 0. The accuracy of the oxygen number density increases with latitude, and the relative deviation of the middle and high latitudes is around 10–20%. Based on the above results, it is concluded that the technique of starlight occultation exhibits high accuracy for detecting atmospheric parameters in the near space region, and the results lay the technical foundation for the independent development of stellar occultation.