The Senate yesterday approvated the New York City financial aid bill, providing the city with $1.65 billion in fedeal loan guarantees, and sent the compromise legislation to President Carter for his signature. The House had passed the measure which was worked out in a joint conference committee on Tuesday.

The legislation is part of a $4.5 billion long-term financing package that is supposed to return New York city's budget to a balanced condition in four years and let it take care of all its short-term and long-term borrowing needs by that time.

The bill replaces a three-year seasonal loan program that provided the city with up to $2.3 billion in federal funds but which had to be repaid annaully. The legislation was enacted in 1975 to avert a New York bankruptcy and expired last June 30.

In New York, meanwhile, an agreement in principle was announced on the entire $4.5 billion package. But Municipal Assistance Corp. chairman Felix G. Rohatyn said, "A lot of pieces still have to be put together" before the complex financial package can closed.

Rohatyn said he expected negotations on the terms, maturities and takedown schedules for the banks, union pension funds, and insurance companies who are also particpating as lenders to the city to take until mid-September before the package can be signed.

The city expects to have enough money until the middle of September to meet its own financing needs. However, it can also draw on some short-term financing provided in the federal legislation if that becomes necessary.

"I expect to see the city in the public credit markets for short-term financing sometime this fall and I hope they can be in the public market for long-term borrowing in two years," he said. "In four years the city should be totally self sufficient."

The bill easily passed the Senate but banking committee chairman William Proxmire (D-Wisc.) voted "no" although he served as floor manager for the bill.

"I am fundamentally opposed because I don't think it was needed," Proxmire told the Senate, reiterating a previous stand. "I think New York could have made it on its own."

Rohatyn had praised the senator who, he said, could have used his position as banking committee chairman to torpedo the bill but instead helped to advance the bill although he opposed it in principle.

Under the legislation, the guarantees would apply to loans to the city from its municipal employe pension funds who are already loaded with city debt. The guarantees would not apply to loans from the banks, insurance companies and other private lenders.

The government now issues about $300 billion in loan guarantees to enterprises ranging from satellites to fishing boats. In 1971 the government guaranteed up to $250 million in bank loans to Lockheed Aircraft Corp. But it has up to now never extended guarantees to underwrite the credit of a large city government.

New York will pay a fee for the guarantees which is expected to more than pay for the administrative costs of the new program and, barring a default, would involve no actual outlays or costs to taxpayers.

There are two further bills that are still needed before Treasury Secretary W. Michael Blumenthal can issue the guarantees. One is an appropriation bill and the other bill weighs certain rules to allow the New York city employe pension funds to increase their loans to the city.