How to create python trading bot with angel broking websocket API?

Hello, I’m trying to create a python bot to automate a trading strategy using Angelbroking websocket API.

Below is the API:

from smartapi import SmartWebSocket

FEED_TOKEN="YOUR_FEED_TOKEN"
CLIENT_CODE="YOUR_CLIENT_CODE"
token="EXCHANGE|TOKEN_SYMBOL"   
task="mw"   

ss = SmartWebSocket(FEED_TOKEN, CLIENT_CODE)

def on_message(ws, message):
    print("Ticks: {}".format(message))

def on_open(ws):
    print("on open")
    ss.subscribe(task,token)

def on_error(ws, error):
    print(error)

def on_close(ws):
    print("Close")

# Assign the callbacks.
ss._on_open = on_open
ss._on_message = on_message
ss._on_error = on_error
ss._on_close = on_close

ss.connect()

When I run this API, it prints the data of stock in the below format.

__on_open################
{'task': 'cn', 'channel': 'NONLM', 'token': '0979754982', 'user': 'V314538', 'acctid': 'V314538'}
2021-11-03 07:39:56.677136 : Start task in the backgroundon open

{'task': 'hb', 'channel': '', 'token': '0979754982', 'user': 'V314538', 'acctid': 'V314538'}
Ticks: [{'ak': 'ok', 'msg': 'connected', 'task': 'cn'}]
Ticks: [{'ak': 'ok', 'msg': 'heartbeat', 'task': 'hb'}]
Ticks: [{'name': 'tm', 'tvalue': '03/11/2021 13:09:57'}]
Ticks: [{'e': 'nse_cm', 'ltp': '2634.65', 'ltq': '20', 'ltt': 'NA', 'name': 'sf', 'tk': '2885'}]
Ticks: [{'ap': '2611.32', 'bp': '2635.00', 'bq': '5', 'bs': '15', 'c': '2572.40', 'cng': '62.25', 'e': 'nse_cm', 'lo': '2581.50', 'ltp': '2634.65', 'ltq': '20', 'ltt': '03/11/2021 13:09:56', 'name': 'sf', 'nc': '02.4199', 'sp': '2635.05', 'tbq': '223636', 'tk': '2885', 'to': '7830246702.96', 'tsq': '797931', 'v': '2998578'}]

I want to buy a stock when Parabolic SAR is bullish. How to do with this api?

I have a good understanding on how to create stock market charts and calculate technical indicators in case of historical data with DataFrames. I’m unable to understand how to calculate live data.

It’s my humble request to all knowledgeable people here, atleast give me a clue how to calculate technical indicator(any indicator) using this data. I have asked this question in the forum of the API provider but they don’t respond.

Ps: Please note that this API shows live data using print function.