MANAGUA, NICARAGUA, OCT. 31 -- President Daniel Ortega left today for a five-day trip to Moscow, at a time when Nicaragua faces mounting economic hardship and when the Soviet Union has begun to set limits to its aid.

Yesterday afternoon Ortega put an end to weeks of speculation about his trip by announcing that he will return home by Nov. 5, the first deadline for a peace plan he signed along with the four other Central American presidents. He will miss the most important day of the week-long celebration of the 70th anniversary of the Bolshevik Revolution, Nov. 7.

Ortega's truncated trip to Moscow for a major meeting of world leftist leaders reflects the bind Nicaragua is in: tugged toward a newly reluctant Soviet Bloc by its pressing material needs and pulled back to Central America because the peace accord could bring an end to U.S. aid for the rebel war that helped cripple Nicaragua's economy.

Discreet Soviet messages starting early this year that Nicaragua should not expect increased aid, and should use what it has more efficiently, contributed to Ortega's decision to sign the controversial Central American accord Aug. 7 in Guatemala, diplomats here said.

An Ortega visit to Moscow at another critical juncture, in April and May 1985, caused a shocked U.S. Congress to reverse itself on aid for the rebels, known as contras, and approve the first of two consecutive aid packages totaling $127 million.

"Nicaragua is not another state of the union. I don't have to give any explanation to the U.S. Congress about why I'm traveling to Moscow," Ortega said at a news conference yesterday.

The Nicaraguan president stopped in Havana for two hours of talks with Cuban President Fidel Castro.

"We have political ties with the Soviet Union we have to take care of," explained Vice President Sergio Ramirez in an interview earlier this month. "We're not interested in producing any chill with the Soviets because we've had a very positive relation with them which we're not the least ashamed of and want to cultivate."

Diplomats here from both East and West were surprised when the Soviets appeared to insist, in an invitation sent in early September, that Ortega be in their capital throughout a key week for Central America's peace plan. The compromise decision that he return early seemed a logical concession to regional pressures, the diplomats said. In recent public statements, Soviet officials strongly supported the Guatemala accord.

"If 60 percent of your economic aid comes from the Soviet Bloc, you go to Moscow. It's the place for contacts," said a top Foreign Ministry official.

The most painful unresolved issue is Nicaragua's oil supply. Minister for Foreign Cooperation Henry Ruiz, a Sandinista commander and the government's top liaison for Soviet Bloc economic aid, appealed Thursday at a gathering of Comecon officials here for 365,000 barrels of oil Nicaragua needs for the rest of this year.

Vice President Ramirez said he learned in meetings in June in Moscow that the Soviet government for the first time would not promise to cover Nicaragua's minimum budgeted petroleum requirements. In 1986 the Soviet Union provided 4.6 million barrels. This year it guaranteed only 2.2 million and instructed Ramirez to get the rest from other Eastern Bloc nations.

Over the summer Ramirez traveled to Hungary, Libya, Iran, Iraq, Czechoslovakia, Poland and East Germany, among other nations. But these countries were stingy with oil, which in some cases came from their own shrinking Soviet allocations.

"At the end of all those negotiations we didn't get the oil we needed. Perhaps the Soviets had a slightly different idea of how the discussions {with the other countries} would go," the vice president said. He added, "We would much prefer to have only one supplier: the Soviet Union."

In the first week of September a special envoy of Soviet leader Mikhail Gorbachev, Vladimir Zagladin, brought relief to Managua in the form of a pledge to supply 730,000 more barrels of oil. Zagladin also carried Ortega's invitation to the Bolshevik Revolution anniversary.

"As it stands now they are facing a real fuel bind come December," said one foreign economic analyst.

Ramirez noted, "The question is still open about what will happen next year." Meanwhile, the quality of the new Soviet fuel is reportedly so bad that it is causing cars to emit thick, gray smoke and has been blamed for four recent crashes of crop-dusting planes in northern Nicaragua.

"The U.S.S.R. is sending a clear message to Nicaragua -- there is a cap to its commitment," commented one ambassador in Managua. He theorized that the Soviets' new tack is part of a larger policy shift in Latin America to improve relations with nationalist governments rather than favoring radical revolutionary regimes and movements most antagonistic to the United States.

This year Soviet assistance apart from oil, and not including military equipment, will come to the equivalent of $350 million, Ortega said in a recent speech, with another $150 million from other Eastern Bloc nations. By contrast, aid from noncommunist countries amounted to about $100 million. The United States provides no aid to the Sandinista government and enforces an embargo on trade.

Most of the foreign aid comes in credit lines on "very easy terms," Ortega said.

The first glimmers of Soviet displeasure came with a visit in March by another official, Boris Yeltsin. He reportedly complained of low gas prices at the pump -- still at about 10 cents a gallon -- sloppy administration of Soviet aid and poor quality of Nicaraguan exports to the Soviet Bloc.

Yesterday Ortega said Nicaragua has had acute difficulties in unloading Soviet shipments because of outdated docks at the main Pacific port, Corinto. He conceded that Nicaragua also had serious problems maintaining thousands of trucks and jeeps that the Soviet Bloc has supplied.

In another policy change, the Soviet Bloc began to insist this year that Nicaragua pay back some of its estimated $2 billion debt by sending more exports to the East to meet its barter obligations. According to official figures, last year Nicaragua sent 12 percent of its goods to the Soviet Bloc; this year the figure was up to 40 percent.

But the shift has Nicaragua hurtling toward a hard currency crisis. Foreign Trade Minister Alejandro Martinez Cuenca said recently that Nicaragua will receive hard currency this year for only 8 percent of its exports, or a total of about $17 million. According to the Sandinista Economic Plan for 1987, the foreign trade deficit for this year is expected to be $520 million.

"Soviet Bloc aid is what makes this economy run. Without it Nicaragua would grind to a halt," said a foreign economist.

But Ramirez said, "Our aid from the Soviet Union and Cuba is very important. But we aren't considering integrating ourselves any further into the Soviet sphere."