Wa`alykum As-Salamu Warahmatullahi Wabarakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
1- Allah, Most High, doesn’t hold people accountable for what they do by mistake, with no intention of violating Shari`ah-based rules.
2- In your case, you are blameless for the period was thought to be over.
Focusing more on your question, the eminent Muslim scholar, Dr. `Abdul-Fattah `Ashoor, Professor of the Exegesis of the Qur’an at Al-Azhar Univ., states:
Brother, you are to know that as long as you mistakenly thought that your wife’s period was over, you are blameless for having sex with her.
If bleeding continues for more than 15 days, what is above the 15th day is considered Istihadah, in which the woman has to pray and you can have sex with her. She is also recommended, in this case, to seek medical checkup.
Allah Almighty knows best.