ccxt 4.4.49 → 4.4.50

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.
Files changed (122) hide show
  1. package/README.md +3 -3
  2. package/dist/ccxt.browser.min.js +3 -3
  3. package/dist/cjs/ccxt.js +1 -1
  4. package/dist/cjs/src/alpaca.js +64 -1
  5. package/dist/cjs/src/base/Exchange.js +75 -0
  6. package/dist/cjs/src/binance.js +8 -4
  7. package/dist/cjs/src/bitfinex1.js +22 -22
  8. package/dist/cjs/src/blofin.js +2 -2
  9. package/dist/cjs/src/bybit.js +2 -2
  10. package/dist/cjs/src/coinex.js +4 -4
  11. package/dist/cjs/src/coinmetro.js +1 -1
  12. package/dist/cjs/src/defx.js +1 -1
  13. package/dist/cjs/src/ellipx.js +1 -0
  14. package/dist/cjs/src/gate.js +1 -1
  15. package/dist/cjs/src/hollaex.js +13 -19
  16. package/dist/cjs/src/hyperliquid.js +4 -4
  17. package/dist/cjs/src/krakenfutures.js +1 -1
  18. package/dist/cjs/src/kucoin.js +49 -71
  19. package/dist/cjs/src/kuna.js +1 -1
  20. package/dist/cjs/src/mexc.js +3 -2
  21. package/dist/cjs/src/okcoin.js +13 -5
  22. package/dist/cjs/src/okx.js +1 -1
  23. package/dist/cjs/src/paradex.js +1 -1
  24. package/dist/cjs/src/paymium.js +42 -0
  25. package/dist/cjs/src/pro/bitfinex1.js +4 -4
  26. package/dist/cjs/src/pro/bitvavo.js +1 -1
  27. package/dist/cjs/src/pro/blofin.js +1 -1
  28. package/dist/cjs/src/pro/bybit.js +1 -1
  29. package/dist/cjs/src/pro/coincatch.js +2 -2
  30. package/dist/cjs/src/pro/cryptocom.js +2 -2
  31. package/dist/cjs/src/pro/defx.js +1 -1
  32. package/dist/cjs/src/pro/exmo.js +1 -1
  33. package/dist/cjs/src/pro/gemini.js +1 -1
  34. package/dist/cjs/src/pro/hashkey.js +2 -2
  35. package/dist/cjs/src/pro/hyperliquid.js +2 -2
  36. package/dist/cjs/src/pro/kucoin.js +1 -1
  37. package/dist/cjs/src/pro/okx.js +1 -1
  38. package/dist/cjs/src/pro/oxfun.js +1 -1
  39. package/dist/cjs/src/probit.js +68 -1
  40. package/dist/cjs/src/timex.js +67 -0
  41. package/dist/cjs/src/tokocrypto.js +82 -5
  42. package/dist/cjs/src/tradeogre.js +55 -2
  43. package/dist/cjs/src/whitebit.js +11 -4
  44. package/examples/README.md +6 -0
  45. package/js/ccxt.d.ts +1 -1
  46. package/js/ccxt.js +1 -1
  47. package/js/src/abstract/binance.d.ts +1 -0
  48. package/js/src/abstract/binancecoinm.d.ts +1 -0
  49. package/js/src/abstract/binanceus.d.ts +1 -0
  50. package/js/src/abstract/binanceusdm.d.ts +1 -0
  51. package/js/src/alpaca.d.ts +35 -0
  52. package/js/src/alpaca.js +64 -1
  53. package/js/src/base/Exchange.js +75 -0
  54. package/js/src/binance.d.ts +1 -0
  55. package/js/src/binance.js +8 -4
  56. package/js/src/bitfinex1.d.ts +22 -22
  57. package/js/src/bitfinex1.js +22 -22
  58. package/js/src/blofin.d.ts +1 -1
  59. package/js/src/blofin.js +2 -2
  60. package/js/src/bybit.d.ts +2 -2
  61. package/js/src/bybit.js +2 -2
  62. package/js/src/coinex.js +4 -4
  63. package/js/src/coinmetro.d.ts +1 -1
  64. package/js/src/coinmetro.js +1 -1
  65. package/js/src/defx.d.ts +1 -1
  66. package/js/src/defx.js +1 -1
  67. package/js/src/ellipx.d.ts +1 -0
  68. package/js/src/ellipx.js +1 -0
  69. package/js/src/gate.d.ts +1 -1
  70. package/js/src/gate.js +1 -1
  71. package/js/src/hollaex.d.ts +2 -1
  72. package/js/src/hollaex.js +13 -19
  73. package/js/src/hyperliquid.d.ts +3 -3
  74. package/js/src/hyperliquid.js +4 -4
  75. package/js/src/krakenfutures.d.ts +1 -1
  76. package/js/src/krakenfutures.js +1 -1
  77. package/js/src/kucoin.js +49 -71
  78. package/js/src/kuna.d.ts +1 -1
  79. package/js/src/kuna.js +1 -1
  80. package/js/src/mexc.js +3 -2
  81. package/js/src/okcoin.js +13 -5
  82. package/js/src/okx.d.ts +1 -1
  83. package/js/src/okx.js +1 -1
  84. package/js/src/paradex.d.ts +1 -1
  85. package/js/src/paradex.js +1 -1
  86. package/js/src/paymium.js +42 -0
  87. package/js/src/pro/bitfinex1.d.ts +4 -4
  88. package/js/src/pro/bitfinex1.js +4 -4
  89. package/js/src/pro/bitvavo.d.ts +1 -1
  90. package/js/src/pro/bitvavo.js +1 -1
  91. package/js/src/pro/blofin.d.ts +1 -1
  92. package/js/src/pro/blofin.js +1 -1
  93. package/js/src/pro/bybit.d.ts +1 -1
  94. package/js/src/pro/bybit.js +1 -1
  95. package/js/src/pro/coincatch.d.ts +2 -2
  96. package/js/src/pro/coincatch.js +2 -2
  97. package/js/src/pro/cryptocom.d.ts +2 -2
  98. package/js/src/pro/cryptocom.js +2 -2
  99. package/js/src/pro/defx.d.ts +1 -1
  100. package/js/src/pro/defx.js +1 -1
  101. package/js/src/pro/exmo.d.ts +1 -1
  102. package/js/src/pro/exmo.js +1 -1
  103. package/js/src/pro/gemini.d.ts +1 -1
  104. package/js/src/pro/gemini.js +1 -1
  105. package/js/src/pro/hashkey.d.ts +2 -2
  106. package/js/src/pro/hashkey.js +2 -2
  107. package/js/src/pro/hyperliquid.d.ts +2 -2
  108. package/js/src/pro/hyperliquid.js +2 -2
  109. package/js/src/pro/kucoin.d.ts +1 -1
  110. package/js/src/pro/kucoin.js +1 -1
  111. package/js/src/pro/okx.d.ts +1 -1
  112. package/js/src/pro/okx.js +1 -1
  113. package/js/src/pro/oxfun.d.ts +1 -1
  114. package/js/src/pro/oxfun.js +1 -1
  115. package/js/src/probit.js +68 -1
  116. package/js/src/timex.js +67 -0
  117. package/js/src/tokocrypto.d.ts +2 -3
  118. package/js/src/tokocrypto.js +82 -5
  119. package/js/src/tradeogre.d.ts +4 -2
  120. package/js/src/tradeogre.js +55 -2
  121. package/js/src/whitebit.js +11 -4
  122. package/package.json +1 -1
