  We present two transits of the hot-Jupiter exoplanet XO-2b using the Gran
Telescopio Canarias (GTC). The time series observations were performed using
long-slit spectroscopy of XO-2 and a nearby reference star with the OSIRIS
instrument, enabling differential specrophotometric transit lightcurves capable
of measuring the exoplanet's transmission spectrum. Two optical low-resolution
grisms were used to cover the optical wavelength range from 3800 to 9300{\AA}.
We find that sub-mmag level slit losses between the target and reference star
prevent full optical transmission spectra from being constructed, limiting our
analysis to differential absorption depths over ~1000{\AA} regions. Wider long
slits or multi-object grism spectroscopy with wide masks will likely prove
effective in minimising the observed slit-loss trends. During both transits, we
detect significant absorption in the planetary atmosphere of XO-2b using a
50{\AA} bandpass centred on the Na I doublet, with absorption depths of
Delta(R_pl/R_star)^2=0.049+/-0.017 % using the R500R grism and 0.047+/-0.011 %
using the R500B grism (combined 5.2-sigma significance from both transits). The
sodium feature is unresolved in our low-resolution spectra, with detailed
modelling also likely ruling out significant line-wing absorption over an
~800{\AA} region surrounding the doublet. Combined with narrowband photometric
measurements, XO-2b is the first hot Jupiter with evidence for both sodium and
potassium present in the planet's atmosphere.
