1st of all, get a new realtor. 2nd of all, try another bank - one denial doesn't mean that every lender will say no. 3rd, take your contract to a real estate lawyer.
As with any question that asks "what does my contract say, what have I agreed to, and what are my rights?" no lawyer can respond in any meaningful way without reviewing the document in question.
PLEASE READ THIS BEFORE YOU COMMENT, EMAIL ME OR PHONE ME. I'm only licensed in CA. This answer doesn't make me your lawyer, and neither do follow-up comments and/or emails and/or phone calls, and you shouldn't expect me to respond to your further questions if you haven't hired me. We need an actual agreement confirmed in writing before any attorney-client relationship is formed. This answer doesn't constitute legal advice, and shouldn't be relied on, since each state has different laws, each situation is fact specific, and it is impossible to evaluate a legal problem without a comprehensive consultation and review of all the facts and documents at issue.