NEW YORK, June 24 (Reuters) - The cost for Wall Street to fund dollar-based trades rose on Friday to the highest in nearly three months as Britain's vote to leave the European Union stunned investors, causing reluctance to lend as global stock markets plunged.

The interest rate in the $3.8 trillion repurchase agreement market, where traders raise short-term cash from investors by pledging securities as collateral, was last bid at 0.80 percent, which was the highest since 0.85 percent on March 31, according to ICAP.

The overnight repo rate was quoted above 1 percent earlier Friday before retreating.

On Thursday before the surprise outcome of the U.K. referendum, the repo rate ended at 0.60 percent.

The scramble for traders to borrow dollars was also seen in the currency market.

The cost premium on three-month cross-currency swap contracts, measured by the three-month London interbank offered rate on dollars over the three-month rate on euros , was quoted about minus 46 basis points on Friday, ICAP data showed.

This was the steepest premium for players to exchange euro-denominated payments for dollar-pegged payments since early December.

Banks and hedge funds use these swaps for currency bets, while U.S. companies use them to hedge their non-dollar denominated bonds.

(Reporting by Richard Leong in New York and Anirban Nag in London; Editing by Chris Reese) ((richard.leong@thomsonreuters.com; +1 646 223 6313; Reuters Messaging: richard.leong.thomsonreuters.com@thomsonreuters.net; Twitter @RichardLeong2))