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.
- package/README.md +3 -3
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/base/Exchange.js +3 -0
- package/dist/cjs/src/binance.js +11 -2
- package/dist/cjs/src/bitget.js +3 -1
- package/dist/cjs/src/bitmart.js +144 -21
- package/dist/cjs/src/bybit.js +58 -56
- package/dist/cjs/src/bydfi.js +102 -100
- package/dist/cjs/src/gate.js +37 -2
- package/dist/cjs/src/kraken.js +2 -0
- package/dist/cjs/src/kucoin.js +4 -2
- package/dist/cjs/src/okx.js +75 -57
- package/dist/cjs/src/paradex.js +2 -6
- package/dist/cjs/src/pro/bydfi.js +19 -19
- package/dist/cjs/src/pro/gate.js +79 -54
- package/dist/cjs/src/pro/grvt.js +5 -3
- package/dist/cjs/src/pro/htx.js +4 -4
- package/dist/cjs/src/pro/okx.js +1 -1
- package/index.d.cts +2 -0
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bitmart.d.ts +7 -0
- package/js/src/abstract/bydfi.d.ts +29 -29
- package/js/src/abstract/kraken.d.ts +1 -0
- package/js/src/abstract/kucoin.d.ts +1 -0
- package/js/src/abstract/kucoinfutures.d.ts +1 -0
- package/js/src/base/Exchange.d.ts +1 -0
- package/js/src/base/Exchange.js +3 -0
- package/js/src/binance.js +11 -2
- package/js/src/bitget.js +3 -1
- package/js/src/bitmart.d.ts +18 -4
- package/js/src/bitmart.js +144 -21
- package/js/src/bybit.d.ts +1 -0
- package/js/src/bybit.js +58 -56
- package/js/src/bydfi.d.ts +31 -31
- package/js/src/bydfi.js +102 -100
- package/js/src/gate.js +37 -2
- package/js/src/kraken.js +2 -0
- package/js/src/kucoin.js +4 -2
- package/js/src/okx.d.ts +1 -0
- package/js/src/okx.js +75 -57
- package/js/src/paradex.d.ts +0 -1
- package/js/src/paradex.js +2 -6
- package/js/src/pro/bydfi.d.ts +18 -18
- package/js/src/pro/bydfi.js +19 -19
- package/js/src/pro/gate.d.ts +2 -2
- package/js/src/pro/gate.js +79 -54
- package/js/src/pro/grvt.js +5 -3
- package/js/src/pro/htx.js +4 -4
- package/js/src/pro/okx.js +1 -1
- package/package.json +2 -2
package/dist/cjs/src/gate.js
CHANGED
|
@@ -5021,6 +5021,42 @@ class gate extends gate$1["default"] {
|
|
|
5021
5021
|
// order_type: '',
|
|
5022
5022
|
// in_dual_mode: false,
|
|
5023
5023
|
// parent_id: '0',
|
|
5024
|
+
//
|
|
5025
|
+
// unified spot: watchOrders
|
|
5026
|
+
//
|
|
5027
|
+
// {
|
|
5028
|
+
// "id": "1036717689726",
|
|
5029
|
+
// "text": "apiv4",
|
|
5030
|
+
// "create_time": "1774613210",
|
|
5031
|
+
// "update_time": "1774613210",
|
|
5032
|
+
// "currency_pair": "BTC_USDT",
|
|
5033
|
+
// "type": "limit",
|
|
5034
|
+
// "account": "unified",
|
|
5035
|
+
// "side": "buy",
|
|
5036
|
+
// "amount": "0.1",
|
|
5037
|
+
// "price": "200",
|
|
5038
|
+
// "time_in_force": "gtc",
|
|
5039
|
+
// "left": "0.1",
|
|
5040
|
+
// "filled_amount": "0",
|
|
5041
|
+
// "filled_total": "0",
|
|
5042
|
+
// "avg_deal_price": "0",
|
|
5043
|
+
// "fee": "0",
|
|
5044
|
+
// "fee_currency": "BTC",
|
|
5045
|
+
// "point_fee": "0",
|
|
5046
|
+
// "gt_fee": "0",
|
|
5047
|
+
// "rebated_fee": "0",
|
|
5048
|
+
// "rebated_fee_currency": "BTC",
|
|
5049
|
+
// "create_time_ms": "1774613210391",
|
|
5050
|
+
// "update_time_ms": "1774613210391",
|
|
5051
|
+
// "user": 10406147,
|
|
5052
|
+
// "event": "put",
|
|
5053
|
+
// "stp_id": 0,
|
|
5054
|
+
// "stp_act": "-",
|
|
5055
|
+
// "finish_as": "open",
|
|
5056
|
+
// "biz_info": "ch:ccxt",
|
|
5057
|
+
// "amend_text": "-"
|
|
5058
|
+
// }
|
|
5059
|
+
//
|
|
5024
5060
|
const succeeded = this.safeBool(order, 'succeeded', true);
|
|
5025
5061
|
if (!succeeded) {
|
|
5026
5062
|
// cancelOrders response
|
|
@@ -5097,7 +5133,6 @@ class gate extends gate$1["default"] {
|
|
|
5097
5133
|
}
|
|
5098
5134
|
const exchangeSymbol = this.safeString2(order, 'currency_pair', 'market', contract);
|
|
5099
5135
|
const symbol = this.safeSymbol(exchangeSymbol, market, '_', marketType);
|
|
5100
|
-
// Everything below this(above return) is related to fees
|
|
5101
5136
|
const fees = [];
|
|
5102
5137
|
const gtFee = this.safeString(order, 'gt_fee');
|
|
5103
5138
|
if (gtFee !== undefined) {
|
|
@@ -5126,7 +5161,7 @@ class gate extends gate$1["default"] {
|
|
|
5126
5161
|
let remaining = Precise["default"].stringAbs(remainingString);
|
|
5127
5162
|
// handle spot market buy
|
|
5128
5163
|
const account = this.safeString(order, 'account'); // using this instead of market type because of the conflicting ids
|
|
5129
|
-
if (account === 'spot') {
|
|
5164
|
+
if ((account === 'spot') || (account === 'unified')) {
|
|
5130
5165
|
const averageString = this.safeString(order, 'avg_deal_price');
|
|
5131
5166
|
average = this.parseNumber(averageString);
|
|
5132
5167
|
if ((type === 'market') && (side === 'buy')) {
|
package/dist/cjs/src/kraken.js
CHANGED
package/dist/cjs/src/kucoin.js
CHANGED
|
@@ -191,6 +191,7 @@ class kucoin extends kucoin$1["default"] {
|
|
|
191
191
|
'get': {
|
|
192
192
|
// account
|
|
193
193
|
'user-info': 20,
|
|
194
|
+
'user/api-key': 20,
|
|
194
195
|
'accounts': 5,
|
|
195
196
|
'accounts/{accountId}': 5,
|
|
196
197
|
'accounts/ledgers': 2,
|
|
@@ -708,7 +709,7 @@ class kucoin extends kucoin$1["default"] {
|
|
|
708
709
|
'400006': errors.AuthenticationError,
|
|
709
710
|
'400007': errors.AuthenticationError,
|
|
710
711
|
'400008': errors.NotSupported,
|
|
711
|
-
'400100': errors.
|
|
712
|
+
'400100': errors.BadRequest,
|
|
712
713
|
'400200': errors.InvalidOrder,
|
|
713
714
|
'400330': errors.InvalidOrder,
|
|
714
715
|
'400350': errors.InvalidOrder,
|
|
@@ -740,6 +741,7 @@ class kucoin extends kucoin$1["default"] {
|
|
|
740
741
|
'330008': errors.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"}
|
|
741
742
|
},
|
|
742
743
|
'broad': {
|
|
744
|
+
'pageSize should not greater than 500': errors.BadRequest,
|
|
743
745
|
'Exceeded the access frequency': errors.RateLimitExceeded,
|
|
744
746
|
'require more permission': errors.PermissionDenied,
|
|
745
747
|
// futures errors
|
|
@@ -6737,7 +6739,7 @@ class kucoin extends kucoin$1["default"] {
|
|
|
6737
6739
|
let paginate = false;
|
|
6738
6740
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchWithdrawals', 'paginate');
|
|
6739
6741
|
if (paginate) {
|
|
6740
|
-
return await this.fetchPaginatedCallDynamic('fetchWithdrawals', code, since, limit, params);
|
|
6742
|
+
return await this.fetchPaginatedCallDynamic('fetchWithdrawals', code, since, limit, params, 500);
|
|
6741
6743
|
}
|
|
6742
6744
|
let request = {};
|
|
6743
6745
|
let currency = undefined;
|
package/dist/cjs/src/okx.js
CHANGED
|
@@ -1075,9 +1075,12 @@ class okx extends okx$1["default"] {
|
|
|
1075
1075
|
'BTC': 'Bitcoin',
|
|
1076
1076
|
'BTCLN': 'Lightning',
|
|
1077
1077
|
'BTCLIGHTNING': 'Lightning',
|
|
1078
|
+
'BSC': 'BSC',
|
|
1078
1079
|
'BEP20': 'BSC',
|
|
1079
1080
|
'BRC20': 'BRC20',
|
|
1081
|
+
'ETH': 'ERC20',
|
|
1080
1082
|
'ERC20': 'ERC20',
|
|
1083
|
+
'TRX': 'TRC20',
|
|
1081
1084
|
'TRC20': 'TRC20',
|
|
1082
1085
|
'CRC20': 'Crypto',
|
|
1083
1086
|
'ACA': 'Acala',
|
|
@@ -1193,6 +1196,11 @@ class okx extends okx$1["default"] {
|
|
|
1193
1196
|
// "WBTCK-OKTC",
|
|
1194
1197
|
// "ZetaChain",
|
|
1195
1198
|
},
|
|
1199
|
+
'networksById': {
|
|
1200
|
+
'ERC20': 'ERC20',
|
|
1201
|
+
'TRC20': 'TRC20',
|
|
1202
|
+
'BEP20': 'BEP20',
|
|
1203
|
+
},
|
|
1196
1204
|
'fetchOpenInterestHistory': {
|
|
1197
1205
|
'timeframes': {
|
|
1198
1206
|
'5m': '5m',
|
|
@@ -1890,7 +1898,18 @@ class okx extends okx$1["default"] {
|
|
|
1890
1898
|
// }
|
|
1891
1899
|
//
|
|
1892
1900
|
const dataResponse = this.safeList(response, 'data', []);
|
|
1893
|
-
|
|
1901
|
+
const marketsWithoutTest = [];
|
|
1902
|
+
for (let i = 0; i < dataResponse.length; i++) {
|
|
1903
|
+
const data = dataResponse[i];
|
|
1904
|
+
if (this.isSandboxModeEnabled) {
|
|
1905
|
+
const instFamily = this.safeString(data, 'instFamily', '');
|
|
1906
|
+
if (instFamily.startsWith('TEST')) {
|
|
1907
|
+
continue;
|
|
1908
|
+
}
|
|
1909
|
+
}
|
|
1910
|
+
marketsWithoutTest.push(data);
|
|
1911
|
+
}
|
|
1912
|
+
return this.parseMarkets(marketsWithoutTest);
|
|
1894
1913
|
}
|
|
1895
1914
|
/**
|
|
1896
1915
|
* @method
|
|
@@ -1959,68 +1978,67 @@ class okx extends okx$1["default"] {
|
|
|
1959
1978
|
// }
|
|
1960
1979
|
//
|
|
1961
1980
|
const data = this.safeList(response, 'data', []);
|
|
1962
|
-
const result = {};
|
|
1963
1981
|
const dataByCurrencyId = this.groupBy(data, 'ccy');
|
|
1964
|
-
const
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
const chainPart = parts.join('-');
|
|
1984
|
-
const networkCode = this.networkIdToCode(chainPart, currency['code']);
|
|
1985
|
-
networks[networkCode] = {
|
|
1986
|
-
'id': networkId,
|
|
1987
|
-
'network': networkCode,
|
|
1988
|
-
'active': undefined,
|
|
1989
|
-
'deposit': this.safeBool(chain, 'canDep'),
|
|
1990
|
-
'withdraw': this.safeBool(chain, 'canWd'),
|
|
1991
|
-
'fee': this.safeNumber(chain, 'fee'),
|
|
1992
|
-
'precision': this.parseNumber(this.parsePrecision(this.safeString(chain, 'wdTickSz'))),
|
|
1993
|
-
'limits': {
|
|
1994
|
-
'withdraw': {
|
|
1995
|
-
'min': this.safeNumber(chain, 'minWd'),
|
|
1996
|
-
'max': this.safeNumber(chain, 'maxWd'),
|
|
1997
|
-
},
|
|
1998
|
-
},
|
|
1999
|
-
'info': chain,
|
|
2000
|
-
};
|
|
1982
|
+
const currencies = Object.values(dataByCurrencyId);
|
|
1983
|
+
return this.parseCurrencies(currencies);
|
|
1984
|
+
}
|
|
1985
|
+
parseCurrency(currency) {
|
|
1986
|
+
const chains = currency;
|
|
1987
|
+
// currencies are grouped by chain entries, so there is at least one entry
|
|
1988
|
+
const firstChain = this.safeDict(chains, 0, {});
|
|
1989
|
+
const currencyId = this.safeString(firstChain, 'ccy');
|
|
1990
|
+
const code = this.safeCurrencyCode(currencyId);
|
|
1991
|
+
const networks = {};
|
|
1992
|
+
let type = 'crypto';
|
|
1993
|
+
const chainsLength = chains.length;
|
|
1994
|
+
for (let j = 0; j < chainsLength; j++) {
|
|
1995
|
+
const chain = chains[j];
|
|
1996
|
+
// allow empty string for rare fiat-currencies, e.g. TRY
|
|
1997
|
+
const networkId = this.safeString(chain, 'chain', ''); // USDT-BEP20, USDT-Avalance-C, etc
|
|
1998
|
+
if (networkId === '') {
|
|
1999
|
+
// only happens for fiat 'TRY' currency
|
|
2000
|
+
type = 'fiat';
|
|
2001
2001
|
}
|
|
2002
|
-
const
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
'
|
|
2002
|
+
const idParts = networkId.split('-');
|
|
2003
|
+
const parts = this.arraySlice(idParts, 1);
|
|
2004
|
+
const chainPart = parts.join('-');
|
|
2005
|
+
const networkCode = this.networkIdToCode(chainPart, code);
|
|
2006
|
+
networks[networkCode] = {
|
|
2007
|
+
'id': networkId,
|
|
2008
|
+
'network': networkCode,
|
|
2008
2009
|
'active': undefined,
|
|
2009
|
-
'deposit':
|
|
2010
|
-
'withdraw':
|
|
2011
|
-
'fee':
|
|
2012
|
-
'precision':
|
|
2010
|
+
'deposit': this.safeBool(chain, 'canDep'),
|
|
2011
|
+
'withdraw': this.safeBool(chain, 'canWd'),
|
|
2012
|
+
'fee': this.safeNumber(chain, 'fee'),
|
|
2013
|
+
'precision': this.parseNumber(this.parsePrecision(this.safeString(chain, 'wdTickSz'))),
|
|
2013
2014
|
'limits': {
|
|
2014
|
-
'
|
|
2015
|
-
'min':
|
|
2016
|
-
'max':
|
|
2015
|
+
'withdraw': {
|
|
2016
|
+
'min': this.safeNumber(chain, 'minWd'),
|
|
2017
|
+
'max': this.safeNumber(chain, 'maxWd'),
|
|
2017
2018
|
},
|
|
2018
2019
|
},
|
|
2019
|
-
'
|
|
2020
|
-
|
|
2021
|
-
});
|
|
2020
|
+
'info': chain,
|
|
2021
|
+
};
|
|
2022
2022
|
}
|
|
2023
|
-
return
|
|
2023
|
+
return this.safeCurrencyStructure({
|
|
2024
|
+
'info': chains,
|
|
2025
|
+
'code': code,
|
|
2026
|
+
'id': currencyId,
|
|
2027
|
+
'name': this.safeString(firstChain, 'name'),
|
|
2028
|
+
'active': undefined,
|
|
2029
|
+
'deposit': undefined,
|
|
2030
|
+
'withdraw': undefined,
|
|
2031
|
+
'fee': undefined,
|
|
2032
|
+
'precision': undefined,
|
|
2033
|
+
'limits': {
|
|
2034
|
+
'amount': {
|
|
2035
|
+
'min': undefined,
|
|
2036
|
+
'max': undefined,
|
|
2037
|
+
},
|
|
2038
|
+
},
|
|
2039
|
+
'type': type,
|
|
2040
|
+
'networks': networks,
|
|
2041
|
+
});
|
|
2024
2042
|
}
|
|
2025
2043
|
/**
|
|
2026
2044
|
* @method
|
|
@@ -5405,7 +5423,7 @@ class okx extends okx$1["default"] {
|
|
|
5405
5423
|
if (fee === undefined) {
|
|
5406
5424
|
const currencies = await this.fetchCurrencies();
|
|
5407
5425
|
this.currencies = this.mapToSafeMap(this.deepExtend(this.currencies, currencies));
|
|
5408
|
-
const targetNetwork = this.safeDict(currency['networks'], this.networkIdToCode(network), {});
|
|
5426
|
+
const targetNetwork = this.safeDict(currency['networks'], this.networkIdToCode(network, currency['code']), {});
|
|
5409
5427
|
fee = this.safeString(targetNetwork, 'fee');
|
|
5410
5428
|
if (fee === undefined) {
|
|
5411
5429
|
throw new errors.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.');
|
package/dist/cjs/src/paradex.js
CHANGED
|
@@ -1344,10 +1344,6 @@ class paradex extends paradex$1["default"] {
|
|
|
1344
1344
|
};
|
|
1345
1345
|
return this.safeStringLower(types, type, type);
|
|
1346
1346
|
}
|
|
1347
|
-
convertShortString(str) {
|
|
1348
|
-
// TODO: add stringToBase16 in exchange
|
|
1349
|
-
return '0x' + this.binaryToBase16(this.base64ToBinary(this.stringToBase64(str)));
|
|
1350
|
-
}
|
|
1351
1347
|
scaleNumber(num) {
|
|
1352
1348
|
return Precise["default"].stringMul(num, '100000000');
|
|
1353
1349
|
}
|
|
@@ -1464,9 +1460,9 @@ class paradex extends paradex$1["default"] {
|
|
|
1464
1460
|
const now = this.nonce();
|
|
1465
1461
|
const orderReq = {
|
|
1466
1462
|
'timestamp': now * 1000,
|
|
1467
|
-
'market': this.
|
|
1463
|
+
'market': this.stringToBase16(request['market']),
|
|
1468
1464
|
'side': (orderSide === 'BUY') ? '1' : '2',
|
|
1469
|
-
'orderType': this.
|
|
1465
|
+
'orderType': this.stringToBase16(request['type']),
|
|
1470
1466
|
'size': this.scaleNumber(request['size']),
|
|
1471
1467
|
'price': (isMarket) ? '0' : this.scaleNumber(request['price']),
|
|
1472
1468
|
};
|
|
@@ -44,7 +44,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
44
44
|
},
|
|
45
45
|
'urls': {
|
|
46
46
|
'api': {
|
|
47
|
-
'ws': 'wss://stream.bydfi.com/v1/public/
|
|
47
|
+
'ws': 'wss://stream.bydfi.com/v1/public/fapi',
|
|
48
48
|
},
|
|
49
49
|
},
|
|
50
50
|
'options': {
|
|
@@ -143,7 +143,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
143
143
|
* @method
|
|
144
144
|
* @name bydfi#watchTicker
|
|
145
145
|
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
146
|
-
* @see https://developers.bydfi.com/en/
|
|
146
|
+
* @see https://developers.bydfi.com/en/futures/websocket-market#ticker-by-symbol
|
|
147
147
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
148
148
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
149
149
|
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
|
|
@@ -160,7 +160,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
160
160
|
* @method
|
|
161
161
|
* @name bydfi#unWatchTicker
|
|
162
162
|
* @description unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
163
|
-
* @see https://developers.bydfi.com/en/
|
|
163
|
+
* @see https://developers.bydfi.com/en/futures/websocket-market#ticker-by-symbol
|
|
164
164
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
165
165
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
166
166
|
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
|
|
@@ -172,8 +172,8 @@ class bydfi extends bydfi$1["default"] {
|
|
|
172
172
|
* @method
|
|
173
173
|
* @name bydfi#watchTickers
|
|
174
174
|
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
|
|
175
|
-
* @see https://developers.bydfi.com/en/
|
|
176
|
-
* @see https://developers.bydfi.com/en/
|
|
175
|
+
* @see https://developers.bydfi.com/en/futures/websocket-market#ticker-by-symbol
|
|
176
|
+
* @see https://developers.bydfi.com/en/futures/websocket-market#market-wide-ticker
|
|
177
177
|
* @param {string[]} symbols unified symbol of the market to fetch the ticker for
|
|
178
178
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
179
179
|
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
|
|
@@ -204,8 +204,8 @@ class bydfi extends bydfi$1["default"] {
|
|
|
204
204
|
* @method
|
|
205
205
|
* @name bydfi#unWatchTickers
|
|
206
206
|
* @description unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
|
|
207
|
-
* @see https://developers.bydfi.com/en/
|
|
208
|
-
* @see https://developers.bydfi.com/en/
|
|
207
|
+
* @see https://developers.bydfi.com/en/futures/websocket-market#ticker-by-symbol
|
|
208
|
+
* @see https://developers.bydfi.com/en/futures/websocket-market#market-wide-ticker
|
|
209
209
|
* @param {string[]} symbols unified symbol of the market to fetch the ticker for
|
|
210
210
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
211
211
|
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
|
|
@@ -289,7 +289,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
289
289
|
* @method
|
|
290
290
|
* @name bydfi#watchOHLCV
|
|
291
291
|
* @description watches historical candlestick data containing the open, high, low, close price, and the volume of a market
|
|
292
|
-
* @see https://developers.bydfi.com/en/
|
|
292
|
+
* @see https://developers.bydfi.com/en/futures/websocket-market#candlestick-data
|
|
293
293
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
294
294
|
* @param {string} timeframe the length of time each candle represents
|
|
295
295
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
@@ -305,7 +305,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
305
305
|
* @method
|
|
306
306
|
* @name bydfi#unWatchOHLCV
|
|
307
307
|
* @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
308
|
-
* @see https://developers.bydfi.com/en/
|
|
308
|
+
* @see https://developers.bydfi.com/en/futures/websocket-market#candlestick-data
|
|
309
309
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
310
310
|
* @param {string} timeframe the length of time each candle represents
|
|
311
311
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -318,7 +318,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
318
318
|
* @method
|
|
319
319
|
* @name bydfi#watchOHLCVForSymbols
|
|
320
320
|
* @description watches historical candlestick data containing the open, high, low, close price, and the volume of a market
|
|
321
|
-
* @see https://developers.bydfi.com/en/
|
|
321
|
+
* @see https://developers.bydfi.com/en/futures/websocket-market#candlestick-data
|
|
322
322
|
* @param {string[][]} symbolsAndTimeframes array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']]
|
|
323
323
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
324
324
|
* @param {int} [limit] the maximum amount of candles to fetch
|
|
@@ -354,7 +354,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
354
354
|
* @method
|
|
355
355
|
* @name bydfi#unWatchOHLCVForSymbols
|
|
356
356
|
* @description unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
357
|
-
* @see https://developers.bydfi.com/en/
|
|
357
|
+
* @see https://developers.bydfi.com/en/futures/websocket-market#candlestick-data
|
|
358
358
|
* @param {string[][]} symbolsAndTimeframes array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']]
|
|
359
359
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
360
360
|
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
@@ -422,7 +422,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
422
422
|
* @method
|
|
423
423
|
* @name bydfi#watchOrderBook
|
|
424
424
|
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
425
|
-
* @see https://developers.bydfi.com/en/
|
|
425
|
+
* @see https://developers.bydfi.com/en/futures/websocket-market#limited-depth-information
|
|
426
426
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
427
427
|
* @param {int} [limit] the maximum amount of order book entries to return (default and maxi is 100)
|
|
428
428
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -435,7 +435,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
435
435
|
* @method
|
|
436
436
|
* @name bydfi#unWatchOrderBook
|
|
437
437
|
* @description unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
438
|
-
* @see https://developers.bydfi.com/en/
|
|
438
|
+
* @see https://developers.bydfi.com/en/futures/websocket-market#limited-depth-information
|
|
439
439
|
* @param {string} symbol unified array of symbols
|
|
440
440
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
441
441
|
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
|
|
@@ -447,7 +447,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
447
447
|
* @method
|
|
448
448
|
* @name bydfi#watchOrderBookForSymbols
|
|
449
449
|
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
450
|
-
* @see https://developers.bydfi.com/en/
|
|
450
|
+
* @see https://developers.bydfi.com/en/futures/websocket-market#limited-depth-information
|
|
451
451
|
* @param {string[]} symbols unified array of symbols
|
|
452
452
|
* @param {int} [limit] the maximum amount of order book entries to return (default and max is 100)
|
|
453
453
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -479,7 +479,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
479
479
|
* @method
|
|
480
480
|
* @name bydfi#unWatchOrderBookForSymbols
|
|
481
481
|
* @description unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
482
|
-
* @see https://developers.bydfi.com/en/
|
|
482
|
+
* @see https://developers.bydfi.com/en/futures/websocket-market#limited-depth-information
|
|
483
483
|
* @param {string[]} symbols unified array of symbols
|
|
484
484
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
485
485
|
* @param {string} [params.method] either '/market/level2' or '/spotMarket/level2Depth5' or '/spotMarket/level2Depth50' default is '/market/level2'
|
|
@@ -538,7 +538,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
538
538
|
* @method
|
|
539
539
|
* @name bydfi#watchOrders
|
|
540
540
|
* @description watches information on multiple orders made by the user
|
|
541
|
-
* @see https://developers.bydfi.com/en/
|
|
541
|
+
* @see https://developers.bydfi.com/en/futures/websocket-account#order-trade-update-push
|
|
542
542
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
543
543
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
544
544
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
@@ -556,7 +556,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
556
556
|
* @method
|
|
557
557
|
* @name bydfi#watchOrdersForSymbols
|
|
558
558
|
* @description watches information on multiple orders made by the user
|
|
559
|
-
* @see https://developers.bydfi.com/en/
|
|
559
|
+
* @see https://developers.bydfi.com/en/futures/websocket-account#order-trade-update-push
|
|
560
560
|
* @param {string[]} symbols unified symbol of the market to fetch orders for
|
|
561
561
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
562
562
|
* @param {int} [limit] the maximum number of trade structures to retrieve
|
|
@@ -699,7 +699,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
699
699
|
* @method
|
|
700
700
|
* @name bydfi#watchPositions
|
|
701
701
|
* @description watch all open positions
|
|
702
|
-
* @see https://developers.bydfi.com/en/
|
|
702
|
+
* @see https://developers.bydfi.com/en/futures/websocket-account#balance-and-position-update-push
|
|
703
703
|
* @param {string[]} [symbols] list of unified market symbols
|
|
704
704
|
* @param {int} [since] the earliest time in ms to fetch positions for
|
|
705
705
|
* @param {int} [limit] the maximum number of positions to retrieve
|
|
@@ -852,7 +852,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
852
852
|
* @method
|
|
853
853
|
* @name bydfi#watchBalance
|
|
854
854
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
855
|
-
* @see https://developers.bydfi.com/en/
|
|
855
|
+
* @see https://developers.bydfi.com/en/futures/websocket-account#balance-and-position-update-push
|
|
856
856
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
857
857
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/?id=balance-structure}
|
|
858
858
|
*/
|