ccxt 4.4.47 → 4.4.49
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/dist/ccxt.browser.min.js +16 -16
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +1 -1
- package/dist/cjs/src/binance.js +18 -14
- package/dist/cjs/src/bingx.js +88 -30
- package/dist/cjs/src/bitget.js +16 -12
- package/dist/cjs/src/bitmart.js +7 -2
- package/dist/cjs/src/bitmex.js +8 -5
- package/dist/cjs/src/bybit.js +7 -2
- package/dist/cjs/src/coinbase.js +11 -1
- package/dist/cjs/src/coincatch.js +86 -2
- package/dist/cjs/src/coincheck.js +52 -0
- package/dist/cjs/src/coinlist.js +77 -0
- package/dist/cjs/src/coinmate.js +63 -0
- package/dist/cjs/src/coinmetro.js +68 -0
- package/dist/cjs/src/coinone.js +56 -0
- package/dist/cjs/src/coinsph.js +85 -10
- package/dist/cjs/src/coinspot.js +47 -0
- package/dist/cjs/src/currencycom.js +72 -0
- package/dist/cjs/src/defx.js +93 -6
- package/dist/cjs/src/delta.js +83 -1
- package/dist/cjs/src/deribit.js +82 -0
- package/dist/cjs/src/digifinex.js +131 -11
- package/dist/cjs/src/ellipx.js +61 -0
- package/dist/cjs/src/exmo.js +58 -0
- package/dist/cjs/src/gate.js +10 -1
- package/dist/cjs/src/hitbtc.js +99 -0
- package/dist/cjs/src/hollaex.js +73 -0
- package/dist/cjs/src/htx.js +10 -2
- package/dist/cjs/src/huobijp.js +73 -0
- package/dist/cjs/src/hyperliquid.js +28 -2
- package/dist/cjs/src/idex.js +71 -0
- package/dist/cjs/src/independentreserve.js +124 -0
- package/dist/cjs/src/indodax.js +61 -0
- package/dist/cjs/src/kraken.js +1 -1
- package/dist/cjs/src/krakenfutures.js +4 -4
- package/dist/cjs/src/kuna.js +60 -1
- package/dist/cjs/src/latoken.js +64 -0
- package/dist/cjs/src/lbank.js +70 -0
- package/dist/cjs/src/luno.js +73 -0
- package/dist/cjs/src/lykke.js +64 -0
- package/dist/cjs/src/mercado.js +65 -0
- package/dist/cjs/src/mexc.js +1 -1
- package/dist/cjs/src/myokx.js +10 -0
- package/dist/cjs/src/ndax.js +71 -0
- package/dist/cjs/src/novadax.js +74 -0
- package/dist/cjs/src/oceanex.js +69 -0
- package/dist/cjs/src/okcoin.js +79 -2
- package/dist/cjs/src/okx.js +9 -1
- package/dist/cjs/src/onetrading.js +66 -0
- package/dist/cjs/src/oxfun.js +66 -0
- package/dist/cjs/src/p2b.js +63 -1
- package/dist/cjs/src/paradex.js +73 -2
- package/dist/cjs/src/phemex.js +103 -0
- package/dist/cjs/src/poloniex.js +61 -0
- package/dist/cjs/src/poloniexfutures.js +74 -0
- package/dist/cjs/src/pro/bitmart.js +6 -0
- package/dist/cjs/src/upbit.js +61 -0
- package/dist/cjs/src/woo.js +6 -1
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/independentreserve.d.ts +6 -0
- package/js/src/ace.js +1 -1
- package/js/src/binance.d.ts +7 -0
- package/js/src/binance.js +18 -14
- package/js/src/bingx.d.ts +8 -0
- package/js/src/bingx.js +88 -30
- package/js/src/bitget.d.ts +1 -0
- package/js/src/bitget.js +16 -12
- package/js/src/bitmart.js +7 -2
- package/js/src/bitmex.js +8 -5
- package/js/src/bybit.d.ts +1 -1
- package/js/src/bybit.js +7 -2
- package/js/src/coinbase.d.ts +1 -0
- package/js/src/coinbase.js +11 -1
- package/js/src/coincatch.d.ts +1 -2
- package/js/src/coincatch.js +86 -2
- package/js/src/coincheck.js +52 -0
- package/js/src/coinlist.js +77 -0
- package/js/src/coinmate.js +63 -0
- package/js/src/coinmetro.js +68 -0
- package/js/src/coinone.js +56 -0
- package/js/src/coinsph.d.ts +2 -1
- package/js/src/coinsph.js +85 -10
- package/js/src/coinspot.js +47 -0
- package/js/src/currencycom.js +72 -0
- package/js/src/defx.js +93 -6
- package/js/src/delta.js +83 -1
- package/js/src/deribit.js +82 -0
- package/js/src/digifinex.d.ts +1 -0
- package/js/src/digifinex.js +131 -11
- package/js/src/ellipx.d.ts +1 -0
- package/js/src/ellipx.js +61 -0
- package/js/src/exmo.js +58 -0
- package/js/src/gate.d.ts +1 -0
- package/js/src/gate.js +10 -1
- package/js/src/hitbtc.js +99 -0
- package/js/src/hollaex.js +73 -0
- package/js/src/htx.d.ts +1 -0
- package/js/src/htx.js +10 -2
- package/js/src/huobijp.js +73 -0
- package/js/src/hyperliquid.d.ts +1 -0
- package/js/src/hyperliquid.js +28 -2
- package/js/src/idex.js +71 -0
- package/js/src/independentreserve.js +124 -0
- package/js/src/indodax.js +61 -0
- package/js/src/kraken.js +1 -1
- package/js/src/krakenfutures.js +4 -4
- package/js/src/kuna.js +60 -1
- package/js/src/latoken.js +64 -0
- package/js/src/lbank.js +70 -0
- package/js/src/luno.js +73 -0
- package/js/src/lykke.js +64 -0
- package/js/src/mercado.js +65 -0
- package/js/src/mexc.js +1 -1
- package/js/src/myokx.js +10 -0
- package/js/src/ndax.js +71 -0
- package/js/src/novadax.js +74 -0
- package/js/src/oceanex.js +69 -0
- package/js/src/okcoin.js +79 -2
- package/js/src/okx.d.ts +1 -0
- package/js/src/okx.js +9 -1
- package/js/src/onetrading.js +66 -0
- package/js/src/oxfun.js +66 -0
- package/js/src/p2b.js +63 -1
- package/js/src/paradex.js +73 -2
- package/js/src/phemex.js +103 -0
- package/js/src/poloniex.js +61 -0
- package/js/src/poloniexfutures.js +74 -0
- package/js/src/pro/bitmart.d.ts +1 -0
- package/js/src/pro/bitmart.js +6 -0
- package/js/src/upbit.js +61 -0
- package/js/src/woo.js +6 -1
- package/package.json +2 -2
package/js/src/bitget.js
CHANGED
|
@@ -1384,18 +1384,18 @@ export default class bitget extends Exchange {
|
|
|
1384
1384
|
'1m': 30,
|
|
1385
1385
|
'3m': 30,
|
|
1386
1386
|
'5m': 30,
|
|
1387
|
-
'10m':
|
|
1387
|
+
'10m': 30,
|
|
1388
1388
|
'15m': 52,
|
|
1389
|
-
'30m':
|
|
1389
|
+
'30m': 62,
|
|
1390
1390
|
'1h': 83,
|
|
1391
1391
|
'2h': 120,
|
|
1392
1392
|
'4h': 240,
|
|
1393
1393
|
'6h': 360,
|
|
1394
1394
|
'12h': 360,
|
|
1395
|
-
'1d':
|
|
1396
|
-
'3d':
|
|
1397
|
-
'1w':
|
|
1398
|
-
'1M':
|
|
1395
|
+
'1d': 300,
|
|
1396
|
+
'3d': 300,
|
|
1397
|
+
'1w': 300,
|
|
1398
|
+
'1M': 300,
|
|
1399
1399
|
},
|
|
1400
1400
|
},
|
|
1401
1401
|
'fetchTrades': {
|
|
@@ -3557,6 +3557,7 @@ export default class bitget extends Exchange {
|
|
|
3557
3557
|
* @param {int} [limit] the maximum amount of candles to fetch
|
|
3558
3558
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3559
3559
|
* @param {int} [params.until] timestamp in ms of the latest candle to fetch
|
|
3560
|
+
* @param {boolean} [params.useHistoryEndpoint] whether to force to use historical endpoint (it has max limit of 200)
|
|
3560
3561
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
3561
3562
|
* @param {string} [params.price] *swap only* "mark" (to fetch mark price candles) or "index" (to fetch index price candles)
|
|
3562
3563
|
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
@@ -3569,9 +3570,10 @@ export default class bitget extends Exchange {
|
|
|
3569
3570
|
let paginate = false;
|
|
3570
3571
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchOHLCV', 'paginate');
|
|
3571
3572
|
if (paginate) {
|
|
3572
|
-
return await this.fetchPaginatedCallDeterministic('fetchOHLCV', symbol, since, limit, timeframe, params,
|
|
3573
|
+
return await this.fetchPaginatedCallDeterministic('fetchOHLCV', symbol, since, limit, timeframe, params, maxLimitForRecentEndpoint);
|
|
3573
3574
|
}
|
|
3574
3575
|
const sandboxMode = this.safeBool(this.options, 'sandboxMode', false);
|
|
3576
|
+
const useHistoryEndpoint = this.safeBool(params, 'useHistoryEndpoint', false);
|
|
3575
3577
|
let market = undefined;
|
|
3576
3578
|
if (sandboxMode) {
|
|
3577
3579
|
const sandboxSymbol = this.convertSymbolForSandbox(symbol);
|
|
@@ -3601,7 +3603,7 @@ export default class bitget extends Exchange {
|
|
|
3601
3603
|
const ohlcOptions = this.safeDict(this.options, 'fetchOHLCV', {});
|
|
3602
3604
|
const retrievableDaysMap = this.safeDict(ohlcOptions, 'maxDaysPerTimeframe', {});
|
|
3603
3605
|
const maxRetrievableDaysForRecent = this.safeInteger(retrievableDaysMap, timeframe, 30); // default to safe minimum
|
|
3604
|
-
const endpointTsBoundary = now - maxRetrievableDaysForRecent * msInDay;
|
|
3606
|
+
const endpointTsBoundary = now - (maxRetrievableDaysForRecent - 1) * msInDay;
|
|
3605
3607
|
if (limitDefined) {
|
|
3606
3608
|
limit = Math.min(limit, maxLimitForRecentEndpoint);
|
|
3607
3609
|
request['limit'] = limit;
|
|
@@ -3640,7 +3642,7 @@ export default class bitget extends Exchange {
|
|
|
3640
3642
|
// make request
|
|
3641
3643
|
if (market['spot']) {
|
|
3642
3644
|
// checks if we need history endpoint
|
|
3643
|
-
if (historicalEndpointNeeded) {
|
|
3645
|
+
if (historicalEndpointNeeded || useHistoryEndpoint) {
|
|
3644
3646
|
response = await this.publicSpotGetV2SpotMarketHistoryCandles(this.extend(request, params));
|
|
3645
3647
|
}
|
|
3646
3648
|
else {
|
|
@@ -3672,7 +3674,7 @@ export default class bitget extends Exchange {
|
|
|
3672
3674
|
response = await this.publicMixGetV2MixMarketHistoryIndexCandles(extended);
|
|
3673
3675
|
}
|
|
3674
3676
|
else {
|
|
3675
|
-
if (historicalEndpointNeeded) {
|
|
3677
|
+
if (historicalEndpointNeeded || useHistoryEndpoint) {
|
|
3676
3678
|
response = await this.publicMixGetV2MixMarketHistoryCandles(extended);
|
|
3677
3679
|
}
|
|
3678
3680
|
else {
|
|
@@ -4335,8 +4337,10 @@ export default class bitget extends Exchange {
|
|
|
4335
4337
|
if (!market['spot']) {
|
|
4336
4338
|
throw new NotSupported(this.id + ' createMarketBuyOrderWithCost() supports spot orders only');
|
|
4337
4339
|
}
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
+
const req = {
|
|
4341
|
+
'createMarketBuyOrderRequiresPrice': false,
|
|
4342
|
+
};
|
|
4343
|
+
return await this.createOrder(symbol, 'market', 'buy', cost, undefined, this.extend(req, params));
|
|
4340
4344
|
}
|
|
4341
4345
|
/**
|
|
4342
4346
|
* @method
|
package/js/src/bitmart.js
CHANGED
|
@@ -529,6 +529,8 @@ export default class bitmart extends Exchange {
|
|
|
529
529
|
'defaultNetworks': {
|
|
530
530
|
'USDT': 'ERC20',
|
|
531
531
|
},
|
|
532
|
+
'timeDifference': 0,
|
|
533
|
+
'adjustForTimeDifference': false,
|
|
532
534
|
'networks': {
|
|
533
535
|
'ERC20': 'ERC20',
|
|
534
536
|
'SOL': 'SOL',
|
|
@@ -1143,6 +1145,9 @@ export default class bitmart extends Exchange {
|
|
|
1143
1145
|
* @returns {object[]} an array of objects representing market data
|
|
1144
1146
|
*/
|
|
1145
1147
|
async fetchMarkets(params = {}) {
|
|
1148
|
+
if (this.options['adjustForTimeDifference']) {
|
|
1149
|
+
await this.loadTimeDifference();
|
|
1150
|
+
}
|
|
1146
1151
|
const spot = await this.fetchSpotMarkets(params);
|
|
1147
1152
|
const contract = await this.fetchContractMarkets(params);
|
|
1148
1153
|
return this.arrayConcat(spot, contract);
|
|
@@ -5303,7 +5308,7 @@ export default class bitmart extends Exchange {
|
|
|
5303
5308
|
return this.filterBySinceLimit(sorted, since, limit);
|
|
5304
5309
|
}
|
|
5305
5310
|
nonce() {
|
|
5306
|
-
return this.milliseconds();
|
|
5311
|
+
return this.milliseconds() - this.options['timeDifference'];
|
|
5307
5312
|
}
|
|
5308
5313
|
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
|
|
5309
5314
|
const parts = path.split('/');
|
|
@@ -5323,7 +5328,7 @@ export default class bitmart extends Exchange {
|
|
|
5323
5328
|
}
|
|
5324
5329
|
if (api === 'private') {
|
|
5325
5330
|
this.checkRequiredCredentials();
|
|
5326
|
-
const timestamp = this.
|
|
5331
|
+
const timestamp = this.nonce().toString();
|
|
5327
5332
|
const brokerId = this.safeString(this.options, 'brokerId', 'CCXTxBitmart000');
|
|
5328
5333
|
headers = {
|
|
5329
5334
|
'X-BM-KEY': this.apiKey,
|
package/js/src/bitmex.js
CHANGED
|
@@ -302,9 +302,11 @@ export default class bitmex extends Exchange {
|
|
|
302
302
|
'trailing': true,
|
|
303
303
|
'marketBuyRequiresPrice': false,
|
|
304
304
|
'marketBuyByCost': false,
|
|
305
|
-
|
|
306
|
-
'selfTradePrevention':
|
|
307
|
-
'
|
|
305
|
+
// exchange-supported features
|
|
306
|
+
// 'selfTradePrevention': true,
|
|
307
|
+
// 'twap': false,
|
|
308
|
+
// 'iceberg': false,
|
|
309
|
+
// 'oco': false,
|
|
308
310
|
},
|
|
309
311
|
'createOrders': undefined,
|
|
310
312
|
'fetchMyTrades': {
|
|
@@ -335,7 +337,7 @@ export default class bitmex extends Exchange {
|
|
|
335
337
|
'fetchClosedOrders': {
|
|
336
338
|
'marginMode': false,
|
|
337
339
|
'limit': 500,
|
|
338
|
-
'
|
|
340
|
+
'daysBackClosed': undefined,
|
|
339
341
|
'daysBackCanceled': undefined,
|
|
340
342
|
'untilDays': 1000000,
|
|
341
343
|
'trigger': false,
|
|
@@ -2611,7 +2613,8 @@ export default class bitmex extends Exchange {
|
|
|
2611
2613
|
}
|
|
2612
2614
|
}
|
|
2613
2615
|
symbols = this.marketSymbols(symbols);
|
|
2614
|
-
|
|
2616
|
+
const result = this.parseFundingRates(filteredResponse);
|
|
2617
|
+
return this.filterByArray(result, 'symbol', symbols);
|
|
2615
2618
|
}
|
|
2616
2619
|
parseFundingRate(contract, market = undefined) {
|
|
2617
2620
|
// see response sample under "fetchMarkets" because same endpoint is being used here
|
package/js/src/bybit.d.ts
CHANGED
|
@@ -212,7 +212,7 @@ export default class bybit extends Exchange {
|
|
|
212
212
|
* @param {bool} [params.reduceOnly] true or false whether the order is reduce-only
|
|
213
213
|
* @param {string} [params.positionIdx] *contracts only* 0 for one-way mode, 1 buy side of hedged mode, 2 sell side of hedged mode
|
|
214
214
|
* @param {bool} [params.hedged] *contracts only* true for hedged mode, false for one way mode, default is false
|
|
215
|
-
* @param {
|
|
215
|
+
* @param {int} [params.isLeverage] *unified spot only* false then spot trading true then margin trading
|
|
216
216
|
* @param {string} [params.tpslMode] *contract only* 'full' or 'partial'
|
|
217
217
|
* @param {string} [params.mmp] *option only* market maker protection
|
|
218
218
|
* @param {string} [params.triggerDirection] *contract only* the direction for trigger orders, 'above' or 'below'
|
package/js/src/bybit.js
CHANGED
|
@@ -3336,7 +3336,12 @@ export default class bybit extends Exchange {
|
|
|
3336
3336
|
account['free'] = free;
|
|
3337
3337
|
}
|
|
3338
3338
|
else {
|
|
3339
|
-
|
|
3339
|
+
const locked = this.safeString(coinEntry, 'locked', '0');
|
|
3340
|
+
const totalPositionIm = this.safeString(coinEntry, 'totalPositionIM', '0');
|
|
3341
|
+
const totalOrderIm = this.safeString(coinEntry, 'totalOrderIM', '0');
|
|
3342
|
+
let totalUsed = Precise.stringAdd(locked, totalPositionIm);
|
|
3343
|
+
totalUsed = Precise.stringAdd(totalUsed, totalOrderIm);
|
|
3344
|
+
account['used'] = totalUsed;
|
|
3340
3345
|
}
|
|
3341
3346
|
// account['used'] = this.safeString (coinEntry, 'locked');
|
|
3342
3347
|
const currencyId = this.safeString(coinEntry, 'coin');
|
|
@@ -3861,7 +3866,7 @@ export default class bybit extends Exchange {
|
|
|
3861
3866
|
* @param {bool} [params.reduceOnly] true or false whether the order is reduce-only
|
|
3862
3867
|
* @param {string} [params.positionIdx] *contracts only* 0 for one-way mode, 1 buy side of hedged mode, 2 sell side of hedged mode
|
|
3863
3868
|
* @param {bool} [params.hedged] *contracts only* true for hedged mode, false for one way mode, default is false
|
|
3864
|
-
* @param {
|
|
3869
|
+
* @param {int} [params.isLeverage] *unified spot only* false then spot trading true then margin trading
|
|
3865
3870
|
* @param {string} [params.tpslMode] *contract only* 'full' or 'partial'
|
|
3866
3871
|
* @param {string} [params.mmp] *option only* market maker protection
|
|
3867
3872
|
* @param {string} [params.triggerDirection] *contract only* the direction for trigger orders, 'above' or 'below'
|
package/js/src/coinbase.d.ts
CHANGED
|
@@ -606,6 +606,7 @@ export default class coinbase extends Exchange {
|
|
|
606
606
|
*/
|
|
607
607
|
fetchTradingFees(params?: {}): Promise<TradingFees>;
|
|
608
608
|
createAuthToken(seconds: Int, method?: Str, url?: Str): string;
|
|
609
|
+
nonce(): number;
|
|
609
610
|
sign(path: any, api?: any[], method?: string, params?: {}, headers?: any, body?: any): {
|
|
610
611
|
url: string;
|
|
611
612
|
method: string;
|
package/js/src/coinbase.js
CHANGED
|
@@ -370,6 +370,8 @@ export default class coinbase extends Exchange {
|
|
|
370
370
|
'createMarketBuyOrderRequiresPrice': true,
|
|
371
371
|
'advanced': true,
|
|
372
372
|
'fetchMarkets': 'fetchMarketsV3',
|
|
373
|
+
'timeDifference': 0,
|
|
374
|
+
'adjustForTimeDifference': false,
|
|
373
375
|
'fetchTicker': 'fetchTickerV3',
|
|
374
376
|
'fetchTickers': 'fetchTickersV3',
|
|
375
377
|
'fetchAccounts': 'fetchAccountsV3',
|
|
@@ -1278,6 +1280,9 @@ export default class coinbase extends Exchange {
|
|
|
1278
1280
|
* @returns {object[]} an array of objects representing market data
|
|
1279
1281
|
*/
|
|
1280
1282
|
async fetchMarkets(params = {}) {
|
|
1283
|
+
if (this.options['adjustForTimeDifference']) {
|
|
1284
|
+
await this.loadTimeDifference();
|
|
1285
|
+
}
|
|
1281
1286
|
const method = this.safeString(this.options, 'fetchMarkets', 'fetchMarketsV3');
|
|
1282
1287
|
if (method === 'fetchMarketsV3') {
|
|
1283
1288
|
return await this.fetchMarketsV3(params);
|
|
@@ -4884,6 +4889,9 @@ export default class coinbase extends Exchange {
|
|
|
4884
4889
|
const token = jwt(request, this.encode(this.secret), sha256, false, { 'kid': this.apiKey, 'nonce': nonce, 'alg': 'ES256' });
|
|
4885
4890
|
return token;
|
|
4886
4891
|
}
|
|
4892
|
+
nonce() {
|
|
4893
|
+
return this.milliseconds() - this.options['timeDifference'];
|
|
4894
|
+
}
|
|
4887
4895
|
sign(path, api = [], method = 'GET', params = {}, headers = undefined, body = undefined) {
|
|
4888
4896
|
const version = api[0];
|
|
4889
4897
|
const signed = api[1] === 'private';
|
|
@@ -4956,7 +4964,9 @@ export default class coinbase extends Exchange {
|
|
|
4956
4964
|
authorizationString = 'Bearer ' + token;
|
|
4957
4965
|
}
|
|
4958
4966
|
else {
|
|
4959
|
-
const
|
|
4967
|
+
const nonce = this.nonce();
|
|
4968
|
+
const timestamp = this.parseToInt(nonce / 1000);
|
|
4969
|
+
const timestampString = timestamp.toString();
|
|
4960
4970
|
const auth = timestampString + method + savedPath + payload;
|
|
4961
4971
|
const signature = this.hmac(this.encode(auth), this.encode(this.secret), sha256);
|
|
4962
4972
|
headers = {
|
package/js/src/coincatch.d.ts
CHANGED
|
@@ -353,8 +353,7 @@ export default class coincatch extends Exchange {
|
|
|
353
353
|
* @method
|
|
354
354
|
* @name coincatch#createOrders
|
|
355
355
|
* @description create a list of trade orders (all orders should be of the same symbol)
|
|
356
|
-
* @see https://
|
|
357
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/batch-create-new-futures-order
|
|
356
|
+
* @see https://coincatch.github.io/github.io/en/spot/#batch-order
|
|
358
357
|
* @param {Array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params (max 50 entries)
|
|
359
358
|
* @param {object} [params] extra parameters specific to the api endpoint
|
|
360
359
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
package/js/src/coincatch.js
CHANGED
|
@@ -413,6 +413,91 @@ export default class coincatch extends Exchange {
|
|
|
413
413
|
'CronosChain': 'CRO', // todo check
|
|
414
414
|
},
|
|
415
415
|
},
|
|
416
|
+
'features': {
|
|
417
|
+
'default': {
|
|
418
|
+
'sandbox': false,
|
|
419
|
+
'createOrder': {
|
|
420
|
+
'marginMode': false,
|
|
421
|
+
'triggerPrice': true,
|
|
422
|
+
'triggerPriceType': {
|
|
423
|
+
'last': true,
|
|
424
|
+
'mark': true,
|
|
425
|
+
'index': false,
|
|
426
|
+
},
|
|
427
|
+
'triggerDirection': false,
|
|
428
|
+
'stopLossPrice': false,
|
|
429
|
+
'takeProfitPrice': false,
|
|
430
|
+
'attachedStopLossTakeProfit': undefined,
|
|
431
|
+
'timeInForce': {
|
|
432
|
+
'IOC': true,
|
|
433
|
+
'FOK': true,
|
|
434
|
+
'PO': true,
|
|
435
|
+
'GTD': false,
|
|
436
|
+
},
|
|
437
|
+
'hedged': false,
|
|
438
|
+
'trailing': false,
|
|
439
|
+
'leverage': false,
|
|
440
|
+
'marketBuyByCost': true,
|
|
441
|
+
'marketBuyRequiresPrice': false,
|
|
442
|
+
'selfTradePrevention': false,
|
|
443
|
+
'iceberg': false,
|
|
444
|
+
},
|
|
445
|
+
'createOrders': {
|
|
446
|
+
'max': 50,
|
|
447
|
+
},
|
|
448
|
+
'fetchMyTrades': {
|
|
449
|
+
'marginMode': false,
|
|
450
|
+
'limit': 500,
|
|
451
|
+
'daysBack': 100000,
|
|
452
|
+
'untilDays': 100000, // todo implement
|
|
453
|
+
},
|
|
454
|
+
'fetchOrder': {
|
|
455
|
+
'marginMode': false,
|
|
456
|
+
'trigger': false,
|
|
457
|
+
'trailing': false,
|
|
458
|
+
},
|
|
459
|
+
'fetchOpenOrders': {
|
|
460
|
+
'marginMode': false,
|
|
461
|
+
'limit': 100,
|
|
462
|
+
'trigger': true,
|
|
463
|
+
'trailing': false,
|
|
464
|
+
'marketType': true,
|
|
465
|
+
},
|
|
466
|
+
'fetchOrders': undefined,
|
|
467
|
+
'fetchClosedOrders': undefined,
|
|
468
|
+
'fetchOHLCV': {
|
|
469
|
+
'limit': 1000,
|
|
470
|
+
},
|
|
471
|
+
},
|
|
472
|
+
'spot': {
|
|
473
|
+
'extends': 'default',
|
|
474
|
+
},
|
|
475
|
+
'forDerivatives': {
|
|
476
|
+
'extends': 'default',
|
|
477
|
+
'createOrder': {
|
|
478
|
+
// todo check
|
|
479
|
+
'attachedStopLossTakeProfit': {
|
|
480
|
+
'triggerPriceType': undefined,
|
|
481
|
+
'price': false,
|
|
482
|
+
},
|
|
483
|
+
},
|
|
484
|
+
'fetchMyTrades': {
|
|
485
|
+
'limit': 100,
|
|
486
|
+
},
|
|
487
|
+
},
|
|
488
|
+
'swap': {
|
|
489
|
+
'linear': {
|
|
490
|
+
'extends': 'forDerivatives',
|
|
491
|
+
},
|
|
492
|
+
'inverse': {
|
|
493
|
+
'extends': 'forDerivatives',
|
|
494
|
+
},
|
|
495
|
+
},
|
|
496
|
+
'future': {
|
|
497
|
+
'linear': undefined,
|
|
498
|
+
'inverse': undefined,
|
|
499
|
+
},
|
|
500
|
+
},
|
|
416
501
|
'commonCurrencies': {},
|
|
417
502
|
'exceptions': {
|
|
418
503
|
'exact': {
|
|
@@ -2653,8 +2738,7 @@ export default class coincatch extends Exchange {
|
|
|
2653
2738
|
* @method
|
|
2654
2739
|
* @name coincatch#createOrders
|
|
2655
2740
|
* @description create a list of trade orders (all orders should be of the same symbol)
|
|
2656
|
-
* @see https://
|
|
2657
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/batch-create-new-futures-order
|
|
2741
|
+
* @see https://coincatch.github.io/github.io/en/spot/#batch-order
|
|
2658
2742
|
* @param {Array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params (max 50 entries)
|
|
2659
2743
|
* @param {object} [params] extra parameters specific to the api endpoint
|
|
2660
2744
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
package/js/src/coincheck.js
CHANGED
|
@@ -155,6 +155,58 @@ export default class coincheck extends Exchange {
|
|
|
155
155
|
// 'LTC/BTC': { 'id': 'ltc_btc', 'symbol': 'LTC/BTC', 'base': 'LTC', 'quote': 'BTC', 'baseId': 'ltc', 'quoteId': 'btc' },
|
|
156
156
|
// 'DASH/BTC': { 'id': 'dash_btc', 'symbol': 'DASH/BTC', 'base': 'DASH', 'quote': 'BTC', 'baseId': 'dash', 'quoteId': 'btc' },
|
|
157
157
|
},
|
|
158
|
+
'features': {
|
|
159
|
+
'spot': {
|
|
160
|
+
'sandbox': false,
|
|
161
|
+
'createOrder': {
|
|
162
|
+
'marginMode': false,
|
|
163
|
+
'triggerPrice': false,
|
|
164
|
+
'triggerPriceType': undefined,
|
|
165
|
+
'triggerDirection': false,
|
|
166
|
+
'stopLossPrice': false,
|
|
167
|
+
'takeProfitPrice': false,
|
|
168
|
+
'attachedStopLossTakeProfit': undefined,
|
|
169
|
+
'timeInForce': {
|
|
170
|
+
'IOC': false,
|
|
171
|
+
'FOK': false,
|
|
172
|
+
'PO': true,
|
|
173
|
+
'GTD': false,
|
|
174
|
+
},
|
|
175
|
+
'hedged': false,
|
|
176
|
+
'trailing': false,
|
|
177
|
+
'leverage': false,
|
|
178
|
+
'marketBuyByCost': false,
|
|
179
|
+
'marketBuyRequiresPrice': false,
|
|
180
|
+
'selfTradePrevention': false,
|
|
181
|
+
'iceberg': false,
|
|
182
|
+
},
|
|
183
|
+
'createOrders': undefined,
|
|
184
|
+
'fetchMyTrades': {
|
|
185
|
+
'marginMode': false,
|
|
186
|
+
'limit': undefined,
|
|
187
|
+
'daysBack': undefined,
|
|
188
|
+
'untilDays': undefined,
|
|
189
|
+
},
|
|
190
|
+
'fetchOrder': undefined,
|
|
191
|
+
'fetchOpenOrders': {
|
|
192
|
+
'marginMode': false,
|
|
193
|
+
'limit': undefined,
|
|
194
|
+
'trigger': false,
|
|
195
|
+
'trailing': false,
|
|
196
|
+
},
|
|
197
|
+
'fetchOrders': undefined,
|
|
198
|
+
'fetchClosedOrders': undefined,
|
|
199
|
+
'fetchOHLCV': undefined,
|
|
200
|
+
},
|
|
201
|
+
'swap': {
|
|
202
|
+
'linear': undefined,
|
|
203
|
+
'inverse': undefined,
|
|
204
|
+
},
|
|
205
|
+
'future': {
|
|
206
|
+
'linear': undefined,
|
|
207
|
+
'inverse': undefined,
|
|
208
|
+
},
|
|
209
|
+
},
|
|
158
210
|
'fees': {
|
|
159
211
|
'trading': {
|
|
160
212
|
'tierBased': false,
|
package/js/src/coinlist.js
CHANGED
|
@@ -207,6 +207,83 @@ export default class coinlist extends Exchange {
|
|
|
207
207
|
},
|
|
208
208
|
},
|
|
209
209
|
},
|
|
210
|
+
'features': {
|
|
211
|
+
'default': {
|
|
212
|
+
'sandbox': false,
|
|
213
|
+
'createOrder': {
|
|
214
|
+
'marginMode': false,
|
|
215
|
+
'triggerPrice': true,
|
|
216
|
+
'triggerPriceType': {
|
|
217
|
+
'last': true,
|
|
218
|
+
'mark': true,
|
|
219
|
+
'index': true,
|
|
220
|
+
},
|
|
221
|
+
'triggerDirection': false,
|
|
222
|
+
'stopLossPrice': false,
|
|
223
|
+
'takeProfitPrice': false,
|
|
224
|
+
'attachedStopLossTakeProfit': undefined,
|
|
225
|
+
'timeInForce': {
|
|
226
|
+
'IOC': false,
|
|
227
|
+
'FOK': false,
|
|
228
|
+
'PO': true,
|
|
229
|
+
'GTD': false,
|
|
230
|
+
},
|
|
231
|
+
'hedged': false,
|
|
232
|
+
'trailing': true,
|
|
233
|
+
'leverage': false,
|
|
234
|
+
'marketBuyByCost': false,
|
|
235
|
+
'marketBuyRequiresPrice': false,
|
|
236
|
+
'selfTradePrevention': true,
|
|
237
|
+
'iceberg': false,
|
|
238
|
+
},
|
|
239
|
+
'createOrders': undefined,
|
|
240
|
+
'fetchMyTrades': {
|
|
241
|
+
'marginMode': false,
|
|
242
|
+
'limit': 500,
|
|
243
|
+
'daysBack': 100000,
|
|
244
|
+
'untilDays': 100000,
|
|
245
|
+
},
|
|
246
|
+
'fetchOrder': {
|
|
247
|
+
'marginMode': false,
|
|
248
|
+
'trigger': false,
|
|
249
|
+
'trailing': false,
|
|
250
|
+
},
|
|
251
|
+
'fetchOpenOrders': {
|
|
252
|
+
'marginMode': false,
|
|
253
|
+
'limit': 500,
|
|
254
|
+
'trigger': false,
|
|
255
|
+
'trailing': false,
|
|
256
|
+
},
|
|
257
|
+
'fetchOrders': {
|
|
258
|
+
'marginMode': false,
|
|
259
|
+
'limit': 500,
|
|
260
|
+
'daysBack': 100000,
|
|
261
|
+
'untilDays': 100000,
|
|
262
|
+
'trigger': false,
|
|
263
|
+
'trailing': false,
|
|
264
|
+
},
|
|
265
|
+
'fetchClosedOrders': {
|
|
266
|
+
'marginMode': false,
|
|
267
|
+
'limit': 500,
|
|
268
|
+
'daysBack': 100000,
|
|
269
|
+
'daysBackCanceled': undefined,
|
|
270
|
+
'untilDays': 100000,
|
|
271
|
+
'trigger': false,
|
|
272
|
+
'trailing': false,
|
|
273
|
+
},
|
|
274
|
+
'fetchOHLCV': {
|
|
275
|
+
'limit': 300,
|
|
276
|
+
},
|
|
277
|
+
},
|
|
278
|
+
'swap': {
|
|
279
|
+
'linear': undefined,
|
|
280
|
+
'inverse': undefined,
|
|
281
|
+
},
|
|
282
|
+
'future': {
|
|
283
|
+
'linear': undefined,
|
|
284
|
+
'inverse': undefined,
|
|
285
|
+
},
|
|
286
|
+
},
|
|
210
287
|
'fees': {
|
|
211
288
|
'trading': {
|
|
212
289
|
'feeSide': 'get',
|
package/js/src/coinmate.js
CHANGED
|
@@ -212,6 +212,69 @@ export default class coinmate extends Exchange {
|
|
|
212
212
|
},
|
|
213
213
|
},
|
|
214
214
|
},
|
|
215
|
+
'features': {
|
|
216
|
+
'spot': {
|
|
217
|
+
'sandbox': false,
|
|
218
|
+
'createOrder': {
|
|
219
|
+
'marginMode': false,
|
|
220
|
+
'triggerPrice': true,
|
|
221
|
+
'triggerPriceType': undefined,
|
|
222
|
+
'triggerDirection': false,
|
|
223
|
+
'stopLossPrice': false,
|
|
224
|
+
'takeProfitPrice': false,
|
|
225
|
+
'attachedStopLossTakeProfit': undefined,
|
|
226
|
+
'timeInForce': {
|
|
227
|
+
'IOC': true,
|
|
228
|
+
'FOK': false,
|
|
229
|
+
'PO': true,
|
|
230
|
+
'GTD': false,
|
|
231
|
+
},
|
|
232
|
+
'hedged': false,
|
|
233
|
+
'trailing': true,
|
|
234
|
+
'leverage': false,
|
|
235
|
+
'marketBuyByCost': false,
|
|
236
|
+
'marketBuyRequiresPrice': false,
|
|
237
|
+
'selfTradePrevention': false,
|
|
238
|
+
'iceberg': true, // todo
|
|
239
|
+
},
|
|
240
|
+
'createOrders': undefined,
|
|
241
|
+
'fetchMyTrades': {
|
|
242
|
+
'marginMode': false,
|
|
243
|
+
'limit': 1000,
|
|
244
|
+
'daysBack': 100000,
|
|
245
|
+
'untilDays': 100000, // todo implement
|
|
246
|
+
},
|
|
247
|
+
'fetchOrder': {
|
|
248
|
+
'marginMode': false,
|
|
249
|
+
'trigger': false,
|
|
250
|
+
'trailing': false,
|
|
251
|
+
},
|
|
252
|
+
'fetchOpenOrders': {
|
|
253
|
+
'marginMode': false,
|
|
254
|
+
'limit': undefined,
|
|
255
|
+
'trigger': false,
|
|
256
|
+
'trailing': false,
|
|
257
|
+
},
|
|
258
|
+
'fetchOrders': {
|
|
259
|
+
'marginMode': false,
|
|
260
|
+
'limit': 100,
|
|
261
|
+
'daysBack': undefined,
|
|
262
|
+
'untilDays': undefined,
|
|
263
|
+
'trigger': false,
|
|
264
|
+
'trailing': false,
|
|
265
|
+
},
|
|
266
|
+
'fetchClosedOrders': undefined,
|
|
267
|
+
'fetchOHLCV': undefined,
|
|
268
|
+
},
|
|
269
|
+
'swap': {
|
|
270
|
+
'linear': undefined,
|
|
271
|
+
'inverse': undefined,
|
|
272
|
+
},
|
|
273
|
+
'future': {
|
|
274
|
+
'linear': undefined,
|
|
275
|
+
'inverse': undefined,
|
|
276
|
+
},
|
|
277
|
+
},
|
|
215
278
|
'exceptions': {
|
|
216
279
|
'exact': {
|
|
217
280
|
'No order with given ID': OrderNotFound,
|
package/js/src/coinmetro.js
CHANGED
|
@@ -214,6 +214,74 @@ export default class coinmetro extends Exchange {
|
|
|
214
214
|
'currenciesByIdForParseMarket': undefined,
|
|
215
215
|
'currencyIdsListForParseMarket': undefined,
|
|
216
216
|
},
|
|
217
|
+
'features': {
|
|
218
|
+
'spot': {
|
|
219
|
+
'sandbox': true,
|
|
220
|
+
'createOrder': {
|
|
221
|
+
'marginMode': true,
|
|
222
|
+
'triggerPrice': true,
|
|
223
|
+
'triggerPriceType': undefined,
|
|
224
|
+
'triggerDirection': false,
|
|
225
|
+
'stopLossPrice': false,
|
|
226
|
+
'takeProfitPrice': false,
|
|
227
|
+
'attachedStopLossTakeProfit': {
|
|
228
|
+
'triggerPriceType': undefined,
|
|
229
|
+
'price': false,
|
|
230
|
+
},
|
|
231
|
+
'timeInForce': {
|
|
232
|
+
'IOC': true,
|
|
233
|
+
'FOK': true,
|
|
234
|
+
'PO': false,
|
|
235
|
+
'GTD': true,
|
|
236
|
+
},
|
|
237
|
+
'hedged': false,
|
|
238
|
+
'trailing': false,
|
|
239
|
+
'leverage': false,
|
|
240
|
+
'marketBuyByCost': true,
|
|
241
|
+
'marketBuyRequiresPrice': false,
|
|
242
|
+
'selfTradePrevention': false,
|
|
243
|
+
'iceberg': true,
|
|
244
|
+
},
|
|
245
|
+
'createOrders': undefined,
|
|
246
|
+
'fetchMyTrades': {
|
|
247
|
+
'marginMode': false,
|
|
248
|
+
'limit': undefined,
|
|
249
|
+
'daysBack': 100000,
|
|
250
|
+
'untilDays': undefined,
|
|
251
|
+
},
|
|
252
|
+
'fetchOrder': {
|
|
253
|
+
'marginMode': false,
|
|
254
|
+
'trigger': false,
|
|
255
|
+
'trailing': false,
|
|
256
|
+
},
|
|
257
|
+
'fetchOpenOrders': {
|
|
258
|
+
'marginMode': false,
|
|
259
|
+
'limit': undefined,
|
|
260
|
+
'trigger': false,
|
|
261
|
+
'trailing': false,
|
|
262
|
+
},
|
|
263
|
+
'fetchOrders': {
|
|
264
|
+
'marginMode': false,
|
|
265
|
+
'limit': undefined,
|
|
266
|
+
'daysBack': 100000,
|
|
267
|
+
'untilDays': undefined,
|
|
268
|
+
'trigger': false,
|
|
269
|
+
'trailing': false,
|
|
270
|
+
},
|
|
271
|
+
'fetchClosedOrders': undefined,
|
|
272
|
+
'fetchOHLCV': {
|
|
273
|
+
'limit': 1000,
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
'swap': {
|
|
277
|
+
'linear': undefined,
|
|
278
|
+
'inverse': undefined,
|
|
279
|
+
},
|
|
280
|
+
'future': {
|
|
281
|
+
'linear': undefined,
|
|
282
|
+
'inverse': undefined,
|
|
283
|
+
},
|
|
284
|
+
},
|
|
217
285
|
'exceptions': {
|
|
218
286
|
// https://trade-docs.coinmetro.co/?javascript--nodejs#message-codes
|
|
219
287
|
'exact': {
|