Miami received international bonus pool money in the swap. The National League East squads announced the exchange on Wednesday.
Barraclough, 28, posted a 4.20 ERA and had 10 saves in 61 appearances last season for the Marlins. The right-handed reliever also had a 1-6 record in 2018. Barraclough was 6-2 in 2017 with a 3.00 ERA and one save in 66 appearances for the Marlins.
For his career, Barraclough has a 3.21 ERA, 11 saves and a 15-12 record in 227 appearances. Barraclough made his Major League Baseball debut in 2015 for the Marlins. He made $1.1 million this season and is eligible for arbitration in 2019.
Barraclough entered the league as a seventh-round pick by the St. Louis Cardinals in the 2012 First-Year Player Draft. The St. Mary's College of California product was traded to the Marlins in 2015 for right-handed pitcher Steve Cishek.