The Marlins also will receive $250,000 in international bonus slot money.
Realmuto, 27, hit .277 with a career-high 21 home runs and 74 RBIs in 125 games last season for the Marlins, earning his first All-Star selection. The five-year veteran owns a career .279 batting average with 59 home runs during his Major League Baseball tenure.
Realmuto joined the Marlins as a third round pick in the 2010 MLB June Amateur Draft out of Carl Albert High School in Midwest City, Okla. He is set to make $5.9 million in 2019 and is eligible for arbitration in 2020.
Alfaro, 25, hit .262 with 10 home runs and 37 RBIs in 108 games last season for the Phillies.
Sanchez, 20, is the Phillies' No. 1 overall prospect, according to MLB Pipeline. The right-handed pitcher posted a 2.51 ERA and a 4-3 record in eight starts last season for the Clearwater Threshers in the Florida State League.
Stewart, 21, posted a 2.06 ERA in 20 starts last season at the single-A level. The lefty also posted an 8-1 record for the Lakewood BlueClaws of the South Atlantic League.
Sanchez ranked as the No. 21 overall prospect in baseball. The transaction is pending physicals for the players involved.