api_connect_nodejs 1.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/conf/settings.ini +9 -10
- package/enums/streamingConstants.js +11 -0
- package/index.js +2 -2
- package/package.json +2 -14
- package/src/{edelconnect.js → apiConnect.js} +401 -182
- package/src/{edelweissApiUtils.js → apiUtils.js} +1 -1
- package/src/config.js +1 -1
- package/src/feed/feed.js +139 -0
- package/src/feed/liveNewsFeed.js +112 -0
- package/src/feed/ordersFeed.js +124 -0
- package/src/feed/quotesFeed.js +121 -0
- package/src/http.js +1 -0
- package/src/iniparser.js +4 -3
- package/src/logger.js +1 -1
- package/validations/{edelconnectValidator.js → apiConnectValidator.js} +77 -188
- package/validations/feedStreamerValidator.js +68 -0
- package/.prettierrc.json +0 -19
- package/gitignore +0 -23
- package/src/feed.js +0 -166
- package/validations/feedValidator.js +0 -31
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
</a>
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
|
-
>
|
|
11
|
+
> API's to trade from Nuvama
|
|
12
12
|
|
|
13
13
|
## Prerequisites
|
|
14
14
|
|
|
@@ -23,9 +23,9 @@ npm install api_connect_nodejs
|
|
|
23
23
|
|
|
24
24
|
## Documentation
|
|
25
25
|
|
|
26
|
-
https://
|
|
26
|
+
https://nuvamawealth.com/api-connect/
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
## Author
|
|
30
30
|
|
|
31
|
-
👤 **
|
|
31
|
+
👤 **Nuvama**
|
package/conf/settings.ini
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
[GLOBAL]
|
|
2
2
|
|
|
3
3
|
UserAgent =
|
|
4
|
-
BasePathLogin = https://
|
|
5
|
-
BasePathEq = https://
|
|
6
|
-
BasePathComm = https://
|
|
7
|
-
BasePathMf = https://
|
|
8
|
-
BasePathContent = https://
|
|
9
|
-
EquityContractURL = https://
|
|
10
|
-
MFContractURL = https://
|
|
4
|
+
BasePathLogin = https://nc.nuvamawealth.com/edelmw-login/login/
|
|
5
|
+
BasePathEq = https://nc.nuvamawealth.com/edelmw-eq/eq/
|
|
6
|
+
BasePathComm = https://nc.nuvamawealth.com/edelmw-comm/comm/
|
|
7
|
+
BasePathMf = https://nc.nuvamawealth.com/edelmw-mf/mf/
|
|
8
|
+
BasePathContent = https://nc.nuvamawealth.com/edelmw-content/content/
|
|
9
|
+
EquityContractURL = https://nc.nuvamawealth.com/app/toccontracts/instruments.zip
|
|
10
|
+
MFContractURL = https://nc.nuvamawealth.com/app/toccontracts/mfInstruments.zip
|
|
11
11
|
|
|
12
|
-
ApiIdKey = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.
|
|
12
|
+
ApiIdKey = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHAiOjAsImZmIjoiVyIsImJkIjoid2ViLXBjIiwibmJmIjoxNjcxMTcwMzEzLCJzcmMiOiJlbXRtdyIsImF2IjoiMi4wLjAiLCJhcHBpZCI6ImE5YmIyMTZkMDI3ZThjYzY4NzQwYjU2ZmUzYTgwMjMwIiwiaXNzIjoiZW10IiwiZXhwIjoxNjcxMjE1NDAwLCJpYXQiOjE2NzExNzA2MTN9.0NQuOb5nztUELDRgYjKThG-D_dNxwMnlsCxrUTGcLMc
|
|
13
13
|
TlsVersion = 1.2
|
|
14
14
|
LogLevel = All
|
|
15
15
|
|
|
16
16
|
[STREAM]
|
|
17
|
-
hostName =
|
|
17
|
+
hostName = ncst.nuvamawealth.com
|
|
18
18
|
port = 9443
|
|
19
19
|
|
|
20
|
-
formFactor = N
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Define streaming Constants as enum for Quote, Order and LiveNews
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
const streamingConstants = Object.freeze({
|
|
6
|
+
QUOTE_SREAM_REQ_CODE: 1,
|
|
7
|
+
ORDER_STREAM_REQ_CODE: 2,
|
|
8
|
+
LIVENEWS_STREAM_REQ_CODE: 3,
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
module.exports = streamingConstants;
|
package/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const
|
|
1
|
+
const apiConnect = require("./src/apiConnect");
|
|
2
2
|
|
|
3
|
-
module.exports =
|
|
3
|
+
module.exports = apiConnect;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "api_connect_nodejs",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "Command to run :",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"directories": {
|
|
@@ -20,18 +20,6 @@
|
|
|
20
20
|
"winston": "^3.6.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {},
|
|
23
|
-
"
|
|
24
|
-
"testEODChart": "mocha test/unitTests/charts/eodChartTest.test.js --timeout 10000",
|
|
25
|
-
"testEquity": "mocha test/unitTests/equity/*.js",
|
|
26
|
-
"testCommodity": "mocha test/unitTests/commodity/*.js",
|
|
27
|
-
"testMF": "mocha test/unitTests/mf/*.js",
|
|
28
|
-
"testCharts": "mocha test/unitTests/charts/chartsTest.test.js --timeout 10000",
|
|
29
|
-
"testGetNewsCategories": "mocha test/unitTests/liveNews/getNewsCategoriesTest.test.js"
|
|
30
|
-
},
|
|
31
|
-
"repository": {
|
|
32
|
-
"type": "git",
|
|
33
|
-
"url": "https://rishabh.kumar@bitbucket.edelweissfin.com/scm/platformmw/client-lib-nodejs.git"
|
|
34
|
-
},
|
|
35
|
-
"author": "",
|
|
23
|
+
"author": "Nuvama",
|
|
36
24
|
"license": "ISC"
|
|
37
25
|
}
|