All praise be to Allah, peace and blessings be upon Prophet Mohammad.
In principle, the pregnant and the breastfeeding are obliged to observe fast unless they feared harm, or hardship on themselves alone, or on themselves along with their babies due to either abstaining from food, drink and medication, or they were advised by a trustful and God-fearing physician not to fast. In such case, they are required to make up for the missed fasting days, and no ransom can replace that . However, if they broke fast for fear on their babies only, then they have to make up for the missed fasts and to pay a ransom which is a Mu`d of food (600 gr. of wheat, or rice) to a needy Muslim for each missed day. The value of the Mu`d is estimated at (60) piasters, and one who gives more is duely rewarded by Allah , The Almighty.
Alkhateeb Al-Shirbini (May Allah have mercy on him) said: “ If they feared harm on themselves similar to the harm inflicted upon a sick person, even along with their babies, then it is incumbent on them to make up for the missed fast without paying a ransom parallel to the ruling in the case of sickness. However, if they feared harm on their babies alone: the pregnant feared abortion, or the breastfeeding feared a decrease in her lactate, then it is incumbent that they pay a ransom along with making up for the missed fast.” {Moghni Al-Mohatajj}.
Nevertheless, if the fast was bearable, and there was no harm on the pregnant, or her fetus, then it is impermissible for her to break fast. Therefore, we recommend consulting a specialized physician to check your ability to observe fast. And Allah knows best.