@icgio/icg-exchanges-wrapper 1.9.174 → 1.9.176
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/middleware/orders.js +3 -3
- package/package.json +2 -2
package/middleware/orders.js
CHANGED
|
@@ -1217,10 +1217,10 @@ module.exports = class Orders {
|
|
|
1217
1217
|
}
|
|
1218
1218
|
}
|
|
1219
1219
|
}
|
|
1220
|
-
let rates_handler = (exchange, pair, res) => {
|
|
1220
|
+
let rates_handler = (exchange, pair, res, rates_with_routes = false) => {
|
|
1221
1221
|
if (res.success) {
|
|
1222
1222
|
let { asks, bids } = res.body
|
|
1223
|
-
if (
|
|
1223
|
+
if (rates_with_routes) {
|
|
1224
1224
|
_.set(this.rates_with_routes, [exchange, pair], { asks, bids, update_time: new Date() })
|
|
1225
1225
|
asks = asks.map((ask) => ask.slice(0, 2))
|
|
1226
1226
|
bids = bids.map((bid) => bid.slice(0, 2))
|
|
@@ -1262,7 +1262,7 @@ module.exports = class Orders {
|
|
|
1262
1262
|
for (let pair of exchange_pairs[exchange]) {
|
|
1263
1263
|
setInterval(() => {
|
|
1264
1264
|
Exchanges[exchange].rate_with_routes(pair, (res) => {
|
|
1265
|
-
rates_handler(exchange, pair, res)
|
|
1265
|
+
rates_handler(exchange, pair, res, (rates_with_routes = true))
|
|
1266
1266
|
})
|
|
1267
1267
|
}, interval_dict[exchange].rates)
|
|
1268
1268
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icgio/icg-exchanges-wrapper",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.176",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"homepage": "https://github.com/icgio/icg-exchanges-wrapper#readme",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@icgio/icg-exchanges": "^1.27.
|
|
20
|
+
"@icgio/icg-exchanges": "^1.27.121",
|
|
21
21
|
"@icgio/icg-exchanges-data": "^1.6.61",
|
|
22
22
|
"@icgio/icg-utils": "^1.7.37",
|
|
23
23
|
"influx": "^5.7.0",
|