(Adds analyst quotes, background on recent data; updates prices)
* Canadian dollar at C$1.2771, or 78.30 U.S. cents
* Loonie touches its strongest level since June 24 at C$1.2765
* Bond prices mixed across flatter maturity curve
By Fergal Smith
TORONTO, Aug 18 (Reuters) - The commodity-linked Canadian dollar strengthened to a near eight-week high against its U.S. counterpart on Thursday as oil surged and minutes from the Federal Reserve's July meeting weighed on the greenback.
Oil prices were higher for a sixth straight day as the world's biggest producers prepared to discuss a possible freeze in production levels. U.S. crude CLc1 prices settled up $1.43 at $48.22 a barrel. O/R
"The main story of the whole month has been the price of oil ... that has been the driving force behind the appreciation in the loonie against the U.S. dollar for the month of August," said Darren Richardson, senior corporate dealer at CanadianForex.
The U.S. dollar fell against a basket of major currencies .DXY after the Fed minutes, released on Wednesday, showed a bias among policymakers against raising U.S. interest rates soon. think markets were hoping to see a bit more of a hawkish comment especially after the impressive employment figures at the beginning of the month," Richardson said.
Data on Aug. 5 showed a robust U.S. jobs gain for July which contrasted with a slump in domestic jobs for the same month and a record-wide Canadian trade deficit in June. Canadian dollar CAD=D4 was trading at C$1.2771 to the greenback, or 78.30 U.S. cents, stronger than Wednesday's close of C$1.2856, or 77.78 U.S. cents.
The currency's weakest level was C$1.2857, while it touched its strongest level since June 24 at C$1.2765.
Foreign investors bought a net C$9.02 billion ($7.03 billion) in Canadian securities in June, mainly in stocks, after buying C$13.99 billion in securities in May. government bond prices were mixed across the maturity curve, with the two-year CA2YT=RR bond down 0.5 Canadian cent to yield 0.575 percent and the benchmark 10-year CA10YT=RR rising 12 Canadian cents to yield 1.041 percent.
The curve flattened as the spread between the 2-year and 10-year yields narrowed by 1.6 basis points to 46.6 basis points, its narrowest since June 2008.
Canadian retail sales data for June and inflation data for July are awaited on Friday. ECONCA