With the advent of the nanosat/cubesat revolution, new opportunities have appeared to develop and launch small (∼ 1000 cm 3 ), low-cost (∼ US$ 1M) experiments in space in very short timeframes (∼ 2 years). In the field of high-energy astrophysics, in particular, it is a considerable challenge to design instruments with compelling science and competitive capabilities that can fit in very small satellite buses such as a cubesat platform, and operate them with very limited resources. Here we describe a hard X-ray (30-200 keV) experiment, LECX ("Localizador de Explosões Cósmicas de Raios X" -Locator of X-Ray Cosmic Explosions), that is capable of detecting and localizing within a few degrees events like Gamma-Ray Bursts and other explosive phenomena in a 2U-cubesat platform, at a rate of ∼5 events year −1 . In the current gravitational wave era of astronomy, a constellation or swarm of small spacecraft carrying instruments such as LECX can be a very cost-effective way to search for electromagnetic counterparts of gravitational wave events produced by the coalescence of compact objects.