ccxt 4.1.32 → 4.1.33
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 +142 -109
- 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/bitmex.js +16 -22
- package/dist/cjs/src/digifinex.js +14 -0
- 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/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/functions/misc.js +6 -0
- package/js/src/bitmex.js +16 -22
- package/js/src/digifinex.js +14 -0
- 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/zonda.js +37 -30
- package/package.json +1 -1
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);
|
|
@@ -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);
|
|
@@ -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
|
},
|
|
@@ -224940,6 +224960,9 @@ class huobi extends _huobi_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
224940
224960
|
orderbook.reset(snapshot);
|
|
224941
224961
|
orderbook['nonce'] = seqNum;
|
|
224942
224962
|
}
|
|
224963
|
+
if (prevSeqNum !== undefined && prevSeqNum > orderbook['nonce']) {
|
|
224964
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidNonce(this.id + ' watchOrderBook() received a mesage out of order');
|
|
224965
|
+
}
|
|
224943
224966
|
if ((prevSeqNum === undefined || prevSeqNum <= orderbook['nonce']) && (seqNum > orderbook['nonce'])) {
|
|
224944
224967
|
const asks = this.safeValue(tick, 'asks', []);
|
|
224945
224968
|
const bids = this.safeValue(tick, 'bids', []);
|
|
@@ -243963,8 +243986,11 @@ class woo extends _woo_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
243963
243986
|
const value = balances[key];
|
|
243964
243987
|
const code = this.safeCurrencyCode(key);
|
|
243965
243988
|
const account = (code in this.balance) ? this.balance[code] : this.account();
|
|
243966
|
-
|
|
243967
|
-
|
|
243989
|
+
const total = this.safeString(value, 'holding');
|
|
243990
|
+
const used = this.safeString(value, 'frozen');
|
|
243991
|
+
account['total'] = total;
|
|
243992
|
+
account['used'] = used;
|
|
243993
|
+
account['free'] = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise.stringSub */ .O.stringSub(total, used);
|
|
243968
243994
|
this.balance[code] = account;
|
|
243969
243995
|
}
|
|
243970
243996
|
this.balance = this.safeBalance(this.balance);
|
|
@@ -260993,17 +261019,19 @@ class upbit extends _abstract_upbit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
260993
261019
|
'timeframe': timeframeValue,
|
|
260994
261020
|
'count': limit,
|
|
260995
261021
|
};
|
|
260996
|
-
let
|
|
261022
|
+
let response = undefined;
|
|
261023
|
+
if (since !== undefined) {
|
|
261024
|
+
// convert `since` to `to` value
|
|
261025
|
+
request['to'] = this.iso8601(this.sum(since, timeframePeriod * limit * 1000));
|
|
261026
|
+
}
|
|
260997
261027
|
if (timeframeValue === 'minutes') {
|
|
260998
261028
|
const numMinutes = Math.round(timeframePeriod / 60);
|
|
260999
261029
|
request['unit'] = numMinutes;
|
|
261000
|
-
|
|
261030
|
+
response = await this.publicGetCandlesTimeframeUnit(this.extend(request, params));
|
|
261001
261031
|
}
|
|
261002
|
-
|
|
261003
|
-
|
|
261004
|
-
request['to'] = this.iso8601(this.sum(since, timeframePeriod * limit * 1000));
|
|
261032
|
+
else {
|
|
261033
|
+
response = await this.publicGetCandlesTimeframe(this.extend(request, params));
|
|
261005
261034
|
}
|
|
261006
|
-
const response = await this[method](this.extend(request, params));
|
|
261007
261035
|
//
|
|
261008
261036
|
// [
|
|
261009
261037
|
// {
|
|
@@ -261861,8 +261889,7 @@ class upbit extends _abstract_upbit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
261861
261889
|
/* harmony import */ var _abstract_wavesexchange_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8888);
|
|
261862
261890
|
/* harmony import */ var _base_errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6689);
|
|
261863
261891
|
/* 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);
|
|
261892
|
+
/* harmony import */ var _static_dependencies_noble_curves_ed25519_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8817);
|
|
261866
261893
|
/* harmony import */ var _base_functions_number_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9292);
|
|
261867
261894
|
// ---------------------------------------------------------------------------
|
|
261868
261895
|
|
|
@@ -261870,7 +261897,6 @@ class upbit extends _abstract_upbit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
261870
261897
|
|
|
261871
261898
|
|
|
261872
261899
|
|
|
261873
|
-
|
|
261874
261900
|
// ---------------------------------------------------------------------------
|
|
261875
261901
|
/**
|
|
261876
261902
|
* @class wavesexchange
|
|
@@ -262615,7 +262641,7 @@ class wavesexchange extends _abstract_wavesexchange_js__WEBPACK_IMPORTED_MODULE_
|
|
|
262615
262641
|
const messageHex = this.binaryToBase16(this.encode(message));
|
|
262616
262642
|
const payload = prefix + messageHex;
|
|
262617
262643
|
const hexKey = this.binaryToBase16(this.base58ToBinary(this.secret));
|
|
262618
|
-
const signature =
|
|
262644
|
+
const signature = this.axolotl(payload, hexKey, _static_dependencies_noble_curves_ed25519_js__WEBPACK_IMPORTED_MODULE_4__/* .ed25519 */ .UN);
|
|
262619
262645
|
const request = {
|
|
262620
262646
|
'grant_type': 'password',
|
|
262621
262647
|
'scope': 'general',
|
|
@@ -263284,7 +263310,7 @@ class wavesexchange extends _abstract_wavesexchange_js__WEBPACK_IMPORTED_MODULE_
|
|
|
263284
263310
|
if ((serializedOrder[0] === '"') && (serializedOrder[(serializedOrder.length - 1)] === '"')) {
|
|
263285
263311
|
serializedOrder = serializedOrder.slice(1, serializedOrder.length - 1);
|
|
263286
263312
|
}
|
|
263287
|
-
const signature =
|
|
263313
|
+
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
263314
|
body['signature'] = signature;
|
|
263289
263315
|
//
|
|
263290
263316
|
// {
|
|
@@ -263399,7 +263425,7 @@ class wavesexchange extends _abstract_wavesexchange_js__WEBPACK_IMPORTED_MODULE_
|
|
|
263399
263425
|
];
|
|
263400
263426
|
const binary = this.binaryConcatArray(byteArray);
|
|
263401
263427
|
const hexSecret = this.binaryToBase16(this.base58ToBinary(this.secret));
|
|
263402
|
-
const signature =
|
|
263428
|
+
const signature = this.axolotl(this.binaryToBase16(binary), hexSecret, _static_dependencies_noble_curves_ed25519_js__WEBPACK_IMPORTED_MODULE_4__/* .ed25519 */ .UN);
|
|
263403
263429
|
const request = {
|
|
263404
263430
|
'Timestamp': timestamp.toString(),
|
|
263405
263431
|
'Signature': signature,
|
|
@@ -263434,7 +263460,7 @@ class wavesexchange extends _abstract_wavesexchange_js__WEBPACK_IMPORTED_MODULE_
|
|
|
263434
263460
|
];
|
|
263435
263461
|
const binary = this.binaryConcatArray(byteArray);
|
|
263436
263462
|
const hexSecret = this.binaryToBase16(this.base58ToBinary(this.secret));
|
|
263437
|
-
const signature =
|
|
263463
|
+
const signature = this.axolotl(this.binaryToBase16(binary), hexSecret, _static_dependencies_noble_curves_ed25519_js__WEBPACK_IMPORTED_MODULE_4__/* .ed25519 */ .UN);
|
|
263438
263464
|
const request = {
|
|
263439
263465
|
'Accept': 'application/json',
|
|
263440
263466
|
'Timestamp': timestamp.toString(),
|
|
@@ -263798,7 +263824,7 @@ class wavesexchange extends _abstract_wavesexchange_js__WEBPACK_IMPORTED_MODULE_
|
|
|
263798
263824
|
];
|
|
263799
263825
|
const binary = this.binaryConcatArray(byteArray);
|
|
263800
263826
|
const hexSecret = this.binaryToBase16(this.base58ToBinary(this.secret));
|
|
263801
|
-
const signature =
|
|
263827
|
+
const signature = this.axolotl(this.binaryToBase16(binary), hexSecret, _static_dependencies_noble_curves_ed25519_js__WEBPACK_IMPORTED_MODULE_4__/* .ed25519 */ .UN);
|
|
263802
263828
|
const matcherRequest = {
|
|
263803
263829
|
'publicKey': this.apiKey,
|
|
263804
263830
|
'signature': signature,
|
|
@@ -264396,7 +264422,7 @@ class wavesexchange extends _abstract_wavesexchange_js__WEBPACK_IMPORTED_MODULE_
|
|
|
264396
264422
|
];
|
|
264397
264423
|
const binary = this.binaryConcatArray(byteArray);
|
|
264398
264424
|
const hexSecret = this.binaryToBase16(this.base58ToBinary(this.secret));
|
|
264399
|
-
const signature =
|
|
264425
|
+
const signature = this.axolotl(this.binaryToBase16(binary), hexSecret, _static_dependencies_noble_curves_ed25519_js__WEBPACK_IMPORTED_MODULE_4__/* .ed25519 */ .UN);
|
|
264400
264426
|
const request = {
|
|
264401
264427
|
'senderPublicKey': this.apiKey,
|
|
264402
264428
|
'amount': amountInteger,
|
|
@@ -272504,7 +272530,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
272504
272530
|
'3d': '259200',
|
|
272505
272531
|
'1w': '604800',
|
|
272506
272532
|
},
|
|
272507
|
-
'hostname': '
|
|
272533
|
+
'hostname': 'zondacrypto.exchange',
|
|
272508
272534
|
'urls': {
|
|
272509
272535
|
'referral': 'https://auth.zondaglobal.com/ref/jHlbB4mIkdS1',
|
|
272510
272536
|
'logo': 'https://user-images.githubusercontent.com/1294454/159202310-a0e38007-5e7c-4ba9-a32f-c8263a0291fe.jpg',
|
|
@@ -272516,7 +272542,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
272516
272542
|
'v1_01Private': 'https://api.{hostname}/rest',
|
|
272517
272543
|
},
|
|
272518
272544
|
'doc': [
|
|
272519
|
-
'https://docs.
|
|
272545
|
+
'https://docs.zondacrypto.exchange/',
|
|
272520
272546
|
'https://github.com/BitBayNet/API',
|
|
272521
272547
|
],
|
|
272522
272548
|
'support': 'https://zondaglobal.com/en/helpdesk/zonda-exchange',
|
|
@@ -272577,6 +272603,8 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
272577
272603
|
'balances/BITBAY/balance',
|
|
272578
272604
|
'balances/BITBAY/balance/transfer/{source}/{destination}',
|
|
272579
272605
|
'fiat_cantor/exchange',
|
|
272606
|
+
'api_payments/withdrawals/crypto',
|
|
272607
|
+
'api_payments/withdrawals/fiat',
|
|
272580
272608
|
],
|
|
272581
272609
|
'delete': [
|
|
272582
272610
|
'trading/offer/{symbol}/{id}/{side}/{price}',
|
|
@@ -272685,6 +272713,10 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
272685
272713
|
'REQUEST_TIMESTAMP_TOO_OLD': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidNonce,
|
|
272686
272714
|
'PERMISSIONS_NOT_SUFFICIENT': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.PermissionDenied,
|
|
272687
272715
|
'INVALID_STOP_RATE': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder,
|
|
272716
|
+
'TIMEOUT': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeError,
|
|
272717
|
+
'RESPONSE_TIMEOUT': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeError,
|
|
272718
|
+
'ACTION_BLOCKED': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.PermissionDenied,
|
|
272719
|
+
'INVALID_HASH_SIGNATURE': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.AuthenticationError,
|
|
272688
272720
|
},
|
|
272689
272721
|
'commonCurrencies': {
|
|
272690
272722
|
'GGC': 'Global Game Coin',
|
|
@@ -272695,7 +272727,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
272695
272727
|
/**
|
|
272696
272728
|
* @method
|
|
272697
272729
|
* @name zonda#fetchMarkets
|
|
272698
|
-
* @see https://docs.
|
|
272730
|
+
* @see https://docs.zondacrypto.exchange/reference/ticker-1
|
|
272699
272731
|
* @description retrieves data on all markets for zonda
|
|
272700
272732
|
* @param {object} [params] extra parameters specific to the exchange api endpoint
|
|
272701
272733
|
* @returns {object[]} an array of objects representing market data
|
|
@@ -272798,7 +272830,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
272798
272830
|
/**
|
|
272799
272831
|
* @method
|
|
272800
272832
|
* @name zonda#fetchOpenOrders
|
|
272801
|
-
* @see https://docs.
|
|
272833
|
+
* @see https://docs.zondacrypto.exchange/reference/active-orders
|
|
272802
272834
|
* @description fetch all unfilled currently open orders
|
|
272803
272835
|
* @param {string} symbol not used by zonda fetchOpenOrders
|
|
272804
272836
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
@@ -272866,7 +272898,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
272866
272898
|
/**
|
|
272867
272899
|
* @method
|
|
272868
272900
|
* @name zonda#fetchMyTrades
|
|
272869
|
-
* @see https://docs.
|
|
272901
|
+
* @see https://docs.zondacrypto.exchange/reference/transactions-history
|
|
272870
272902
|
* @description fetch all trades made by the user
|
|
272871
272903
|
* @param {string} symbol unified market symbol
|
|
272872
272904
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
@@ -272931,7 +272963,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
272931
272963
|
/**
|
|
272932
272964
|
* @method
|
|
272933
272965
|
* @name zonda#fetchBalance
|
|
272934
|
-
* @see https://docs.
|
|
272966
|
+
* @see https://docs.zondacrypto.exchange/reference/list-of-wallets
|
|
272935
272967
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
272936
272968
|
* @param {object} [params] extra parameters specific to the zonda api endpoint
|
|
272937
272969
|
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
@@ -272944,7 +272976,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
272944
272976
|
/**
|
|
272945
272977
|
* @method
|
|
272946
272978
|
* @name zonda#fetchOrderBook
|
|
272947
|
-
* @see https://docs.
|
|
272979
|
+
* @see https://docs.zondacrypto.exchange/reference/orderbook-2
|
|
272948
272980
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
272949
272981
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
272950
272982
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
@@ -273057,7 +273089,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
273057
273089
|
* @method
|
|
273058
273090
|
* @name zonda#fetchTicker
|
|
273059
273091
|
* @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.
|
|
273092
|
+
* @see https://docs.zondacrypto.exchange/reference/market-statistics
|
|
273061
273093
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
273062
273094
|
* @param {object} [params] extra parameters specific to the zonda api endpoint
|
|
273063
273095
|
* @param {string} [params.method] v1_01PublicGetTradingTickerSymbol (default) or v1_01PublicGetTradingStatsSymbol
|
|
@@ -273130,7 +273162,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
273130
273162
|
* @method
|
|
273131
273163
|
* @name zonda#fetchTickersV2
|
|
273132
273164
|
* @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.
|
|
273165
|
+
* @see https://docs.zondacrypto.exchange/reference/market-statistics
|
|
273134
273166
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
273135
273167
|
* @param {object} [params] extra parameters specific to the zonda api endpoint
|
|
273136
273168
|
* @param {string} [params.method] v1_01PublicGetTradingTicker (default) or v1_01PublicGetTradingStats
|
|
@@ -273203,7 +273235,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
273203
273235
|
/**
|
|
273204
273236
|
* @method
|
|
273205
273237
|
* @name zonda#fetchLedger
|
|
273206
|
-
* @see https://docs.
|
|
273238
|
+
* @see https://docs.zondacrypto.exchange/reference/operations-history
|
|
273207
273239
|
* @description fetch the history of changes, actions done by the user or operations that altered balance of the user
|
|
273208
273240
|
* @param {string} code unified currency code, default is undefined
|
|
273209
273241
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
@@ -273577,7 +273609,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
273577
273609
|
/**
|
|
273578
273610
|
* @method
|
|
273579
273611
|
* @name zonda#fetchOHLCV
|
|
273580
|
-
* @see https://docs.
|
|
273612
|
+
* @see https://docs.zondacrypto.exchange/reference/candles-chart
|
|
273581
273613
|
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
273582
273614
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
273583
273615
|
* @param {string} timeframe the length of time each candle represents
|
|
@@ -273703,7 +273735,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
273703
273735
|
/**
|
|
273704
273736
|
* @method
|
|
273705
273737
|
* @name zonda#fetchTrades
|
|
273706
|
-
* @see https://docs.
|
|
273738
|
+
* @see https://docs.zondacrypto.exchange/reference/last-transactions
|
|
273707
273739
|
* @description get the list of most recent trades for a particular symbol
|
|
273708
273740
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
273709
273741
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
@@ -273756,7 +273788,6 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
273756
273788
|
const isStopLimit = (type === 'stop-limit') || (isLimitOrder && isStopLossPrice);
|
|
273757
273789
|
const isStopMarket = type === 'stop-market' || (isMarketOrder && isStopLossPrice);
|
|
273758
273790
|
const isStopOrder = isStopLimit || isStopMarket;
|
|
273759
|
-
const method = isStopOrder ? 'v1_01PrivatePostTradingStopOfferSymbol' : 'v1_01PrivatePostTradingOfferSymbol';
|
|
273760
273791
|
if (isLimitOrder || isStopLimit) {
|
|
273761
273792
|
request['rate'] = this.priceToPrecision(symbol, price);
|
|
273762
273793
|
request['mode'] = isStopLimit ? 'stop-limit' : 'limit';
|
|
@@ -273767,14 +273798,18 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
273767
273798
|
else {
|
|
273768
273799
|
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeError(this.id + ' createOrder() invalid type');
|
|
273769
273800
|
}
|
|
273801
|
+
params = this.omit(params, ['stopPrice', 'stopLossPrice']);
|
|
273802
|
+
let response = undefined;
|
|
273770
273803
|
if (isStopOrder) {
|
|
273771
273804
|
if (!isStopLossPrice) {
|
|
273772
273805
|
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
273806
|
}
|
|
273774
273807
|
request['stopRate'] = this.priceToPrecision(symbol, stopLossPrice);
|
|
273808
|
+
response = await this.v1_01PrivatePostTradingStopOfferSymbol(this.extend(request, params));
|
|
273809
|
+
}
|
|
273810
|
+
else {
|
|
273811
|
+
response = await this.v1_01PrivatePostTradingOfferSymbol(this.extend(request, params));
|
|
273775
273812
|
}
|
|
273776
|
-
params = this.omit(params, ['stopPrice', 'stopLossPrice']);
|
|
273777
|
-
const response = await this[method](this.extend(request, params));
|
|
273778
273813
|
//
|
|
273779
273814
|
// unfilled (open order)
|
|
273780
273815
|
//
|
|
@@ -273858,7 +273893,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
273858
273893
|
/**
|
|
273859
273894
|
* @method
|
|
273860
273895
|
* @name zonda#cancelOrder
|
|
273861
|
-
* @see https://docs.
|
|
273896
|
+
* @see https://docs.zondacrypto.exchange/reference/cancel-order
|
|
273862
273897
|
* @description cancels an open order
|
|
273863
273898
|
* @param {string} id order id
|
|
273864
273899
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
@@ -273919,7 +273954,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
273919
273954
|
/**
|
|
273920
273955
|
* @method
|
|
273921
273956
|
* @name zonda#fetchDepositAddress
|
|
273922
|
-
* @see https://docs.
|
|
273957
|
+
* @see https://docs.zondacrypto.exchange/reference/deposit-addresses-for-crypto
|
|
273923
273958
|
* @description fetch the deposit address for a currency associated with this account
|
|
273924
273959
|
* @param {string} code unified currency code
|
|
273925
273960
|
* @param {object} [params] extra parameters specific to the zonda api endpoint
|
|
@@ -273953,7 +273988,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
273953
273988
|
/**
|
|
273954
273989
|
* @method
|
|
273955
273990
|
* @name zonda#fetchDepositAddresses
|
|
273956
|
-
* @see https://docs.
|
|
273991
|
+
* @see https://docs.zondacrypto.exchange/reference/deposit-addresses-for-crypto
|
|
273957
273992
|
* @description fetch deposit addresses for multiple currencies and chain types
|
|
273958
273993
|
* @param {string[]|undefined} codes zonda does not support filtering filtering by multiple codes and will ignore this parameter.
|
|
273959
273994
|
* @param {object} [params] extra parameters specific to the zonda api endpoint
|
|
@@ -273981,7 +274016,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
273981
274016
|
/**
|
|
273982
274017
|
* @method
|
|
273983
274018
|
* @name zonda#transfer
|
|
273984
|
-
* @see https://docs.
|
|
274019
|
+
* @see https://docs.zondacrypto.exchange/reference/internal-transfer
|
|
273985
274020
|
* @description transfer currency internally between wallets on the same account
|
|
273986
274021
|
* @param {string} code unified currency code
|
|
273987
274022
|
* @param {float} amount amount to transfer
|
|
@@ -274093,7 +274128,7 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
274093
274128
|
/**
|
|
274094
274129
|
* @method
|
|
274095
274130
|
* @name zonda#withdraw
|
|
274096
|
-
* @see https://docs.
|
|
274131
|
+
* @see https://docs.zondacrypto.exchange/reference/crypto-withdrawal-1
|
|
274097
274132
|
* @description make a withdrawal
|
|
274098
274133
|
* @param {string} code unified currency code
|
|
274099
274134
|
* @param {float} amount the amount to withdraw
|
|
@@ -274105,26 +274140,24 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
274105
274140
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
274106
274141
|
this.checkAddress(address);
|
|
274107
274142
|
await this.loadMarkets();
|
|
274108
|
-
let
|
|
274143
|
+
let response = undefined;
|
|
274109
274144
|
const currency = this.currency(code);
|
|
274110
274145
|
const request = {
|
|
274111
274146
|
'currency': currency['id'],
|
|
274112
|
-
'
|
|
274147
|
+
'amount': amount,
|
|
274148
|
+
'address': address,
|
|
274149
|
+
// 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
274150
|
};
|
|
274114
274151
|
if (this.isFiat(code)) {
|
|
274115
|
-
|
|
274116
|
-
|
|
274117
|
-
// request['express'] = params['express']; // whatever it means, they don't explain
|
|
274118
|
-
// request['bic'] = '';
|
|
274152
|
+
// request['swift'] = params['swift']; // Bank identifier, if required.
|
|
274153
|
+
response = await this.v1_01PrivatePostApiPaymentsWithdrawalsFiat(this.extend(request, params));
|
|
274119
274154
|
}
|
|
274120
274155
|
else {
|
|
274121
|
-
method = 'privatePostTransfer';
|
|
274122
274156
|
if (tag !== undefined) {
|
|
274123
|
-
|
|
274157
|
+
request['tag'] = tag;
|
|
274124
274158
|
}
|
|
274125
|
-
|
|
274159
|
+
response = await this.v1_01PrivatePostApiPaymentsWithdrawalsCrypto(this.extend(request, params));
|
|
274126
274160
|
}
|
|
274127
|
-
const response = await this[method](this.extend(request, params));
|
|
274128
274161
|
//
|
|
274129
274162
|
// {
|
|
274130
274163
|
// "status": "Ok",
|
|
@@ -279849,7 +279882,7 @@ SOFTWARE.
|
|
|
279849
279882
|
|
|
279850
279883
|
//-----------------------------------------------------------------------------
|
|
279851
279884
|
// this is updated by vss.js when building
|
|
279852
|
-
const version = '4.1.
|
|
279885
|
+
const version = '4.1.33';
|
|
279853
279886
|
_src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange.ccxtVersion */ .e.ccxtVersion = version;
|
|
279854
279887
|
//-----------------------------------------------------------------------------
|
|
279855
279888
|
|