package/js/src/hollaex.js CHANGED
@@ -831,13 +831,14 @@ export default class hollaex extends Exchange {
831
831
  /**
832
832
  * @method
833
833
  * @name hollaex#fetchOHLCV
834
- * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
834
+ * @description hollaex has large gaps between candles, so it's recommended to specify since
835
835
  * @see https://apidocs.hollaex.com/#chart
836
836
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
837
837
  * @param {string} timeframe the length of time each candle represents
838
838
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
839
839
  * @param {int} [limit] the maximum amount of candles to fetch
840
840
  * @param {object} [params] extra parameters specific to the exchange API endpoint
841
+ * @param {int} [params.until] timestamp in ms of the latest candle to fetch
841
842
  * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
842
843
  */
843
844
  async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
@@ -847,27 +848,20 @@ export default class hollaex extends Exchange {
847
848
  'symbol': market['id'],
848
849
  'resolution': this.safeString(this.timeframes, timeframe, timeframe),
849
850
  };
850
- const duration = this.parseTimeframe(timeframe);
851
- if (since === undefined) {
852
- if (limit === undefined) {
853
- limit = 1000; // they have no defaults and can actually provide tens of thousands of bars in one request, but we should cap "default" at generous amount
854
- }
855
- const end = this.seconds();
856
- const start = end - duration * limit;
857
- request['to'] = end;
858
- request['from'] = start;
851
+ const until = this.safeInteger(params, 'until');
852
+ let end = this.seconds();
853
+ if (until !== undefined) {
854
+ end = this.parseToInt(until / 1000);
855
+ }
856
+ const defaultSpan = 2592000; // 30 days
857
+ if (since !== undefined) {
858
+ request['from'] = this.parseToInt(since / 1000);
859
859
  }
860
860
  else {
861
- if (limit === undefined) {
862
- request['from'] = this.parseToInt(since / 1000);
863
- request['to'] = this.seconds();
864
- }
865
- else {
866
- const start = this.parseToInt(since / 1000);
867
- request['from'] = start;
868
- request['to'] = this.sum(start, duration * limit);
869
- }
861
+ request['from'] = end - defaultSpan;
870
862
  }
863
+ request['to'] = end;
864
+ params = this.omit(params, 'until');
871
865
  const response = await this.publicGetChart(this.extend(request, params));
872
866
  //
873
867
  // [
@@ -28,7 +28,7 @@ export default class hyperliquid extends Exchange {
28
28
  fetchMarkets(params?: {}): Promise<Market[]>;
29
29
  /**
30
30
  * @method
31
- * @name hyperliquid#fetchMarkets
31
+ * @name hyperliquid#fetchSwapMarkets
32
32
  * @description retrieves data on all swap markets for hyperliquid
33
33
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-perpetuals-asset-contexts-includes-mark-price-current-funding-open-interest-etc
34
34
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -37,7 +37,7 @@ export default class hyperliquid extends Exchange {
37
37
  fetchSwapMarkets(params?: {}): Promise<Market[]>;
38
38
  /**
39
39
  * @method
40
- * @name calculatePricePrecision
40
+ * @name hyperliquid#calculatePricePrecision
41
41
  * @description Helper function to calculate the Hyperliquid DECIMAL_PLACES price precision
42
42
  * @param {float} price the price to use in the calculation
43
43
  * @param {int} amountPrecision the amountPrecision to use in the calculation
@@ -47,7 +47,7 @@ export default class hyperliquid extends Exchange {
47
47
  calculatePricePrecision(price: number, amountPrecision: number, maxDecimals: number): number;
48
48
  /**
49
49
  * @method
50
- * @name hyperliquid#fetchMarkets
50
+ * @name hyperliquid#fetchSpotMarkets
51
51
  * @description retrieves data on all spot markets for hyperliquid
52
52
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/spot#retrieve-spot-asset-contexts
53
53
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -400,7 +400,7 @@ export default class hyperliquid extends Exchange {
400
400
  }
401
401
  /**
402
402
  * @method
403
- * @name hyperliquid#fetchMarkets
403
+ * @name hyperliquid#fetchSwapMarkets
404
404
  * @description retrieves data on all swap markets for hyperliquid
405
405
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-perpetuals-asset-contexts-includes-mark-price-current-funding-open-interest-etc
406
406
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -455,7 +455,7 @@ export default class hyperliquid extends Exchange {
455
455
  }
456
456
  /**
457
457
  * @method
458
- * @name calculatePricePrecision
458
+ * @name hyperliquid#calculatePricePrecision
459
459
  * @description Helper function to calculate the Hyperliquid DECIMAL_PLACES price precision
460
460
  * @param {float} price the price to use in the calculation
461
461
  * @param {int} amountPrecision the amountPrecision to use in the calculation
@@ -504,7 +504,7 @@ export default class hyperliquid extends Exchange {
504
504
  }
505
505
  /**
506
506
  * @method
507
- * @name hyperliquid#fetchMarkets
507
+ * @name hyperliquid#fetchSpotMarkets
508
508
  * @description retrieves data on all spot markets for hyperliquid
509
509
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/spot#retrieve-spot-asset-contexts
510
510
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -1402,7 +1402,7 @@ export default class hyperliquid extends Exchange {
1402
1402
  createOrdersRequest(orders, params = {}) {
1403
1403
  /**
1404
1404
  * @method
1405
- * @name hyperliquid#createOrders
1405
+ * @name hyperliquid#createOrdersRequest
1406
1406
  * @description create a list of trade orders
1407
1407
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#place-an-order
1408
1408
  * @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
@@ -39,7 +39,7 @@ export default class krakenfutures extends Exchange {
39
39
  parseTicker(ticker: Dict, market?: Market): Ticker;
40
40
  /**
41
41
  * @method
42
- * @name kraken#fetchOHLCV
42
+ * @name krakenfutures#fetchOHLCV
43
43
  * @see https://docs.futures.kraken.com/#http-api-charts-candles
44
44
  * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
45
45
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
@@ -702,7 +702,7 @@ export default class krakenfutures extends Exchange {
702
702
  }
703
703
  /**
704
704
  * @method
705
- * @name kraken#fetchOHLCV
705
+ * @name krakenfutures#fetchOHLCV
706
706
  * @see https://docs.futures.kraken.com/#http-api-charts-candles
707
707
  * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
708
708
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
package/js/src/kucoin.js CHANGED
@@ -1344,8 +1344,7 @@ export default class kucoin extends Exchange {
1344
1344
  * @returns {object} an associative dictionary of currencies
1345
1345
  */
1346
1346
  async fetchCurrencies(params = {}) {
1347
- const promises = [];
1348
- promises.push(this.publicGetCurrencies(params));
1347
+ const response = await this.publicGetCurrencies(params);
1349
1348
  //
1350
1349
  // {
1351
1350
  // "code":"200000",
@@ -1371,92 +1370,40 @@ export default class kucoin extends Exchange {
1371
1370
  // "isDepositEnabled":false,
1372
1371
  // "confirms":12,
1373
1372
  // "preConfirms":12,
1373
+ // "withdrawPrecision": 8,
1374
+ // "maxWithdraw": null,
1375
+ // "maxDeposit": null,
1376
+ // "needTag": false,
1374
1377
  // "contractAddress":"0xa6446d655a0c34bc4f05042ee88170d056cbaf45",
1375
1378
  // "depositFeeRate": "0.001", // present for some currencies/networks
1376
1379
  // }
1377
1380
  // ]
1378
1381
  // },
1379
- // }
1380
- //
1381
- promises.push(this.fetchWebEndpoint('fetchCurrencies', 'webExchangeGetCurrencyCurrencyChainInfo', true));
1382
- //
1383
- // {
1384
- // "success": true,
1385
- // "code": "200",
1386
- // "msg": "success",
1387
- // "retry": false,
1388
- // "data": [
1389
- // {
1390
- // "status": "enabled",
1391
- // "currency": "BTC",
1392
- // "isChainEnabled": "true",
1393
- // "chain": "btc",
1394
- // "chainName": "BTC",
1395
- // "chainFullName": "Bitcoin",
1396
- // "walletPrecision": "8",
1397
- // "isDepositEnabled": "true",
1398
- // "depositMinSize": "0.00005",
1399
- // "confirmationCount": "2",
1400
- // "isWithdrawEnabled": "true",
1401
- // "withdrawMinSize": "0.001",
1402
- // "withdrawMinFee": "0.0005",
1403
- // "withdrawFeeRate": "0",
1404
- // "depositDisabledTip": "Wallet Maintenance",
1405
- // "preDepositTipEnabled": "true",
1406
- // "preDepositTip": "Do not transfer from ETH network directly",
1407
- // "withdrawDisabledTip": "",
1408
- // "preWithdrawTipEnabled": "false",
1409
- // "preWithdrawTip": "",
1410
- // "orgAddress": "",
1411
- // "userAddressName": "Memo",
1412
- // },
1413
1382
  // ]
1414
1383
  // }
1415
1384
  //
1416
- const responses = await Promise.all(promises);
1417
- const currenciesResponse = this.safeDict(responses, 0, {});
1418
- const currenciesData = this.safeList(currenciesResponse, 'data', []);
1419
- const additionalResponse = this.safeDict(responses, 1, {});
1420
- const additionalData = this.safeList(additionalResponse, 'data', []);
1421
- const additionalDataGrouped = this.groupBy(additionalData, 'currency');
1385
+ const currenciesData = this.safeList(response, 'data', []);
1422
1386
  const result = {};
1423
1387
  for (let i = 0; i < currenciesData.length; i++) {
1424
1388
  const entry = currenciesData[i];
1425
1389
  const id = this.safeString(entry, 'currency');
1426
1390
  const name = this.safeString(entry, 'fullName');
1427
1391
  const code = this.safeCurrencyCode(id);
1428
- let isWithdrawEnabled = undefined;
1429
- let isDepositEnabled = undefined;
1430
1392
  const networks = {};
1431
1393
  const chains = this.safeList(entry, 'chains', []);
1432
- const extraChainsData = this.indexBy(this.safeList(additionalDataGrouped, id, []), 'chain');
1433
1394
  const rawPrecision = this.safeString(entry, 'precision');
1434
1395
  const precision = this.parseNumber(this.parsePrecision(rawPrecision));
1435
1396
  const chainsLength = chains.length;
1436
1397
  if (!chainsLength) {
1437
- // https://t.me/KuCoin_API/173118
1438
- isWithdrawEnabled = false;
1439
- isDepositEnabled = false;
1398
+ // one buggy coin, which doesn't contain info https://t.me/KuCoin_API/173118
1399
+ continue;
1440
1400
  }
1441
1401
  for (let j = 0; j < chainsLength; j++) {
1442
1402
  const chain = chains[j];
1443
1403
  const chainId = this.safeString(chain, 'chainId');
1444
1404
  const networkCode = this.networkIdToCode(chainId, code);
1445
1405
  const chainWithdrawEnabled = this.safeBool(chain, 'isWithdrawEnabled', false);
1446
- if (isWithdrawEnabled === undefined) {
1447
- isWithdrawEnabled = chainWithdrawEnabled;
1448
- }
1449
- else {
1450
- isWithdrawEnabled = isWithdrawEnabled || chainWithdrawEnabled;
1451
- }
1452
1406
  const chainDepositEnabled = this.safeBool(chain, 'isDepositEnabled', false);
1453
- if (isDepositEnabled === undefined) {
1454
- isDepositEnabled = chainDepositEnabled;
1455
- }
1456
- else {
1457
- isDepositEnabled = isDepositEnabled || chainDepositEnabled;
1458
- }
1459
- const chainExtraData = this.safeDict(extraChainsData, chainId, {});
1460
1407
  networks[networkCode] = {
1461
1408
  'info': chain,
1462
1409
  'id': chainId,
@@ -1466,35 +1413,35 @@ export default class kucoin extends Exchange {
1466
1413
  'fee': this.safeNumber(chain, 'withdrawalMinFee'),
1467
1414
  'deposit': chainDepositEnabled,
1468
1415
  'withdraw': chainWithdrawEnabled,
1469
- 'precision': this.parseNumber(this.parsePrecision(this.safeString(chainExtraData, 'walletPrecision'))),
1416
+ 'precision': this.parseNumber(this.parsePrecision(this.safeString(chain, 'withdrawPrecision'))),
1470
1417
  'limits': {
1471
1418
  'withdraw': {
1472
1419
  'min': this.safeNumber(chain, 'withdrawalMinSize'),
1473
- 'max': undefined,
1420
+ 'max': this.safeNumber(chain, 'maxWithdraw'),
1474
1421
  },
1475
1422
  'deposit': {
1476
1423
  'min': this.safeNumber(chain, 'depositMinSize'),
1477
- 'max': undefined,
1424
+ 'max': this.safeNumber(chain, 'maxDeposit'),
1478
1425
  },
1479
1426
  },
1480
1427
  };
1481
1428
  }
1482
1429
  // kucoin has determined 'fiat' currencies with below logic
1483
1430
  const isFiat = (rawPrecision === '2') && (chainsLength === 0);
1484
- result[code] = {
1431
+ result[code] = this.safeCurrencyStructure({
1485
1432
  'id': id,
1486
1433
  'name': name,
1487
1434
  'code': code,
1488
1435
  'type': isFiat ? 'fiat' : 'crypto',
1489
1436
  'precision': precision,
1490
1437
  'info': entry,
1491
- 'active': (isDepositEnabled || isWithdrawEnabled),
1492
- 'deposit': isDepositEnabled,
1493
- 'withdraw': isWithdrawEnabled,
1494
- 'fee': undefined,
1495
- 'limits': this.limits,
1496
1438
  'networks': networks,
1497
- };
1439
+ 'deposit': undefined,
1440
+ 'withdraw': undefined,
1441
+ 'active': undefined,
1442
+ 'fee': undefined,
1443
+ 'limits': undefined,
1444
+ });
1498
1445
  }
1499
1446
  return result;
1500
1447
  }
@@ -1638,6 +1585,37 @@ export default class kucoin extends Exchange {
1638
1585
  // "chain": "ERC20"
1639
1586
  // }
1640
1587
  //
1588
+ if ('chains' in fee) {
1589
+ // if data obtained through `currencies` endpoint
1590
+ const resultNew = {
1591
+ 'info': fee,
1592
+ 'withdraw': {
1593
+ 'fee': undefined,
1594
+ 'percentage': false,
1595
+ },
1596
+ 'deposit': {
1597
+ 'fee': undefined,
1598
+ 'percentage': undefined,
1599
+ },
1600
+ 'networks': {},
1601
+ };
1602
+ const chains = this.safeList(fee, 'chains', []);
1603
+ for (let i = 0; i < chains.length; i++) {
1604
+ const chain = chains[i];
1605
+ const networkCodeNew = this.networkIdToCode(this.safeString(chain, 'chainId'), this.safeString(currency, 'code'));
1606
+ resultNew['networks'][networkCodeNew] = {
1607
+ 'withdraw': {
1608
+ 'fee': this.safeNumber(chain, 'withdrawMinFee'),
1609
+ 'percentage': false,
1610
+ },
1611
+ 'deposit': {
1612
+ 'fee': undefined,
1613
+ 'percentage': undefined,
1614
+ },
1615
+ };
1616
+ }
1617
+ return resultNew;
1618
+ }
1641
1619
  const minWithdrawFee = this.safeNumber(fee, 'withdrawMinFee');
1642
1620
  const result = {
1643
1621
  'info': fee,
package/js/src/kuna.d.ts CHANGED
@@ -131,7 +131,7 @@ export default class kuna extends Exchange {
131
131
  cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
132
132
  /**
133
133
  * @method
134
- * @name kuna#cancelOrder
134
+ * @name kuna#cancelOrders
135
135
  * @description cancels an open order
136
136
  * @param {string} ids order ids
137
137
  * @param {string} symbol not used by kuna cancelOrder
package/js/src/kuna.js CHANGED
@@ -1082,7 +1082,7 @@ export default class kuna extends Exchange {
1082
1082
  }
1083
1083
  /**
1084
1084
  * @method
1085
- * @name kuna#cancelOrder
1085
+ * @name kuna#cancelOrders
1086
1086
  * @description cancels an open order
1087
1087
  * @param {string} ids order ids
1088
1088
  * @param {string} symbol not used by kuna cancelOrder
package/js/src/mexc.js CHANGED
@@ -1384,6 +1384,7 @@ export default class mexc extends Exchange {
1384
1384
  const quote = this.safeCurrencyCode(quoteId);
1385
1385
  const settle = this.safeCurrencyCode(settleId);
1386
1386
  const state = this.safeString(market, 'state');
1387
+ const isLinear = quote === settle;
1387
1388
  result.push({
1388
1389
  'id': id,
1389
1390
  'symbol': base + '/' + quote + ':' + settle,
@@ -1401,8 +1402,8 @@ export default class mexc extends Exchange {
1401
1402
  'option': false,
1402
1403
  'active': (state === '0'),
1403
1404
  'contract': true,
1404
- 'linear': true,
1405
- 'inverse': false,
1405
+ 'linear': isLinear,
1406
+ 'inverse': !isLinear,
1406
1407
  'taker': this.safeNumber(market, 'takerFeeRate'),
1407
1408
  'maker': this.safeNumber(market, 'makerFeeRate'),
1408
1409
  'contractSize': this.safeNumber(market, 'contractSize'),
package/js/src/okcoin.js CHANGED
@@ -691,12 +691,20 @@ export default class okcoin extends Exchange {
691
691
  async fetchTime(params = {}) {
692
692
  const response = await this.publicGetPublicTime(params);
693
693
  //
694
- // {
695
- // "iso": "2015-01-07T23:47:25.201Z",
696
- // "epoch": 1420674445.201
697
- // }
694
+ // {
695
+ // "code": "0",
696
+ // "data":
697
+ // [
698
+ // {
699
+ // "ts": "1737379360033"
700
+ // }
701
+ // ],
702
+ // "msg": ""
703
+ // }
698
704
  //
699
- return this.parse8601(this.safeString(response, 'iso'));
705
+ const data = this.safeList(response, 'data');
706
+ const timestamp = this.safeDict(data, 0);
707
+ return this.safeInteger(timestamp, 'ts');
700
708
  }
701
709
  /**
702
710
  * @method
package/js/src/okx.d.ts CHANGED
@@ -577,7 +577,7 @@ export default class okx extends Exchange {
577
577
  fetchPositions(symbols?: Strings, params?: {}): Promise<Position[]>;
578
578
  /**
579
579
  * @method
580
- * @name okx#fetchPositions
580
+ * @name okx#fetchPositionsForSymbol
581
581
  * @see https://www.okx.com/docs-v5/en/#rest-api-account-get-positions
582
582
  * @description fetch all open positions for specific symbol
583
583
  * @param {string} symbol unified market symbol
package/js/src/okx.js CHANGED
@@ -5733,7 +5733,7 @@ export default class okx extends Exchange {
5733
5733
  }
5734
5734
  /**
5735
5735
  * @method
5736
- * @name okx#fetchPositions
5736
+ * @name okx#fetchPositionsForSymbol
5737
5737
  * @see https://www.okx.com/docs-v5/en/#rest-api-account-get-positions
5738
5738
  * @description fetch all open positions for specific symbol
5739
5739
  * @param {string} symbol unified market symbol
@@ -246,7 +246,7 @@ export default class paradex extends Exchange {
246
246
  fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
247
247
  /**
248
248
  * @method
249
- * @name paradex#fetchPositions
249
+ * @name paradex#fetchPosition
250
250
  * @description fetch data on an open position
251
251
  * @see https://docs.api.prod.paradex.trade/#list-open-positions
252
252
  * @param {string} symbol unified market symbol of the market the position is held in
package/js/src/paradex.js CHANGED
@@ -1722,7 +1722,7 @@ export default class paradex extends Exchange {
1722
1722
  }
1723
1723
  /**
1724
1724
  * @method
1725
- * @name paradex#fetchPositions
1725
+ * @name paradex#fetchPosition
1726
1726
  * @description fetch data on an open position
1727
1727
  * @see https://docs.api.prod.paradex.trade/#list-open-positions
1728
1728
  * @param {string} symbol unified market symbol of the market the position is held in
package/js/src/paymium.js CHANGED
@@ -114,6 +114,48 @@ export default class paymium extends Exchange {
114
114
  },
115
115
  },
116
116
  'precisionMode': TICK_SIZE,
117
+ 'features': {
118
+ 'spot': {
119
+ 'sandbox': false,
120
+ 'createOrder': {
121
+ 'marginMode': false,
122
+ 'triggerPrice': false,
123
+ 'triggerDirection': false,
124
+ 'triggerPriceType': undefined,
125
+ 'stopLossPrice': false,
126
+ 'takeProfitPrice': false,
127
+ 'attachedStopLossTakeProfit': undefined,
128
+ 'timeInForce': {
129
+ 'IOC': false,
130
+ 'FOK': false,
131
+ 'PO': false,
132
+ 'GTD': false,
133
+ },
134
+ 'hedged': false,
135
+ 'trailing': false,
136
+ 'leverage': false,
137
+ 'marketBuyByCost': true,
138
+ 'marketBuyRequiresPrice': false,
139
+ 'selfTradePrevention': false,
140
+ 'iceberg': false,
141
+ },
142
+ 'createOrders': undefined,
143
+ 'fetchMyTrades': undefined,
144
+ 'fetchOrder': undefined,
145
+ 'fetchOpenOrders': undefined,
146
+ 'fetchOrders': undefined,
147
+ 'fetchClosedOrders': undefined,
148
+ 'fetchOHLCV': undefined, // todo
149
+ },
150
+ 'swap': {
151
+ 'linear': undefined,
152
+ 'inverse': undefined,
153
+ },
154
+ 'future': {
155
+ 'linear': undefined,
156
+ 'inverse': undefined,
157
+ },
158
+ },
117
159
  });
118
160
  }
119
161
  parseBalance(response) {
@@ -6,7 +6,7 @@ export default class bitfinex1 extends bitfinex1Rest {
6
6
  subscribe(channel: any, symbol: any, params?: {}): Promise<any>;
7
7
  /**
8
8
  * @method
9
- * @name bitfinex#watchTrades
9
+ * @name bitfinex1#watchTrades
10
10
  * @description get the list of most recent trades for a particular symbol
11
11
  * @see https://docs.bitfinex.com/v1/reference/ws-public-trades
12
12
  * @param {string} symbol unified symbol of the market to fetch trades for
@@ -18,7 +18,7 @@ export default class bitfinex1 extends bitfinex1Rest {
18
18
  watchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
19
19
  /**
20
20
  * @method
21
- * @name bitfinex#watchTicker
21
+ * @name bitfinex1#watchTicker
22
22
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
23
23
  * @see https://docs.bitfinex.com/v1/reference/ws-public-ticker
24
24
  * @param {string} symbol unified symbol of the market to fetch the ticker for
@@ -31,7 +31,7 @@ export default class bitfinex1 extends bitfinex1Rest {
31
31
  handleTicker(client: Client, message: any, subscription: any): void;
32
32
  /**
33
33
  * @method
34
- * @name bitfinex#watchOrderBook
34
+ * @name bitfinex1#watchOrderBook
35
35
  * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
36
36
  * @see https://docs.bitfinex.com/v1/reference/ws-public-order-books
37
37
  * @param {string} symbol unified symbol of the market to fetch the order book for
@@ -49,7 +49,7 @@ export default class bitfinex1 extends bitfinex1Rest {
49
49
  watchOrder(id: any, symbol?: Str, params?: {}): Promise<any>;
50
50
  /**
51
51
  * @method
52
- * @name bitfinex#watchOrders
52
+ * @name bitfinex1#watchOrders
53
53
  * @description watches information on multiple orders made by the user
54
54
  * @see https://docs.bitfinex.com/v1/reference/ws-auth-order-updates
55
55
  * @see https://docs.bitfinex.com/v1/reference/ws-auth-order-snapshots
@@ -58,7 +58,7 @@ export default class bitfinex1 extends bitfinex1Rest {
58
58
  }
59
59
  /**
60
60
  * @method
61
- * @name bitfinex#watchTrades
61
+ * @name bitfinex1#watchTrades
62
62
  * @description get the list of most recent trades for a particular symbol
63
63
  * @see https://docs.bitfinex.com/v1/reference/ws-public-trades
64
64
  * @param {string} symbol unified symbol of the market to fetch trades for
@@ -78,7 +78,7 @@ export default class bitfinex1 extends bitfinex1Rest {
78
78
  }
79
79
  /**
80
80
  * @method
81
- * @name bitfinex#watchTicker
81
+ * @name bitfinex1#watchTicker
82
82
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
83
83
  * @see https://docs.bitfinex.com/v1/reference/ws-public-ticker
84
84
  * @param {string} symbol unified symbol of the market to fetch the ticker for
@@ -251,7 +251,7 @@ export default class bitfinex1 extends bitfinex1Rest {
251
251
  }
252
252
  /**
253
253
  * @method
254
- * @name bitfinex#watchOrderBook
254
+ * @name bitfinex1#watchOrderBook
255
255
  * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
256
256
  * @see https://docs.bitfinex.com/v1/reference/ws-public-order-books
257
257
  * @param {string} symbol unified symbol of the market to fetch the order book for
@@ -462,7 +462,7 @@ export default class bitfinex1 extends bitfinex1Rest {
462
462
  }
463
463
  /**
464
464
  * @method
465
- * @name bitfinex#watchOrders
465
+ * @name bitfinex1#watchOrders
466
466
  * @description watches information on multiple orders made by the user
467
467
  * @see https://docs.bitfinex.com/v1/reference/ws-auth-order-updates
468
468
  * @see https://docs.bitfinex.com/v1/reference/ws-auth-order-snapshots
@@ -28,7 +28,7 @@ export default class bitvavo extends bitvavoRest {
28
28
  handleTicker(client: Client, message: any): void;
29
29
  /**
30
30
  * @method
31
- * @name mexc#watchBidsAsks
31
+ * @name bitvavo#watchBidsAsks
32
32
  * @description watches best bid & ask for symbols
33
33
  * @see https://docs.bitvavo.com/#tag/Market-data-subscription-WebSocket/paths/~1subscribeTicker24h/post
34
34
  * @param {string[]} symbols unified symbol of the market to fetch the ticker for
@@ -173,7 +173,7 @@ export default class bitvavo extends bitvavoRest {
173
173
  }
174
174
  /**
175
175
  * @method
176
- * @name mexc#watchBidsAsks
176
+ * @name bitvavo#watchBidsAsks
177
177
  * @description watches best bid & ask for symbols
178
178
  * @see https://docs.bitvavo.com/#tag/Market-data-subscription-WebSocket/paths/~1subscribeTicker24h/post
179
179
  * @param {string[]} symbols unified symbol of the market to fetch the ticker for
@@ -127,7 +127,7 @@ export default class blofin extends blofinRest {
127
127
  parseWsBalance(message: any): Balances;
128
128
  /**
129
129
  * @method
130
- * @name alpaca#watchOrders
130
+ * @name biofin#watchOrders
131
131
  * @description watches information on multiple orders made by the user
132
132
  * @param {string} symbol unified market symbol of the market orders were made in
133
133
  * @param {int} [since] the earliest time in ms to fetch orders for
@@ -475,7 +475,7 @@ export default class blofin extends blofinRest {
475
475
  }
476
476
  /**
477
477
  * @method
478
- * @name alpaca#watchOrders
478
+ * @name biofin#watchOrders
479
479
  * @description watches information on multiple orders made by the user
480
480
  * @param {string} symbol unified market symbol of the market orders were made in
481
481
  * @param {int} [since] the earliest time in ms to fetch orders for
@@ -199,7 +199,7 @@ export default class bybit extends bybitRest {
199
199
  watchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
200
200
  /**
201
201
  * @method
202
- * @name bybit#watchOrderBook
202
+ * @name bybit#watchOrderBookForSymbols
203
203
  * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
204
204
  * @see https://bybit-exchange.github.io/docs/v5/websocket/public/orderbook
205
205
  * @param {string[]} symbols unified array of symbols
@@ -830,7 +830,7 @@ export default class bybit extends bybitRest {
830
830
  }
831
831
  /**
832
832
  * @method
833
- * @name bybit#watchOrderBook
833
+ * @name bybit#watchOrderBookForSymbols
834
834
  * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
835
835
  * @see https://bybit-exchange.github.io/docs/v5/websocket/public/orderbook
836
836
  * @param {string[]} symbols unified array of symbols
@@ -98,7 +98,7 @@ export default class coincatch extends coincatchRest {
98
98
  unWatchOrderBook(symbol: string, params?: {}): Promise<any>;
99
99
  /**
100
100
  * @method
101
- * @name coincatch#watchOrderBook
101
+ * @name coincatch#watchOrderBookForSymbols
102
102
  * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
103
103
  * @see https://coincatch.github.io/github.io/en/spot/#depth-channel
104
104
  * @param symbols
@@ -125,7 +125,7 @@ export default class coincatch extends coincatchRest {
125
125
  watchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
126
126
  /**
127
127
  * @method
128
- * @name coincatch#watchTrades
128
+ * @name coincatch#watchTradesForSymbols
129
129
  * @description watches information on multiple trades made in a market
130
130
  * @see https://coincatch.github.io/github.io/en/spot/#trades-channel
131
131
  * @param symbols