ChartInk Discussion _ 23_11_2020 UX - theheapdump/kite-webapp GitHub Wiki

(a) For Look and Feel Refer Image:

https://drive.google.com/file/d/12EqJQtck9Ts078lHLX6oJqvHKZKtPy7h/view?usp=sharing

Notable Features:

  1. Mix of White and Blue / Grey Highlight in alternate rows

  2. No Column borders/separators and no row borders

  3. White Background

(b) For Content / TradeBull - Alerts Actual UX Refer Image:

https://drive.google.com/file/d/1-uev04uaCGaDUoDMGmDe0MpVEhV1nLUc/view?usp=sharing

Notable Features:

  1. Top left corner inside chart-ink page, an info Icon (i).

    -> On hover: WebHook URL

    -> On click: Actual WebHook URL

  2. On Top of the Table, there will be three icons in the same order as in the mock-up.

    Note: {On Hover Text to be taken care} for all the icons

    -> Disable All Icon - To disable all the alerts with a confirmation dialog {Standard Confirmation Dialog}

    -> Delete All Alerts - To delete all the alerts with a confirmation dialog {Standard Confirmation Dialog}

    -> Plus Icon - To Add A New Chart Ink Alert

  3. Table {Headers are : S.No | Alert Name | Transaction Type | Profit(%) | Loss(%) | Quantity | Status | Actions

    -> S.No shall be sequential 1....10 | Current product limitation is 10 alerts | Free tier only 1 alert

    -> Type - Buy / Sell

    -> Profit & Loss %age - {with 0.05 increase / decrease}

    -> Status should be a switch Green / Red - Green is enabled; Red is disabled

    -> Actions is three dots {vertical/horizontal} based on the icon availability and how each looks on the real UI

    -> The {...} should be clickable and should be noticeable on the UI and should appear as clickable

    -> On click of {...}, a small pop-up shall appear like e.g. 1 https://drive.google.com/file/d/1kFm88QI-s-oL8po3kv7eu9fWvaylpjaI/view?usp=sharing and e.g. 2 https://drive.google.com/file/d/1iE9qr5xWFSYafgvZQMAJeHsmHeSBWRPf/view?usp=sharing

    -> The options available in the above pop-up will be. {Edit & Delete}. This has room for any future Actions like {share, export, etc.}

    -> Click on Delete should send a REST API call for individual DELETE

    -> Click on Edit should open a small pop-up. The location of the pop-up can be either

         -> https://drive.google.com/file/d/1Yy-NY8PS0FzT_d9X89IdQ0PvWYec16F5/view?usp=sharing 
            On the side not hiding the main table OR in the middle of the screen over the table 
    
         ->  When the pop-up is shown | clicking outside should not have any impact.
    
         -> The pop up will be the same for Add and Edit 
    
         -> The pop up should not contain the Enable / Disable switch button.
    
         -> Refer to this image for add/delete pop-up: https://drive.google.com/file/d/11NV_fsxGyB_WlF_7-XraNDgCr4rfHjcE/view?usp=sharing
    
         -> Add / Delete popup will have save / cancel buttons. and an optional cross button to close the window
    
         ->  If the close icon is there -> it should have the same behavior as cancel
    
         ->  Cancel may or may not have a confirmation.
    
         -> Save should send a backend API call for add/update respectively.
    

    -> Every column should have a feature to sort on that column in the future as per the availability. As of today, sort should be provided on alert name and Type.


23/11/2020

  1. Configuration

     --- Add 1 alert  - [{name , loss% , profit% ,*** qty , active/inactive }]
     --- Add multiple alerts [ {name , loss% , profit%} , {}]
    

POST https://35.187.245.85:8080/tb/ui/v1/actions/cinkalert

Request Body : {"ca_cfg":[{"an":"adee_alert","pp":"1.3","lp":"1.4","qt":1,"act":false},{"an":"adee_alert2","pp":"1.2","lp":"1.4","qt":2,"act":true}]}

Response Body : {"redirectTo":null,"status":"SUCCESS","status_message":"Succesfully Saved 2 alerts","response":{"ca_cfg":[{"an":"adee_alert2","pp":1.2,"lp":1.4,"qt":2,"act":true},{"an":"adee_alert","pp":1.3,"lp":1.4,"qt":1,"act":false}]}}

	--- Update Single Alert - [{name , loss% , profit% ,*** qty}]
	--- Update multiple alerts - [{name , loss% , profit% ,*** qty}]

PUT https://35.187.245.85:8080/tb/ui/v1/actions/cinkalert

Request Body same as POST (add)

Response Body : { "redirectTo": null, "status": "SUCCESS", "status_message": "Succesfully updated 2 alerts.", "response": { "ca_cfg": [ { "an": "adee_alert", "pp": 1.3, "lp": 1.4, "qt": 100, "act": false }, { "an": "adee_alert5", "pp": 1.2, "lp": 1.4, "qt": 2, "act": true } ] } }

	--- Delete single Alert [internal_id]
	--- Delete multiple /all alerts [internal_id]

	--- GET ALL Alerts 

GET https://35.187.245.85:8080/tb/ui/v1/actions/cinkalert

Request Output : {"redirectTo":null,"status":"SUCCESS","status_message":"Found 2 alerts for the customer","response":{"ca_cfg":[{"an":"adee_alert2","pp":1.2,"lp":1.4,"qt":2,"act":true},{"an":"adee_alert","pp":1.3,"lp":1.4,"qt":1,"act":false}]}}

	--- Enable / Disable  one [{internal_id}] SWITCH
	--- Enable / Disable  all [{internal_id}] SWITCH

	--- Get Webhook URL {backend / frontend} + UX 
	--- UI feature {infinite scroll}


													SAVE CANCEL


	-- Add should by default keep trigger disabled (default disabled)

  1. Runtime + DB

https://docs.google.com/presentation/d/1gGAw5P8Z8Gjh5dGgePdaZHegHrlIMS7t/edit#slide=id.p3


############################# NEW REST API - 13/12/2020 ##########################

new REST API to get WebHook URI

GET https://35.187.245.85:8080/tb/ui/v1/actions/cinkalert?webhook=true Response

{ "redirectTo": null, "status": "SUCCESS", "status_message": "WebHOOK URL is generated succesfully.", "response": { "wu": "https://35.187.245.85:8080/tb/ui/v1/cink/XA1346/run" } }

Response of run / execute command

{ "redirectTo": null, "status": "SUCCESS", "status_message": "Successfully Executed alert", "response": { "altId": "aBHnyb299145078bDhPBC" } }

New REST API to get execution status for this execution

GET https://35.187.245.85:8080/tb/ui/v1/actions/cinkalert?altrunid=aBHnyb299145078bDhPBC

Response

{ "redirectTo": null, "status": "SUCCESS", "status_message": "400 - Exception occured in KiteOperations : placeOrder | MIS (intraday) are blocked as the markets are not open for trading today. Try placing an AMO order.", "response": null }

############################# NEW REST API - 13/12/2020 ##########################