error getaddrinfo ENOTFOUND wsportfolioupdate-api.upstox.com
Seeing this error on console while trying to connect
We are using this approach : Streamer Functions | Upstox Developer API
Edit : Created a ticket for this - Ticket ID: 9751875
error getaddrinfo ENOTFOUND wsportfolioupdate-api.upstox.com
Seeing this error on console while trying to connect
We are using this approach : Streamer Functions | Upstox Developer API
Edit : Created a ticket for this - Ticket ID: 9751875
@Rajesh_51191072 Which programming language you are using? Also the link from where you have downloaded the SDK. Official link for portfolio stream is different as mentioned here in the official code - upstox-nodejs/src/feeder/PortfolioDataFeeder.js at master Ā· upstox/upstox-nodejs Ā· GitHub
@DSingh Iām using NodeJS. SDK being used is the latest one available on ānpmā . Also, Iām not invoking any URL manually, it might be getting called internally by the SDK. Attaching a sample of the code here:
const UpstoxClient = require(āupstox-js-sdkā);
/** Current portfolio streamer instance for disconnect. */
let currentStreamer = null;
/**
Connect to Upstox Portfolio WebSocket for real-time order (and optional position/holding/GTT) updates.
@see https://upstox.com/developer/api-documentation/streamer-function#portfoliodatastreamer
*/
export async function connectPortfolioDataStream() {
const accessToken = readAccessToken();
const defaultClient = UpstoxClient.ApiClient.instance;
const OAUTH2 = defaultClient.authentications[āOAUTH2ā];
OAUTH2.accessToken = accessToken;
const streamer = new UpstoxClient.PortfolioDataStreamer();
currentStreamer = streamer;
streamer.connect();
streamer.on(āopenā, () => {
console.log(āPortfolio WebSocket: openā);
});
streamer.on(āmessageā, (data) => {
const feed = data.toString(āutf-8ā);
console.log(āPortfolio WebSocket: messageā + feed);
});
streamer.on(āerrorā, (err) => {
console.error(āPortfolio WebSocket: errorā, err?.message || err);
});
streamer.on(ācloseā, () => {
console.log(āPortfolio WebSocket: closeā);
if (currentStreamer === streamer) currentStreamer = null;
});
return streamer;
}
Note : This example is very similar to the one quoted on your official documentation here
Also, from the error, it doesnāt seem to be an issue with the code or SDK, rather, the DNS name is not being resolved anymore.
Did you guys accidentally bring down that endpoint (wsportfolioupdate-api.upstox.com), yet still unaware about it ?
PS: This was working perfectly up untill today afternoon. I have been using this SDK for the past 1 week without any issues.
@Ketan_Gupta Kindly check.
Same happening for me, it has stopped working some time around afternoon. The ELB is down.
Please fix this issue ASAP, our system we have developed locally relies on that portfolio stream socket.
Hi @Rajesh_51191072 @DSingh @SHAIK_43162122
This issue has been resolved, can you please check and confirm.
Thanks!
Yes, it has been fixed now. Thanks.
I also have a similar issue with my Market Data Feed Websocket , where i get a 403 when i try from my IP 65.20.75.231