@trader_noob Can you share basic code of websocket! I am Currently fetching all the market data via Sapi I tried documentation of Smart api but still failed to work with websocket so also tried the example snippets available on the forum but not working for me so if you have websocket code which is working to fetch market data so can you share it to me so I can know the response structure and the coding structure of it
rahulvishwakarma
@rahulvishwakarma
Best posts made by rahulvishwakarma
Latest posts made by rahulvishwakarma
-
RE: Websocket error, suddenly lost connection. (14:50PM)
-
RE: Get LTP Data OHLC
Can you please provide me the code, How did you fetch OHLC, I am unable to fetch it
-
RE: header details needed?
@sayed Hi, please help me, I am also stuck on this, I am confused from where and how can I fill the required header details,
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-UserType': 'USER',
'X-SourceID': 'WEB',
'X-ClientLocalIP': 'CLIENT_LOCAL_IP',
'X-ClientPublicIP': 'CLIENT_PUBLIC_IP',
'X-MACAddress': 'MAC_ADDRESS',
'X-PrivateKey': 'API_KEY'
} -
Confused to setup Header Information
payload = "{\n"clientcode":"S162966",\n"password":"**********"\n}"
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-UserType': 'USER',
'X-SourceID': 'WEB',
'X-ClientLocalIP': 'CLIENT_LOCAL_IP',
'X-ClientPublicIP': 'CLIENT_PUBLIC_IP',
'X-MACAddress': 'MAC_ADDRESS',
'X-PrivateKey': 'API_KEY'
}