Socket
Socket
Sign inDemoInstall

truedata-nodejs

Package Overview
Dependencies
11
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.13 to 1.0.14

26

feed.js

@@ -179,2 +179,9 @@ const WebSocket = require('ws');

else if (jsonObj.interval) {
const bar = jsonObj.interval
jsonObj.data.forEach(barArray=> {
rtFeed.emit('bar', handleFullFeedBarData(barArray, bar));
})
}
else if (jsonObj.success) {

@@ -196,6 +203,2 @@ switch (jsonObj.message) {

// if (!hearbeatCheckerCalled) {
// hearbeatChecker();
// hearbeatCheckerCalled = true;
// }
jsonObj.symbollist.forEach((d) => {

@@ -372,2 +375,17 @@ touchlineData[d[1]] = handleTouchline(d);

function handleFullFeedBarData(barArray, bar) {
return {
Symbol: touchlineMap[barArray[1]],
SymbolId: barArray[1],
Bar: bar,
Time: barArray[0],
Open: +barArray[2],
High: +barArray[3],
Low: +barArray[4],
Close: +barArray[5],
Volume: +barArray[6],
OI: +barArray[7],
};
}
async function fetchSymbolNames(username, password, symbolNamePath, date) {

@@ -374,0 +392,0 @@

11

hisorical.js

@@ -55,5 +55,2 @@ const axios = require('axios');

authEvent.emit('resolve');
setTimeout(() => {
this.auth(user, pwd, true);
}, Math.max(token.time - Date.now(), 100));

@@ -66,3 +63,3 @@ return true;

}
}
}
};

@@ -206,3 +203,7 @@

.get(`https://api.truedata.in/getAllSymbols?segment=all&user=${user}&password=${pwd}&search=${symbol}`)
.catch((err) => console.log(err.response.data.Mesage));
.catch((err) => {
if (err.response && err.response.data && err.response.data.Mesage) console.log(err.response.data.Mesage);
else if (err.response.data) console.log(err.response.data);
else console.log(err.response);
});
}

@@ -209,0 +210,0 @@ if (auth) config = bearer();

{
"name": "truedata-nodejs",
"version": "1.0.13",
"version": "1.0.14",
"description": "Truedata's Official Nodejs Package",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc