We define functors on the derived category of the moduli space M of stable sheaves on a smooth projective surface (under Assumptions A and S below), and prove that these functors satisfy certain relations. These relations allow us to prove that the given functors induce an action of the elliptic Hall algebra on the K-theory of the moduli space M, thus generalizing the action studied by Nakajima, Grojnowski and Baranovsky in cohomology.