IPC removed, replaced by WS
This commit is contained in:
1 parent
ba4217fb24
commit
656c193511
503 files changed
+28128
-34498
No files matched your search
+40
-3
@@ -16,8 +16,10 @@ module.exports = class kucoin extends Exchange {
|
||||
'rateLimit': 334,
|
||||
'version': 'v2',
|
||||
'certified': false,
|
||||
'pro': true,
|
||||
'comment': 'Platform 2.0',
|
||||
'has': {
|
||||
'CORS': false,
|
||||
'fetchTime': true,
|
||||
'fetchMarkets': true,
|
||||
'fetchCurrencies': true,
|
||||
@@ -70,6 +72,10 @@ module.exports = class kucoin extends Exchange {
|
||||
'symbols',
|
||||
'market/allTickers',
|
||||
'market/orderbook/level{level}',
|
||||
'market/orderbook/level2',
|
||||
'market/orderbook/level2_20',
|
||||
'market/orderbook/level2_100',
|
||||
'market/orderbook/level3',
|
||||
'market/histories',
|
||||
'market/candles',
|
||||
'market/stats',
|
||||
@@ -101,6 +107,7 @@ module.exports = class kucoin extends Exchange {
|
||||
'post': [
|
||||
'accounts',
|
||||
'accounts/inner-transfer',
|
||||
'accounts/sub-transfer',
|
||||
'deposit-addresses',
|
||||
'withdrawals',
|
||||
'orders',
|
||||
@@ -182,6 +189,8 @@ module.exports = class kucoin extends Exchange {
|
||||
'commonCurrencies': {
|
||||
'HOT': 'HOTNOW',
|
||||
'EDGE': 'DADI', // https://github.com/ccxt/ccxt/issues/5756
|
||||
'WAX': 'WAXP',
|
||||
'TRY': 'Trias',
|
||||
},
|
||||
'options': {
|
||||
'version': 'v1',
|
||||
@@ -190,6 +199,23 @@ module.exports = class kucoin extends Exchange {
|
||||
'fetchBalance': {
|
||||
'type': 'trade', // or 'main'
|
||||
},
|
||||
// endpoint versions
|
||||
'versions': {
|
||||
'public': {
|
||||
'GET': {
|
||||
'market/orderbook/level{level}': 'v1',
|
||||
'market/orderbook/level2': 'v2',
|
||||
'market/orderbook/level2_20': 'v1',
|
||||
'market/orderbook/level2_100': 'v1',
|
||||
},
|
||||
},
|
||||
'private': {
|
||||
'POST': {
|
||||
'accounts/inner-transfer': 'v2',
|
||||
'accounts/sub-transfer': 'v2',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -239,8 +265,7 @@ module.exports = class kucoin extends Exchange {
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
const market = data[i];
|
||||
const id = this.safeString (market, 'symbol');
|
||||
const baseId = this.safeString (market, 'baseCurrency');
|
||||
const quoteId = this.safeString (market, 'quoteCurrency');
|
||||
const [ baseId, quoteId ] = id.split ('-');
|
||||
const base = this.safeCurrencyCode (baseId);
|
||||
const quote = this.safeCurrencyCode (quoteId);
|
||||
const symbol = base + '/' + quote;
|
||||
@@ -308,6 +333,9 @@ module.exports = class kucoin extends Exchange {
|
||||
'code': code,
|
||||
'precision': precision,
|
||||
'info': entry,
|
||||
'active': undefined,
|
||||
'fee': undefined,
|
||||
'limits': this.limits,
|
||||
};
|
||||
}
|
||||
return result;
|
||||
@@ -873,8 +901,10 @@ module.exports = class kucoin extends Exchange {
|
||||
}
|
||||
}
|
||||
}
|
||||
const clientOrderId = this.safeString (order, 'clientOid');
|
||||
return {
|
||||
'id': orderId,
|
||||
'clientOrderId': clientOrderId,
|
||||
'symbol': symbol,
|
||||
'type': type,
|
||||
'side': side,
|
||||
@@ -888,6 +918,9 @@ module.exports = class kucoin extends Exchange {
|
||||
'fee': fee,
|
||||
'status': status,
|
||||
'info': order,
|
||||
'lastTradeTimestamp': undefined,
|
||||
'average': undefined,
|
||||
'trades': undefined,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1612,7 +1645,11 @@ module.exports = class kucoin extends Exchange {
|
||||
// the v2 URL is https://openapi-v2.kucoin.com/api/v1/endpoint
|
||||
// † ↑
|
||||
//
|
||||
const version = this.safeString (params, 'version', this.options['version']);
|
||||
const versions = this.safeValue (this.options, 'versions', {});
|
||||
const apiVersions = this.safeValue (versions, api);
|
||||
const methodVersions = this.safeValue (apiVersions, method, {});
|
||||
const defaultVersion = this.safeString (methodVersions, path, this.options['version']);
|
||||
const version = this.safeString (params, 'version', defaultVersion);
|
||||
params = this.omit (params, 'version');
|
||||
let endpoint = '/api/' + version + '/' + this.implodeParams (path, params);
|
||||
const query = this.omit (params, this.extractParams (path));
|
||||
|
||||
Reference in new issue
Block a user