Chlamydia while pregnant

Im 19 weeks & 1 day & I recently went to the doctor where she swabbed me to test for any infection or disease. So the doctor called me & told me it was positive for Chlymdia. I was very shocked because i know for a fact my partner has not cheated the whole 2 years we been together. Its very possible i had it for awhile from a previous partner right? & i feel like i have had it for awhile because i was having sex with someone unprotected & knowing he was sleeping with others also. (I was being very dumb & was not getting checked like i needed to at all until now)