* C$ at C$0.9793 versus the U.S. dollar, or $1.0211 * Lower oil and metal prices drag * Confined to range of just C$0.9768 to C$0.9809 * Ends week flat despite sharp Wall St drop * Focus turns to China trade data over weekend By Alastair Sharp TORONTO, Oct 12 (Reuters) - The Canadian dollar ended slightly weaker against the U.S. currency on Friday, with lower commodity prices weighing on sentiment and traders nervous about Chinese trade and economic growth data that will start to flow over the weekend. Still, the resource-linked currency ended the week just a few notches weaker than it started it, bucking the sharp declines in North American equity markets, which were spooked by early third-quarter earnings disappointments and uncertainty about a debt bailout for Spain. On Saturday, China is set to release trade figures for September, which are expected to show a pick-up in activity even though momentum will likely stay weak. China will report GDP numbers, industrial production and retail sales figures later next week. "We have apprehension about the Chinese trade data coming out on the weekend ... and the market has grown increasingly sensitive to those figures," said Adam Button, a currency analyst at ForexLive in Montreal. "The Canadian dollar is one of those currencies particularly sensitive to Chinese slowdown." China is the world's second largest economy, and a major buyer of the raw materials Canada exports. The Canadian currency closed at C$0.9793 versus the U.S. dollar, or $1.0211, down slightly from Thursday's North American session close of C$0.9787 to the greenback, or $1.0218. It moved in a narrow range of C$0.9809 and C$0.9768 in the session. Commodity prices and other currencies influenced by them also struggled as traders awaited clarity on whether heavily indebted Spain would request a bailout to shore up its finances. A bailout request is widely seen as positive as it would remove some uncertainty from financial markets. Canadian and U.S. stocks pulled back, posting their sharpest weekly declines in four months, as investors fretted over what is expected to be a weak earnings season. "It's been a disappointing week in stocks but the Canadian dollar has proven to be resilient once again," Button said. As caution waxed, Canadian government bond prices moved higher. The two-year bond gained 2 Canadian cents to yield 1.142 percent, while the benchmark 10-year bond added 7 Canadian cents to yield 1.801 percent. The Canadian dollar received some support from news that U.S. consumer sentiment unexpectedly rose in October to its highest level in five years as optimism about the overall economy improved. "Ultimately we need to see some signs that the North American economy is holding up," said Jeremy Stretch, head of foreign exchange strategy at CIBC World Markets in London.