fyers-api-v3 1.4.2 → 1.6.0
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/HSM/datasocket.min.js +1 -1
- package/HSM/mapper.js +1 -0
- package/README.md +370 -0
- package/apiService/apiService.js +805 -30
- package/config/config.js +14 -1
- package/ordersocket/fyersSocket.js +9 -0
- package/package.json +1 -1
package/config/config.js
CHANGED
|
@@ -26,5 +26,18 @@ module.exports.Config = {
|
|
|
26
26
|
"quotes" : "/quotes",
|
|
27
27
|
"market_depth" : "/depth",
|
|
28
28
|
"optionChain" : "/options-chain-v3",
|
|
29
|
-
"logout" : "/logout"
|
|
29
|
+
"logout" : "/logout",
|
|
30
|
+
"priceAlert" : "/price-alert",
|
|
31
|
+
"togglePriceAlert" : "/toggle-alert",
|
|
32
|
+
"createSmartorderStep" :"/smart-order/step",
|
|
33
|
+
"createSmartorderLimit" :"/smart-order/limit",
|
|
34
|
+
"createSmartorderTrail" :"/smart-order/trail",
|
|
35
|
+
"createSmartorderSip" :"/smart-order/sip",
|
|
36
|
+
"modifySmartorder":"/smart-order/modify",
|
|
37
|
+
"cancelSmartorder":"/smart-order/cancel",
|
|
38
|
+
"pauseSmartorder":"/smart-order/pause",
|
|
39
|
+
"resumeSmartorder":"/smart-order/resume",
|
|
40
|
+
"smartorderOrderBook":"/smart-order/orderbook",
|
|
41
|
+
"smartExitTrigger":"/flows/tc/se",
|
|
42
|
+
"activateSmartExitTrigger":"/flows/tc/se/activate"
|
|
30
43
|
}
|
|
@@ -96,6 +96,9 @@ class FyersOrderSocket {
|
|
|
96
96
|
var orderdata=datamapper(parseddata["orders"],mapper.orders)
|
|
97
97
|
orderdata.status=ordstatobj[orderdata.status]
|
|
98
98
|
orderdata['orderNumStatus']=orderdata.id+':'+orderdata.status
|
|
99
|
+
if (parseddata["orders"].hasOwnProperty("id_fyers")) {
|
|
100
|
+
orderdata['id_fyers']=parseddata["orders"].id_fyers
|
|
101
|
+
}
|
|
99
102
|
if (this.orderscallback) {
|
|
100
103
|
this.orderscallback({"s":"ok","orders":orderdata})
|
|
101
104
|
}
|
|
@@ -105,6 +108,9 @@ class FyersOrderSocket {
|
|
|
105
108
|
}
|
|
106
109
|
else if (parseddata.hasOwnProperty("positions")) {
|
|
107
110
|
var positiondata=datamapper(parseddata["positions"],mapper.position)
|
|
111
|
+
if (parseddata["positions"].hasOwnProperty("id_fyers")) {
|
|
112
|
+
positiondata['id_fyers']=parseddata["positions"].id_fyers
|
|
113
|
+
}
|
|
108
114
|
if (this.positionscallback) {
|
|
109
115
|
this.positionscallback({"s":"ok","positions":positiondata})
|
|
110
116
|
}
|
|
@@ -114,6 +120,9 @@ class FyersOrderSocket {
|
|
|
114
120
|
}
|
|
115
121
|
else if (parseddata.hasOwnProperty("trades")) {
|
|
116
122
|
var tradebookdata=datamapper(parseddata["trades"],mapper.tradebook)
|
|
123
|
+
if (parseddata["trades"].hasOwnProperty("id_fyers")) {
|
|
124
|
+
tradebookdata['id_fyers']=parseddata["trades"].id_fyers
|
|
125
|
+
}
|
|
117
126
|
if (this.tradescallback) {
|
|
118
127
|
this.tradescallback({"s":"ok","trades":tradebookdata})
|
|
119
128
|
}
|