After years of a robust mortgage refinance market, fewer homeowners are swapping their old loans for new ones.

That's the conclusion from mortgage data collected by Ellie Mae, a Pleasanton, California-based company that provides residential mortgage technology for banks, credit unions and mortgage lenders.

Purchase loans move higher
In a statement, Ellie Mae President Jonathan Corr said 63 percent of all closed loans in Ellie Mae's April survey were to purchase a home. A year earlier, refinance loans made up 58 percent of the total.

"This was the highest percentage of purchase loans we've seen since we began reporting data in August 2011 and two percentage points higher than the previous high of 61 percent in October 2013," Corr said.

'Days to close' shrinks
That said, mortgage lenders closed refinance loans more quickly in April, taking just 37 days, while purchase loans took 40. Collectively, the days to close averaged 39 days, the first dip to fewer than 40 days in the history of Ellie Mae's data.

The report covers only aggregated data and doesn't disclose information about specific borrowers or their loans, the company said.

FHFA: Refinancing drops
Separately, the Federal Housing Finance Agency (FHFA) reported a similar decline in mortgage refinance activity for the first three months of 2014.

The FHFA reported approximately 370,000 loans were refinanced during the quarter, of which some 77,000 were through the Home Affordable Refinance Program (HARP).

The first quarter of 2014 was the fourth straight in which total refinances and HARP refinances declined, the FHFA said in a statement. Total refinance volume in March alone had not been as low since 2008.

Refinances for the last five years totaled more than 19 million, of which 3.1 million were through HARP, the FHFA said.

HARP still open
HARP enables borrowers who owe more than their home is worth to refinance if they meet the program requirements. One requirement is that the borrower's loan must be owned or guaranteed by Fannie Mae or Freddie Mac. Another is that the loan must have been originated on or before May 31, 2009.

HARP expires on Dec. 31, 2015.

This article originally appeared on HSH.com

More mortgage articles can be found on HSH.com:

Current mortgage rates

Mortgage refinancing starter kit

Why hasn't everyone refinanced?