Harvest and reinvest example in ApeSwap.
Using the Matic Network, harvesting and reinvesting any pair (APE-MATIC pair by defect), all tokens are pairs of MATIC for now.
Put your new pairs editing the json addresses.
Before running the script remember to put your private wallet key in the script
Installation:
npm install
Launch with:
node ape.js -p TOKEN