Here is a collection of libraries and APIs that bot developers may find useful when building their bots. Want to add your library here? Check out this section to suggest an edit.
forta-bot-templates is a repository of low-code bot templates developed by Forta community member Arbitrary Execution. All you have to do is modify a single json config file to build your bot. Some example templates include listening for a set of events and filtering by some conditions, or scanning for accounts that have interacted with Tornado Cash.
forta-flashloan-detector is an awesome library developed by Forta community member LimeChain. It provides a convenient way to detect whether transactions contain flashloans from various protocols including Aave, dYdX, Euler, Iron Bank and MakerDAO.
ethers-multicall is useful for querying lots of data from the blockchain without having to make multiple http requests. For example, if you want to query token balances for a list of addresses, you can use this library to fetch all the balances in a single http request.
rolling-math is an awesome library developed by Forta community member Arbitrary Execution. It is useful for bots that require analyzing trends across some time window.
lru-cache is great for adding caching capability to your bot. You can specify the maximum number of items you want to cache and keep only the most recently used items.
The Etherscan APIs are a great resource for bot developers. They can be used to answer questions like "which transactions was a given address involved in?" or "what is the ABI for a given contract address?". Note: make sure to use obfuscation if placing an Etherscan API key in your code.