Serendipity2-0 / TradeManV1

0 stars 0 forks source link

Phase1 Onboarding new clients without touching the DB #30

Closed Serendipity2-0 closed 1 month ago

Serendipity2-0 commented 2 months ago

Onboarding New Clients Without Touching DB

Description

We need to implement a process for onboarding new clients and starting their trading activities without directly interacting with the database. This involves creating a schedule, clearing old data, and refactoring our FastAPI endpoints to ensure all interactions are handled through proper models and validation.

Acceptance Criteria

  1. We can add new clients and start their trading without manually changing our database
  2. We have a clear step-by-step plan for when and how to add each new client
  3. Clear the old trademan_clients collection so that we can start on-boarding the clients in the same collection
  4. Our system is updated to:
    • Collect all necessary information when a new user signs up
    • Use web addresses (URLs) to get any extra information we need
    • Check that all client information is correct and in the right format before using it
  5. All of these changes ensure we never have to manually edit the database

All of these changes ensure we never have to manually edit the database

Tasks

Admin

Backend - @VarshitaTP

Frontend - @Anand-ak7

Additional Notes

Related Issues

Serendipity2-0 commented 1 month ago

@varshitavarshu Please add the onboarding calendar here. We can edit if there are any changes later.

Attached Onboarding Calender link below👇

https://1drv.ms/x/s!AsRu5T9zzOj9ywMDkVg4aS1cthpd?e=B4HjtX

Attached TradeManClientsDetails PDF folder link below👇

https://1drv.ms/f/s!AsRu5T9zzOj9ykjOIbk3GGnYH5dy?e=RqH8Kd

Attached TradeManClientsDetails excel folder link below👇

https://1drv.ms/x/s!AsRu5T9zzOj9ywIv-84JsMZsCZ9l?e=jQ6tMl

Link to the detailed documentation of onboard meetings👇

https://1drv.ms/f/s!AsRu5T9zzOj9yxyLCzdIzj5EH0UE?e=pL0tQX

VarshitaTP commented 1 month ago

🔖TradeMan Account Creation Guide - Step-by-Step Instructions

📩 Enquiry 📝 BrokerAccountCreated ✅ BrokerAccountActivated 📝DDPI_Completed 💰 FundsAdded 🎉 TradeManOnboard_Completed 🚀 TradingActivated ⏸️AccountSuspension 🚪AccountClosed

1.📩 Enquiry

(I am adding the first text to be sent once we receive any new enquiry)

Thanks for reaching out to TradeMan! We’re excited to assist you with our trading services. We’ll get back to you shortly with the details. For any immediate questions, just reply here or call us at +91 8618221715 .

TODO Add details of our services and how it works so as to make both employee and user understand.

2.📝 BrokerAccountCreated

Attached the Firstock Broker Account creating link below.Use the below link to create the account.

📈https://signup.thefirstock.com?p=SRP18

Attached the Firstock account opening process 📄docx link below.For any confusion regading account opening process refer the below document.

https://1drv.ms/b/s!AsRu5T9zzOj9ywTEZ0NICfgWoDTE?e=sgslfB

📄Required Documents List.

  1. Client Active Mobile Number
  2. Client Active Email-id
  3. Client AadharCard PhotoCopy
  4. Client PAN PhotoCopy
  5. Client Signature PhotoCopy
  6. Client's Last Six Months BankStatement

NOTE After successful registration the client will receive an email having USER-ID and Password. Collect the details and change the password.

📞 FIRSTOCK CUSTOMER SUPPORT CONTACT NUMBER (For any additional query contact this number below👇) +91 9900199801 or +91 7760462442

Once the account is created successfully send the below message to our client👇

We are pleased to inform you that your Firstock trading account has been successfully created through TradeMan.

To complete the setup, kindly share the email you received from Firstock containing your User ID and Password with us.

If you have any questions or need assistance, feel free to reach out.

Thank you for choosing TradeMan.

3.✅ BrokerAccountActivated

Once the user share the User ID and Password , login with the below link 👇 📈https://login.thefirstock.com/#/

Change the password by asking the manager for the Password to be set. Enable TOTP in setting (click on server status on the nav bar and select security and enable totp ) Create new Email-id in the format [Serendipity.clientname@gmail.com] and update this Email-id in the Firstock account profile.(Go to server status and click on BO Reports . select profile and under contact details edit the Email by updating the new mail)

Once all the above is done send the below message to our client 👇

We are excited to inform you that your trading account is now activated!You can start adding funds at your convenience.

