ccxt 4.5.45 → 4.5.46

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 (52) hide show
  1. package/README.md +3 -3
  2. package/dist/ccxt.browser.min.js +2 -2
  3. package/dist/cjs/ccxt.js +1 -1
  4. package/dist/cjs/src/base/Exchange.js +3 -0
  5. package/dist/cjs/src/binance.js +11 -2
  6. package/dist/cjs/src/bitget.js +3 -1
  7. package/dist/cjs/src/bitmart.js +144 -21
  8. package/dist/cjs/src/bybit.js +58 -56
  9. package/dist/cjs/src/bydfi.js +102 -100
  10. package/dist/cjs/src/gate.js +37 -2
  11. package/dist/cjs/src/kraken.js +2 -0
  12. package/dist/cjs/src/kucoin.js +4 -2
  13. package/dist/cjs/src/okx.js +75 -57
  14. package/dist/cjs/src/paradex.js +2 -6
  15. package/dist/cjs/src/pro/bydfi.js +19 -19
  16. package/dist/cjs/src/pro/gate.js +79 -54
  17. package/dist/cjs/src/pro/grvt.js +5 -3
  18. package/dist/cjs/src/pro/htx.js +4 -4
  19. package/dist/cjs/src/pro/okx.js +1 -1
  20. package/index.d.cts +2 -0
  21. package/js/ccxt.d.ts +1 -1
  22. package/js/ccxt.js +1 -1
  23. package/js/src/abstract/bitmart.d.ts +7 -0
  24. package/js/src/abstract/bydfi.d.ts +29 -29
  25. package/js/src/abstract/kraken.d.ts +1 -0
  26. package/js/src/abstract/kucoin.d.ts +1 -0
  27. package/js/src/abstract/kucoinfutures.d.ts +1 -0
  28. package/js/src/base/Exchange.d.ts +1 -0
  29. package/js/src/base/Exchange.js +3 -0
  30. package/js/src/binance.js +11 -2
  31. package/js/src/bitget.js +3 -1
  32. package/js/src/bitmart.d.ts +18 -4
  33. package/js/src/bitmart.js +144 -21
  34. package/js/src/bybit.d.ts +1 -0
  35. package/js/src/bybit.js +58 -56
  36. package/js/src/bydfi.d.ts +31 -31
  37. package/js/src/bydfi.js +102 -100
  38. package/js/src/gate.js +37 -2
  39. package/js/src/kraken.js +2 -0
  40. package/js/src/kucoin.js +4 -2
  41. package/js/src/okx.d.ts +1 -0
  42. package/js/src/okx.js +75 -57
  43. package/js/src/paradex.d.ts +0 -1
  44. package/js/src/paradex.js +2 -6
  45. package/js/src/pro/bydfi.d.ts +18 -18
  46. package/js/src/pro/bydfi.js +19 -19
  47. package/js/src/pro/gate.d.ts +2 -2
  48. package/js/src/pro/gate.js +79 -54
  49. package/js/src/pro/grvt.js +5 -3
  50. package/js/src/pro/htx.js +4 -4
  51. package/js/src/pro/okx.js +1 -1
  52. package/package.json +2 -2
