We present new X-ray observations obtained with Chandra ACIS-S of the HD 189733 system , consisting of a K-type star orbited by a transiting Hot Jupiter and an M-type stellar companion . We report a detection of the planetary transit in soft X-rays with a significantly larger transit depth than observed in the optical . The X-ray data favor a transit depth of 6-8 % , versus a broadband optical transit depth of 2.41 % . While we are able to exclude several possible stellar origins for this deep transit , additional observations will be necessary to fully exclude the possibility that coronal inhomogeneities influence the result . From the available data , we interpret the deep X-ray transit to be caused by a thin outer planetary atmosphere which is transparent at optical wavelengths , but dense enough to be opaque to X-rays . The X-ray radius appears to be larger than the radius observed at far-UV wavelengths , most likely due to high temperatures in the outer atmosphere at which hydrogen is mostly ionized . We furthermore detect the stellar companion HD 189733B in X-rays for the first time with an X-ray luminosity of \log L _ { X } = 26.67 erg s ^ { -1 } . We show that the magnetic activity level of the companion is at odds with the activity level observed for the planet-hosting primary . The discrepancy may be caused by tidal interaction between the Hot Jupiter and its host star .