Algo Trading Service Agreement Terms

We would be launching an algotrading service where our algorithm will trade in the client account. We have used Zerodha and Upstox API to build this system and user will log in and there API daily keys are stored in database after which the system places orders and manages the trade without any manual intervention.
Now my qurery is to all the knowledgeable members of this forum is this whether this service can get us in legal trouble incase there are losses and the customer wants to sue us. We tried to see many document on this subject but we are not sure on how to set the terms and conditions and legalities.
Any help will be highly appreciated.