US President Joe Biden and top Republican lawmaker Kevin McCarthy today were edging close to an agreement on the US debt ceiling, according to a person familiar with the talks, with the two sides just $70 billion apart on a deal that would involve trillions of dollars.

The deal aims to raise the government's $31.4 trillion debt ceiling in exchange for limits on government spending.

Negotiations are going down to the wire as the Treasury Department has warned the government could run short of funds to cover all its expenses as soon as June 1, which without a deal could trigger an economically catastrophic default.

The deal would specify the total amount the government could spend on discretionary programs like housing and education, another source said, but not break that down into individual categories. Lawmakers would fill in the blanks in the weeks and months to come.

McCarthy said earlier in the day that the two sides were making progress.

"We worked well past midnight last night," McCarthy told reporters.

"There's still some outstanding issues and I've directed our teams to work 24/7 to try to solve this problem."

Representative Kevin Hern, who leads the powerful Republican Study Committee, told Reuters a deal was likely by Friday afternoon.

Even as Republicans tout progress, McCarthy is preparing to possibly let lawmakers leave Washington on Thursday for a week-long holiday recess, with the proviso that they need to be ready to return for a vote. The Senate is currently out but on similar orders to be ready to return.

Time is running short. A US default could upend global financial markets and push the United States into recession.

But Treasury's forecast is not iron-clad and some private sector analysts reckon the government could go another week without defaulting, which has led some hardliners in McCarthy's caucus to dismiss the significance of the June 1 deadline.

Credit rating agency DBRS Morningstar put the United States on review for a possible downgrade on Thursday, echoing similar warnings by Fitch, Moody's and Scope Ratings. Another agency, S&P Global, downgraded US debt following a similar debt-ceiling standoff in 2011.

The months-long standoff has spooked Wall Street, weighing on US stocks and pushing the nation's cost of borrowing higher. The yield on US Treasury bills maturing in early June climbed in early Thursday trading, in a sign of investor unease.

Deputy US Treasury Secretary Wally Adeyemo said concerns about the debt ceiling had pushed up the government's interest costs by $80 million so far.

"Ultimately that's money that's out of the American people's pockets," he told an investment industry conference in Washington.