OpenApi-5p / py5paisa

Official Python SDK for 5paisa APIs natively written in VB .NET
https://5paisa.github.io
92 stars 68 forks source link

SSL Renegotiation issue in Websocket #248

Open mhdSharuk opened 1 year ago

mhdSharuk commented 1 year ago

Description

Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen.

I was trying to stream the index OHLCdata using the Live Market Feed Streaming in Google Colab. But it is producing ERROR:websocket:[SSL: UNSAFE_LEGACY_RENEGOTIATION_DISABLED] unsafe legacy renegotiation disabled (_ssl.c:1007) - goodbye. The expected results should be providing the correct OHLC data that is passed through the req_list variable

What I Did

NIFTY_SCRIP_CODE = 999920000
BANK_SCRIP_CODE = 999920005
FINNIFTY_SCRIP_CODE = 999920041

req_list = [
    { "Exch":"N","ExchType":"C","ScripCode": NIFTY_SCRIP_CODE},
    { "Exch":"N","ExchType":"C","ScripCode": BANK_SCRIP_CODE},
    { "Exch":"N","ExchType":"C","ScripCode": FINNIFTY_SCRIP_CODE},]

req_data=client.Request_Feed('mf','s',req_list)
def on_message(ws, message):
    print(message)

client.connect(req_data)
client.receive_data(on_message)
ATULRAHUL commented 1 year ago

i am also facing the same issue

lakhtomillion commented 1 year ago

Any solution for this ? this works on my local but same code on AWS EC2 fails only for socket connection