Knight Capital Group (KCG) told brokers Friday morning that the embattled market maker has received a badly-needed line of credit, raising hopes the firm reeling from a $440 million trading loss can survive the weekend without a bankruptcy filing.

In another boost of confidence, TD Ameritrade (AMTD) said it has resumed routing its client trades through Knight Capital after a careful review. 

Likewise, brokerage Scottrade resumed routing orders through Knight as of 12:30 p.m. ET and is confident in the firm's order execution capabilities, Reuters reported.

Shares of Knight Capital, the largest handler of stock orders for U.S. retail brokerages, surged as much as 33% on word the firm has received a line of credit and extended its gains to more than 60% on the brokerage news. Knight's shares closed up 56.98% to $4.05, though they remain at depressed levels when compared with a close of $10.33 on Tuesday before the technology issues emerged. 

However, it's not clear which lender or lenders are providing the line of credit, which is seen as a stop gap to replace losses from an erroneous trade, but J.P. Morgan Chase (JPM) is not believed to be the source of the financing.

In fact, J.P. Morgan suspended a revolving line of credit with Knight Capital in recent days, forcing the firm to go back into the market to try to retain a new one, FOX Business's Charlie Gasparino reported. 

Further, Goldman Sachs (GS) is awaiting regulatory approval to unwind erroneous trades executed by Knight Capital, though Goldman believes there is only an "outside chance" that unwinding won't take place this weekend, sources told Gasparino. 

The $440 million loss estimate supplied by Knight assumes the successful unwinding by Goldman Sachs.

One option to keep Knight afloat is a sale of convertible bonds that would give the firm breathing room but also massively dilute existing shareholders, Gasparino reported.

Knight is said to have drawn initial interest from private-equity firms KKR, TPG and Silver Lake, Bloomberg News reported. 

According to The New York Times, Knight is also in talks to sell its futures brokerage unit with possible buyers, including R.J. O'Brien, which calls itself the oldest and largest independent futures brokerage and clearing firm in the U.S.

Jersey City, N.J.-based Knight Capital has been thrust into turmoil by a software malfunction that caused the firm to buy $5 billion of NYSE-listed stock in just 20 minutes on Wednesday morning even though the order called for the transaction to take place over five weeks.

On the hook for the erroneous trades, Knight Capital warned a day later its capital base had been depleted by an estimated loss of $440 million, a stunning figure for a firm whose market value stood at just $250 million as of Thursday.

Knight Capital needs to raise about $200 million to unwind the bad trades and receive regulatory approval for a deal to save the firm on Friday to stay out of a bankruptcy, sources told Gasparino. 

Knight’s bankers at Sandler O’Neill have been racing for the past two days to string together a deal. Goldman Sachs (GS) is among the firms pitching financing deals, but it is not a paid advisor to Knight.

While Chicago-based Citadel LLC remains a potential savior, Virtu, a New York electronic-trading and market-making firm, is not interested right now, Gasparino reported.

The Knight glitch comes just months after a technology malfunction at Nasdaq OMX Group (NDAQ) marred the high-profile initial public offering of Facebook (FB).

Mary Schapiro, chairman of the Securities and Exchange Commission, weighed in on the Knight Capital matter on Friday, saying the agency will continue to review what happened and determine if any additional measures are needed to safeguard the markets. 

Schapiro said she asked her staff to "accelerate ongoing efforts" aimed at proposing a rule to require exchanges and other market centers to have specific programs in place to "ensure the capacity and integrity of their systems."

The Knight Capital incident "reflects the type of event that can raise concerns for investors about our nation’s equity markets -- markets that I believe are the most resilient, efficient, and robust in the world," said Schapiro.

Duncan Niederauer, the CEO of Big Board parent NYSE Euronext (NYX), said the Knight Capital situation is “unfortunate" and called on Congress and regulators to take action to address investors’ lingering concerns.

Niederauer said Knight CEO Thomas Joyce has done a good job handling the firm’s problems, but also warned recent technology issues are fueling a “crisis of confidence” among investors.

A bankruptcy filing at Knight Capital would seemingly imperil the jobs of the 1,418 people who work at the New Jersey firm, which was founded in 1995 and generated average daily volume of U.S. equities of $29.3 billion in 2011.

“These past two days have taken much from me,” Peter Kenny, a managing director at Knight Capital Group, wrote in a note. “But given me much more. Confirmation that at the end of the day, it is all about kindness and the human connection. Teamwork, selflessness and compassion. This place, Knight Capital, has an abundance of all three.”

Follow Matt Egan on Twitter @MattMEgan5