New York also gets a player to be named as part of the deal.
Peralta, 29, is 2-1 with two saves and a 5.40 ERA in 10 relief appearances with the Giants this season and is 9-9 with a 4.72 ERA and two saves in nine major league seasons with Cincinnati (2016-19) and San Francisco (2019-21). He throws fastballs, sliders and changeups, mixing in occasional sinkers, and his fastball averages 95 mph.
Last season, Peralta went 1-1 with a 3.29 ERA in 25 relief outings. Left-handed hitters were just 7-for-41 (.171) against him.
Tauchman, 30, is 3 for 14 (.214) in 11 games and has a .250 average with 26 doubles, 13 home runs, 63 RBIs and 16 stolen bases over five major league seasons with Colorado (2017-18) and the Yankees (2019-21). Tauchman was acquired by the Yankees from the Rockies for left-hander Phillip Diehl on March 23, 2019.
San Francisco lost outfielder Mike Yastrzemski on Sunday to a mild oblique strain. Yastrzemski had an MRI exam Monday, and manager Gabe Kapler said the Giants were hopeful the outfielder could avoid a trip the injured list.
Peralta has a $925,000, one-year contract, is eligible for arbitration after the season and can become a free agent after the 2023 season.
Tauchman has a $624,200 salary while in the major leagues and $301,550 while in the minors. He could be eligible for arbitration for the first time after this season.