It may be hot in the nation's neighborhoods now, but the U.S. housing market is cooling off.

Signed contracts to buy existing homes fell 0.7 percent in July compared with June, according to the National Association of Realtors' pending home sales index. The gauge was down 2.3 percent compared with July 2017. That is the seventh straight month of annual declines. Pending home sales are an indicator of future closed sales.

"It's evident in recent months that many of the most overheated real estate markets — especially those out West — are starting to see a slight decline in home sales and slower price growth," Lawrence Yun, chief economist for the Realtors, said in a release. "The reason sales are falling off last year's pace is that multiple years of inadequate supply in markets with strong job growth have finally driven up home prices to a point where an increasing number of prospective buyers are unable to afford it."

Buyers have been struggling to find affordable homes this year, as the supply of homes for sale has fallen annually for most of the year. It was finally flat in July, but the market needs a significant surge in new listings in order to cool prices and boost sales.