Aid to financially troubled New York City cleared its last major hurdle yesterday as the Senate Banking Committee voted unanimously to provide federal guarantees for up to $1.5 billion of long-term city securities over the next four years.

Although $1.5 billion is less than the levels provided by the House or recommended by the Carter administration, sources said that, even if efforts on the floor of the Senate or in conference to raise the amount, are unsuccessful, "New York can live with it."

The House earlier overwhelming approved a bill up to $2 billion in long-term federal guarantees.

But because the interest that accrues on the securities is included in the total amount of loans the House bill would guarantee and is excluded from the Senate Banking Committee version, the difference between the two figures is about $300 million rather than $500 million.

Treasury Secretary W. Michael Blumenthal, who lobbied long and hard for the New York legislation, issued a statement that he was "delighted" with the vote because it shows that the House, the Senate and the administration agree on the concept of long-term aid for New York.

Sen. William Proxmire (D-Wis.) long had held that New York does not need additional federal assistance after a special government program expires June 30. City officials and the Carter administration said that, if the federal government did not help New York, the city would go bankrupt.

New York City has been unable to borrow on its own since 1975 when it became clear to investors that the city was running a sizeable deficit every year.

Since 1975, New York has made big spending cuts and plans to have its budget in actual balance - at present it is technically in balance by using long-term money to pay current expenses - by 1982.

The Senate Banking Committee yesterday provided that either the House or Senate could vote to cut guarantees to New York in 1981 or 1982.

The $1.5 billion of guarantees would be parceled out over four years under an amendment offered by Sen. Adlai Stevenson (D-III.). The federal government could guarantee up to $500 million in the first year another $500 million in the second year, and $250 million in each of the third and fourth years.

New York Mayor Edward Koch said he was happy with the unanimous 15-to-0 vote, but cautioned that 'nothing is done until it is done." Koch issued a statement that he would not trow a "party" until the bill is enacted by Congress and signed by the president.

Only last February, the Senate Banking Committee issued a report that claimed New York City did not need federal help and could solve its financial difficulties by relying upon the state, the city's pension funds and the banks.

But heavy lobbying changed the committee's stance, which Proxmire termed a "remarkable turnaround." One administration official termed the vote an "amazing victory."