ccxt 4.1.32 → 4.1.34
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 +4 -4
- package/build.sh +5 -2
- package/dist/ccxt.browser.js +237 -132
- package/dist/ccxt.browser.min.js +9 -9
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/base/Exchange.js +4 -1
- package/dist/cjs/src/base/functions/misc.js +6 -0
- package/dist/cjs/src/binance.js +3 -3
- package/dist/cjs/src/bitforex.js +1 -1
- package/dist/cjs/src/bitmex.js +16 -22
- package/dist/cjs/src/digifinex.js +81 -1
- package/dist/cjs/src/krakenfutures.js +2 -2
- package/dist/cjs/src/pro/bitget.js +1 -1
- package/dist/cjs/src/pro/coinex.js +1 -1
- package/dist/cjs/src/pro/hitbtc.js +4 -6
- package/dist/cjs/src/pro/huobi.js +3 -0
- package/dist/cjs/src/pro/woo.js +5 -2
- package/dist/cjs/src/upbit.js +8 -6
- package/dist/cjs/src/wavesexchange.js +6 -7
- package/dist/cjs/src/woo.js +16 -8
- package/dist/cjs/src/zonda.js +37 -30
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bitbay.d.ts +2 -0
- package/js/src/abstract/digifinex.d.ts +14 -0
- package/js/src/abstract/zonda.d.ts +2 -0
- package/js/src/base/Exchange.d.ts +1 -1
- package/js/src/base/Exchange.js +7 -2
- package/js/src/base/errorHierarchy.d.ts +2 -0
- package/js/src/base/errorHierarchy.js +2 -0
- package/js/src/base/functions/misc.js +6 -0
- package/js/src/binance.js +3 -3
- package/js/src/bitforex.js +1 -1
- package/js/src/bitmex.js +16 -22
- package/js/src/digifinex.d.ts +10 -0
- package/js/src/digifinex.js +81 -1
- package/js/src/krakenfutures.js +2 -2
- package/js/src/pro/bitget.js +1 -1
- package/js/src/pro/coinex.js +1 -1
- package/js/src/pro/hitbtc.js +4 -6
- package/js/src/pro/huobi.js +3 -0
- package/js/src/pro/woo.js +5 -2
- package/js/src/upbit.js +8 -6
- package/js/src/wavesexchange.js +6 -7
- package/js/src/woo.d.ts +1 -0
- package/js/src/woo.js +16 -8
- package/js/src/zonda.js +37 -30
- package/package.json +4 -2
package/dist/ccxt.browser.js
CHANGED
|
@@ -6610,11 +6610,12 @@ class ascendex extends _abstract_ascendex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
6610
6610
|
/* harmony import */ var _functions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(927);
|
|
6611
6611
|
/* harmony import */ var _functions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2116);
|
|
6612
6612
|
/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6689);
|
|
6613
|
-
/* harmony import */ var
|
|
6613
|
+
/* harmony import */ var _Precise_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(2194);
|
|
6614
6614
|
/* harmony import */ var _ws_WsClient_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7517);
|
|
6615
6615
|
/* harmony import */ var _ws_Future_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2367);
|
|
6616
6616
|
/* harmony import */ var _ws_OrderBook_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7091);
|
|
6617
|
-
/* harmony import */ var
|
|
6617
|
+
/* harmony import */ var _functions_crypto_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(6890);
|
|
6618
|
+
/* harmony import */ var _functions_totp_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(2523);
|
|
6618
6619
|
// ----------------------------------------------------------------------------
|
|
6619
6620
|
/* eslint-disable */
|
|
6620
6621
|
|
|
@@ -6627,6 +6628,9 @@ const { isNode, deepExtend, extend, clone, flatten, unique, indexBy, sortBy, sor
|
|
|
6627
6628
|
|
|
6628
6629
|
|
|
6629
6630
|
|
|
6631
|
+
// ----------------------------------------------------------------------------
|
|
6632
|
+
//
|
|
6633
|
+
|
|
6630
6634
|
|
|
6631
6635
|
// ----------------------------------------------------------------------------
|
|
6632
6636
|
/**
|
|
@@ -6804,7 +6808,6 @@ class Exchange {
|
|
|
6804
6808
|
this.urlencodeNested = urlencodeNested;
|
|
6805
6809
|
this.parseDate = parseDate;
|
|
6806
6810
|
this.ymd = ymd;
|
|
6807
|
-
this.isArray = _functions_js__WEBPACK_IMPORTED_MODULE_1__/* .inArray */ .d3;
|
|
6808
6811
|
this.base64ToString = base64ToString;
|
|
6809
6812
|
this.crc32 = crc32;
|
|
6810
6813
|
Object.assign(this, _functions_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
@@ -7685,6 +7688,9 @@ class Exchange {
|
|
|
7685
7688
|
getProperty(obj, property, defaultValue = undefined) {
|
|
7686
7689
|
return (property in obj ? obj[property] : defaultValue);
|
|
7687
7690
|
}
|
|
7691
|
+
axolotl(payload, hexKey, ed25519) {
|
|
7692
|
+
return (0,_functions_crypto_js__WEBPACK_IMPORTED_MODULE_7__/* .axolotl */ .gC)(payload, hexKey, ed25519);
|
|
7693
|
+
}
|
|
7688
7694
|
/* eslint-enable */
|
|
7689
7695
|
// ------------------------------------------------------------------------
|
|
7690
7696
|
// ########################################################################
|
|
@@ -8070,18 +8076,18 @@ class Exchange {
|
|
|
8070
8076
|
const amount = this.safeString(entry, 'amount');
|
|
8071
8077
|
if (amount !== undefined) {
|
|
8072
8078
|
if (before === undefined && after !== undefined) {
|
|
8073
|
-
before =
|
|
8079
|
+
before = _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringSub */ .O.stringSub(after, amount);
|
|
8074
8080
|
}
|
|
8075
8081
|
else if (before !== undefined && after === undefined) {
|
|
8076
|
-
after =
|
|
8082
|
+
after = _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringAdd */ .O.stringAdd(before, amount);
|
|
8077
8083
|
}
|
|
8078
8084
|
}
|
|
8079
8085
|
if (before !== undefined && after !== undefined) {
|
|
8080
8086
|
if (direction === undefined) {
|
|
8081
|
-
if (
|
|
8087
|
+
if (_Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringGt */ .O.stringGt(before, after)) {
|
|
8082
8088
|
direction = 'out';
|
|
8083
8089
|
}
|
|
8084
|
-
if (
|
|
8090
|
+
if (_Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringGt */ .O.stringGt(after, before)) {
|
|
8085
8091
|
direction = 'in';
|
|
8086
8092
|
}
|
|
8087
8093
|
}
|
|
@@ -8317,13 +8323,13 @@ class Exchange {
|
|
|
8317
8323
|
let used = this.safeString(balance[code], 'used');
|
|
8318
8324
|
const debt = this.safeString(balance[code], 'debt');
|
|
8319
8325
|
if ((total === undefined) && (free !== undefined) && (used !== undefined)) {
|
|
8320
|
-
total =
|
|
8326
|
+
total = _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringAdd */ .O.stringAdd(free, used);
|
|
8321
8327
|
}
|
|
8322
8328
|
if ((free === undefined) && (total !== undefined) && (used !== undefined)) {
|
|
8323
|
-
free =
|
|
8329
|
+
free = _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringSub */ .O.stringSub(total, used);
|
|
8324
8330
|
}
|
|
8325
8331
|
if ((used === undefined) && (total !== undefined) && (free !== undefined)) {
|
|
8326
|
-
used =
|
|
8332
|
+
used = _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringSub */ .O.stringSub(total, free);
|
|
8327
8333
|
}
|
|
8328
8334
|
balance[code]['free'] = this.parseNumber(free);
|
|
8329
8335
|
balance[code]['used'] = this.parseNumber(used);
|
|
@@ -8411,11 +8417,11 @@ class Exchange {
|
|
|
8411
8417
|
const trade = trades[i];
|
|
8412
8418
|
const tradeAmount = this.safeString(trade, 'amount');
|
|
8413
8419
|
if (parseFilled && (tradeAmount !== undefined)) {
|
|
8414
|
-
filled =
|
|
8420
|
+
filled = _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringAdd */ .O.stringAdd(filled, tradeAmount);
|
|
8415
8421
|
}
|
|
8416
8422
|
const tradeCost = this.safeString(trade, 'cost');
|
|
8417
8423
|
if (parseCost && (tradeCost !== undefined)) {
|
|
8418
|
-
cost =
|
|
8424
|
+
cost = _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringAdd */ .O.stringAdd(cost, tradeCost);
|
|
8419
8425
|
}
|
|
8420
8426
|
if (parseSymbol) {
|
|
8421
8427
|
symbol = this.safeString(trade, 'symbol');
|
|
@@ -8474,7 +8480,7 @@ class Exchange {
|
|
|
8474
8480
|
if (amount === undefined) {
|
|
8475
8481
|
// ensure amount = filled + remaining
|
|
8476
8482
|
if (filled !== undefined && remaining !== undefined) {
|
|
8477
|
-
amount =
|
|
8483
|
+
amount = _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringAdd */ .O.stringAdd(filled, remaining);
|
|
8478
8484
|
}
|
|
8479
8485
|
else if (status === 'closed') {
|
|
8480
8486
|
amount = filled;
|
|
@@ -8482,7 +8488,7 @@ class Exchange {
|
|
|
8482
8488
|
}
|
|
8483
8489
|
if (filled === undefined) {
|
|
8484
8490
|
if (amount !== undefined && remaining !== undefined) {
|
|
8485
|
-
filled =
|
|
8491
|
+
filled = _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringSub */ .O.stringSub(amount, remaining);
|
|
8486
8492
|
}
|
|
8487
8493
|
else if (status === 'closed' && amount !== undefined) {
|
|
8488
8494
|
filled = amount;
|
|
@@ -8490,7 +8496,7 @@ class Exchange {
|
|
|
8490
8496
|
}
|
|
8491
8497
|
if (remaining === undefined) {
|
|
8492
8498
|
if (amount !== undefined && filled !== undefined) {
|
|
8493
|
-
remaining =
|
|
8499
|
+
remaining = _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringSub */ .O.stringSub(amount, filled);
|
|
8494
8500
|
}
|
|
8495
8501
|
else if (status === 'closed') {
|
|
8496
8502
|
remaining = '0';
|
|
@@ -8505,13 +8511,13 @@ class Exchange {
|
|
|
8505
8511
|
// linear
|
|
8506
8512
|
// price = cost / (filled * contract size)
|
|
8507
8513
|
if (average === undefined) {
|
|
8508
|
-
if ((filled !== undefined) && (cost !== undefined) &&
|
|
8509
|
-
const filledTimesContractSize =
|
|
8514
|
+
if ((filled !== undefined) && (cost !== undefined) && _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringGt */ .O.stringGt(filled, '0')) {
|
|
8515
|
+
const filledTimesContractSize = _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringMul */ .O.stringMul(filled, contractSize);
|
|
8510
8516
|
if (inverse) {
|
|
8511
|
-
average =
|
|
8517
|
+
average = _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringDiv */ .O.stringDiv(filledTimesContractSize, cost);
|
|
8512
8518
|
}
|
|
8513
8519
|
else {
|
|
8514
|
-
average =
|
|
8520
|
+
average = _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringDiv */ .O.stringDiv(cost, filledTimesContractSize);
|
|
8515
8521
|
}
|
|
8516
8522
|
}
|
|
8517
8523
|
}
|
|
@@ -8531,17 +8537,17 @@ class Exchange {
|
|
|
8531
8537
|
multiplyPrice = average;
|
|
8532
8538
|
}
|
|
8533
8539
|
// contract trading
|
|
8534
|
-
const filledTimesContractSize =
|
|
8540
|
+
const filledTimesContractSize = _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringMul */ .O.stringMul(filled, contractSize);
|
|
8535
8541
|
if (inverse) {
|
|
8536
|
-
cost =
|
|
8542
|
+
cost = _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringDiv */ .O.stringDiv(filledTimesContractSize, multiplyPrice);
|
|
8537
8543
|
}
|
|
8538
8544
|
else {
|
|
8539
|
-
cost =
|
|
8545
|
+
cost = _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringMul */ .O.stringMul(filledTimesContractSize, multiplyPrice);
|
|
8540
8546
|
}
|
|
8541
8547
|
}
|
|
8542
8548
|
// support for market orders
|
|
8543
8549
|
const orderType = this.safeValue(order, 'type');
|
|
8544
|
-
const emptyPrice = (price === undefined) ||
|
|
8550
|
+
const emptyPrice = (price === undefined) || _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringEquals */ .O.stringEquals(price, '0');
|
|
8545
8551
|
if (emptyPrice && (orderType === 'market')) {
|
|
8546
8552
|
price = average;
|
|
8547
8553
|
}
|
|
@@ -8675,7 +8681,7 @@ class Exchange {
|
|
|
8675
8681
|
let key = undefined;
|
|
8676
8682
|
if (useQuote) {
|
|
8677
8683
|
const priceString = this.numberToString(price);
|
|
8678
|
-
cost =
|
|
8684
|
+
cost = _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringMul */ .O.stringMul(cost, priceString);
|
|
8679
8685
|
key = 'quote';
|
|
8680
8686
|
}
|
|
8681
8687
|
else {
|
|
@@ -8690,7 +8696,7 @@ class Exchange {
|
|
|
8690
8696
|
takerOrMaker = 'taker';
|
|
8691
8697
|
}
|
|
8692
8698
|
const rate = this.safeString(market, takerOrMaker);
|
|
8693
|
-
cost =
|
|
8699
|
+
cost = _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringMul */ .O.stringMul(cost, rate);
|
|
8694
8700
|
return {
|
|
8695
8701
|
'type': takerOrMaker,
|
|
8696
8702
|
'currency': market[key],
|
|
@@ -8709,11 +8715,11 @@ class Exchange {
|
|
|
8709
8715
|
if (contractSize !== undefined) {
|
|
8710
8716
|
const inverse = this.safeValue(market, 'inverse', false);
|
|
8711
8717
|
if (inverse) {
|
|
8712
|
-
multiplyPrice =
|
|
8718
|
+
multiplyPrice = _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringDiv */ .O.stringDiv('1', price);
|
|
8713
8719
|
}
|
|
8714
|
-
multiplyPrice =
|
|
8720
|
+
multiplyPrice = _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringMul */ .O.stringMul(multiplyPrice, contractSize);
|
|
8715
8721
|
}
|
|
8716
|
-
cost =
|
|
8722
|
+
cost = _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringMul */ .O.stringMul(multiplyPrice, amount);
|
|
8717
8723
|
}
|
|
8718
8724
|
const parseFee = this.safeValue(trade, 'fee') === undefined;
|
|
8719
8725
|
const parseFees = this.safeValue(trade, 'fees') === undefined;
|
|
@@ -8821,7 +8827,7 @@ class Exchange {
|
|
|
8821
8827
|
if (feeCurrencyCode !== undefined) {
|
|
8822
8828
|
const rate = this.safeString(fee, 'rate');
|
|
8823
8829
|
const cost = this.safeValue(fee, 'cost');
|
|
8824
|
-
if (
|
|
8830
|
+
if (_Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringEq */ .O.stringEq(cost, '0')) {
|
|
8825
8831
|
// omit zero cost fees
|
|
8826
8832
|
continue;
|
|
8827
8833
|
}
|
|
@@ -8830,7 +8836,7 @@ class Exchange {
|
|
|
8830
8836
|
}
|
|
8831
8837
|
const rateKey = (rate === undefined) ? '' : rate;
|
|
8832
8838
|
if (rateKey in reduced[feeCurrencyCode]) {
|
|
8833
|
-
reduced[feeCurrencyCode][rateKey]['cost'] =
|
|
8839
|
+
reduced[feeCurrencyCode][rateKey]['cost'] = _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringAdd */ .O.stringAdd(reduced[feeCurrencyCode][rateKey]['cost'], cost);
|
|
8834
8840
|
}
|
|
8835
8841
|
else {
|
|
8836
8842
|
reduced[feeCurrencyCode][rateKey] = {
|
|
@@ -8862,7 +8868,7 @@ class Exchange {
|
|
|
8862
8868
|
const baseVolume = this.safeString(ticker, 'baseVolume');
|
|
8863
8869
|
const quoteVolume = this.safeString(ticker, 'quoteVolume');
|
|
8864
8870
|
if (vwap === undefined) {
|
|
8865
|
-
vwap =
|
|
8871
|
+
vwap = _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringDiv */ .O.stringDiv(quoteVolume, baseVolume);
|
|
8866
8872
|
}
|
|
8867
8873
|
if ((last !== undefined) && (close === undefined)) {
|
|
8868
8874
|
close = last;
|
|
@@ -8872,20 +8878,20 @@ class Exchange {
|
|
|
8872
8878
|
}
|
|
8873
8879
|
if ((last !== undefined) && (open !== undefined)) {
|
|
8874
8880
|
if (change === undefined) {
|
|
8875
|
-
change =
|
|
8881
|
+
change = _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringSub */ .O.stringSub(last, open);
|
|
8876
8882
|
}
|
|
8877
8883
|
if (average === undefined) {
|
|
8878
|
-
average =
|
|
8884
|
+
average = _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringDiv */ .O.stringDiv(_Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringAdd */ .O.stringAdd(last, open), '2');
|
|
8879
8885
|
}
|
|
8880
8886
|
}
|
|
8881
|
-
if ((percentage === undefined) && (change !== undefined) && (open !== undefined) &&
|
|
8882
|
-
percentage =
|
|
8887
|
+
if ((percentage === undefined) && (change !== undefined) && (open !== undefined) && _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringGt */ .O.stringGt(open, '0')) {
|
|
8888
|
+
percentage = _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringMul */ .O.stringMul(_Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringDiv */ .O.stringDiv(change, open), '100');
|
|
8883
8889
|
}
|
|
8884
8890
|
if ((change === undefined) && (percentage !== undefined) && (open !== undefined)) {
|
|
8885
|
-
change =
|
|
8891
|
+
change = _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringDiv */ .O.stringDiv(_Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringMul */ .O.stringMul(percentage, open), '100');
|
|
8886
8892
|
}
|
|
8887
8893
|
if ((open === undefined) && (last !== undefined) && (change !== undefined)) {
|
|
8888
|
-
open =
|
|
8894
|
+
open = _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringSub */ .O.stringSub(last, change);
|
|
8889
8895
|
}
|
|
8890
8896
|
// timestamp and symbol operations don't belong in safeTicker
|
|
8891
8897
|
// they should be done in the derived classes
|
|
@@ -9306,7 +9312,7 @@ class Exchange {
|
|
|
9306
9312
|
const percentage = this.safeValue(position, 'percentage');
|
|
9307
9313
|
if ((percentage === undefined) && (unrealizedPnlString !== undefined) && (initialMarginString !== undefined)) {
|
|
9308
9314
|
// as it was done in all implementations ( aax, btcex, bybit, deribit, ftx, gate, kucoinfutures, phemex )
|
|
9309
|
-
const percentageString =
|
|
9315
|
+
const percentageString = _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringMul */ .O.stringMul(_Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise.stringDiv */ .O.stringDiv(unrealizedPnlString, initialMarginString, 4), '100');
|
|
9310
9316
|
position['percentage'] = this.parseNumber(percentageString);
|
|
9311
9317
|
}
|
|
9312
9318
|
// if contractSize is undefined get from market
|
|
@@ -9677,7 +9683,7 @@ class Exchange {
|
|
|
9677
9683
|
}
|
|
9678
9684
|
oath() {
|
|
9679
9685
|
if (this.twofa !== undefined) {
|
|
9680
|
-
return (0,
|
|
9686
|
+
return (0,_functions_totp_js__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z)(this.twofa);
|
|
9681
9687
|
}
|
|
9682
9688
|
else {
|
|
9683
9689
|
throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.ExchangeError(this.id + ' exchange.twofa has not been set for 2FA Two-Factor Authentication');
|
|
@@ -12264,6 +12270,12 @@ const roundTimeframe = (timeframe, timestamp, direction = _number_js__WEBPACK_IM
|
|
|
12264
12270
|
return timestamp - offset + ((direction === _number_js__WEBPACK_IMPORTED_MODULE_2__/* .ROUND_UP */ .N8) ? ms : 0);
|
|
12265
12271
|
};
|
|
12266
12272
|
const extractParams = (string) => {
|
|
12273
|
+
/**
|
|
12274
|
+
* @ignore
|
|
12275
|
+
* @method
|
|
12276
|
+
* @param string usually a url path
|
|
12277
|
+
* @returns {[string]} all substrings surrounded by {} from parameter string
|
|
12278
|
+
*/
|
|
12267
12279
|
const re = /{([\w-]+)}/g;
|
|
12268
12280
|
const matches = [];
|
|
12269
12281
|
let match = re.exec(string);
|
|
@@ -21389,13 +21401,13 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
21389
21401
|
* @description cancel multiple orders
|
|
21390
21402
|
* @see https://binance-docs.github.io/apidocs/futures/en/#cancel-multiple-orders-trade
|
|
21391
21403
|
* @see https://binance-docs.github.io/apidocs/delivery/en/#cancel-multiple-orders-trade
|
|
21392
|
-
* @param {[
|
|
21404
|
+
* @param {string[]} ids order ids
|
|
21393
21405
|
* @param {string} [symbol] unified market symbol
|
|
21394
21406
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
21395
21407
|
*
|
|
21396
21408
|
* EXCHANGE SPECIFIC PARAMETERS
|
|
21397
|
-
* @param {[
|
|
21398
|
-
* @param {[
|
|
21409
|
+
* @param {string[]} [params.origClientOrderIdList] max length 10 e.g. ["my_id_1","my_id_2"], encode the double quotes. No space after comma
|
|
21410
|
+
* @param {int[]} [params.recvWindow]
|
|
21399
21411
|
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
21400
21412
|
*/
|
|
21401
21413
|
this.checkRequiredSymbol('cancelOrders', symbol);
|
|
@@ -38708,7 +38720,7 @@ class bitforex extends _abstract_bitforex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
38708
38720
|
* @method
|
|
38709
38721
|
* @name bitforex#fetchOrder
|
|
38710
38722
|
* @description fetches information on an order made by the user
|
|
38711
|
-
* @see
|
|
38723
|
+
* @see https://apidoc.bitforex.com/#order-information-user_data
|
|
38712
38724
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
38713
38725
|
* @param {object} [params] extra parameters specific to the bitforex api endpoint
|
|
38714
38726
|
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
@@ -52550,18 +52562,15 @@ class bitmex extends _abstract_bitmex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
52550
52562
|
// "timestamp":"2021-01-02T21:38:49.246Z"
|
|
52551
52563
|
// }
|
|
52552
52564
|
//
|
|
52553
|
-
const status = this.parseOrderStatus(this.safeString(order, 'ordStatus'));
|
|
52554
52565
|
const marketId = this.safeString(order, 'symbol');
|
|
52555
|
-
|
|
52556
|
-
const
|
|
52557
|
-
const lastTradeTimestamp = this.parse8601(this.safeString(order, 'transactTime'));
|
|
52558
|
-
const price = this.safeString(order, 'price');
|
|
52566
|
+
market = this.safeMarket(marketId, market);
|
|
52567
|
+
const symbol = market['symbol'];
|
|
52559
52568
|
const qty = this.safeString(order, 'orderQty');
|
|
52560
52569
|
let cost = undefined;
|
|
52561
52570
|
let amount = undefined;
|
|
52562
|
-
const defaultSubType = this.safeString(this.options, 'defaultSubType', 'linear');
|
|
52563
52571
|
let isInverse = false;
|
|
52564
|
-
if (
|
|
52572
|
+
if (marketId === undefined) {
|
|
52573
|
+
const defaultSubType = this.safeString(this.options, 'defaultSubType', 'linear');
|
|
52565
52574
|
isInverse = (defaultSubType === 'inverse');
|
|
52566
52575
|
}
|
|
52567
52576
|
else {
|
|
@@ -52582,38 +52591,35 @@ class bitmex extends _abstract_bitmex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
52582
52591
|
else {
|
|
52583
52592
|
filled = cumQty;
|
|
52584
52593
|
}
|
|
52585
|
-
const id = this.safeString(order, 'orderID');
|
|
52586
|
-
const type = this.safeStringLower(order, 'ordType');
|
|
52587
|
-
const side = this.safeStringLower(order, 'side');
|
|
52588
|
-
const clientOrderId = this.safeString(order, 'clOrdID');
|
|
52589
|
-
const timeInForce = this.parseTimeInForce(this.safeString(order, 'timeInForce'));
|
|
52590
|
-
const stopPrice = this.safeNumber(order, 'stopPx');
|
|
52591
52594
|
const execInst = this.safeString(order, 'execInst');
|
|
52592
52595
|
let postOnly = undefined;
|
|
52593
52596
|
if (execInst !== undefined) {
|
|
52594
52597
|
postOnly = (execInst === 'ParticipateDoNotInitiate');
|
|
52595
52598
|
}
|
|
52599
|
+
const timestamp = this.parse8601(this.safeString(order, 'timestamp'));
|
|
52600
|
+
const stopPrice = this.safeNumber(order, 'stopPx');
|
|
52601
|
+
const remaining = this.safeString(order, 'leavesQty');
|
|
52596
52602
|
return this.safeOrder({
|
|
52597
52603
|
'info': order,
|
|
52598
|
-
'id':
|
|
52599
|
-
'clientOrderId':
|
|
52604
|
+
'id': this.safeString(order, 'orderID'),
|
|
52605
|
+
'clientOrderId': this.safeString(order, 'clOrdID'),
|
|
52600
52606
|
'timestamp': timestamp,
|
|
52601
52607
|
'datetime': this.iso8601(timestamp),
|
|
52602
|
-
'lastTradeTimestamp':
|
|
52608
|
+
'lastTradeTimestamp': this.parse8601(this.safeString(order, 'transactTime')),
|
|
52603
52609
|
'symbol': symbol,
|
|
52604
|
-
'type':
|
|
52605
|
-
'timeInForce': timeInForce,
|
|
52610
|
+
'type': this.safeStringLower(order, 'ordType'),
|
|
52611
|
+
'timeInForce': this.parseTimeInForce(this.safeString(order, 'timeInForce')),
|
|
52606
52612
|
'postOnly': postOnly,
|
|
52607
|
-
'side': side,
|
|
52608
|
-
'price': price,
|
|
52613
|
+
'side': this.safeStringLower(order, 'side'),
|
|
52614
|
+
'price': this.safeString(order, 'price'),
|
|
52609
52615
|
'stopPrice': stopPrice,
|
|
52610
52616
|
'triggerPrice': stopPrice,
|
|
52611
52617
|
'amount': amount,
|
|
52612
52618
|
'cost': cost,
|
|
52613
52619
|
'average': average,
|
|
52614
52620
|
'filled': filled,
|
|
52615
|
-
'remaining':
|
|
52616
|
-
'status':
|
|
52621
|
+
'remaining': this.convertFromRawQuantity(symbol, remaining),
|
|
52622
|
+
'status': this.parseOrderStatus(this.safeString(order, 'ordStatus')),
|
|
52617
52623
|
'fee': undefined,
|
|
52618
52624
|
'trades': undefined,
|
|
52619
52625
|
}, market);
|
|
@@ -111060,7 +111066,7 @@ class digifinex extends _abstract_digifinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
111060
111066
|
'fetchDeposits': true,
|
|
111061
111067
|
'fetchDepositWithdrawFee': 'emulated',
|
|
111062
111068
|
'fetchDepositWithdrawFees': true,
|
|
111063
|
-
'fetchFundingHistory':
|
|
111069
|
+
'fetchFundingHistory': true,
|
|
111064
111070
|
'fetchFundingRate': true,
|
|
111065
111071
|
'fetchFundingRateHistory': true,
|
|
111066
111072
|
'fetchFundingRates': false,
|
|
@@ -111207,6 +111213,7 @@ class digifinex extends _abstract_digifinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
111207
111213
|
'account/finance_record',
|
|
111208
111214
|
'account/trading_fee_rate',
|
|
111209
111215
|
'account/transfer_record',
|
|
111216
|
+
'account/funding_fee',
|
|
111210
111217
|
'trade/history_orders',
|
|
111211
111218
|
'trade/history_trades',
|
|
111212
111219
|
'trade/open_orders',
|
|
@@ -111214,10 +111221,23 @@ class digifinex extends _abstract_digifinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
111214
111221
|
],
|
|
111215
111222
|
'post': [
|
|
111216
111223
|
'account/leverage',
|
|
111224
|
+
'account/position_mode',
|
|
111225
|
+
'account/position_margin',
|
|
111217
111226
|
'trade/batch_cancel_order',
|
|
111218
111227
|
'trade/batch_order',
|
|
111219
111228
|
'trade/cancel_order',
|
|
111220
111229
|
'trade/order_place',
|
|
111230
|
+
'follow/sponsor_order',
|
|
111231
|
+
'follow/close_order',
|
|
111232
|
+
'follow/cancel_order',
|
|
111233
|
+
'follow/user_center_current',
|
|
111234
|
+
'follow/user_center_history',
|
|
111235
|
+
'follow/expert_current_open_order',
|
|
111236
|
+
'follow/add_algo',
|
|
111237
|
+
'follow/cancel_algo',
|
|
111238
|
+
'follow/account_available',
|
|
111239
|
+
'follow/plan_task',
|
|
111240
|
+
'follow/instrument_list',
|
|
111221
111241
|
],
|
|
111222
111242
|
},
|
|
111223
111243
|
},
|
|
@@ -114823,6 +114843,72 @@ class digifinex extends _abstract_digifinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
114823
114843
|
}
|
|
114824
114844
|
return depositWithdrawFees;
|
|
114825
114845
|
}
|
|
114846
|
+
async fetchFundingHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
114847
|
+
/**
|
|
114848
|
+
* @method
|
|
114849
|
+
* @name digifinex#fetchFundingHistory
|
|
114850
|
+
* @description fetch the history of funding payments paid and received on this account
|
|
114851
|
+
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#funding-fee
|
|
114852
|
+
* @param {string} [symbol] unified market symbol
|
|
114853
|
+
* @param {int} [since] the earliest time in ms to fetch funding history for
|
|
114854
|
+
* @param {int} [limit] the maximum number of funding history structures to retrieve
|
|
114855
|
+
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
114856
|
+
* @param {int} [params.until] timestamp in ms of the latest funding payment
|
|
114857
|
+
* @returns {object} a [funding history structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-history-structure}
|
|
114858
|
+
*/
|
|
114859
|
+
await this.loadMarkets();
|
|
114860
|
+
let request = {};
|
|
114861
|
+
[request, params] = this.handleUntilOption('end_timestamp', request, params);
|
|
114862
|
+
let market = undefined;
|
|
114863
|
+
if (symbol !== undefined) {
|
|
114864
|
+
market = this.market(symbol);
|
|
114865
|
+
request['instrument_id'] = market['id'];
|
|
114866
|
+
}
|
|
114867
|
+
if (limit !== undefined) {
|
|
114868
|
+
request['limit'] = limit;
|
|
114869
|
+
}
|
|
114870
|
+
if (since !== undefined) {
|
|
114871
|
+
request['start_timestamp'] = since;
|
|
114872
|
+
}
|
|
114873
|
+
const response = await this.privateSwapGetAccountFundingFee(this.extend(request, params));
|
|
114874
|
+
//
|
|
114875
|
+
// {
|
|
114876
|
+
// "code": 0,
|
|
114877
|
+
// "data": [
|
|
114878
|
+
// {
|
|
114879
|
+
// "instrument_id": "BTCUSDTPERP",
|
|
114880
|
+
// "currency": "USDT",
|
|
114881
|
+
// "amount": "-0.000342814",
|
|
114882
|
+
// "timestamp": 1698768009440
|
|
114883
|
+
// }
|
|
114884
|
+
// ]
|
|
114885
|
+
// }
|
|
114886
|
+
//
|
|
114887
|
+
const data = this.safeValue(response, 'data', []);
|
|
114888
|
+
return this.parseIncomes(data, market, since, limit);
|
|
114889
|
+
}
|
|
114890
|
+
parseIncome(income, market = undefined) {
|
|
114891
|
+
//
|
|
114892
|
+
// {
|
|
114893
|
+
// "instrument_id": "BTCUSDTPERP",
|
|
114894
|
+
// "currency": "USDT",
|
|
114895
|
+
// "amount": "-0.000342814",
|
|
114896
|
+
// "timestamp": 1698768009440
|
|
114897
|
+
// }
|
|
114898
|
+
//
|
|
114899
|
+
const marketId = this.safeString(income, 'instrument_id');
|
|
114900
|
+
const currencyId = this.safeString(income, 'currency');
|
|
114901
|
+
const timestamp = this.safeInteger(income, 'timestamp');
|
|
114902
|
+
return {
|
|
114903
|
+
'info': income,
|
|
114904
|
+
'symbol': this.safeSymbol(marketId, market, undefined, 'swap'),
|
|
114905
|
+
'code': this.safeCurrencyCode(currencyId),
|
|
114906
|
+
'timestamp': timestamp,
|
|
114907
|
+
'datetime': this.iso8601(timestamp),
|
|
114908
|
+
'id': undefined,
|
|
114909
|
+
'amount': this.safeNumber(income, 'amount'),
|
|
114910
|
+
};
|
|
114911
|
+
}
|
|
114826
114912
|
sign(path, api = [], method = 'GET', params = {}, headers = undefined, body = undefined) {
|
|
114827
114913
|
const signed = api[0] === 'private';
|
|
114828
114914
|
const endpoint = api[1];
|
|
@@ -148816,12 +148902,12 @@ class krakenfutures extends _abstract_krakenfutures_js__WEBPACK_IMPORTED_MODULE_
|
|
|
148816
148902
|
* @name krakenfutures#cancelOrders
|
|
148817
148903
|
* @description cancel multiple orders
|
|
148818
148904
|
* @see https://docs.futures.kraken.com/#http-api-trading-v3-api-order-management-batch-order-management
|
|
148819
|
-
* @param {[
|
|
148905
|
+
* @param {string[]} ids order ids
|
|
148820
148906
|
* @param {string} [symbol] unified market symbol
|
|
148821
148907
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
148822
148908
|
*
|
|
148823
148909
|
* EXCHANGE SPECIFIC PARAMETERS
|
|
148824
|
-
* @param {[
|
|
148910
|
+
* @param {string[]} [params.clientOrderIds] max length 10 e.g. ["my_id_1","my_id_2"]
|
|
148825
148911
|
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
148826
148912
|
*/
|
|
148827
148913
|
await this.loadMarkets();
|
|
@@ -204063,7 +204149,7 @@ class bitget extends _bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
|
|
|
204063
204149
|
const instType = market['spot'] ? 'sp' : 'mc';
|
|
204064
204150
|
let channel = 'books';
|
|
204065
204151
|
let incrementalFeed = true;
|
|
204066
|
-
if ((limit === 5) || (limit === 15)) {
|
|
204152
|
+
if ((limit === 1) || (limit === 5) || (limit === 15)) {
|
|
204067
204153
|
channel += limit.toString();
|
|
204068
204154
|
incrementalFeed = false;
|
|
204069
204155
|
}
|
|
@@ -217481,7 +217567,7 @@ class coinex extends _coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
|
|
|
217481
217567
|
* @param {int|undefined} limit the maximum amount of candles to fetch
|
|
217482
217568
|
* @param {object} params extra parameters specific to the coinex api endpoint
|
|
217483
217569
|
* @param {int|undefined} params.end the end time for spot markets, this.seconds () is set as default
|
|
217484
|
-
* @returns {[[
|
|
217570
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
217485
217571
|
*/
|
|
217486
217572
|
await this.loadMarkets();
|
|
217487
217573
|
const market = this.market(symbol);
|
|
@@ -222855,9 +222941,8 @@ class hitbtc extends _hitbtc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
|
|
|
222855
222941
|
* @ignore
|
|
222856
222942
|
* @method
|
|
222857
222943
|
* @param {string} name websocket endpoint name
|
|
222858
|
-
* @param {[
|
|
222944
|
+
* @param {string[]} [symbols] unified CCXT symbol(s)
|
|
222859
222945
|
* @param {object} [params] extra parameters specific to the hitbtc api
|
|
222860
|
-
* @returns
|
|
222861
222946
|
*/
|
|
222862
222947
|
await this.loadMarkets();
|
|
222863
222948
|
const url = this.urls['api']['ws']['public'];
|
|
@@ -222880,7 +222965,6 @@ class hitbtc extends _hitbtc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
|
|
|
222880
222965
|
* @param {string} name websocket endpoint name
|
|
222881
222966
|
* @param {string} [symbol] unified CCXT symbol
|
|
222882
222967
|
* @param {object} [params] extra parameters specific to the hitbtc api
|
|
222883
|
-
* @returns
|
|
222884
222968
|
*/
|
|
222885
222969
|
await this.loadMarkets();
|
|
222886
222970
|
await this.authenticate();
|
|
@@ -223334,7 +223418,7 @@ class hitbtc extends _hitbtc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
|
|
|
223334
223418
|
* @param {int} [since] not used by hitbtc watchOHLCV
|
|
223335
223419
|
* @param {int} [limit] 0 – 1000, default value = 0 (no history returned)
|
|
223336
223420
|
* @param {object} [params] extra parameters specific to the hitbtc api endpoint
|
|
223337
|
-
* @returns {[[
|
|
223421
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
223338
223422
|
*/
|
|
223339
223423
|
const period = this.safeString(this.timeframes, timeframe, timeframe);
|
|
223340
223424
|
const name = 'candles/' + period;
|
|
@@ -223446,7 +223530,7 @@ class hitbtc extends _hitbtc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
|
|
|
223446
223530
|
* @param {int} [since] timestamp in ms of the earliest order to fetch
|
|
223447
223531
|
* @param {int} [limit] the maximum amount of orders to fetch
|
|
223448
223532
|
* @param {object} [params] extra parameters specific to the hitbtc api endpoint
|
|
223449
|
-
* @returns {[
|
|
223533
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
223450
223534
|
*/
|
|
223451
223535
|
await this.loadMarkets();
|
|
223452
223536
|
let marketType = undefined;
|
|
@@ -223678,7 +223762,7 @@ class hitbtc extends _hitbtc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
|
|
|
223678
223762
|
*
|
|
223679
223763
|
* EXCHANGE SPECIFIC PARAMETERS
|
|
223680
223764
|
* @param {string} [params.mode] 'updates' or 'batches' (default), 'updates' = messages arrive after balance updates, 'batches' = messages arrive at equal intervals if there were any updates
|
|
223681
|
-
* @returns {[
|
|
223765
|
+
* @returns {object[]} a list of [balance structures]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
223682
223766
|
*/
|
|
223683
223767
|
await this.loadMarkets();
|
|
223684
223768
|
let type = undefined;
|
|
@@ -224940,6 +225024,9 @@ class huobi extends _huobi_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
224940
225024
|
orderbook.reset(snapshot);
|
|
224941
225025
|
orderbook['nonce'] = seqNum;
|
|
224942
225026
|
}
|
|
225027
|
+
if (prevSeqNum !== undefined && prevSeqNum > orderbook['nonce']) {
|
|
225028
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidNonce(this.id + ' watchOrderBook() received a mesage out of order');
|
|
225029
|
+
}
|
|
224943
225030
|
if ((prevSeqNum === undefined || prevSeqNum <= orderbook['nonce']) && (seqNum > orderbook['nonce'])) {
|
|
224944
225031
|
const asks = this.safeValue(tick, 'asks', []);
|
|
224945
225032
|
const bids = this.safeValue(tick, 'bids', []);
|
|
@@ -243963,8 +244050,11 @@ class woo extends _woo_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
243963
244050
|
const value = balances[key];
|
|
243964
244051
|
const code = this.safeCurrencyCode(key);
|
|
243965
244052
|
const account = (code in this.balance) ? this.balance[code] : this.account();
|
|
243966
|
-
|
|
243967
|
-
|
|
244053
|
+
const total = this.safeString(value, 'holding');
|
|
244054
|
+
const used = this.safeString(value, 'frozen');
|
|
244055
|
+
account['total'] = total;
|
|
244056
|
+
account['used'] = used;
|
|
244057
|
+
account['free'] = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise.stringSub */ .O.stringSub(total, used);
|
|
243968
244058
|
this.balance[code] = account;
|
|
243969
244059
|
}
|
|
243970
244060
|
this.balance = this.safeBalance(this.balance);
|
|
@@ -260993,17 +261083,19 @@ class upbit extends _abstract_upbit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
260993
261083
|
'timeframe': timeframeValue,
|
|
260994
261084
|
'count': limit,
|
|
260995
261085
|
};
|
|
260996
|
-
let
|
|
261086
|
+
let response = undefined;
|
|
261087
|
+
if (since !== undefined) {
|
|
261088
|
+
// convert `since` to `to` value
|
|
261089
|
+
request['to'] = this.iso8601(this.sum(since, timeframePeriod * limit * 1000));
|
|
261090
|
+
}
|
|
260997
261091
|
if (timeframeValue === 'minutes') {
|
|
260998
261092
|
const numMinutes = Math.round(timeframePeriod / 60);
|
|
260999
261093
|
request['unit'] = numMinutes;
|
|
261000
|
-
|
|
261094
|
+
response = await this.publicGetCandlesTimeframeUnit(this.extend(request, params));
|
|
261001
261095
|
}
|
|
261002
|
-
|
|
261003
|
-
|
|
261004
|
-
request['to'] = this.iso8601(this.sum(since, timeframePeriod * limit * 1000));
|
|
261096
|
+
else {
|
|
261097
|
+
response = await this.publicGetCandlesTimeframe(this.extend(request, params));
|
|
261005
261098
|
}
|
|
261006
|
-
const response = await this[method](this.extend(request, params));
|
|
261007
261099
|
//
|
|
261008
261100
|
// [
|
|
261009
261101
|
// {
|
|
@@ -261861,8 +261953,7 @@ class upbit extends _abstract_upbit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
261861
261953
|
/* harmony import */ var _abstract_wavesexchange_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8888);
|
|
261862
261954
|
/* harmony import */ var _base_errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6689);
|
|
261863
261955
|
/* harmony import */ var _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2194);
|
|
261864
|
-
/* harmony import */ var
|
|
261865
|
-
/* harmony import */ var _base_functions_crypto_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6890);
|
|
261956
|
+
/* harmony import */ var _static_dependencies_noble_curves_ed25519_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8817);
|
|
261866
261957
|
/* harmony import */ var _base_functions_number_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9292);
|
|
261867
261958
|
// ---------------------------------------------------------------------------
|
|
261868
261959
|
|
|
@@ -261870,7 +261961,6 @@ class upbit extends _abstract_upbit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
261870
261961
|
|
|
261871
261962
|
|
|
261872
261963
|
|
|
261873
|
-
|
|
261874
261964
|
// ---------------------------------------------------------------------------
|
|
261875
261965
|
/**
|
|
261876
261966
|
* @class wavesexchange
|
|
@@ -262615,7 +262705,7 @@ class wavesexchange extends _abstract_wavesexchange_js__WEBPACK_IMPORTED_MODULE_
|
|
|
262615
262705
|
const messageHex = this.binaryToBase16(this.encode(message));
|
|
262616
262706
|
const payload = prefix + messageHex;
|
|
262617
262707
|
const hexKey = this.binaryToBase16(this.base58ToBinary(this.secret));
|
|
262618
|
-
const signature =
|
|
262708
|
+
const signature = this.axolotl(payload, hexKey, _static_dependencies_noble_curves_ed25519_js__WEBPACK_IMPORTED_MODULE_4__/* .ed25519 */ .UN);
|
|
262619
262709
|
const request = {
|
|
262620
262710
|
'grant_type': 'password',
|
|
262621
262711
|
'scope': 'general',
|
|
@@ -263284,7 +263374,7 @@ class wavesexchange extends _abstract_wavesexchange_js__WEBPACK_IMPORTED_MODULE_
|
|
|
263284
263374
|
if ((serializedOrder[0] === '"') && (serializedOrder[(serializedOrder.length - 1)] === '"')) {
|
|
263285
263375
|
serializedOrder = serializedOrder.slice(1, serializedOrder.length - 1);
|
|
263286
263376
|
}
|
|
263287
|
-
const signature =
|
|
263377
|
+
const signature = this.axolotl(this.binaryToBase16(this.base58ToBinary(serializedOrder)), this.binaryToBase16(this.base58ToBinary(this.secret)), _static_dependencies_noble_curves_ed25519_js__WEBPACK_IMPORTED_MODULE_4__/* .ed25519 */ .UN);
|
|
263288
263378
|
body['signature'] = signature;
|
|
263289
263379
|
//
|
|
263290
263380
|
// {
|
|
@@ -263399,7 +263489,7 @@ class wavesexchange extends _abstract_wavesexchange_js__WEBPACK_IMPORTED_MODULE_
|
|
|
263399
263489
|
];
|
|
263400
263490
|
const binary = this.binaryConcatArray(byteArray);
|
|
263401
263491
|
const hexSecret = this.binaryToBase16(this.base58ToBinary(this.secret));
|
|
263402
|
-
const signature =
|
|
263492
|
+
const signature = this.axolotl(this.binaryToBase16(binary), hexSecret, _static_dependencies_noble_curves_ed25519_js__WEBPACK_IMPORTED_MODULE_4__/* .ed25519 */ .UN);
|
|
263403
263493
|
const request = {
|
|
263404
263494
|
'Timestamp': timestamp.toString(),
|
|
263405
263495
|
'Signature': signature,
|
|
@@ -263434,7 +263524,7 @@ class wavesexchange extends _abstract_wavesexchange_js__WEBPACK_IMPORTED_MODULE_
|
|
|
263434
263524
|
];
|
|
263435
263525
|
const binary = this.binaryConcatArray(byteArray);
|
|
263436
263526
|
const hexSecret = this.binaryToBase16(this.base58ToBinary(this.secret));
|
|
263437
|
-
const signature =
|
|
263527
|
+
const signature = this.axolotl(this.binaryToBase16(binary), hexSecret, _static_dependencies_noble_curves_ed25519_js__WEBPACK_IMPORTED_MODULE_4__/* .ed25519 */ .UN);
|
|
263438
263528
|
const request = {
|
|
263439
263529
|
'Accept': 'application/json',
|
|
263440
263530
|
'Timestamp': timestamp.toString(),
|
|
@@ -263798,7 +263888,7 @@ class wavesexchange extends _abstract_wavesexchange_js__WEBPACK_IMPORTED_MODULE_
|
|
|
263798
263888
|
];
|
|
263799
263889
|
const binary = this.binaryConcatArray(byteArray);
|
|
263800
263890
|
const hexSecret = this.binaryToBase16(this.base58ToBinary(this.secret));
|
|
263801
|
-
const signature =
|
|
263891
|
+
const signature = this.axolotl(this.binaryToBase16(binary), hexSecret, _static_dependencies_noble_curves_ed25519_js__WEBPACK_IMPORTED_MODULE_4__/* .ed25519 */ .UN);
|
|
263802
263892
|
const matcherRequest = {
|
|
263803
263893
|
'publicKey': this.apiKey,
|
|
263804
263894
|
'signature': signature,
|
|
@@ -264396,7 +264486,7 @@ class wavesexchange extends _abstract_wavesexchange_js__WEBPACK_IMPORTED_MODULE_
|
|
|
264396
264486
|
];
|
|
264397
264487
|
const binary = this.binaryConcatArray(byteArray);
|
|
264398
264488
|
const hexSecret = this.binaryToBase16(this.base58ToBinary(this.secret));
|
|
264399
|
-
const signature =
|
|
264489
|
+
const signature = this.axolotl(this.binaryToBase16(binary), hexSecret, _static_dependencies_noble_curves_ed25519_js__WEBPACK_IMPORTED_MODULE_4__/* .ed25519 */ .UN);
|
|
264400
264490
|
const request = {
|
|
264401
264491
|
'senderPublicKey': this.apiKey,
|
|
264402
264492
|
'amount': amountInteger,
|
|
@@ -267938,6 +268028,7 @@ class woo extends _abstract_woo_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
267938
268028
|
},
|
|
267939
268029
|
},
|
|
267940
268030
|
'options': {
|
|
268031
|
+
'sandboxMode': false,
|
|
267941
268032
|
'createMarketBuyOrderRequiresPrice': true,
|
|
267942
268033
|
// these network aliases require manual mapping here
|
|
267943
268034
|
'network-aliases-for-tokens': {
|
|
@@ -269844,14 +269935,17 @@ class woo extends _abstract_woo_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
269844
269935
|
else {
|
|
269845
269936
|
this.checkRequiredCredentials();
|
|
269846
269937
|
if (method === 'POST' && (path === 'algo/order' || path === 'order')) {
|
|
269847
|
-
const
|
|
269848
|
-
|
|
269849
|
-
|
|
269850
|
-
|
|
269851
|
-
|
|
269852
|
-
|
|
269853
|
-
|
|
269854
|
-
|
|
269938
|
+
const isSandboxMode = this.safeValue(this.options, 'sandboxMode', false);
|
|
269939
|
+
if (!isSandboxMode) {
|
|
269940
|
+
const applicationId = 'bc830de7-50f3-460b-9ee0-f430f83f9dad';
|
|
269941
|
+
const brokerId = this.safeString(this.options, 'brokerId', applicationId);
|
|
269942
|
+
const isStop = path.indexOf('algo') > -1;
|
|
269943
|
+
if (isStop) {
|
|
269944
|
+
params['brokerId'] = brokerId;
|
|
269945
|
+
}
|
|
269946
|
+
else {
|
|
269947
|
+
params['broker_id'] = brokerId;
|
|
269948
|
+
}
|
|
269855
269949
|
}
|
|
269856
269950
|
params = this.keysort(params);
|
|
269857
269951
|
}
|
|
@@ -270307,6 +270401,10 @@ class woo extends _abstract_woo_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
270307
270401
|
// if it was not returned according to above options, then return the first network of currency
|
|
270308
270402
|
return this.safeValue(networkKeys, 0);
|
|
270309
270403
|
}
|
|
270404
|
+
setSandboxMode(enable) {
|
|
270405
|
+
super.setSandboxMode(enable);
|
|
270406
|
+
this.options['sandboxMode'] = enable;
|
|
270407
|
+
}
|
|
270310
270408
|
}
|
|
270311
270409
|
|
|
270312
270410
|
|
|
@@ -272504,7 +272602,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
272504
272602
|
'3d': '259200',
|
|
272505
272603
|
'1w': '604800',
|
|
272506
272604
|
},
|
|
272507
|
-
'hostname': '
|
|
272605
|
+
'hostname': 'zondacrypto.exchange',
|
|
272508
272606
|
'urls': {
|
|
272509
272607
|
'referral': 'https://auth.zondaglobal.com/ref/jHlbB4mIkdS1',
|
|
272510
272608
|
'logo': 'https://user-images.githubusercontent.com/1294454/159202310-a0e38007-5e7c-4ba9-a32f-c8263a0291fe.jpg',
|
|
@@ -272516,7 +272614,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
272516
272614
|
'v1_01Private': 'https://api.{hostname}/rest',
|
|
272517
272615
|
},
|
|
272518
272616
|
'doc': [
|
|
272519
|
-
'https://docs.
|
|
272617
|
+
'https://docs.zondacrypto.exchange/',
|
|
272520
272618
|
'https://github.com/BitBayNet/API',
|
|
272521
272619
|
],
|
|
272522
272620
|
'support': 'https://zondaglobal.com/en/helpdesk/zonda-exchange',
|
|
@@ -272577,6 +272675,8 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
272577
272675
|
'balances/BITBAY/balance',
|
|
272578
272676
|
'balances/BITBAY/balance/transfer/{source}/{destination}',
|
|
272579
272677
|
'fiat_cantor/exchange',
|
|
272678
|
+
'api_payments/withdrawals/crypto',
|
|
272679
|
+
'api_payments/withdrawals/fiat',
|
|
272580
272680
|
],
|
|
272581
272681
|
'delete': [
|
|
272582
272682
|
'trading/offer/{symbol}/{id}/{side}/{price}',
|
|
@@ -272685,6 +272785,10 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
272685
272785
|
'REQUEST_TIMESTAMP_TOO_OLD': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidNonce,
|
|
272686
272786
|
'PERMISSIONS_NOT_SUFFICIENT': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.PermissionDenied,
|
|
272687
272787
|
'INVALID_STOP_RATE': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder,
|
|
272788
|
+
'TIMEOUT': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeError,
|
|
272789
|
+
'RESPONSE_TIMEOUT': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeError,
|
|
272790
|
+
'ACTION_BLOCKED': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.PermissionDenied,
|
|
272791
|
+
'INVALID_HASH_SIGNATURE': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.AuthenticationError,
|
|
272688
272792
|
},
|
|
272689
272793
|
'commonCurrencies': {
|
|
272690
272794
|
'GGC': 'Global Game Coin',
|
|
@@ -272695,7 +272799,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
272695
272799
|
/**
|
|
272696
272800
|
* @method
|
|
272697
272801
|
* @name zonda#fetchMarkets
|
|
272698
|
-
* @see https://docs.
|
|
272802
|
+
* @see https://docs.zondacrypto.exchange/reference/ticker-1
|
|
272699
272803
|
* @description retrieves data on all markets for zonda
|
|
272700
272804
|
* @param {object} [params] extra parameters specific to the exchange api endpoint
|
|
272701
272805
|
* @returns {object[]} an array of objects representing market data
|
|
@@ -272798,7 +272902,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
272798
272902
|
/**
|
|
272799
272903
|
* @method
|
|
272800
272904
|
* @name zonda#fetchOpenOrders
|
|
272801
|
-
* @see https://docs.
|
|
272905
|
+
* @see https://docs.zondacrypto.exchange/reference/active-orders
|
|
272802
272906
|
* @description fetch all unfilled currently open orders
|
|
272803
272907
|
* @param {string} symbol not used by zonda fetchOpenOrders
|
|
272804
272908
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
@@ -272866,7 +272970,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
272866
272970
|
/**
|
|
272867
272971
|
* @method
|
|
272868
272972
|
* @name zonda#fetchMyTrades
|
|
272869
|
-
* @see https://docs.
|
|
272973
|
+
* @see https://docs.zondacrypto.exchange/reference/transactions-history
|
|
272870
272974
|
* @description fetch all trades made by the user
|
|
272871
272975
|
* @param {string} symbol unified market symbol
|
|
272872
272976
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
@@ -272931,7 +273035,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
272931
273035
|
/**
|
|
272932
273036
|
* @method
|
|
272933
273037
|
* @name zonda#fetchBalance
|
|
272934
|
-
* @see https://docs.
|
|
273038
|
+
* @see https://docs.zondacrypto.exchange/reference/list-of-wallets
|
|
272935
273039
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
272936
273040
|
* @param {object} [params] extra parameters specific to the zonda api endpoint
|
|
272937
273041
|
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
@@ -272944,7 +273048,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
272944
273048
|
/**
|
|
272945
273049
|
* @method
|
|
272946
273050
|
* @name zonda#fetchOrderBook
|
|
272947
|
-
* @see https://docs.
|
|
273051
|
+
* @see https://docs.zondacrypto.exchange/reference/orderbook-2
|
|
272948
273052
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
272949
273053
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
272950
273054
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
@@ -273057,7 +273161,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
273057
273161
|
* @method
|
|
273058
273162
|
* @name zonda#fetchTicker
|
|
273059
273163
|
* @description v1_01PublicGetTradingTickerSymbol retrieves timestamp, datetime, bid, ask, close, last, previousClose, v1_01PublicGetTradingStatsSymbol retrieves high, low, volume and opening price of an asset
|
|
273060
|
-
* @see https://docs.
|
|
273164
|
+
* @see https://docs.zondacrypto.exchange/reference/market-statistics
|
|
273061
273165
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
273062
273166
|
* @param {object} [params] extra parameters specific to the zonda api endpoint
|
|
273063
273167
|
* @param {string} [params.method] v1_01PublicGetTradingTickerSymbol (default) or v1_01PublicGetTradingStatsSymbol
|
|
@@ -273130,7 +273234,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
273130
273234
|
* @method
|
|
273131
273235
|
* @name zonda#fetchTickersV2
|
|
273132
273236
|
* @description v1_01PublicGetTradingTicker retrieves timestamp, datetime, bid, ask, close, last, previousClose for each market, v1_01PublicGetTradingStats retrieves high, low, volume and opening price of each market
|
|
273133
|
-
* @see https://docs.
|
|
273237
|
+
* @see https://docs.zondacrypto.exchange/reference/market-statistics
|
|
273134
273238
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
273135
273239
|
* @param {object} [params] extra parameters specific to the zonda api endpoint
|
|
273136
273240
|
* @param {string} [params.method] v1_01PublicGetTradingTicker (default) or v1_01PublicGetTradingStats
|
|
@@ -273203,7 +273307,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
273203
273307
|
/**
|
|
273204
273308
|
* @method
|
|
273205
273309
|
* @name zonda#fetchLedger
|
|
273206
|
-
* @see https://docs.
|
|
273310
|
+
* @see https://docs.zondacrypto.exchange/reference/operations-history
|
|
273207
273311
|
* @description fetch the history of changes, actions done by the user or operations that altered balance of the user
|
|
273208
273312
|
* @param {string} code unified currency code, default is undefined
|
|
273209
273313
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
@@ -273577,7 +273681,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
273577
273681
|
/**
|
|
273578
273682
|
* @method
|
|
273579
273683
|
* @name zonda#fetchOHLCV
|
|
273580
|
-
* @see https://docs.
|
|
273684
|
+
* @see https://docs.zondacrypto.exchange/reference/candles-chart
|
|
273581
273685
|
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
273582
273686
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
273583
273687
|
* @param {string} timeframe the length of time each candle represents
|
|
@@ -273703,7 +273807,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
273703
273807
|
/**
|
|
273704
273808
|
* @method
|
|
273705
273809
|
* @name zonda#fetchTrades
|
|
273706
|
-
* @see https://docs.
|
|
273810
|
+
* @see https://docs.zondacrypto.exchange/reference/last-transactions
|
|
273707
273811
|
* @description get the list of most recent trades for a particular symbol
|
|
273708
273812
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
273709
273813
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
@@ -273756,7 +273860,6 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
273756
273860
|
const isStopLimit = (type === 'stop-limit') || (isLimitOrder && isStopLossPrice);
|
|
273757
273861
|
const isStopMarket = type === 'stop-market' || (isMarketOrder && isStopLossPrice);
|
|
273758
273862
|
const isStopOrder = isStopLimit || isStopMarket;
|
|
273759
|
-
const method = isStopOrder ? 'v1_01PrivatePostTradingStopOfferSymbol' : 'v1_01PrivatePostTradingOfferSymbol';
|
|
273760
273863
|
if (isLimitOrder || isStopLimit) {
|
|
273761
273864
|
request['rate'] = this.priceToPrecision(symbol, price);
|
|
273762
273865
|
request['mode'] = isStopLimit ? 'stop-limit' : 'limit';
|
|
@@ -273767,14 +273870,18 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
273767
273870
|
else {
|
|
273768
273871
|
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeError(this.id + ' createOrder() invalid type');
|
|
273769
273872
|
}
|
|
273873
|
+
params = this.omit(params, ['stopPrice', 'stopLossPrice']);
|
|
273874
|
+
let response = undefined;
|
|
273770
273875
|
if (isStopOrder) {
|
|
273771
273876
|
if (!isStopLossPrice) {
|
|
273772
273877
|
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeError(this.id + ' createOrder() zonda requires `triggerPrice` or `stopPrice` parameter for stop-limit or stop-market orders');
|
|
273773
273878
|
}
|
|
273774
273879
|
request['stopRate'] = this.priceToPrecision(symbol, stopLossPrice);
|
|
273880
|
+
response = await this.v1_01PrivatePostTradingStopOfferSymbol(this.extend(request, params));
|
|
273881
|
+
}
|
|
273882
|
+
else {
|
|
273883
|
+
response = await this.v1_01PrivatePostTradingOfferSymbol(this.extend(request, params));
|
|
273775
273884
|
}
|
|
273776
|
-
params = this.omit(params, ['stopPrice', 'stopLossPrice']);
|
|
273777
|
-
const response = await this[method](this.extend(request, params));
|
|
273778
273885
|
//
|
|
273779
273886
|
// unfilled (open order)
|
|
273780
273887
|
//
|
|
@@ -273858,7 +273965,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
273858
273965
|
/**
|
|
273859
273966
|
* @method
|
|
273860
273967
|
* @name zonda#cancelOrder
|
|
273861
|
-
* @see https://docs.
|
|
273968
|
+
* @see https://docs.zondacrypto.exchange/reference/cancel-order
|
|
273862
273969
|
* @description cancels an open order
|
|
273863
273970
|
* @param {string} id order id
|
|
273864
273971
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
@@ -273919,7 +274026,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
273919
274026
|
/**
|
|
273920
274027
|
* @method
|
|
273921
274028
|
* @name zonda#fetchDepositAddress
|
|
273922
|
-
* @see https://docs.
|
|
274029
|
+
* @see https://docs.zondacrypto.exchange/reference/deposit-addresses-for-crypto
|
|
273923
274030
|
* @description fetch the deposit address for a currency associated with this account
|
|
273924
274031
|
* @param {string} code unified currency code
|
|
273925
274032
|
* @param {object} [params] extra parameters specific to the zonda api endpoint
|
|
@@ -273953,7 +274060,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
273953
274060
|
/**
|
|
273954
274061
|
* @method
|
|
273955
274062
|
* @name zonda#fetchDepositAddresses
|
|
273956
|
-
* @see https://docs.
|
|
274063
|
+
* @see https://docs.zondacrypto.exchange/reference/deposit-addresses-for-crypto
|
|
273957
274064
|
* @description fetch deposit addresses for multiple currencies and chain types
|
|
273958
274065
|
* @param {string[]|undefined} codes zonda does not support filtering filtering by multiple codes and will ignore this parameter.
|
|
273959
274066
|
* @param {object} [params] extra parameters specific to the zonda api endpoint
|
|
@@ -273981,7 +274088,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
273981
274088
|
/**
|
|
273982
274089
|
* @method
|
|
273983
274090
|
* @name zonda#transfer
|
|
273984
|
-
* @see https://docs.
|
|
274091
|
+
* @see https://docs.zondacrypto.exchange/reference/internal-transfer
|
|
273985
274092
|
* @description transfer currency internally between wallets on the same account
|
|
273986
274093
|
* @param {string} code unified currency code
|
|
273987
274094
|
* @param {float} amount amount to transfer
|
|
@@ -274093,7 +274200,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
274093
274200
|
/**
|
|
274094
274201
|
* @method
|
|
274095
274202
|
* @name zonda#withdraw
|
|
274096
|
-
* @see https://docs.
|
|
274203
|
+
* @see https://docs.zondacrypto.exchange/reference/crypto-withdrawal-1
|
|
274097
274204
|
* @description make a withdrawal
|
|
274098
274205
|
* @param {string} code unified currency code
|
|
274099
274206
|
* @param {float} amount the amount to withdraw
|
|
@@ -274105,26 +274212,24 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
274105
274212
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
274106
274213
|
this.checkAddress(address);
|
|
274107
274214
|
await this.loadMarkets();
|
|
274108
|
-
let
|
|
274215
|
+
let response = undefined;
|
|
274109
274216
|
const currency = this.currency(code);
|
|
274110
274217
|
const request = {
|
|
274111
274218
|
'currency': currency['id'],
|
|
274112
|
-
'
|
|
274219
|
+
'amount': amount,
|
|
274220
|
+
'address': address,
|
|
274221
|
+
// request['balanceId'] = params['balanceId']; // Wallet id used for withdrawal. If not provided, any BITBAY wallet with sufficient funds is used. If BITBAYPAY wallet should be used parameter must be explicitly specified.
|
|
274113
274222
|
};
|
|
274114
274223
|
if (this.isFiat(code)) {
|
|
274115
|
-
|
|
274116
|
-
|
|
274117
|
-
// request['express'] = params['express']; // whatever it means, they don't explain
|
|
274118
|
-
// request['bic'] = '';
|
|
274224
|
+
// request['swift'] = params['swift']; // Bank identifier, if required.
|
|
274225
|
+
response = await this.v1_01PrivatePostApiPaymentsWithdrawalsFiat(this.extend(request, params));
|
|
274119
274226
|
}
|
|
274120
274227
|
else {
|
|
274121
|
-
method = 'privatePostTransfer';
|
|
274122
274228
|
if (tag !== undefined) {
|
|
274123
|
-
|
|
274229
|
+
request['tag'] = tag;
|
|
274124
274230
|
}
|
|
274125
|
-
|
|
274231
|
+
response = await this.v1_01PrivatePostApiPaymentsWithdrawalsCrypto(this.extend(request, params));
|
|
274126
274232
|
}
|
|
274127
|
-
const response = await this[method](this.extend(request, params));
|
|
274128
274233
|
//
|
|
274129
274234
|
// {
|
|
274130
274235
|
// "status": "Ok",
|
|
@@ -279849,7 +279954,7 @@ SOFTWARE.
|
|
|
279849
279954
|
|
|
279850
279955
|
//-----------------------------------------------------------------------------
|
|
279851
279956
|
// this is updated by vss.js when building
|
|
279852
|
-
const version = '4.1.
|
|
279957
|
+
const version = '4.1.34';
|
|
279853
279958
|
_src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange.ccxtVersion */ .e.ccxtVersion = version;
|
|
279854
279959
|
//-----------------------------------------------------------------------------
|
|
279855
279960
|
|