This varies depending on the lender. Typically if you do not have a purchase agreement in place lenders will require you to pay a fee to lock the rate in. However, many lenders will lock the rate for free once you have a sales agreement and complete the 1003 uniform residential loan application.