@Moderator_2
"next": "14.1.3",
I am using next js instead of node js to connect with WebSocketV2 directly from fronend.
It got connected and worked very fine with all the function defined in WebSocketV2 leaving WebSocketV2.fetchData function in smartapi-javascript\lib\websocket2.0.js which is upload in your github repo https://github.com/angel-one/smartapi-javascript/blob/main/lib/websocket2.0.js.
In documentation it said to pass parameter like :
{
"correlationID": "abcde12345",
"action": 1,
"params": {
"mode": 1,
"tokenList": [
{
"exchangeType": 1,
"tokens": [
"10626",
"5290"
]
},
{
"exchangeType": 5,
"tokens": [
"234230",
"234235",
"234219"
]
}
]
}
}
but while retriving in WebSocketV2.fetchData function which is in line number 127 of https://github.com/angel-one/smartapi-javascript/blob/main/lib/websocket2.0.js file is like
const { correlationID, action, mode, exchangeType, tokens } = json_req;
but i am passing data in different structure , so as to retrive the data i pass it has to be like :
const { correlationID, action, params : {mode, tokenList :{exchangeType, tokens} }} = json_req;
I request please provide the solution as soon as possible.
Thank you