SYDNEY, July 3 (Reuters) - The Australian dollar edged up against the U.S. dollar on Wednesday as domestic data on retail spending surprised on the upside, but gains were capped by a weak Chinese yuan. The kiwi, however, struggled to pull up from a key chart level.

The two, however, stood tall versus the battered yen, at near three-decade highs thanks to robust demand from carry trades - where a currency with low interest rates is borrowed to invest in a currency with higher yields.

The Aussie rose 0.1% to $0.6675, building on a 0.1% gain overnight but remaining within its recent trading range of $0.6576 to $0.6705.

It climbed 0.2% to 107.87 yen, just a touch below its 33-year top of 107.93 yen hit two days ago.

The kiwi dollar was flat at $0.6078, after finishing the previous session little changed. It was pinned near its 200-day moving average of $0.6070 and a break of resistance at 61 cents is seen as needed to improve its near-term outlook.

A fresh slide in the Chinese yuan to 7.31 per dollar also weighed on the Aussie, which is often sold as a liquid proxy for the yuan, reflecting Beijing's position as the largest buyer of Australian resources.

Earlier, a private survey showed the expansion in the services sector in China was losing steam.

Australian retail sales showed a 0.6% increase for May, beating market forecasts of 0.2%. Much of the gain was due to discounting and early sales events, which tempted consumers who were otherwise struggling with stubborn inflation and high mortgage rates.

"We'll be looking at the next retail sales print (due 30 July) to gauge whether there is any meaningful upward momentum in today's result," said analysts at ANZ.

"If the June retail data are strong, inflation comes in higher than the RBA’s forecasts and the labour market remains resilient, there is a chance the RBA could hike in August."

The Reserve Bank of Australia, which was caught off guard by an upward revision to consumer spending in the first quarter, will be waiting for more data to gauge whether the current cash rate of 4.35% is restrictive enough.

While consumption has cooled as desired, there is a risk it could pick up again when sweeping tax cuts take effect this month. Rising home prices are also inflating home owners' wealth.

Futures markets imply a 30% probability that RBA will have to tighten further in August, while seeing just 20 basis points of easing by the end of 2025.

The risk of another rate hike to bring inflation down has sent local bonds falling as they lost some of the shine against Treasuries.

Australian 10-year bonds were yielding 4.419%, slightly lower than the 4.4277% in 10-year Treasuries. They were yielding 40 basis points lower than U.S. counterparts in April.

(Reporting by Stella Qiu; Editing by Edwina Gibbs)