live data feed on websocket2


  • is there any one getting live data in python thru smartwebsocket2?
    i have tried to put token =3045 in parse_binary _data and changed
    def _parse_token_value(binary_packet):
    token = ""

        for i in range(len(binary_packet)):
            if binary_packet[i] == b'\x00':
                print(binary_packet)
                return token
            token += binary_packet[i].encode("UTF-8")
        print(token)    
        return token
    

    but result i get is
    In on pong function==> b'\x00'
    In on pong function==> b'\x00'
    In on pong function==> b'\x00'

    any help will be highly appriciated


  • Hi @sajy

    Thank you for your interest in using the beta version of Python SDK for websocket 2.0. We have shared this code as open source, so you are free to use and modify it as needed.

    Please note that we are not currently maintaining the SDK and are not able to provide support for it. If you encounter any issues or bugs while using the code, you may need to address them on your own or seek help from the community or other users of the SDK.

    Our documentation for Websocket 2.0 (https://smartapi.angelbroking.com/docs/WebSocket2) is clear and comprehensive, and can be used as a reference for creating your own SDK or improving the existing SDK. If you have any questions or need help with the code, you can refer to the documentation or reach out to the community for assistance.

    If you would like to contribute to the development of SDKs, you are welcome to make changes and improvements to the code and submit pull requests.

    Thank you.