Let us know when you're ready, and we'll send you the UPI link for payment via GPay, PhonePe, or any UPI app.Alternatively, you can also select net banking for payment.

Your [ALICEBLUE/FIRSTOCK/ZERODHA] login credentials are as follows:

UserID: [Your UserID] Password: [Your Password] Email: [Your Email]

If you have any questions or need further assistance, feel free to contact us.

Thank you for choosing TradeMan!

note- The password will be reset for every 180 days from firstock and will be sent to registered email. login and change the passwords.

Once the client approaches for adding the funds send below👇 message

Thank you for choosing to add funds to your trading account. To proceed, please provide the following details:

Amount: The amount you wish to add. Bank Name: The name of your bank. Account Number: Your bank account number. Account Holder Name: The name of the account holder. IFSC Code: The IFSC code of your bank branch.

Once we receive these details, we'll take care of the rest for you. If you have any questions or need further assistance, feel free to contact us.

Thank you for choosing TradeMan!

4.📝DDPI_Completed

Online procedure

👇Use below link to set DDPI online👇

https://update.thefirstock.com/ddpi

Procedure👇

1.Enter Fistock credentials. 2.Click on Enable DDPI. 3.Accept the terms and conditions & click on continue. 4.Authenticate by logging in via Google or verify through an email verification code. 5.Enter the OTP. 6.Click on submit. 7.click on sign now. 8.Accept the terms and conditions & Enter the Aadhaar number. 9.click on send OTP. 10.Enter the OTP. 11.Click on Verify & Sign.

OR

offline procedure

I.Download the below DDPI form and get the signature from our client.

👇link have DDPI form and signature guide👇

https://1drv.ms/f/s!AsRu5T9zzOj9yn9rh3hKAHpq2PV2?e=KlGYZo

II.Courier the signed form to Firstock office.

Courier Address : FIRSTOCK 1st floor, No 350 36th A Cross 5th Block 7th Main Jayanagar Bangalore - 560041

III.Followup with them so as they will complete the setup.

📞+91 9900199801 or +91 7760462442

IV.Once setup is done we will receive the acknowledgement to the registered mail-id.

👇Once the DDPI is set successfully send the below message to our client👇

We are pleased to inform you that the Demat Debit and Pledge Instruction (DDPI) process for your TradeMan account has been successfully completed. This update ensures that all your securities transactions will continue to be processed smoothly and securely.

If you have any questions or need assistance, please feel free to reach out.

Thank you for choosing TradeMan.

5.💰 FundsAdded

Once the client is ready to add funds, login with the User ID and TOTP/New Password and add the fund. (Firstock login link is already added above in 3rd point) (Go to margins on the nav bar and click on Add Funds. fill the details like Amount , Bank name , Account number and select UPI - Continue. This will send a payment notification to user UPI id .Ask our client to make payment )

Make sure the added fund is reflecting in the account.Once the fund is added successfully send the below message to our client👇

We are pleased to inform you that the funds of [Rs.Amount] have been successfully added to your trading account.

If you have any questions or need assistance, please feel free to reach out.

Thank you for choosing TradeMan.

6. 🎉 TradeManOnboard_Completed

TODO Add Onboarding process document

Once Onboarding is completed send the below message to our client👇

We are pleased to inform you that your TradeMan Onboarding process is completed successfully. Opted Strategy : Commission Details :

We will inform you once trading starts, and it will be managed automatically by our TradeMan.

If you have any questions or need assistance, please feel free to reach out.

Thank you for choosing TradeMan.

7.🚀 TradingActivated

We are excited to announce that trading has officially started today at Trademan!

Our carefully crafted trading strategies are now live in the [Segment Name], focusing on [Sub Segment Name]

We have allocated [Example : 50% for mid-term and 25% for long-term strategies], designed to maximize effectiveness and potential gains.

If you have any questions or need assistance, please feel free to reach out.

Thank you for choosing TradeMan.

8.⏸️AccountSuspension

(Send below👇message to our clients when they ask to stop trading for time being)**

We have received your request to temporarily stop trading on your account. As per your instructions, we will halt all trading activities effective immediately.

If you would like to resume trading , please let us know, and we will act accordingly.

If you have any questions or need further assistance, please feel free to reach out to us.

Thank you for choosing TradeMan.

9.🚪AccountClosed

(Send below👇message to our clients when they need to permanently close TradeMan account)**

I. If in Profit

