During fasting my penis started dripping with madhi drops due to some sexual thoughts at that time I just hold (not rub) my penis in my hand (by tip of my 4 fingers not even by complete hand) for few seconds and I felt like my sperm is about to ejaculate so I quickly left my penis from my hand. But after 5 seconds I ejaculated. It was completely unintentional. Now I want to know if my fast is ok or not?

Answered according to Hanafi Fiqh by Darulifta-Deoband.org

بسم الله الرحمن الرحيم

(Fatwa: 894/726/D=11/1437)

In the question mentioned above since the semen was discharged in the state of fasting hence your fast broke. Only its qaza is wajib, not kaffarah.

أو استمنيی بكفه فأنزل – قضی (الدر المختار مع الشامى 3/379 زكريا).

Allah knows Best!

Darul Ifta,
Darul Uloom Deoband