It is narrated from Sayyiduna Mu'adh bin Jabal (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) had cupping done while he (peace and blessings be upon him) was fasting.
Hadith Referenceالمعجم الكبير للطبراني / باب الميم / 17316