Dear [Client's Name],

We are writing to confirm the closure of your account with TradeMan as per your request.

We are pleased to inform you that your trading activities have resulted in a profit. Here are the details of your account:

Initial Investment: [Amount] Current Amount in Trading Account: [Amount] Profit: [Amount] As per our agreement, the profit/loss is shared equally, with 50% allocated to you and 50% allocated to TradeMan. Therefore, your share of the profit is[Amount].

The total amount to be transferred to you is your initial investment plus your share of the profit, which amounts to[Amount]. We will process this transfer to your designated bank account within the next few business days.

If you have any specific instructions or need further assistance, please do not hesitate to contact us.

Thank you for your time and trust in TradeMan. We wish you all the best in your future endeavors.

Best regards, TradeMan

II. If in Loss

Dear [Client's Name],

We are writing to confirm the closure of your account with TradeMan as per your request.

Unfortunately, your trading activities have resulted in a loss. Here are the details of your account:

Initial Investment: [Amount] Current Amount in Trading Account: [Amount] Loss: [Amount] As per our agreement, the loss is shared equally, with 50% allocated to you and 50% allocated to TradeMan. Therefore, your share of the loss is [Amount].

The total amount to be transferred to you is your initial investment minus your share of the loss, which amounts to [Amount]. We will process this transfer to your designated bank account within the next few business days.

If you have any specific instructions or need further assistance, please do not hesitate to contact us.

Thank you for your time and trust in TradeMan. We wish you all the best in your future endeavors.

Best regards, TradeMan

👇SOME MESSAGES LISTS TO BE SENT TO CLIENTS DEPENDING ON THEIR REQUESTS👇

1.Additions of funds confirmation message👇 (Send below message to our clients whenever they add funds further)

We are pleased to inform you that your recent fund addition of [Amount] has been successfully processed and credited to your TradeMan account. Your updated account balance is [Updated Balance].

If you have any questions or need further assistance, please feel free to reach out to us.

Thank you for choosing TradeMan.

2.Withdraw of funds confirmation message 👇(Send below message to our clients whenever they needs funds withdrawal)

This is to confirm that your recent withdrawal request of [Amount] has been successfully processed. The funds have been debited from your trading account, and your updated account balance is [Updated Balance].

If you have any questions or need further assistance, please feel free to reach out to us.

Thank you for choosing TradeMan.

3.Quarterly settlement by SEBI / Broker message 👇(Send below message to our clients when the quarterly settelment happens from Broker account(eg., Zerodha/Aliceblue/Firstock)

We are pleased to inform you that the SEBI Quarterly Settlement from the broker account has been successfully completed.

Your current funds of [amount] are now available in your account. You can choose to add more funds or continue trading with the available balance, depending on your investment strategy and goals.

If you have any questions or need further assistance, please feel free to reach out to us.

Thank you for choosing TradeMan.

4. Commission message👇

I.ON REQUEST(Send below message to our clients when they request commission amount)

We are pleased to inform you that your trading activities have resulted in a profit. As per our agreement, the profit/loss will be shared equally, with 50% allocated to you and 50% allocated to TradeMan.

We have calculated your share of the profit from last settlement to till date to be [amount], and our commission to be [amount]. We have transfered your profit amount of [amount] to your account.

Thank you for choosing TradeMan.

II.WEEKLY message👇(Send below message to our clients weekly when on profits)

We are pleased to inform you that your trading activities have resulted in a profit. As per our agreement, the profit/loss will be shared equally, with 50% allocated to you and 50% allocated to TradeMan.

We have calculated your share of the profit on this week to be [amount], and our commission to be [amount]. We have transfered your profit amount of [amount] to your account.

Thank you for choosing TradeMan.

EVERYDAY MESSAGES TO SHARE WITH OUR CLIENTS

TODO

Additional information

👇Use the below link to get each clients FIRSTOCK API_SECRET_KEY and VENDOR_ID 👇

https://connect.thefirstock.com/

steps 1.Click on the above link 2.Click on the Generate Key on top right. 3.Enter User ID, Password, DOB/PAN and click on Login 4.Click on the generate key and we will get API_SECRET_KEY and VENDOR_ID AND API_SECRET_KEY expiry date.

👇LINK BELOW IS FOR FIRSTOCK MOBILE APPLICATION👇

Check out "Firstock - Investing Simplifie" https://play.google.com/store/apps/details?id=com.noren.firstock

👇LINK BELOW IS FOR FIRSTOCK COMMUNITY👇 This link is to discuss technical and non technical issues regarding Firstock connect[Login with user id , password and post the occuring issues and later we will be posted back with the solution]

https://community.thefirstock.tech/

👇BIRTHDAY WISHES FORMAT👇

On behalf of the entire TradeMan team, I’d like to extend our warmest wishes on your birthday.

May your day be filled with joy, and the year ahead bring continued success and prosperity.

Best regards,
TradeMan

Serendipity2-0 commented 1 month ago

@VarshitaTP Prepare telegram message for each stage of onboarding: 1. Enquiry Response 2. First stock document list 3. First stock account opening confirmation message 4. Onboarding confirmation message with strategy and commission details 5. Additions/Withdrawals confirmation message 6. Quarterly settlement message 7. Account suspension message 8. Commission request message 9. Account closing message

Prepare them as and when necessary and edit in below comment

Serendipity2-0 commented 1 month ago

This mission is complete with 3 screen recording of onboarding is complete and 10 people are onboarded. P0 until 3 people are onboarded.

12Jul: Finish api and front end integration.

amolkittur commented 1 month ago

Example JSON for the DB:

{
  "Tr00": {
    "Accounts": {
      "Equity": {
        "CapitalAllocation": 100,
        "11Jul24_Equity_FreeCash": 141558.6,
        "11Jul24_Equity_Holdings": 81028
      },
      "01Jul24_Portfolio_AccountValue": 141559,
      "01Jul24_Portfolio_FreeCash": 141558.6,
      "01Jul24_Portfolio_Holdings": 81028,
      "02Jul24_Portfolio_FreeCash": 141507.7,
      "02Jul24_Portfolio_AccountValue": 141507.7,
      "02Jul24_Portfolio_Holdings": 81028
    },
    "Active": true,
    "Broker": {
      "ApiKey": "asdasd",
      "ApiSecret": "asd",
      "BrokerName": "Zerodha",
      "BrokerPassword": "K@asdf",
      "BrokerUsername": "asdf",
      "SessionId": "asdf",
      "TotpAccess": "dgh"
    },
    "Profile": {
      "AadharCardNo": "234",
      "AccountStartDate": "03Jul23",
      "BankAccountNo": "234",
      "BankName": "State Bank of India",
      "DOB": "25Apr90",
      "Email": "nightysky123123asdkk@gmail.com",
      "GmailPassword": "a",
      "Name": "Omkar Hegde",
      "PANCardNo": "asddfasdf",
      "PhoneNumber": "+asdfsadf",
      "RiskProfile": {
        "AreaOfInvestment": [
          "Debt",
          "Equity",
          "Derivatives"
        ],
        "Commission": "50-50",
        "DrawdownTolerance": "35",
        "Duration": "12 months",
        "WithdrawalFrequency": "OnRequest"
      },
      "pwd": "a",
      "usr": "0"
    },
    "Strategies": {
      "Equity": {
        "MidTerm": {
          "AllocationPercent": 50,
          "Strategy1": {
            "AllocationPercent": 33.33,
            "Qty": 28,
            "RiskPerTrade": 1,
            "StrategyName": "Midterm_Strategy1"
          },
          "Strategy2": {
            "AllocationPercent": 33.33,
            "Qty": 28,
            "RiskPerTrade": 1,
            "StrategyName": "Midterm_Strategy2"
          },
          "Strategy3": {
            "AllocationPercent": 33.33,
            "Qty": 28,
            "RiskPerTrade": 1,
            "StrategyName": "Midterm_Strategy3"
          }
        }
      }
    },
    "Tr_No": "Tr00"
  }
}

In this if the client is opting for derivaives we need to add the derivatives dict in the accounts section and note down the capital allocation percentage and also in the strategies we must add the derivatives dict along the capital allocation.

Anand-ak7 commented 1 month ago

Image

Image

Image

Image

Image

Image

Attacted the UI screenshots.

amolkittur commented 1 month ago

@Anand-ak7

@VarshitaTP Once Anand completes this task we will start on-boarding. Till then prepare all the documents and the values which are required for on-boarding.

amolkittur commented 1 month ago

@VarshitaTP

amolkittur commented 1 month ago

@VarshitaTP

amolkittur commented 1 month ago

@VarshitaTP

amolkittur commented 1 month ago

@VarshitaTP Add the enchancement document for onboarding changes which i had mentioned in the comments above

Serendipity2-0 commented 1 month ago

@VarshitaTP Well done with phase one! Onto phase 2!