package/js/src/gate.js CHANGED
@@ -5016,6 +5016,42 @@ export default class gate extends Exchange {
5016
5016
  // order_type: '',
5017
5017
  // in_dual_mode: false,
5018
5018
  // parent_id: '0',
5019
+ //
5020
+ // unified spot: watchOrders
5021
+ //
5022
+ // {
5023
+ // "id": "1036717689726",
5024
+ // "text": "apiv4",
5025
+ // "create_time": "1774613210",
5026
+ // "update_time": "1774613210",
5027
+ // "currency_pair": "BTC_USDT",
5028
+ // "type": "limit",
5029
+ // "account": "unified",
5030
+ // "side": "buy",
5031
+ // "amount": "0.1",
5032
+ // "price": "200",
5033
+ // "time_in_force": "gtc",
5034
+ // "left": "0.1",
5035
+ // "filled_amount": "0",
5036
+ // "filled_total": "0",
5037
+ // "avg_deal_price": "0",
5038
+ // "fee": "0",
5039
+ // "fee_currency": "BTC",
5040
+ // "point_fee": "0",
5041
+ // "gt_fee": "0",
5042
+ // "rebated_fee": "0",
5043
+ // "rebated_fee_currency": "BTC",
5044
+ // "create_time_ms": "1774613210391",
5045
+ // "update_time_ms": "1774613210391",
5046
+ // "user": 10406147,
5047
+ // "event": "put",
5048
+ // "stp_id": 0,
5049
+ // "stp_act": "-",
5050
+ // "finish_as": "open",
5051
+ // "biz_info": "ch:ccxt",
5052
+ // "amend_text": "-"
5053
+ // }
5054
+ //
5019
5055
  const succeeded = this.safeBool(order, 'succeeded', true);
5020
5056
  if (!succeeded) {
5021
5057
  // cancelOrders response
@@ -5092,7 +5128,6 @@ export default class gate extends Exchange {
5092
5128
  }
5093
5129
  const exchangeSymbol = this.safeString2(order, 'currency_pair', 'market', contract);
5094
5130
  const symbol = this.safeSymbol(exchangeSymbol, market, '_', marketType);
5095
- // Everything below this(above return) is related to fees
5096
5131
  const fees = [];
5097
5132
  const gtFee = this.safeString(order, 'gt_fee');
5098
5133
  if (gtFee !== undefined) {
@@ -5121,7 +5156,7 @@ export default class gate extends Exchange {
5121
5156
  let remaining = Precise.stringAbs(remainingString);
5122
5157
  // handle spot market buy
5123
5158
  const account = this.safeString(order, 'account'); // using this instead of market type because of the conflicting ids
5124
- if (account === 'spot') {
5159
+ if ((account === 'spot') || (account === 'unified')) {
5125
5160
  const averageString = this.safeString(order, 'avg_deal_price');
5126
5161
  average = this.parseNumber(averageString);
5127
5162
  if ((type === 'market') && (side === 'buy')) {
package/js/src/kraken.js CHANGED
@@ -209,6 +209,8 @@ export default class kraken extends Exchange {
209
209
  'WithdrawAddresses': 3,
210
210
  'WithdrawStatus': 3,
211
211
  'WalletTransfer': 3,
212
+ // account
213
+ 'GetApiKeyInfo': 3,
212
214
  // sub accounts
213
215
  'CreateSubaccount': 3,
214
216
  'AccountTransfer': 3,
package/js/src/kucoin.js CHANGED
@@ -186,6 +186,7 @@ export default class kucoin extends Exchange {
186
186
  'get': {
187
187
  // account
188
188
  'user-info': 20,
189
+ 'user/api-key': 20,
189
190
  'accounts': 5,
190
191
  'accounts/{accountId}': 5,
191
192
  'accounts/ledgers': 2,
@@ -703,7 +704,7 @@ export default class kucoin extends Exchange {
703
704
  '400006': AuthenticationError,
704
705
  '400007': AuthenticationError,
705
706
  '400008': NotSupported,
706
- '400100': InsufficientFunds,
707
+ '400100': BadRequest,
707
708
  '400200': InvalidOrder,
708
709
  '400330': InvalidOrder,
709
710
  '400350': InvalidOrder,
@@ -735,6 +736,7 @@ export default class kucoin extends Exchange {
735
736
  '330008': InsufficientFunds, // {"msg":"Your current margin and leverage have reached the maximum open limit. Please increase your margin or raise your leverage to open larger positions.","code":"330008"}
736
737
  },
737
738
  'broad': {
739
+ 'pageSize should not greater than 500': BadRequest,
738
740
  'Exceeded the access frequency': RateLimitExceeded,
739
741
  'require more permission': PermissionDenied,
740
742
  // futures errors
@@ -6732,7 +6734,7 @@ export default class kucoin extends Exchange {
6732
6734
  let paginate = false;
6733
6735
  [paginate, params] = this.handleOptionAndParams(params, 'fetchWithdrawals', 'paginate');
6734
6736
  if (paginate) {
6735
- return await this.fetchPaginatedCallDynamic('fetchWithdrawals', code, since, limit, params);
6737
+ return await this.fetchPaginatedCallDynamic('fetchWithdrawals', code, since, limit, params, 500);
6736
6738
  }
6737
6739
  let request = {};
6738
6740
  let currency = undefined;
package/js/src/okx.d.ts CHANGED
@@ -58,6 +58,7 @@ export default class okx extends Exchange {
58
58
  * @returns {object} an associative dictionary of currencies
59
59
  */
60
60
  fetchCurrencies(params?: {}): Promise<Currencies>;
61
+ parseCurrency(currency: Dict): Currency;
61
62
  /**
62
63
  * @method
63
64
  * @name okx#fetchOrderBook
package/js/src/okx.js CHANGED
@@ -1070,9 +1070,12 @@ export default class okx extends Exchange {
1070
1070
  'BTC': 'Bitcoin',
1071
1071
  'BTCLN': 'Lightning',
1072
1072
  'BTCLIGHTNING': 'Lightning',
1073
+ 'BSC': 'BSC',
1073
1074
  'BEP20': 'BSC',
1074
1075
  'BRC20': 'BRC20',
1076
+ 'ETH': 'ERC20',
1075
1077
  'ERC20': 'ERC20',
1078
+ 'TRX': 'TRC20',
1076
1079
  'TRC20': 'TRC20',
1077
1080
  'CRC20': 'Crypto',
1078
1081
  'ACA': 'Acala',
@@ -1188,6 +1191,11 @@ export default class okx extends Exchange {
1188
1191
  // "WBTCK-OKTC",
1189
1192
  // "ZetaChain",
1190
1193
  },
1194
+ 'networksById': {
1195
+ 'ERC20': 'ERC20',
1196
+ 'TRC20': 'TRC20',
1197
+ 'BEP20': 'BEP20',
1198
+ },
1191
1199
  'fetchOpenInterestHistory': {
1192
1200
  'timeframes': {
1193
1201
  '5m': '5m',
@@ -1885,7 +1893,18 @@ export default class okx extends Exchange {
1885
1893
  // }
1886
1894
  //
1887
1895
  const dataResponse = this.safeList(response, 'data', []);
1888
- return this.parseMarkets(dataResponse);
1896
+ const marketsWithoutTest = [];
1897
+ for (let i = 0; i < dataResponse.length; i++) {
1898
+ const data = dataResponse[i];
1899
+ if (this.isSandboxModeEnabled) {
1900
+ const instFamily = this.safeString(data, 'instFamily', '');
1901
+ if (instFamily.startsWith('TEST')) {
1902
+ continue;
1903
+ }
1904
+ }
1905
+ marketsWithoutTest.push(data);
1906
+ }
1907
+ return this.parseMarkets(marketsWithoutTest);
1889
1908
  }
1890
1909
  /**
1891
1910
  * @method
@@ -1954,68 +1973,67 @@ export default class okx extends Exchange {
1954
1973
  // }
1955
1974
  //
1956
1975
  const data = this.safeList(response, 'data', []);
1957
- const result = {};
1958
1976
  const dataByCurrencyId = this.groupBy(data, 'ccy');
1959
- const currencyIds = Object.keys(dataByCurrencyId);
1960
- for (let i = 0; i < currencyIds.length; i++) {
1961
- const currencyId = currencyIds[i];
1962
- const currency = this.safeCurrency(currencyId);
1963
- const code = currency['code'];
1964
- const chains = dataByCurrencyId[currencyId];
1965
- const networks = {};
1966
- let type = 'crypto';
1967
- const chainsLength = chains.length;
1968
- for (let j = 0; j < chainsLength; j++) {
1969
- const chain = chains[j];
1970
- // allow empty string for rare fiat-currencies, e.g. TRY
1971
- const networkId = this.safeString(chain, 'chain', ''); // USDT-BEP20, USDT-Avalance-C, etc
1972
- if (networkId === '') {
1973
- // only happens for fiat 'TRY' currency
1974
- type = 'fiat';
1975
- }
1976
- const idParts = networkId.split('-');
1977
- const parts = this.arraySlice(idParts, 1);
1978
- const chainPart = parts.join('-');
1979
- const networkCode = this.networkIdToCode(chainPart, currency['code']);
1980
- networks[networkCode] = {
1981
- 'id': networkId,
1982
- 'network': networkCode,
1983
- 'active': undefined,
1984
- 'deposit': this.safeBool(chain, 'canDep'),
1985
- 'withdraw': this.safeBool(chain, 'canWd'),
1986
- 'fee': this.safeNumber(chain, 'fee'),
1987
- 'precision': this.parseNumber(this.parsePrecision(this.safeString(chain, 'wdTickSz'))),
1988
- 'limits': {
1989
- 'withdraw': {
1990
- 'min': this.safeNumber(chain, 'minWd'),
1991
- 'max': this.safeNumber(chain, 'maxWd'),
1992
- },
1993
- },
1994
- 'info': chain,
1995
- };
1977
+ const currencies = Object.values(dataByCurrencyId);
1978
+ return this.parseCurrencies(currencies);
1979
+ }
1980
+ parseCurrency(currency) {
1981
+ const chains = currency;
1982
+ // currencies are grouped by chain entries, so there is at least one entry
1983
+ const firstChain = this.safeDict(chains, 0, {});
1984
+ const currencyId = this.safeString(firstChain, 'ccy');
1985
+ const code = this.safeCurrencyCode(currencyId);
1986
+ const networks = {};
1987
+ let type = 'crypto';
1988
+ const chainsLength = chains.length;
1989
+ for (let j = 0; j < chainsLength; j++) {
1990
+ const chain = chains[j];
1991
+ // allow empty string for rare fiat-currencies, e.g. TRY
1992
+ const networkId = this.safeString(chain, 'chain', ''); // USDT-BEP20, USDT-Avalance-C, etc
1993
+ if (networkId === '') {
1994
+ // only happens for fiat 'TRY' currency
1995
+ type = 'fiat';
1996
1996
  }
1997
- const firstChain = this.safeDict(chains, 0, {});
1998
- result[code] = this.safeCurrencyStructure({
1999
- 'info': chains,
2000
- 'code': code,
2001
- 'id': currencyId,
2002
- 'name': this.safeString(firstChain, 'name'),
1997
+ const idParts = networkId.split('-');
1998
+ const parts = this.arraySlice(idParts, 1);
1999
+ const chainPart = parts.join('-');
2000
+ const networkCode = this.networkIdToCode(chainPart, code);
2001
+ networks[networkCode] = {
2002
+ 'id': networkId,
2003
+ 'network': networkCode,
2003
2004
  'active': undefined,
2004
- 'deposit': undefined,
2005
- 'withdraw': undefined,
2006
- 'fee': undefined,
2007
- 'precision': undefined,
2005
+ 'deposit': this.safeBool(chain, 'canDep'),
2006
+ 'withdraw': this.safeBool(chain, 'canWd'),
2007
+ 'fee': this.safeNumber(chain, 'fee'),
2008
+ 'precision': this.parseNumber(this.parsePrecision(this.safeString(chain, 'wdTickSz'))),
2008
2009
  'limits': {
2009
- 'amount': {
2010
- 'min': undefined,
2011
- 'max': undefined,
2010
+ 'withdraw': {
2011
+ 'min': this.safeNumber(chain, 'minWd'),
2012
+ 'max': this.safeNumber(chain, 'maxWd'),
2012
2013
  },
2013
2014
  },
2014
- 'type': type,
2015
- 'networks': networks,
2016
- });
2015
+ 'info': chain,
2016
+ };
2017
2017
  }
2018
- return result;
2018
+ return this.safeCurrencyStructure({
2019
+ 'info': chains,
2020
+ 'code': code,
2021
+ 'id': currencyId,
2022
+ 'name': this.safeString(firstChain, 'name'),
2023
+ 'active': undefined,
2024
+ 'deposit': undefined,
2025
+ 'withdraw': undefined,
2026
+ 'fee': undefined,
2027
+ 'precision': undefined,
2028
+ 'limits': {
2029
+ 'amount': {
2030
+ 'min': undefined,
2031
+ 'max': undefined,
2032
+ },
2033
+ },
2034
+ 'type': type,
2035
+ 'networks': networks,
2036
+ });
2019
2037
  }
2020
2038
  /**
2021
2039
  * @method
@@ -5400,7 +5418,7 @@ export default class okx extends Exchange {
5400
5418
  if (fee === undefined) {
5401
5419
  const currencies = await this.fetchCurrencies();
5402
5420
  this.currencies = this.mapToSafeMap(this.deepExtend(this.currencies, currencies));
5403
- const targetNetwork = this.safeDict(currency['networks'], this.networkIdToCode(network), {});
5421
+ const targetNetwork = this.safeDict(currency['networks'], this.networkIdToCode(network, currency['code']), {});
5404
5422
  fee = this.safeString(targetNetwork, 'fee');
5405
5423
  if (fee === undefined) {
5406
5424
  throw new ArgumentsRequired(this.id + ' withdraw() requires a "fee" string parameter, network transaction fee must be ≥ 0. Withdrawals to OKCoin or OKX are fee-free, please set "0". Withdrawing to external digital asset address requires network transaction fee.');
@@ -136,7 +136,6 @@ export default class paradex extends Exchange {
136
136
  parseTimeInForce(timeInForce: Str): string;
137
137
  parseOrderStatus(status: Str): string;
138
138
  parseOrderType(type: Str): string;
139
- convertShortString(str: string): string;
140
139
  scaleNumber(num: string): string;
141
140
  /**
142
141
  * @method
package/js/src/paradex.js CHANGED
@@ -1339,10 +1339,6 @@ export default class paradex extends Exchange {
1339
1339
  };
1340
1340
  return this.safeStringLower(types, type, type);
1341
1341
  }
1342
- convertShortString(str) {
1343
- // TODO: add stringToBase16 in exchange
1344
- return '0x' + this.binaryToBase16(this.base64ToBinary(this.stringToBase64(str)));
1345
- }
1346
1342
  scaleNumber(num) {
1347
1343
  return Precise.stringMul(num, '100000000');
1348
1344
  }
@@ -1459,9 +1455,9 @@ export default class paradex extends Exchange {
1459
1455
  const now = this.nonce();
1460
1456
  const orderReq = {
1461
1457
  'timestamp': now * 1000,
1462
- 'market': this.convertShortString(request['market']),
1458
+ 'market': this.stringToBase16(request['market']),
1463
1459
  'side': (orderSide === 'BUY') ? '1' : '2',
1464
- 'orderType': this.convertShortString(request['type']),
1460
+ 'orderType': this.stringToBase16(request['type']),
1465
1461
  'size': this.scaleNumber(request['size']),
1466
1462
  'price': (isMarket) ? '0' : this.scaleNumber(request['price']),
1467
1463
  };
@@ -14,7 +14,7 @@ export default class bydfi extends bydfiRest {
14
14
  * @method
15
15
  * @name bydfi#watchTicker
16
16
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
17
- * @see https://developers.bydfi.com/en/swap/websocket-market#ticker-by-symbol
17
+ * @see https://developers.bydfi.com/en/futures/websocket-market#ticker-by-symbol
18
18
  * @param {string} symbol unified symbol of the market to fetch the ticker for
19
19
  * @param {object} [params] extra parameters specific to the exchange API endpoint
20
20
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
@@ -24,7 +24,7 @@ export default class bydfi extends bydfiRest {
24
24
  * @method
25
25
  * @name bydfi#unWatchTicker
26
26
  * @description unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
27
- * @see https://developers.bydfi.com/en/swap/websocket-market#ticker-by-symbol
27
+ * @see https://developers.bydfi.com/en/futures/websocket-market#ticker-by-symbol
28
28
  * @param {string} symbol unified symbol of the market to fetch the ticker for
29
29
  * @param {object} [params] extra parameters specific to the exchange API endpoint
30
30
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
@@ -34,8 +34,8 @@ export default class bydfi extends bydfiRest {
34
34
  * @method
35
35
  * @name bydfi#watchTickers
36
36
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
37
- * @see https://developers.bydfi.com/en/swap/websocket-market#ticker-by-symbol
38
- * @see https://developers.bydfi.com/en/swap/websocket-market#market-wide-ticker
37
+ * @see https://developers.bydfi.com/en/futures/websocket-market#ticker-by-symbol
38
+ * @see https://developers.bydfi.com/en/futures/websocket-market#market-wide-ticker
39
39
  * @param {string[]} symbols unified symbol of the market to fetch the ticker for
40
40
  * @param {object} [params] extra parameters specific to the exchange API endpoint
41
41
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
@@ -45,8 +45,8 @@ export default class bydfi extends bydfiRest {
45
45
  * @method
46
46
  * @name bydfi#unWatchTickers
47
47
  * @description unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
48
- * @see https://developers.bydfi.com/en/swap/websocket-market#ticker-by-symbol
49
- * @see https://developers.bydfi.com/en/swap/websocket-market#market-wide-ticker
48
+ * @see https://developers.bydfi.com/en/futures/websocket-market#ticker-by-symbol
49
+ * @see https://developers.bydfi.com/en/futures/websocket-market#market-wide-ticker
50
50
  * @param {string[]} symbols unified symbol of the market to fetch the ticker for
51
51
  * @param {object} [params] extra parameters specific to the exchange API endpoint
52
52
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
@@ -58,7 +58,7 @@ export default class bydfi extends bydfiRest {
58
58
  * @method
59
59
  * @name bydfi#watchOHLCV
60
60
  * @description watches historical candlestick data containing the open, high, low, close price, and the volume of a market
61
- * @see https://developers.bydfi.com/en/swap/websocket-market#candlestick-data
61
+ * @see https://developers.bydfi.com/en/futures/websocket-market#candlestick-data
62
62
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
63
63
  * @param {string} timeframe the length of time each candle represents
64
64
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
@@ -71,7 +71,7 @@ export default class bydfi extends bydfiRest {
71
71
  * @method
72
72
  * @name bydfi#unWatchOHLCV
73
73
  * @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
74
- * @see https://developers.bydfi.com/en/swap/websocket-market#candlestick-data
74
+ * @see https://developers.bydfi.com/en/futures/websocket-market#candlestick-data
75
75
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
76
76
  * @param {string} timeframe the length of time each candle represents
77
77
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -82,7 +82,7 @@ export default class bydfi extends bydfiRest {
82
82
  * @method
83
83
  * @name bydfi#watchOHLCVForSymbols
84
84
  * @description watches historical candlestick data containing the open, high, low, close price, and the volume of a market
85
- * @see https://developers.bydfi.com/en/swap/websocket-market#candlestick-data
85
+ * @see https://developers.bydfi.com/en/futures/websocket-market#candlestick-data
86
86
  * @param {string[][]} symbolsAndTimeframes array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']]
87
87
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
88
88
  * @param {int} [limit] the maximum amount of candles to fetch
@@ -94,7 +94,7 @@ export default class bydfi extends bydfiRest {
94
94
  * @method
95
95
  * @name bydfi#unWatchOHLCVForSymbols
96
96
  * @description unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market
97
- * @see https://developers.bydfi.com/en/swap/websocket-market#candlestick-data
97
+ * @see https://developers.bydfi.com/en/futures/websocket-market#candlestick-data
98
98
  * @param {string[][]} symbolsAndTimeframes array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']]
99
99
  * @param {object} [params] extra parameters specific to the exchange API endpoint
100
100
  * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
@@ -105,7 +105,7 @@ export default class bydfi extends bydfiRest {
105
105
  * @method
106
106
  * @name bydfi#watchOrderBook
107
107
  * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
108
- * @see https://developers.bydfi.com/en/swap/websocket-market#limited-depth-information
108
+ * @see https://developers.bydfi.com/en/futures/websocket-market#limited-depth-information
109
109
  * @param {string} symbol unified symbol of the market to fetch the order book for
110
110
  * @param {int} [limit] the maximum amount of order book entries to return (default and maxi is 100)
111
111
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -116,7 +116,7 @@ export default class bydfi extends bydfiRest {
116
116
  * @method
117
117
  * @name bydfi#unWatchOrderBook
118
118
  * @description unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
119
- * @see https://developers.bydfi.com/en/swap/websocket-market#limited-depth-information
119
+ * @see https://developers.bydfi.com/en/futures/websocket-market#limited-depth-information
120
120
  * @param {string} symbol unified array of symbols
121
121
  * @param {object} [params] extra parameters specific to the exchange API endpoint
122
122
  * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
@@ -126,7 +126,7 @@ export default class bydfi extends bydfiRest {
126
126
  * @method
127
127
  * @name bydfi#watchOrderBookForSymbols
128
128
  * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
129
- * @see https://developers.bydfi.com/en/swap/websocket-market#limited-depth-information
129
+ * @see https://developers.bydfi.com/en/futures/websocket-market#limited-depth-information
130
130
  * @param {string[]} symbols unified array of symbols
131
131
  * @param {int} [limit] the maximum amount of order book entries to return (default and max is 100)
132
132
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -137,7 +137,7 @@ export default class bydfi extends bydfiRest {
137
137
  * @method
138
138
  * @name bydfi#unWatchOrderBookForSymbols
139
139
  * @description unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
140
- * @see https://developers.bydfi.com/en/swap/websocket-market#limited-depth-information
140
+ * @see https://developers.bydfi.com/en/futures/websocket-market#limited-depth-information
141
141
  * @param {string[]} symbols unified array of symbols
142
142
  * @param {object} [params] extra parameters specific to the exchange API endpoint
143
143
  * @param {string} [params.method] either '/market/level2' or '/spotMarket/level2Depth5' or '/spotMarket/level2Depth50' default is '/market/level2'
@@ -149,7 +149,7 @@ export default class bydfi extends bydfiRest {
149
149
  * @method
150
150
  * @name bydfi#watchOrders
151
151
  * @description watches information on multiple orders made by the user
152
- * @see https://developers.bydfi.com/en/swap/websocket-account#order-trade-update-push
152
+ * @see https://developers.bydfi.com/en/futures/websocket-account#order-trade-update-push
153
153
  * @param {string} symbol unified market symbol of the market orders were made in
154
154
  * @param {int} [since] the earliest time in ms to fetch orders for
155
155
  * @param {int} [limit] the maximum number of order structures to retrieve
@@ -161,7 +161,7 @@ export default class bydfi extends bydfiRest {
161
161
  * @method
162
162
  * @name bydfi#watchOrdersForSymbols
163
163
  * @description watches information on multiple orders made by the user
164
- * @see https://developers.bydfi.com/en/swap/websocket-account#order-trade-update-push
164
+ * @see https://developers.bydfi.com/en/futures/websocket-account#order-trade-update-push
165
165
  * @param {string[]} symbols unified symbol of the market to fetch orders for
166
166
  * @param {int} [since] the earliest time in ms to fetch orders for
167
167
  * @param {int} [limit] the maximum number of trade structures to retrieve
@@ -175,7 +175,7 @@ export default class bydfi extends bydfiRest {
175
175
  * @method
176
176
  * @name bydfi#watchPositions
177
177
  * @description watch all open positions
178
- * @see https://developers.bydfi.com/en/swap/websocket-account#balance-and-position-update-push
178
+ * @see https://developers.bydfi.com/en/futures/websocket-account#balance-and-position-update-push
179
179
  * @param {string[]} [symbols] list of unified market symbols
180
180
  * @param {int} [since] the earliest time in ms to fetch positions for
181
181
  * @param {int} [limit] the maximum number of positions to retrieve
@@ -190,7 +190,7 @@ export default class bydfi extends bydfiRest {
190
190
  * @method
191
191
  * @name bydfi#watchBalance
192
192
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
193
- * @see https://developers.bydfi.com/en/swap/websocket-account#balance-and-position-update-push
193
+ * @see https://developers.bydfi.com/en/futures/websocket-account#balance-and-position-update-push
194
194
  * @param {object} [params] extra parameters specific to the exchange API endpoint
195
195
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/?id=balance-structure}
196
196
  */
@@ -39,7 +39,7 @@ export default class bydfi extends bydfiRest {
39
39
  },
40
40
  'urls': {
41
41
  'api': {
42
- 'ws': 'wss://stream.bydfi.com/v1/public/swap',
42
+ 'ws': 'wss://stream.bydfi.com/v1/public/fapi',
43
43
  },
44
44
  },
45
45
  'options': {
@@ -138,7 +138,7 @@ export default class bydfi extends bydfiRest {
138
138
  * @method
139
139
  * @name bydfi#watchTicker
140
140
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
141
- * @see https://developers.bydfi.com/en/swap/websocket-market#ticker-by-symbol
141
+ * @see https://developers.bydfi.com/en/futures/websocket-market#ticker-by-symbol
142
142
  * @param {string} symbol unified symbol of the market to fetch the ticker for
143
143
  * @param {object} [params] extra parameters specific to the exchange API endpoint
144
144
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
@@ -155,7 +155,7 @@ export default class bydfi extends bydfiRest {
155
155
  * @method
156
156
  * @name bydfi#unWatchTicker
157
157
  * @description unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
158
- * @see https://developers.bydfi.com/en/swap/websocket-market#ticker-by-symbol
158
+ * @see https://developers.bydfi.com/en/futures/websocket-market#ticker-by-symbol
159
159
  * @param {string} symbol unified symbol of the market to fetch the ticker for
160
160
  * @param {object} [params] extra parameters specific to the exchange API endpoint
161
161
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
@@ -167,8 +167,8 @@ export default class bydfi extends bydfiRest {
167
167
  * @method
168
168
  * @name bydfi#watchTickers
169
169
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
170
- * @see https://developers.bydfi.com/en/swap/websocket-market#ticker-by-symbol
171
- * @see https://developers.bydfi.com/en/swap/websocket-market#market-wide-ticker
170
+ * @see https://developers.bydfi.com/en/futures/websocket-market#ticker-by-symbol
171
+ * @see https://developers.bydfi.com/en/futures/websocket-market#market-wide-ticker
172
172
  * @param {string[]} symbols unified symbol of the market to fetch the ticker for
173
173
  * @param {object} [params] extra parameters specific to the exchange API endpoint
174
174
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
@@ -199,8 +199,8 @@ export default class bydfi extends bydfiRest {
199
199
  * @method
200
200
  * @name bydfi#unWatchTickers
201
201
  * @description unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
202
- * @see https://developers.bydfi.com/en/swap/websocket-market#ticker-by-symbol
203
- * @see https://developers.bydfi.com/en/swap/websocket-market#market-wide-ticker
202
+ * @see https://developers.bydfi.com/en/futures/websocket-market#ticker-by-symbol
203
+ * @see https://developers.bydfi.com/en/futures/websocket-market#market-wide-ticker
204
204
  * @param {string[]} symbols unified symbol of the market to fetch the ticker for
205
205
  * @param {object} [params] extra parameters specific to the exchange API endpoint
206
206
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
@@ -284,7 +284,7 @@ export default class bydfi extends bydfiRest {
284
284
  * @method
285
285
  * @name bydfi#watchOHLCV
286
286
  * @description watches historical candlestick data containing the open, high, low, close price, and the volume of a market
287
- * @see https://developers.bydfi.com/en/swap/websocket-market#candlestick-data
287
+ * @see https://developers.bydfi.com/en/futures/websocket-market#candlestick-data
288
288
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
289
289
  * @param {string} timeframe the length of time each candle represents
290
290
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
@@ -300,7 +300,7 @@ export default class bydfi extends bydfiRest {
300
300
  * @method
301
301
  * @name bydfi#unWatchOHLCV
302
302
  * @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
303
- * @see https://developers.bydfi.com/en/swap/websocket-market#candlestick-data
303
+ * @see https://developers.bydfi.com/en/futures/websocket-market#candlestick-data
304
304
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
305
305
  * @param {string} timeframe the length of time each candle represents
306
306
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -313,7 +313,7 @@ export default class bydfi extends bydfiRest {
313
313
  * @method
314
314
  * @name bydfi#watchOHLCVForSymbols
315
315
  * @description watches historical candlestick data containing the open, high, low, close price, and the volume of a market
316
- * @see https://developers.bydfi.com/en/swap/websocket-market#candlestick-data
316
+ * @see https://developers.bydfi.com/en/futures/websocket-market#candlestick-data
317
317
  * @param {string[][]} symbolsAndTimeframes array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']]
318
318
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
319
319
  * @param {int} [limit] the maximum amount of candles to fetch
@@ -349,7 +349,7 @@ export default class bydfi extends bydfiRest {
349
349
  * @method
350
350
  * @name bydfi#unWatchOHLCVForSymbols
351
351
  * @description unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market
352
- * @see https://developers.bydfi.com/en/swap/websocket-market#candlestick-data
352
+ * @see https://developers.bydfi.com/en/futures/websocket-market#candlestick-data
353
353
  * @param {string[][]} symbolsAndTimeframes array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']]
354
354
  * @param {object} [params] extra parameters specific to the exchange API endpoint
355
355
  * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
@@ -417,7 +417,7 @@ export default class bydfi extends bydfiRest {
417
417
  * @method
418
418
  * @name bydfi#watchOrderBook
419
419
  * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
420
- * @see https://developers.bydfi.com/en/swap/websocket-market#limited-depth-information
420
+ * @see https://developers.bydfi.com/en/futures/websocket-market#limited-depth-information
421
421
  * @param {string} symbol unified symbol of the market to fetch the order book for
422
422
  * @param {int} [limit] the maximum amount of order book entries to return (default and maxi is 100)
423
423
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -430,7 +430,7 @@ export default class bydfi extends bydfiRest {
430
430
  * @method
431
431
  * @name bydfi#unWatchOrderBook
432
432
  * @description unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
433
- * @see https://developers.bydfi.com/en/swap/websocket-market#limited-depth-information
433
+ * @see https://developers.bydfi.com/en/futures/websocket-market#limited-depth-information
434
434
  * @param {string} symbol unified array of symbols
435
435
  * @param {object} [params] extra parameters specific to the exchange API endpoint
436
436
  * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
@@ -442,7 +442,7 @@ export default class bydfi extends bydfiRest {
442
442
  * @method
443
443
  * @name bydfi#watchOrderBookForSymbols
444
444
  * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
445
- * @see https://developers.bydfi.com/en/swap/websocket-market#limited-depth-information
445
+ * @see https://developers.bydfi.com/en/futures/websocket-market#limited-depth-information
446
446
  * @param {string[]} symbols unified array of symbols
447
447
  * @param {int} [limit] the maximum amount of order book entries to return (default and max is 100)
448
448
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -474,7 +474,7 @@ export default class bydfi extends bydfiRest {
474
474
  * @method
475
475
  * @name bydfi#unWatchOrderBookForSymbols
476
476
  * @description unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
477
- * @see https://developers.bydfi.com/en/swap/websocket-market#limited-depth-information
477
+ * @see https://developers.bydfi.com/en/futures/websocket-market#limited-depth-information
478
478
  * @param {string[]} symbols unified array of symbols
479
479
  * @param {object} [params] extra parameters specific to the exchange API endpoint
480
480
  * @param {string} [params.method] either '/market/level2' or '/spotMarket/level2Depth5' or '/spotMarket/level2Depth50' default is '/market/level2'
@@ -533,7 +533,7 @@ export default class bydfi extends bydfiRest {
533
533
  * @method
534
534
  * @name bydfi#watchOrders
535
535
  * @description watches information on multiple orders made by the user
536
- * @see https://developers.bydfi.com/en/swap/websocket-account#order-trade-update-push
536
+ * @see https://developers.bydfi.com/en/futures/websocket-account#order-trade-update-push
537
537
  * @param {string} symbol unified market symbol of the market orders were made in
538
538
  * @param {int} [since] the earliest time in ms to fetch orders for
539
539
  * @param {int} [limit] the maximum number of order structures to retrieve
@@ -551,7 +551,7 @@ export default class bydfi extends bydfiRest {
551
551
  * @method
552
552
  * @name bydfi#watchOrdersForSymbols
553
553
  * @description watches information on multiple orders made by the user
554
- * @see https://developers.bydfi.com/en/swap/websocket-account#order-trade-update-push
554
+ * @see https://developers.bydfi.com/en/futures/websocket-account#order-trade-update-push
555
555
  * @param {string[]} symbols unified symbol of the market to fetch orders for
556
556
  * @param {int} [since] the earliest time in ms to fetch orders for
557
557
  * @param {int} [limit] the maximum number of trade structures to retrieve
@@ -694,7 +694,7 @@ export default class bydfi extends bydfiRest {
694
694
  * @method
695
695
  * @name bydfi#watchPositions
696
696
  * @description watch all open positions
697
- * @see https://developers.bydfi.com/en/swap/websocket-account#balance-and-position-update-push
697
+ * @see https://developers.bydfi.com/en/futures/websocket-account#balance-and-position-update-push
698
698
  * @param {string[]} [symbols] list of unified market symbols
699
699
  * @param {int} [since] the earliest time in ms to fetch positions for
700
700
  * @param {int} [limit] the maximum number of positions to retrieve
@@ -847,7 +847,7 @@ export default class bydfi extends bydfiRest {
847
847
  * @method
848
848
  * @name bydfi#watchBalance
849
849
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
850
- * @see https://developers.bydfi.com/en/swap/websocket-account#balance-and-position-update-push
850
+ * @see https://developers.bydfi.com/en/futures/websocket-account#balance-and-position-update-push
851
851
  * @param {object} [params] extra parameters specific to the exchange API endpoint
852
852
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/?id=balance-structure}
853
853
  */