Apparatus is provided that is configured to be deployed in a lumen of a blood vessel of a subject. The apparatus includes a pump portion, including an anchor configured to engage a wall of the blood vessel in order to maintain the apparatus in place within the blood vessel, and a reciprocating valve coupled to the anchor and including a set of one or more leaflets. A valve driver is configured to drive the reciprocating valve in a reciprocating pattern between (i) a first state in which the leaflets are in an open configuration allowing blood flow through the reciprocating valve, and (ii) a second state in which the leaflets are in a closed configuration inhibiting blood flow through the reciprocating valve. Other embodiments are also described.