The inclusive $D_s^{\pm}$ production asymmetry is measured in $pp$ collisions collected by the LHCb experiment at centre-of-mass energies of $\sqrt{s} =7$ and 8 TeV. Promptly produced $D_s^{\pm}$ mesons are used, which decay as $D_s^{\pm}\to\phi\pi^{\pm}$, with $\phi\to K^+K^-$. The measurement is performed in bins of transverse momentum, $p_{\rm T}$, and rapidity, $y$, covering the range $2.5