NEW YORK, July 16 (Reuters) - The dollar rose on Tuesday, on track for a second straight daily gain, after a reading of retail sales proved to be firmer than expected, but was still soft enough to keep expectations intact for a rate cut from the Federal Reserve this year.

U.S. retail sales

were unchanged

in June, topping expectations of economists polled by Reuters for a decline of 0.3%, as a drop in receipts at auto dealerships was offset by strength elsewhere, a show of consumer resilience that boosts economic growth prospects for the second quarter.

"It isn't so much the overall number, but it's the ex-autos number, which was up considerably more than expected," said Joseph Trevisani, senior analyst at FX Street in New York.

"The auto sales are being depressed by interest rates so aside from that and of course the housing market, it looks like the consumer's still doing pretty well and we all know that's the base of the U.S. economy."

Other data showed import prices were unchanged in June, as a rebound in the price of food was offset by lower energy prices, giving the Fed cushion to cut interest rates this year.

The dollar index, which measures the greenback against a basket of currencies, gained 0.07% at 104.31, but was off its earlier high of 104.51. Against the Japanese yen, the dollar strengthened 0.28% at 158.46.

While markets only see a slim chance for a rate cut of at least 25 basis points (bps) by the Fed at its July meeting, a cut is being fully priced in for the September meeting, according to CME's FedWatch Tool.

Sterling weakened 0.07% at $1.2957 ahead of British inflation data due on Wednesday while the euro shed 0.03% at $1.0891 ahead of a European Central Bank (ECB) policy meeting scheduled for Thursday.

The ECB is largely expected to keep rates steady, putting the focus on comments from President Christine Lagarde for clues on the timing of the next rate cut following a 25 bps reduction in June.

On Monday, Federal Reserve Chair Jerome Powell said the second quarter's three U.S. inflation readings "add somewhat to confidence" that the pace of price increases is returning to the Fed's target in a sustainable way.

The Canadian dollar strengthened 0.03% versus the greenback at 1.37 per dollar, bouncing back from a drop of as much as 0.21%, after the country's slower-than-expected rise in consumer prices in June bolstered expectations that yet another rate cut by the Bank of Canada may be in the offing next week.

Cryptocurrencies rose modestly following a rally in the prior session, along with shares of companies that could benefit from a Trump presidency, after an assassination bid on the Republican candidate boosted expectations that he would win the November election.

Bitcoin gained 1.58% at $64,780.28 while ethereum rose 0.83% at $3463.60.

(Reporting by Chuck Mikolajczak; Editing by Andrea Ricci and Nick Zieminski)