We provide a general formula for the refined topologically twisted index of $mathcal{N}=1$ gauge theories living on the world-volume of D3-branes at conical Calabi-Yau singularities in the Cardy limit. The index is defined as the partition function on $T^2 times S^2_omega$, with a partial topological twist and a $Omega$-deformation along $S^2$, in the presence of background magnetic fluxes and fugacities for the global symmetries and can be used to study the properties of a class of BPS black strings. To this purpose, we find rotating domain-wall solutions of five-dimensional gauged supergravity interpolating between AdS$_5$ and a near horizon region consisting of a warped fibration of BTZ over a sphere. We explicitly construct rotating domain-walls that can be embedded in AdS$_5 times S^5$ by uplifting a class of four-dimensional rotating black holes. We then provide a microscopic explanation of the entropy of such black holes by using the refined topologically twisted index of $mathcal{N}=4$ super Yang-Mills.