ccxt 4.2.16 → 4.2.18
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 +4 -4
- package/dist/ccxt.browser.js +546 -276
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/js/ccxt.js +3 -1
- package/dist/cjs/js/src/base/Exchange.js +5 -2
- package/dist/cjs/js/src/binance.js +7 -0
- package/dist/cjs/js/src/bingx.js +26 -0
- package/dist/cjs/js/src/bybit.js +21 -47
- package/dist/cjs/js/src/coincheck.js +1 -0
- package/dist/cjs/js/src/coinlist.js +10 -2
- package/dist/cjs/js/src/coinsph.js +2 -2
- package/dist/cjs/js/src/deribit.js +5 -1
- package/dist/cjs/js/src/kraken.js +1 -1
- package/dist/cjs/js/src/pro/binance.js +3 -3
- package/dist/cjs/js/src/pro/bitget.js +1 -1
- package/dist/cjs/js/src/pro/coincheck.js +208 -0
- package/dist/cjs/js/src/pro/hitbtc.js +5 -4
- package/dist/cjs/js/src/pro/kucoin.js +46 -36
- package/dist/cjs/js/src/pro/kucoinfutures.js +45 -37
- package/dist/cjs/js/src/pro/poloniex.js +2 -2
- package/dist/cjs/js/src/pro/poloniexfutures.js +43 -35
- package/dist/cjs/js/src/whitebit.js +1 -0
- package/js/ccxt.d.ts +4 -1
- package/js/ccxt.js +3 -1
- package/js/src/abstract/binance.d.ts +1 -0
- package/js/src/abstract/binancecoinm.d.ts +1 -0
- package/js/src/abstract/binanceus.d.ts +1 -0
- package/js/src/abstract/binanceusdm.d.ts +1 -0
- package/js/src/abstract/coinlist.d.ts +8 -0
- package/js/src/base/Exchange.d.ts +2 -3
- package/js/src/base/Exchange.js +5 -2
- package/js/src/binance.js +7 -0
- package/js/src/bingx.d.ts +1 -0
- package/js/src/bingx.js +26 -0
- package/js/src/bybit.js +21 -47
- package/js/src/coincheck.js +1 -0
- package/js/src/coinlist.js +10 -2
- package/js/src/coinsph.js +2 -2
- package/js/src/deribit.js +5 -1
- package/js/src/kraken.js +1 -1
- package/js/src/pro/binance.js +3 -3
- package/js/src/pro/bitget.js +1 -1
- package/js/src/pro/coincheck.d.ts +12 -0
- package/js/src/pro/coincheck.js +209 -0
- package/js/src/pro/hitbtc.js +5 -4
- package/js/src/pro/kucoin.js +46 -36
- package/js/src/pro/kucoinfutures.js +45 -37
- package/js/src/pro/poloniex.js +2 -2
- package/js/src/pro/poloniexfutures.js +43 -35
- package/js/src/whitebit.js +1 -0
- package/package.json +1 -1
- package/skip-tests.json +12 -1
|
@@ -77,43 +77,51 @@ export default class kucoinfutures extends kucoinfuturesRest {
|
|
|
77
77
|
async negotiateHelper(privateChannel, params = {}) {
|
|
78
78
|
let response = undefined;
|
|
79
79
|
const connectId = privateChannel ? 'private' : 'public';
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
'
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
80
|
+
try {
|
|
81
|
+
if (privateChannel) {
|
|
82
|
+
response = await this.futuresPrivatePostBulletPrivate(params);
|
|
83
|
+
//
|
|
84
|
+
// {
|
|
85
|
+
// "code": "200000",
|
|
86
|
+
// "data": {
|
|
87
|
+
// "instanceServers": [
|
|
88
|
+
// {
|
|
89
|
+
// "pingInterval": 50000,
|
|
90
|
+
// "endpoint": "wss://push-private.kucoin.com/endpoint",
|
|
91
|
+
// "protocol": "websocket",
|
|
92
|
+
// "encrypt": true,
|
|
93
|
+
// "pingTimeout": 10000
|
|
94
|
+
// }
|
|
95
|
+
// ],
|
|
96
|
+
// "token": "2neAiuYvAU61ZDXANAGAsiL4-iAExhsBXZxftpOeh_55i3Ysy2q2LEsEWU64mdzUOPusi34M_wGoSf7iNyEWJ1UQy47YbpY4zVdzilNP-Bj3iXzrjjGlWtiYB9J6i9GjsxUuhPw3BlrzazF6ghq4Lzf7scStOz3KkxjwpsOBCH4=.WNQmhZQeUKIkh97KYgU0Lg=="
|
|
97
|
+
// }
|
|
98
|
+
// }
|
|
99
|
+
//
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
response = await this.futuresPublicPostBulletPublic(params);
|
|
103
|
+
}
|
|
104
|
+
const data = this.safeValue(response, 'data', {});
|
|
105
|
+
const instanceServers = this.safeValue(data, 'instanceServers', []);
|
|
106
|
+
const firstInstanceServer = this.safeValue(instanceServers, 0);
|
|
107
|
+
const pingInterval = this.safeInteger(firstInstanceServer, 'pingInterval');
|
|
108
|
+
const endpoint = this.safeString(firstInstanceServer, 'endpoint');
|
|
109
|
+
const token = this.safeString(data, 'token');
|
|
110
|
+
const result = endpoint + '?' + this.urlencode({
|
|
111
|
+
'token': token,
|
|
112
|
+
'privateChannel': privateChannel,
|
|
113
|
+
'connectId': connectId,
|
|
114
|
+
});
|
|
115
|
+
const client = this.client(result);
|
|
116
|
+
client.keepAlive = pingInterval;
|
|
117
|
+
return result;
|
|
118
|
+
}
|
|
119
|
+
catch (e) {
|
|
120
|
+
const future = this.safeValue(this.options['urls'], connectId);
|
|
121
|
+
future.reject(e);
|
|
122
|
+
delete this.options['urls'][connectId];
|
|
123
|
+
}
|
|
124
|
+
return undefined;
|
|
117
125
|
}
|
|
118
126
|
requestId() {
|
|
119
127
|
const requestId = this.sum(this.safeInteger(this.options, 'requestId', 0), 1);
|
package/js/src/pro/poloniex.js
CHANGED
|
@@ -943,7 +943,7 @@ export default class poloniex extends poloniexRest {
|
|
|
943
943
|
// }
|
|
944
944
|
//
|
|
945
945
|
const data = this.safeValue(message, 'data', []);
|
|
946
|
-
const newTickers =
|
|
946
|
+
const newTickers = {};
|
|
947
947
|
for (let i = 0; i < data.length; i++) {
|
|
948
948
|
const item = data[i];
|
|
949
949
|
const marketId = this.safeString(item, 'symbol');
|
|
@@ -951,7 +951,7 @@ export default class poloniex extends poloniexRest {
|
|
|
951
951
|
const ticker = this.parseTicker(item);
|
|
952
952
|
const symbol = ticker['symbol'];
|
|
953
953
|
this.tickers[symbol] = ticker;
|
|
954
|
-
newTickers
|
|
954
|
+
newTickers[symbol] = ticker;
|
|
955
955
|
}
|
|
956
956
|
}
|
|
957
957
|
const messageHashes = this.findMessageHashes(client, 'ticker::');
|
|
@@ -80,43 +80,51 @@ export default class poloniexfutures extends poloniexfuturesRest {
|
|
|
80
80
|
async negotiateHelper(privateChannel, params = {}) {
|
|
81
81
|
let response = undefined;
|
|
82
82
|
const connectId = privateChannel ? 'private' : 'public';
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
83
|
+
try {
|
|
84
|
+
if (privateChannel) {
|
|
85
|
+
response = await this.privatePostBulletPrivate(params);
|
|
86
|
+
//
|
|
87
|
+
// {
|
|
88
|
+
// "code": "200000",
|
|
89
|
+
// "data": {
|
|
90
|
+
// "instanceServers": [
|
|
91
|
+
// {
|
|
92
|
+
// "pingInterval": 50000,
|
|
93
|
+
// "endpoint": "wss://push-private.kucoin.com/endpoint",
|
|
94
|
+
// "protocol": "websocket",
|
|
95
|
+
// "encrypt": true,
|
|
96
|
+
// "pingTimeout": 10000
|
|
97
|
+
// }
|
|
98
|
+
// ],
|
|
99
|
+
// "token": "2neAiuYvAU61ZDXANAGAsiL4-iAExhsBXZxftpOeh_55i3Ysy2q2LEsEWU64mdzUOPusi34M_wGoSf7iNyEWJ1UQy47YbpY4zVdzilNP-Bj3iXzrjjGlWtiYB9J6i9GjsxUuhPw3BlrzazF6ghq4Lzf7scStOz3KkxjwpsOBCH4=.WNQmhZQeUKIkh97KYgU0Lg=="
|
|
100
|
+
// }
|
|
101
|
+
// }
|
|
102
|
+
//
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
response = await this.publicPostBulletPublic(params);
|
|
106
|
+
}
|
|
107
|
+
const data = this.safeValue(response, 'data', {});
|
|
108
|
+
const instanceServers = this.safeValue(data, 'instanceServers', []);
|
|
109
|
+
const firstInstanceServer = this.safeValue(instanceServers, 0);
|
|
110
|
+
const pingInterval = this.safeInteger(firstInstanceServer, 'pingInterval');
|
|
111
|
+
const endpoint = this.safeString(firstInstanceServer, 'endpoint');
|
|
112
|
+
const token = this.safeString(data, 'token');
|
|
113
|
+
const result = endpoint + '?' + this.urlencode({
|
|
114
|
+
'token': token,
|
|
115
|
+
'privateChannel': privateChannel,
|
|
116
|
+
'connectId': connectId,
|
|
117
|
+
});
|
|
118
|
+
const client = this.client(result);
|
|
119
|
+
client.keepAlive = pingInterval;
|
|
120
|
+
return result;
|
|
102
121
|
}
|
|
103
|
-
|
|
104
|
-
|
|
122
|
+
catch (e) {
|
|
123
|
+
const future = this.safeValue(this.options['urls'], connectId);
|
|
124
|
+
future.reject(e);
|
|
125
|
+
delete this.options['urls'][connectId];
|
|
105
126
|
}
|
|
106
|
-
|
|
107
|
-
const instanceServers = this.safeValue(data, 'instanceServers', []);
|
|
108
|
-
const firstInstanceServer = this.safeValue(instanceServers, 0);
|
|
109
|
-
const pingInterval = this.safeInteger(firstInstanceServer, 'pingInterval');
|
|
110
|
-
const endpoint = this.safeString(firstInstanceServer, 'endpoint');
|
|
111
|
-
const token = this.safeString(data, 'token');
|
|
112
|
-
const result = endpoint + '?' + this.urlencode({
|
|
113
|
-
'token': token,
|
|
114
|
-
'privateChannel': privateChannel,
|
|
115
|
-
'connectId': connectId,
|
|
116
|
-
});
|
|
117
|
-
const client = this.client(result);
|
|
118
|
-
client.keepAlive = pingInterval;
|
|
119
|
-
return result;
|
|
127
|
+
return undefined;
|
|
120
128
|
}
|
|
121
129
|
requestId() {
|
|
122
130
|
const requestId = this.sum(this.safeInteger(this.options, 'requestId', 0), 1);
|
package/js/src/whitebit.js
CHANGED
package/package.json
CHANGED
package/skip-tests.json
CHANGED
|
@@ -107,6 +107,9 @@
|
|
|
107
107
|
"watchTicker": {
|
|
108
108
|
"quoteVolume": "https://app.travis-ci.com/github/ccxt/ccxt/builds/267900037#L2466"
|
|
109
109
|
},
|
|
110
|
+
"watchTickers": {
|
|
111
|
+
"quoteVolume": "https://app.travis-ci.com/github/ccxt/ccxt/builds/268171081#L2414"
|
|
112
|
+
},
|
|
110
113
|
"watchOrderBook": "out of order update"
|
|
111
114
|
}
|
|
112
115
|
},
|
|
@@ -634,6 +637,7 @@
|
|
|
634
637
|
}
|
|
635
638
|
},
|
|
636
639
|
"coincheck": {
|
|
640
|
+
"skipWs": true,
|
|
637
641
|
"skipMethods": {
|
|
638
642
|
"loadMarkets":{
|
|
639
643
|
"info":"not provided",
|
|
@@ -902,11 +906,15 @@
|
|
|
902
906
|
"currencyIdAndCode": "messed codes"
|
|
903
907
|
},
|
|
904
908
|
"fetchCurrencies": {
|
|
905
|
-
"fee": "not provided"
|
|
909
|
+
"fee": "not provided",
|
|
910
|
+
"currencyIdAndCode": "https://app.travis-ci.com/github/ccxt/ccxt/builds/268371892#L2455"
|
|
906
911
|
},
|
|
907
912
|
"fetchTickers": {
|
|
908
913
|
"bid":"messed bid-ask",
|
|
909
914
|
"ask":"messed bid-ask"
|
|
915
|
+
},
|
|
916
|
+
"watchOrderBook": {
|
|
917
|
+
"bid": "https://app.travis-ci.com/github/ccxt/ccxt/builds/268349324#L2400"
|
|
910
918
|
}
|
|
911
919
|
}
|
|
912
920
|
},
|
|
@@ -970,6 +978,9 @@
|
|
|
970
978
|
"contractSize": "broken for some markets",
|
|
971
979
|
"strike": "incorrect number type"
|
|
972
980
|
},
|
|
981
|
+
"fetchCurrencies": {
|
|
982
|
+
"currencyIdAndCode": "https://app.travis-ci.com/github/ccxt/ccxt/builds/268371892#L2559"
|
|
983
|
+
},
|
|
973
984
|
"fetchTrades": {
|
|
974
985
|
"timestamp": "timestamp is in decimals"
|
|
975
986
|
},
|