ccxt 4.1.72 → 4.1.74
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 +6 -8
- package/dist/ccxt.browser.js +729 -1360
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -4
- package/dist/cjs/src/base/Exchange.js +27 -4
- package/dist/cjs/src/bybit.js +30 -7
- package/dist/cjs/src/cex.js +61 -3
- package/dist/cjs/src/coinex.js +1 -1
- package/dist/cjs/src/exmo.js +34 -31
- package/dist/cjs/src/kraken.js +2 -0
- package/dist/cjs/src/latoken.js +27 -20
- package/dist/cjs/src/okx.js +45 -2
- package/dist/cjs/src/pro/cex.js +317 -10
- package/js/ccxt.d.ts +2 -5
- package/js/ccxt.js +2 -4
- package/js/src/abstract/kraken.d.ts +2 -0
- package/js/src/base/Exchange.d.ts +4 -2
- package/js/src/base/Exchange.js +27 -4
- package/js/src/bybit.d.ts +1 -0
- package/js/src/bybit.js +30 -7
- package/js/src/cex.d.ts +1 -0
- package/js/src/cex.js +61 -3
- package/js/src/coinex.js +1 -1
- package/js/src/exmo.d.ts +1 -1
- package/js/src/exmo.js +34 -31
- package/js/src/kraken.js +2 -0
- package/js/src/latoken.d.ts +6 -1
- package/js/src/latoken.js +28 -21
- package/js/src/okx.d.ts +2 -0
- package/js/src/okx.js +45 -2
- package/js/src/pro/cex.d.ts +11 -2
- package/js/src/pro/cex.js +318 -11
- package/package.json +1 -1
- package/js/src/abstract/tidex.d.ts +0 -28
- package/js/src/abstract/tidex.js +0 -11
package/dist/ccxt.browser.js
CHANGED
|
@@ -1248,22 +1248,6 @@ class Exchange extends _base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchang
|
|
|
1248
1248
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Exchange);
|
|
1249
1249
|
|
|
1250
1250
|
|
|
1251
|
-
/***/ }),
|
|
1252
|
-
|
|
1253
|
-
/***/ 6057:
|
|
1254
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1255
|
-
|
|
1256
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1257
|
-
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
1258
|
-
/* harmony export */ });
|
|
1259
|
-
/* harmony import */ var _base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3043);
|
|
1260
|
-
// -------------------------------------------------------------------------------
|
|
1261
|
-
|
|
1262
|
-
class Exchange extends _base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e {
|
|
1263
|
-
}
|
|
1264
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Exchange);
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
1251
|
/***/ }),
|
|
1268
1252
|
|
|
1269
1253
|
/***/ 1696:
|
|
@@ -7353,6 +7337,7 @@ class Exchange {
|
|
|
7353
7337
|
'createMarketOrder': true,
|
|
7354
7338
|
'createOrder': true,
|
|
7355
7339
|
'createMarketBuyOrderWithCost': undefined,
|
|
7340
|
+
'createMarketOrderWithCost': undefined,
|
|
7356
7341
|
'createMarketSellOrderWithCost': undefined,
|
|
7357
7342
|
'createOrders': undefined,
|
|
7358
7343
|
'createPostOnlyOrder': undefined,
|
|
@@ -10555,28 +10540,50 @@ class Exchange {
|
|
|
10555
10540
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
10556
10541
|
throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.NotSupported(this.id + ' createOrder() is not supported yet');
|
|
10557
10542
|
}
|
|
10543
|
+
async createMarketOrderWithCost(symbol, side, cost, params = {}) {
|
|
10544
|
+
/**
|
|
10545
|
+
* @method
|
|
10546
|
+
* @name createMarketOrderWithCost
|
|
10547
|
+
* @description create a market order by providing the symbol, side and cost
|
|
10548
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
10549
|
+
* @param {string} side 'buy' or 'sell'
|
|
10550
|
+
* @param {float} cost how much you want to trade in units of the quote currency
|
|
10551
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
10552
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
10553
|
+
*/
|
|
10554
|
+
if (this.options['createMarketOrderWithCost'] || (this.options['createMarketBuyOrderWithCost'] && this.options['createMarketSellOrderWithCost'])) {
|
|
10555
|
+
return await this.createOrder(symbol, 'market', side, cost, 1, params);
|
|
10556
|
+
}
|
|
10557
|
+
throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.NotSupported(this.id + ' createMarketOrderWithCost() is not supported yet');
|
|
10558
|
+
}
|
|
10558
10559
|
async createMarketBuyOrderWithCost(symbol, cost, params = {}) {
|
|
10559
10560
|
/**
|
|
10560
10561
|
* @method
|
|
10561
|
-
* @name
|
|
10562
|
+
* @name createMarketBuyOrderWithCost
|
|
10562
10563
|
* @description create a market buy order by providing the symbol and cost
|
|
10563
10564
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
10564
10565
|
* @param {float} cost how much you want to trade in units of the quote currency
|
|
10565
10566
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
10566
10567
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
10567
10568
|
*/
|
|
10569
|
+
if (this.options['createMarketBuyOrderRequiresPrice'] || this.options['createMarketBuyOrderWithCost']) {
|
|
10570
|
+
return await this.createOrder(symbol, 'market', 'buy', cost, 1, params);
|
|
10571
|
+
}
|
|
10568
10572
|
throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.NotSupported(this.id + ' createMarketBuyOrderWithCost() is not supported yet');
|
|
10569
10573
|
}
|
|
10570
10574
|
async createMarketSellOrderWithCost(symbol, cost, params = {}) {
|
|
10571
10575
|
/**
|
|
10572
10576
|
* @method
|
|
10573
10577
|
* @name createMarketSellOrderWithCost
|
|
10574
|
-
* @description create a market
|
|
10578
|
+
* @description create a market sell order by providing the symbol and cost
|
|
10575
10579
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
10576
10580
|
* @param {float} cost how much you want to trade in units of the quote currency
|
|
10577
10581
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
10578
10582
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
10579
10583
|
*/
|
|
10584
|
+
if (this.options['createMarketSellOrderRequiresPrice'] || this.options['createMarketSellOrderWithCost']) {
|
|
10585
|
+
return await this.createOrder(symbol, 'market', 'sell', cost, 1, params);
|
|
10586
|
+
}
|
|
10580
10587
|
throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.NotSupported(this.id + ' createMarketSellOrderWithCost() is not supported yet');
|
|
10581
10588
|
}
|
|
10582
10589
|
async createOrders(orders, params = {}) {
|
|
@@ -10655,10 +10662,10 @@ class Exchange {
|
|
|
10655
10662
|
*/
|
|
10656
10663
|
throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.NotSupported(this.id + ' fetchDepositsWithdrawals() is not supported yet');
|
|
10657
10664
|
}
|
|
10658
|
-
async fetchDeposits(
|
|
10665
|
+
async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
10659
10666
|
throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.NotSupported(this.id + ' fetchDeposits() is not supported yet');
|
|
10660
10667
|
}
|
|
10661
|
-
async fetchWithdrawals(
|
|
10668
|
+
async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
10662
10669
|
throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.NotSupported(this.id + ' fetchWithdrawals() is not supported yet');
|
|
10663
10670
|
}
|
|
10664
10671
|
async fetchOpenInterest(symbol, params = {}) {
|
|
@@ -75955,6 +75962,8 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
75955
75962
|
'borrowCrossMargin': true,
|
|
75956
75963
|
'cancelAllOrders': true,
|
|
75957
75964
|
'cancelOrder': true,
|
|
75965
|
+
'createMarketBuyOrderWithCost': true,
|
|
75966
|
+
'createMarketSellOrderWithCost': false,
|
|
75958
75967
|
'createOrder': true,
|
|
75959
75968
|
'createOrders': true,
|
|
75960
75969
|
'createPostOnlyOrder': true,
|
|
@@ -79366,6 +79375,25 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
79366
79375
|
}
|
|
79367
79376
|
return this.safeValue(result, 0);
|
|
79368
79377
|
}
|
|
79378
|
+
async createMarketBuyOrderWithCost(symbol, cost, params = {}) {
|
|
79379
|
+
/**
|
|
79380
|
+
* @method
|
|
79381
|
+
* @name bybit#createMarketBuyOrderWithCost
|
|
79382
|
+
* @see https://bybit-exchange.github.io/docs/v5/order/create-order
|
|
79383
|
+
* @description create a market buy order by providing the symbol and cost
|
|
79384
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
79385
|
+
* @param {float} cost how much you want to trade in units of the quote currency
|
|
79386
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
79387
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
79388
|
+
*/
|
|
79389
|
+
await this.loadMarkets();
|
|
79390
|
+
const market = this.market(symbol);
|
|
79391
|
+
if (!market['spot']) {
|
|
79392
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.NotSupported(this.id + ' createMarketBuyOrderWithCost() supports spot orders only');
|
|
79393
|
+
}
|
|
79394
|
+
params['createMarketBuyOrderRequiresPrice'] = false;
|
|
79395
|
+
return await this.createOrder(symbol, 'market', 'buy', cost, undefined, params);
|
|
79396
|
+
}
|
|
79369
79397
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
79370
79398
|
/**
|
|
79371
79399
|
* @method
|
|
@@ -79466,18 +79494,20 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
79466
79494
|
}
|
|
79467
79495
|
if (market['spot'] && (type === 'market') && (side === 'buy')) {
|
|
79468
79496
|
// for market buy it requires the amount of quote currency to spend
|
|
79469
|
-
|
|
79470
|
-
|
|
79471
|
-
|
|
79472
|
-
|
|
79473
|
-
|
|
79497
|
+
let createMarketBuyOrderRequiresPrice = true;
|
|
79498
|
+
[createMarketBuyOrderRequiresPrice, params] = this.handleOptionAndParams(params, 'createOrder', 'createMarketBuyOrderRequiresPrice', true);
|
|
79499
|
+
const cost = this.safeNumber(params, 'cost');
|
|
79500
|
+
params = this.omit(params, 'cost');
|
|
79501
|
+
if (createMarketBuyOrderRequiresPrice) {
|
|
79502
|
+
if ((price === undefined) && (cost === undefined)) {
|
|
79503
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder(this.id + ' createOrder() requires the price argument for market buy orders to calculate the total cost to spend (amount * price), alternatively set the createMarketBuyOrderRequiresPrice option or param to false and pass the cost to spend in the amount argument');
|
|
79474
79504
|
}
|
|
79475
79505
|
else {
|
|
79476
79506
|
const amountString = this.numberToString(amount);
|
|
79477
79507
|
const priceString = this.numberToString(price);
|
|
79478
79508
|
const quoteAmount = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringMul(amountString, priceString);
|
|
79479
|
-
|
|
79480
|
-
request['qty'] = this.costToPrecision(symbol,
|
|
79509
|
+
const costRequest = (cost !== undefined) ? cost : quoteAmount;
|
|
79510
|
+
request['qty'] = this.costToPrecision(symbol, costRequest);
|
|
79481
79511
|
}
|
|
79482
79512
|
}
|
|
79483
79513
|
else {
|
|
@@ -83539,6 +83569,7 @@ class cex extends _abstract_cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
83539
83569
|
'future': false,
|
|
83540
83570
|
'option': false,
|
|
83541
83571
|
'addMargin': false,
|
|
83572
|
+
'cancelAllOrders': true,
|
|
83542
83573
|
'cancelOrder': true,
|
|
83543
83574
|
'cancelOrders': false,
|
|
83544
83575
|
'createDepositAddress': false,
|
|
@@ -83974,6 +84005,7 @@ class cex extends _abstract_cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
83974
84005
|
/**
|
|
83975
84006
|
* @method
|
|
83976
84007
|
* @name cex#fetchBalance
|
|
84008
|
+
* @see https://docs.cex.io/#account-balance
|
|
83977
84009
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
83978
84010
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
83979
84011
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
@@ -83986,6 +84018,7 @@ class cex extends _abstract_cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
83986
84018
|
/**
|
|
83987
84019
|
* @method
|
|
83988
84020
|
* @name cex#fetchOrderBook
|
|
84021
|
+
* @see https://docs.cex.io/#orderbook
|
|
83989
84022
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
83990
84023
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
83991
84024
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
@@ -84028,6 +84061,7 @@ class cex extends _abstract_cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
84028
84061
|
/**
|
|
84029
84062
|
* @method
|
|
84030
84063
|
* @name cex#fetchOHLCV
|
|
84064
|
+
* @see https://docs.cex.io/#historical-ohlcv-chart
|
|
84031
84065
|
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
84032
84066
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
84033
84067
|
* @param {string} timeframe the length of time each candle represents
|
|
@@ -84133,6 +84167,7 @@ class cex extends _abstract_cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
84133
84167
|
/**
|
|
84134
84168
|
* @method
|
|
84135
84169
|
* @name cex#fetchTicker
|
|
84170
|
+
* @see https://docs.cex.io/#ticker
|
|
84136
84171
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
84137
84172
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
84138
84173
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -84185,6 +84220,7 @@ class cex extends _abstract_cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
84185
84220
|
/**
|
|
84186
84221
|
* @method
|
|
84187
84222
|
* @name cex#fetchTrades
|
|
84223
|
+
* @see https://docs.cex.io/#trade-history
|
|
84188
84224
|
* @description get the list of most recent trades for a particular symbol
|
|
84189
84225
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
84190
84226
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
@@ -84204,6 +84240,7 @@ class cex extends _abstract_cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
84204
84240
|
/**
|
|
84205
84241
|
* @method
|
|
84206
84242
|
* @name cex#fetchTradingFees
|
|
84243
|
+
* @see https://docs.cex.io/#get-my-fee
|
|
84207
84244
|
* @description fetch the trading fees for multiple markets
|
|
84208
84245
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
84209
84246
|
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
@@ -84245,6 +84282,7 @@ class cex extends _abstract_cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
84245
84282
|
/**
|
|
84246
84283
|
* @method
|
|
84247
84284
|
* @name cex#createOrder
|
|
84285
|
+
* @see https://docs.cex.io/#place-order
|
|
84248
84286
|
* @description create a trade order
|
|
84249
84287
|
* @see https://cex.io/rest-api#place-order
|
|
84250
84288
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
@@ -84328,6 +84366,7 @@ class cex extends _abstract_cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
84328
84366
|
/**
|
|
84329
84367
|
* @method
|
|
84330
84368
|
* @name cex#cancelOrder
|
|
84369
|
+
* @see https://docs.cex.io/#cancel-order
|
|
84331
84370
|
* @description cancels an open order
|
|
84332
84371
|
* @param {string} id order id
|
|
84333
84372
|
* @param {string} symbol not used by cex cancelOrder ()
|
|
@@ -84342,6 +84381,36 @@ class cex extends _abstract_cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
84342
84381
|
// 'true'
|
|
84343
84382
|
return this.extend(this.parseOrder({}), { 'info': response, 'type': undefined, 'id': id, 'status': 'canceled' });
|
|
84344
84383
|
}
|
|
84384
|
+
async cancelAllOrders(symbol = undefined, params = {}) {
|
|
84385
|
+
/**
|
|
84386
|
+
* @method
|
|
84387
|
+
* @name cex#cancelAllOrders
|
|
84388
|
+
* @see https://docs.cex.io/#cancel-all-orders-for-given-pair
|
|
84389
|
+
* @description cancel all open orders in a market
|
|
84390
|
+
* @param {string} symbol unified market symbol of the market to cancel orders in
|
|
84391
|
+
* @param {object} [params] extra parameters specific to the cex api endpoint
|
|
84392
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
|
|
84393
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
84394
|
+
*/
|
|
84395
|
+
if (symbol === undefined) {
|
|
84396
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' cancelAllOrders requires a symbol.');
|
|
84397
|
+
}
|
|
84398
|
+
await this.loadMarkets();
|
|
84399
|
+
const market = this.market(symbol);
|
|
84400
|
+
const request = {
|
|
84401
|
+
'pair': market['id'],
|
|
84402
|
+
};
|
|
84403
|
+
const orders = await this.privatePostCancelOrdersPair(this.extend(request, params));
|
|
84404
|
+
//
|
|
84405
|
+
// {
|
|
84406
|
+
// "e":"cancel_orders",
|
|
84407
|
+
// "ok":"ok",
|
|
84408
|
+
// "data":[
|
|
84409
|
+
// ]
|
|
84410
|
+
// }
|
|
84411
|
+
//
|
|
84412
|
+
return orders;
|
|
84413
|
+
}
|
|
84345
84414
|
parseOrder(order, market = undefined) {
|
|
84346
84415
|
// Depending on the call, 'time' can be a unix int, unix string or ISO string
|
|
84347
84416
|
// Yes, really
|
|
@@ -84355,9 +84424,9 @@ class cex extends _abstract_cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
84355
84424
|
timestamp = parseInt(timestamp);
|
|
84356
84425
|
}
|
|
84357
84426
|
let symbol = undefined;
|
|
84358
|
-
|
|
84359
|
-
|
|
84360
|
-
|
|
84427
|
+
const baseId = this.safeString(order, 'symbol1');
|
|
84428
|
+
const quoteId = this.safeString(order, 'symbol2');
|
|
84429
|
+
if (market === undefined && baseId !== undefined && quoteId !== undefined) {
|
|
84361
84430
|
const base = this.safeCurrencyCode(baseId);
|
|
84362
84431
|
const quote = this.safeCurrencyCode(quoteId);
|
|
84363
84432
|
if ((base !== undefined) && (quote !== undefined)) {
|
|
@@ -84612,6 +84681,7 @@ class cex extends _abstract_cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
84612
84681
|
/**
|
|
84613
84682
|
* @method
|
|
84614
84683
|
* @name cex#fetchOpenOrders
|
|
84684
|
+
* @see https://docs.cex.io/#open-orders
|
|
84615
84685
|
* @description fetch all unfilled currently open orders
|
|
84616
84686
|
* @param {string} symbol unified market symbol
|
|
84617
84687
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
@@ -84638,6 +84708,7 @@ class cex extends _abstract_cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
84638
84708
|
/**
|
|
84639
84709
|
* @method
|
|
84640
84710
|
* @name cex#fetchClosedOrders
|
|
84711
|
+
* @see https://docs.cex.io/#archived-orders
|
|
84641
84712
|
* @description fetches information on multiple closed orders made by the user
|
|
84642
84713
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
84643
84714
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
@@ -84659,6 +84730,7 @@ class cex extends _abstract_cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
84659
84730
|
/**
|
|
84660
84731
|
* @method
|
|
84661
84732
|
* @name cex#fetchOrder
|
|
84733
|
+
* @see https://docs.cex.io/?python#get-order-details
|
|
84662
84734
|
* @description fetches information on an order made by the user
|
|
84663
84735
|
* @param {string} symbol not used by cex fetchOrder
|
|
84664
84736
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -84776,6 +84848,7 @@ class cex extends _abstract_cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
84776
84848
|
/**
|
|
84777
84849
|
* @method
|
|
84778
84850
|
* @name cex#fetchOrders
|
|
84851
|
+
* @see https://docs.cex.io/#archived-orders
|
|
84779
84852
|
* @description fetches information on multiple orders made by the user
|
|
84780
84853
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
84781
84854
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
@@ -84998,6 +85071,20 @@ class cex extends _abstract_cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
84998
85071
|
return this.safeString(this.options['order']['status'], status, status);
|
|
84999
85072
|
}
|
|
85000
85073
|
async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
|
|
85074
|
+
/**
|
|
85075
|
+
* @method
|
|
85076
|
+
* @name cex#editOrderWs
|
|
85077
|
+
* @description edit a trade order
|
|
85078
|
+
* @see https://docs.cex.io/#cancel-replace-order
|
|
85079
|
+
* @param {string} id order id
|
|
85080
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
85081
|
+
* @param {string} type 'market' or 'limit'
|
|
85082
|
+
* @param {string} side 'buy' or 'sell'
|
|
85083
|
+
* @param {float} amount how much of the currency you want to trade in units of the base currency
|
|
85084
|
+
* @param {float|undefined} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
85085
|
+
* @param {object} [params] extra parameters specific to the cex api endpoint
|
|
85086
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
85087
|
+
*/
|
|
85001
85088
|
if (amount === undefined) {
|
|
85002
85089
|
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' editOrder() requires a amount argument');
|
|
85003
85090
|
}
|
|
@@ -85021,6 +85108,7 @@ class cex extends _abstract_cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
85021
85108
|
/**
|
|
85022
85109
|
* @method
|
|
85023
85110
|
* @name cex#fetchDepositAddress
|
|
85111
|
+
* @see https://docs.cex.io/#get-crypto-address
|
|
85024
85112
|
* @description fetch the deposit address for a currency associated with this account
|
|
85025
85113
|
* @param {string} code unified currency code
|
|
85026
85114
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -91181,8 +91269,8 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
91181
91269
|
'cancelOrder': true,
|
|
91182
91270
|
'cancelOrders': true,
|
|
91183
91271
|
'createDepositAddress': true,
|
|
91184
|
-
'createOrder': true,
|
|
91185
91272
|
'createMarketBuyOrderWithCost': true,
|
|
91273
|
+
'createOrder': true,
|
|
91186
91274
|
'createOrders': true,
|
|
91187
91275
|
'createReduceOnlyOrder': true,
|
|
91188
91276
|
'editOrder': true,
|
|
@@ -119344,14 +119432,13 @@ class exmo extends _abstract_exmo_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
119344
119432
|
'position_id': market['id'],
|
|
119345
119433
|
'quantity': amount,
|
|
119346
119434
|
};
|
|
119347
|
-
let
|
|
119435
|
+
let response = undefined;
|
|
119348
119436
|
if (type === 'add') {
|
|
119349
|
-
|
|
119437
|
+
response = await this.privatePostMarginUserPositionMarginAdd(this.extend(request, params));
|
|
119350
119438
|
}
|
|
119351
119439
|
else if (type === 'reduce') {
|
|
119352
|
-
|
|
119440
|
+
response = await this.privatePostMarginUserPositionMarginRemove(this.extend(request, params));
|
|
119353
119441
|
}
|
|
119354
|
-
const response = await this[method](this.extend(request, params));
|
|
119355
119442
|
//
|
|
119356
119443
|
// {}
|
|
119357
119444
|
//
|
|
@@ -119410,13 +119497,16 @@ class exmo extends _abstract_exmo_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
119410
119497
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
119411
119498
|
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
119412
119499
|
*/
|
|
119413
|
-
|
|
119500
|
+
const options = this.safeValue(this.options, 'fetchTradingFees', {});
|
|
119501
|
+
const defaultMethod = this.safeString(options, 'method', 'fetchPrivateTradingFees');
|
|
119502
|
+
const method = this.safeString(params, 'method', defaultMethod);
|
|
119414
119503
|
params = this.omit(params, 'method');
|
|
119415
|
-
if (method ===
|
|
119416
|
-
|
|
119417
|
-
|
|
119504
|
+
if (method === 'fetchPrivateTradingFees') {
|
|
119505
|
+
return await this.fetchPrivateTradingFees(params);
|
|
119506
|
+
}
|
|
119507
|
+
else {
|
|
119508
|
+
return await this.fetchPublicTradingFees(params);
|
|
119418
119509
|
}
|
|
119419
|
-
return await this[method](params);
|
|
119420
119510
|
}
|
|
119421
119511
|
async fetchPrivateTradingFees(params = {}) {
|
|
119422
119512
|
await this.loadMarkets();
|
|
@@ -120529,7 +120619,6 @@ class exmo extends _abstract_exmo_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
120529
120619
|
// 'client_id': 123, // optional, must be a positive integer
|
|
120530
120620
|
// 'comment': '', // up to 50 latin symbols, whitespaces, underscores
|
|
120531
120621
|
};
|
|
120532
|
-
let method = isSpot ? 'privatePostOrderCreate' : 'privatePostMarginUserOrderCreate';
|
|
120533
120622
|
let clientOrderId = this.safeValue2(params, 'client_id', 'clientOrderId');
|
|
120534
120623
|
if (clientOrderId !== undefined) {
|
|
120535
120624
|
clientOrderId = this.safeInteger2(params, 'client_id', 'clientOrderId');
|
|
@@ -120545,32 +120634,22 @@ class exmo extends _abstract_exmo_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
120545
120634
|
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' createOrder requires an extra param params["leverage"] for margin orders');
|
|
120546
120635
|
}
|
|
120547
120636
|
params = this.omit(params, ['stopPrice', 'stop_price', 'triggerPrice', 'timeInForce', 'client_id', 'clientOrderId']);
|
|
120548
|
-
if (
|
|
120549
|
-
|
|
120637
|
+
if (price !== undefined) {
|
|
120638
|
+
request['price'] = this.priceToPrecision(market['symbol'], price);
|
|
120639
|
+
}
|
|
120640
|
+
let response = undefined;
|
|
120641
|
+
if (isSpot) {
|
|
120642
|
+
if (triggerPrice !== undefined) {
|
|
120550
120643
|
if (type === 'limit') {
|
|
120551
120644
|
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.BadRequest(this.id + ' createOrder () cannot create stop limit orders for spot, only stop market');
|
|
120552
120645
|
}
|
|
120553
120646
|
else {
|
|
120554
|
-
method = 'privatePostStopMarketOrderCreate';
|
|
120555
120647
|
request['type'] = side;
|
|
120556
120648
|
request['trigger_price'] = this.priceToPrecision(symbol, triggerPrice);
|
|
120557
120649
|
}
|
|
120650
|
+
response = await this.privatePostStopMarketOrderCreate(this.extend(request, params));
|
|
120558
120651
|
}
|
|
120559
120652
|
else {
|
|
120560
|
-
request['stop_price'] = this.priceToPrecision(symbol, triggerPrice);
|
|
120561
|
-
if (type === 'limit') {
|
|
120562
|
-
request['type'] = 'stop_limit_' + side;
|
|
120563
|
-
}
|
|
120564
|
-
else if (type === 'market') {
|
|
120565
|
-
request['type'] = 'stop_' + side;
|
|
120566
|
-
}
|
|
120567
|
-
else {
|
|
120568
|
-
request['type'] = type;
|
|
120569
|
-
}
|
|
120570
|
-
}
|
|
120571
|
-
}
|
|
120572
|
-
else {
|
|
120573
|
-
if (isSpot) {
|
|
120574
120653
|
const execType = this.safeString(params, 'exec_type');
|
|
120575
120654
|
let isPostOnly = undefined;
|
|
120576
120655
|
[isPostOnly, params] = this.handlePostOnly(type === 'market', execType === 'post_only', params);
|
|
@@ -120588,6 +120667,21 @@ class exmo extends _abstract_exmo_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
120588
120667
|
else if (timeInForce !== undefined) {
|
|
120589
120668
|
request['exec_type'] = timeInForce;
|
|
120590
120669
|
}
|
|
120670
|
+
response = await this.privatePostOrderCreate(this.extend(request, params));
|
|
120671
|
+
}
|
|
120672
|
+
}
|
|
120673
|
+
else {
|
|
120674
|
+
if (triggerPrice !== undefined) {
|
|
120675
|
+
request['stop_price'] = this.priceToPrecision(symbol, triggerPrice);
|
|
120676
|
+
if (type === 'limit') {
|
|
120677
|
+
request['type'] = 'stop_limit_' + side;
|
|
120678
|
+
}
|
|
120679
|
+
else if (type === 'market') {
|
|
120680
|
+
request['type'] = 'stop_' + side;
|
|
120681
|
+
}
|
|
120682
|
+
else {
|
|
120683
|
+
request['type'] = type;
|
|
120684
|
+
}
|
|
120591
120685
|
}
|
|
120592
120686
|
else {
|
|
120593
120687
|
if (type === 'limit' || type === 'market') {
|
|
@@ -120597,11 +120691,8 @@ class exmo extends _abstract_exmo_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
120597
120691
|
request['type'] = type;
|
|
120598
120692
|
}
|
|
120599
120693
|
}
|
|
120694
|
+
response = await this.privatePostMarginUserOrderCreate(this.extend(request, params));
|
|
120600
120695
|
}
|
|
120601
|
-
if (price !== undefined) {
|
|
120602
|
-
request['price'] = this.priceToPrecision(market['symbol'], price);
|
|
120603
|
-
}
|
|
120604
|
-
const response = await this[method](this.extend(request, params));
|
|
120605
120696
|
return this.parseOrder(response, market);
|
|
120606
120697
|
}
|
|
120607
120698
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
@@ -150425,6 +150516,8 @@ class kraken extends _abstract_kraken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
150425
150516
|
'Withdraw': 3,
|
|
150426
150517
|
'WithdrawCancel': 3,
|
|
150427
150518
|
'WithdrawInfo': 3,
|
|
150519
|
+
'WithdrawMethods': 3,
|
|
150520
|
+
'WithdrawAddresses': 3,
|
|
150428
150521
|
'WithdrawStatus': 3,
|
|
150429
150522
|
'WalletTransfer': 3,
|
|
150430
150523
|
// sub accounts
|
|
@@ -164960,13 +165053,19 @@ class latoken extends _abstract_latoken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
164960
165053
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
164961
165054
|
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
164962
165055
|
*/
|
|
164963
|
-
|
|
165056
|
+
const options = this.safeValue(this.options, 'fetchTradingFee', {});
|
|
165057
|
+
const defaultMethod = this.safeString(options, 'method', 'fetchPrivateTradingFee');
|
|
165058
|
+
const method = this.safeString(params, 'method', defaultMethod);
|
|
164964
165059
|
params = this.omit(params, 'method');
|
|
164965
|
-
if (method ===
|
|
164966
|
-
|
|
164967
|
-
|
|
165060
|
+
if (method === 'fetchPrivateTradingFee') {
|
|
165061
|
+
return await this.fetchPrivateTradingFee(symbol, params);
|
|
165062
|
+
}
|
|
165063
|
+
else if (method === 'fetchPublicTradingFee') {
|
|
165064
|
+
return await this.fetchPublicTradingFee(symbol, params);
|
|
165065
|
+
}
|
|
165066
|
+
else {
|
|
165067
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.NotSupported(this.id + ' not support this method');
|
|
164968
165068
|
}
|
|
164969
|
-
return await this[method](symbol, params);
|
|
164970
165069
|
}
|
|
164971
165070
|
async fetchPublicTradingFee(symbol, params = {}) {
|
|
164972
165071
|
await this.loadMarkets();
|
|
@@ -165032,18 +165131,20 @@ class latoken extends _abstract_latoken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
165032
165131
|
// 'from': this.milliseconds (),
|
|
165033
165132
|
// 'limit': limit, // default '100'
|
|
165034
165133
|
};
|
|
165035
|
-
let method = 'privateGetAuthTrade';
|
|
165036
165134
|
let market = undefined;
|
|
165135
|
+
if (limit !== undefined) {
|
|
165136
|
+
request['limit'] = limit; // default 100
|
|
165137
|
+
}
|
|
165138
|
+
let response = undefined;
|
|
165037
165139
|
if (symbol !== undefined) {
|
|
165038
165140
|
market = this.market(symbol);
|
|
165039
165141
|
request['currency'] = market['baseId'];
|
|
165040
165142
|
request['quote'] = market['quoteId'];
|
|
165041
|
-
|
|
165143
|
+
response = await this.privateGetAuthTradePairCurrencyQuote(this.extend(request, params));
|
|
165042
165144
|
}
|
|
165043
|
-
|
|
165044
|
-
|
|
165145
|
+
else {
|
|
165146
|
+
response = await this.privateGetAuthTrade(this.extend(request, params));
|
|
165045
165147
|
}
|
|
165046
|
-
const response = await this[method](this.extend(request, params));
|
|
165047
165148
|
//
|
|
165048
165149
|
// [
|
|
165049
165150
|
// {
|
|
@@ -165709,22 +165810,21 @@ class latoken extends _abstract_latoken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
165709
165810
|
*/
|
|
165710
165811
|
await this.loadMarkets();
|
|
165711
165812
|
const currency = this.currency(code);
|
|
165712
|
-
|
|
165813
|
+
const request = {
|
|
165814
|
+
'currency': currency['id'],
|
|
165815
|
+
'recipient': toAccount,
|
|
165816
|
+
'value': this.currencyToPrecision(code, amount),
|
|
165817
|
+
};
|
|
165818
|
+
let response = undefined;
|
|
165713
165819
|
if (toAccount.indexOf('@') >= 0) {
|
|
165714
|
-
|
|
165820
|
+
response = await this.privatePostAuthTransferEmail(this.extend(request, params));
|
|
165715
165821
|
}
|
|
165716
165822
|
else if (toAccount.length === 36) {
|
|
165717
|
-
|
|
165823
|
+
response = await this.privatePostAuthTransferId(this.extend(request, params));
|
|
165718
165824
|
}
|
|
165719
165825
|
else {
|
|
165720
|
-
|
|
165826
|
+
response = await this.privatePostAuthTransferPhone(this.extend(request, params));
|
|
165721
165827
|
}
|
|
165722
|
-
const request = {
|
|
165723
|
-
'currency': currency['id'],
|
|
165724
|
-
'recipient': toAccount,
|
|
165725
|
-
'value': this.currencyToPrecision(code, amount),
|
|
165726
|
-
};
|
|
165727
|
-
const response = await this[method](this.extend(request, params));
|
|
165728
165828
|
//
|
|
165729
165829
|
// {
|
|
165730
165830
|
// "id": "e6fc4ace-7750-44e4-b7e9-6af038ac7107",
|
|
@@ -185345,6 +185445,8 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
185345
185445
|
'cancelOrder': true,
|
|
185346
185446
|
'cancelOrders': true,
|
|
185347
185447
|
'createDepositAddress': false,
|
|
185448
|
+
'createMarketBuyOrderWithCost': true,
|
|
185449
|
+
'createMarketSellOrderWithCost': true,
|
|
185348
185450
|
'createOrder': true,
|
|
185349
185451
|
'createOrders': true,
|
|
185350
185452
|
'createPostOnlyOrder': true,
|
|
@@ -187799,6 +187901,46 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
187799
187901
|
//
|
|
187800
187902
|
return this.parseBalanceByType(marketType, response);
|
|
187801
187903
|
}
|
|
187904
|
+
async createMarketBuyOrderWithCost(symbol, cost, params = {}) {
|
|
187905
|
+
/**
|
|
187906
|
+
* @method
|
|
187907
|
+
* @name okx#createMarketBuyOrderWithCost
|
|
187908
|
+
* @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-place-order
|
|
187909
|
+
* @description create a market buy order by providing the symbol and cost
|
|
187910
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
187911
|
+
* @param {float} cost how much you want to trade in units of the quote currency
|
|
187912
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
187913
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
187914
|
+
*/
|
|
187915
|
+
await this.loadMarkets();
|
|
187916
|
+
const market = this.market(symbol);
|
|
187917
|
+
if (!market['spot']) {
|
|
187918
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.NotSupported(this.id + ' createMarketBuyOrderWithCost() supports spot markets only');
|
|
187919
|
+
}
|
|
187920
|
+
params['createMarketBuyOrderRequiresPrice'] = false;
|
|
187921
|
+
params['tgtCcy'] = 'quote_ccy';
|
|
187922
|
+
return await this.createOrder(symbol, 'market', 'buy', cost, undefined, params);
|
|
187923
|
+
}
|
|
187924
|
+
async createMarketSellOrderWithCost(symbol, cost, params = {}) {
|
|
187925
|
+
/**
|
|
187926
|
+
* @method
|
|
187927
|
+
* @name okx#createMarketSellOrderWithCost
|
|
187928
|
+
* @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-place-order
|
|
187929
|
+
* @description create a market buy order by providing the symbol and cost
|
|
187930
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
187931
|
+
* @param {float} cost how much you want to trade in units of the quote currency
|
|
187932
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
187933
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
187934
|
+
*/
|
|
187935
|
+
await this.loadMarkets();
|
|
187936
|
+
const market = this.market(symbol);
|
|
187937
|
+
if (!market['spot']) {
|
|
187938
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.NotSupported(this.id + ' createMarketSellOrderWithCost() supports spot markets only');
|
|
187939
|
+
}
|
|
187940
|
+
params['createMarketBuyOrderRequiresPrice'] = false;
|
|
187941
|
+
params['tgtCcy'] = 'quote_ccy';
|
|
187942
|
+
return await this.createOrder(symbol, 'market', 'sell', cost, undefined, params);
|
|
187943
|
+
}
|
|
187802
187944
|
createOrderRequest(symbol, type, side, amount, price = undefined, params = {}) {
|
|
187803
187945
|
const market = this.market(symbol);
|
|
187804
187946
|
const request = {
|
|
@@ -187892,8 +188034,10 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
187892
188034
|
// see documentation: https://www.okx.com/docs-v5/en/#rest-api-trade-place-order
|
|
187893
188035
|
if (tgtCcy === 'quote_ccy') {
|
|
187894
188036
|
// quote_ccy: sz refers to units of quote currency
|
|
188037
|
+
let createMarketBuyOrderRequiresPrice = true;
|
|
188038
|
+
[createMarketBuyOrderRequiresPrice, params] = this.handleOptionAndParams(params, 'createOrder', 'createMarketBuyOrderRequiresPrice', true);
|
|
187895
188039
|
let notional = this.safeNumber2(params, 'cost', 'sz');
|
|
187896
|
-
|
|
188040
|
+
params = this.omit(params, ['cost', 'sz']);
|
|
187897
188041
|
if (createMarketBuyOrderRequiresPrice) {
|
|
187898
188042
|
if (price !== undefined) {
|
|
187899
188043
|
if (notional === undefined) {
|
|
@@ -187911,7 +188055,6 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
187911
188055
|
notional = (notional === undefined) ? amount : notional;
|
|
187912
188056
|
}
|
|
187913
188057
|
request['sz'] = this.costToPrecision(symbol, notional);
|
|
187914
|
-
params = this.omit(params, ['cost', 'sz']);
|
|
187915
188058
|
}
|
|
187916
188059
|
}
|
|
187917
188060
|
if (marketIOC && contract) {
|
|
@@ -221366,10 +221509,10 @@ class bybit extends _bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
221366
221509
|
/* harmony export */ Z: () => (/* binding */ cex)
|
|
221367
221510
|
/* harmony export */ });
|
|
221368
221511
|
/* harmony import */ var _cex_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6445);
|
|
221512
|
+
/* harmony import */ var _static_dependencies_noble_hashes_sha256_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1372);
|
|
221369
221513
|
/* harmony import */ var _base_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6689);
|
|
221370
221514
|
/* harmony import */ var _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2194);
|
|
221371
221515
|
/* harmony import */ var _base_ws_Cache_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3020);
|
|
221372
|
-
/* harmony import */ var _static_dependencies_noble_hashes_sha256_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1372);
|
|
221373
221516
|
// ---------------------------------------------------------------------------
|
|
221374
221517
|
|
|
221375
221518
|
|
|
@@ -221391,6 +221534,14 @@ class cex extends _cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
221391
221534
|
'watchOrderBook': true,
|
|
221392
221535
|
'watchOHLCV': true,
|
|
221393
221536
|
'watchPosition': undefined,
|
|
221537
|
+
'createOrderWs': true,
|
|
221538
|
+
'editOrderWs': true,
|
|
221539
|
+
'cancelOrderWs': true,
|
|
221540
|
+
'cancelOrdersWs': true,
|
|
221541
|
+
'fetchOrderWs': true,
|
|
221542
|
+
'fetchOpenOrdersWs': true,
|
|
221543
|
+
'fetchTickerWs': true,
|
|
221544
|
+
'fetchBalanceWs': true,
|
|
221394
221545
|
},
|
|
221395
221546
|
'urls': {
|
|
221396
221547
|
'api': {
|
|
@@ -221407,7 +221558,7 @@ class cex extends _cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
221407
221558
|
requestId() {
|
|
221408
221559
|
const requestId = this.sum(this.safeInteger(this.options, 'requestId', 0), 1);
|
|
221409
221560
|
this.options['requestId'] = requestId;
|
|
221410
|
-
return requestId;
|
|
221561
|
+
return requestId.toString();
|
|
221411
221562
|
}
|
|
221412
221563
|
async watchBalance(params = {}) {
|
|
221413
221564
|
/**
|
|
@@ -221419,7 +221570,7 @@ class cex extends _cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
221419
221570
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
221420
221571
|
*/
|
|
221421
221572
|
await this.authenticate(params);
|
|
221422
|
-
const messageHash =
|
|
221573
|
+
const messageHash = this.requestId();
|
|
221423
221574
|
const url = this.urls['api']['ws'];
|
|
221424
221575
|
const subscribe = {
|
|
221425
221576
|
'e': 'get-balance',
|
|
@@ -221466,7 +221617,8 @@ class cex extends _cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
221466
221617
|
result[code] = account;
|
|
221467
221618
|
}
|
|
221468
221619
|
this.balance = this.safeBalance(result);
|
|
221469
|
-
|
|
221620
|
+
const messageHash = this.safeString(message, 'oid');
|
|
221621
|
+
client.resolve(this.balance, messageHash);
|
|
221470
221622
|
}
|
|
221471
221623
|
async watchTrades(symbol, since = undefined, limit = undefined, params = {}) {
|
|
221472
221624
|
/**
|
|
@@ -221656,6 +221808,27 @@ class cex extends _cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
221656
221808
|
}
|
|
221657
221809
|
return this.filterByArray(this.tickers, 'symbol', symbols);
|
|
221658
221810
|
}
|
|
221811
|
+
async fetchTickerWs(symbol, params = {}) {
|
|
221812
|
+
/**
|
|
221813
|
+
* @method
|
|
221814
|
+
* @name cex#fetchTickerWs
|
|
221815
|
+
* @see https://docs.cex.io/#ws-api-ticker-deprecated
|
|
221816
|
+
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
221817
|
+
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
221818
|
+
* @param {object} [params] extra parameters specific to the cex api endpoint
|
|
221819
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
221820
|
+
*/
|
|
221821
|
+
await this.loadMarkets();
|
|
221822
|
+
const market = this.market(symbol);
|
|
221823
|
+
const url = this.urls['api']['ws'];
|
|
221824
|
+
const messageHash = this.requestId();
|
|
221825
|
+
const request = this.extend({
|
|
221826
|
+
'e': 'ticker',
|
|
221827
|
+
'oid': messageHash,
|
|
221828
|
+
'data': [market['base'], market['quote']],
|
|
221829
|
+
}, params);
|
|
221830
|
+
return await this.watch(url, messageHash, request, messageHash);
|
|
221831
|
+
}
|
|
221659
221832
|
handleTicker(client, message) {
|
|
221660
221833
|
//
|
|
221661
221834
|
// {
|
|
@@ -221672,10 +221845,12 @@ class cex extends _cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
221672
221845
|
const data = this.safeValue(message, 'data', {});
|
|
221673
221846
|
const ticker = this.parseWsTicker(data);
|
|
221674
221847
|
const symbol = ticker['symbol'];
|
|
221675
|
-
const messageHash = 'ticker:' + symbol;
|
|
221676
221848
|
this.tickers[symbol] = ticker;
|
|
221849
|
+
let messageHash = 'ticker:' + symbol;
|
|
221677
221850
|
client.resolve(ticker, messageHash);
|
|
221678
221851
|
client.resolve(ticker, 'tickers');
|
|
221852
|
+
messageHash = this.safeString(message, 'oid');
|
|
221853
|
+
client.resolve(ticker, messageHash);
|
|
221679
221854
|
}
|
|
221680
221855
|
parseWsTicker(ticker, market = undefined) {
|
|
221681
221856
|
//
|
|
@@ -221740,6 +221915,25 @@ class cex extends _cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
221740
221915
|
'info': ticker,
|
|
221741
221916
|
}, market);
|
|
221742
221917
|
}
|
|
221918
|
+
async fetchBalanceWs(params = {}) {
|
|
221919
|
+
/**
|
|
221920
|
+
* @method
|
|
221921
|
+
* @name cex#fetchBalanceWs
|
|
221922
|
+
* @see https://docs.cex.io/#ws-api-get-balance
|
|
221923
|
+
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
221924
|
+
* @param {object} [params] extra parameters specific to the cex api endpoint
|
|
221925
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure}
|
|
221926
|
+
*/
|
|
221927
|
+
await this.loadMarkets();
|
|
221928
|
+
await this.authenticate();
|
|
221929
|
+
const url = this.urls['api']['ws'];
|
|
221930
|
+
const messageHash = this.requestId();
|
|
221931
|
+
const request = this.extend({
|
|
221932
|
+
'e': 'get-balance',
|
|
221933
|
+
'oid': messageHash,
|
|
221934
|
+
}, params);
|
|
221935
|
+
return await this.watch(url, messageHash, request, messageHash);
|
|
221936
|
+
}
|
|
221743
221937
|
async watchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
221744
221938
|
/**
|
|
221745
221939
|
* @method
|
|
@@ -222028,7 +222222,8 @@ class cex extends _cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
222028
222222
|
const limit = this.safeInteger(this.options, 'ordersLimit', 1000);
|
|
222029
222223
|
this.orders = new _base_ws_Cache_js__WEBPACK_IMPORTED_MODULE_2__/* .ArrayCacheBySymbolById */ .hl(limit);
|
|
222030
222224
|
}
|
|
222031
|
-
const
|
|
222225
|
+
const storedOrders = this.orders;
|
|
222226
|
+
const ordersBySymbol = this.safeValue(storedOrders.hashmap, symbol, {});
|
|
222032
222227
|
let order = this.safeValue(ordersBySymbol, orderId);
|
|
222033
222228
|
if (order === undefined) {
|
|
222034
222229
|
order = this.parseWsOrderUpdate(data, market);
|
|
@@ -222053,7 +222248,6 @@ class cex extends _cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
222053
222248
|
order['timestamp'] = timestamp;
|
|
222054
222249
|
order['datetime'] = this.iso8601(timestamp);
|
|
222055
222250
|
order = this.safeOrder(order);
|
|
222056
|
-
const storedOrders = this.orders;
|
|
222057
222251
|
storedOrders.append(order);
|
|
222058
222252
|
const messageHash = 'orders:' + symbol;
|
|
222059
222253
|
client.resolve(storedOrders, messageHash);
|
|
@@ -222114,7 +222308,10 @@ class cex extends _cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
222114
222308
|
}
|
|
222115
222309
|
const base = this.safeCurrencyCode(baseId);
|
|
222116
222310
|
const quote = this.safeCurrencyCode(quoteId);
|
|
222117
|
-
|
|
222311
|
+
let symbol = undefined;
|
|
222312
|
+
if (base !== undefined && quote !== undefined) {
|
|
222313
|
+
symbol = base + '/' + quote;
|
|
222314
|
+
}
|
|
222118
222315
|
market = this.safeMarket(symbol, market);
|
|
222119
222316
|
const time = this.safeInteger(order, 'time', this.milliseconds());
|
|
222120
222317
|
let timestamp = time;
|
|
@@ -222479,6 +222676,236 @@ class cex extends _cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
222479
222676
|
client.resolve(stored, messageHash);
|
|
222480
222677
|
}
|
|
222481
222678
|
}
|
|
222679
|
+
async fetchOrderWs(id, symbol = undefined, params = {}) {
|
|
222680
|
+
/**
|
|
222681
|
+
* @method
|
|
222682
|
+
* @name cex#fetchOrderWs
|
|
222683
|
+
* @description fetches information on an order made by the user
|
|
222684
|
+
* @see https://docs.cex.io/#ws-api-get-order
|
|
222685
|
+
* @param {string} symbol not used by cex fetchOrder
|
|
222686
|
+
* @param {object} [params] extra parameters specific to the cex api endpoint
|
|
222687
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
222688
|
+
*/
|
|
222689
|
+
await this.loadMarkets();
|
|
222690
|
+
await this.authenticate();
|
|
222691
|
+
let market = undefined;
|
|
222692
|
+
if (symbol !== undefined) {
|
|
222693
|
+
market = this.market(symbol);
|
|
222694
|
+
}
|
|
222695
|
+
const data = this.extend({
|
|
222696
|
+
'order_id': id.toString(),
|
|
222697
|
+
}, params);
|
|
222698
|
+
const url = this.urls['api']['ws'];
|
|
222699
|
+
const messageHash = this.requestId();
|
|
222700
|
+
const request = {
|
|
222701
|
+
'e': 'get-order',
|
|
222702
|
+
'oid': messageHash,
|
|
222703
|
+
'data': data,
|
|
222704
|
+
};
|
|
222705
|
+
const response = await this.watch(url, messageHash, request, messageHash);
|
|
222706
|
+
return this.parseOrder(response, market);
|
|
222707
|
+
}
|
|
222708
|
+
async fetchOpenOrdersWs(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
222709
|
+
/**
|
|
222710
|
+
* @method
|
|
222711
|
+
* @name cex#fetchOpenOrdersWs
|
|
222712
|
+
* @see https://docs.cex.io/#ws-api-open-orders
|
|
222713
|
+
* @description fetch all unfilled currently open orders
|
|
222714
|
+
* @param {string} symbol unified market symbol
|
|
222715
|
+
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
222716
|
+
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
222717
|
+
* @param {object} [params] extra parameters specific to the cex api endpoint
|
|
222718
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
222719
|
+
*/
|
|
222720
|
+
if (symbol === undefined) {
|
|
222721
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.ArgumentsRequired(this.id + 'fetchOpenOrdersWs requires a symbol.');
|
|
222722
|
+
}
|
|
222723
|
+
await this.loadMarkets();
|
|
222724
|
+
await this.authenticate();
|
|
222725
|
+
const market = this.market(symbol);
|
|
222726
|
+
const url = this.urls['api']['ws'];
|
|
222727
|
+
const messageHash = this.requestId();
|
|
222728
|
+
const data = this.extend({
|
|
222729
|
+
'pair': [market['baseId'], market['quoteId']],
|
|
222730
|
+
}, params);
|
|
222731
|
+
const request = {
|
|
222732
|
+
'e': 'open-orders',
|
|
222733
|
+
'oid': messageHash,
|
|
222734
|
+
'data': data,
|
|
222735
|
+
};
|
|
222736
|
+
const response = await this.watch(url, messageHash, request, messageHash);
|
|
222737
|
+
return this.parseOrders(response, market, since, limit, params);
|
|
222738
|
+
}
|
|
222739
|
+
async createOrderWs(symbol, type, side, amount, price = undefined, params = {}) {
|
|
222740
|
+
/**
|
|
222741
|
+
* @method
|
|
222742
|
+
* @name cex#createOrderWs
|
|
222743
|
+
* @see https://docs.cex.io/#ws-api-order-placement
|
|
222744
|
+
* @description create a trade order
|
|
222745
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
222746
|
+
* @param {string} type 'market' or 'limit'
|
|
222747
|
+
* @param {string} side 'buy' or 'sell'
|
|
222748
|
+
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
222749
|
+
* @param {float} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
222750
|
+
* @param {object} [params] extra parameters specific to the kraken api endpoint
|
|
222751
|
+
* @param {boolean} [params.maker_only] Optional, maker only places an order only if offers best sell (<= max) or buy(>= max) price for this pair, if not order placement will be rejected with an error - "Order is not maker"
|
|
222752
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
222753
|
+
*/
|
|
222754
|
+
if (price === undefined) {
|
|
222755
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest(this.id + ' createOrderWs requires a price argument');
|
|
222756
|
+
}
|
|
222757
|
+
await this.loadMarkets();
|
|
222758
|
+
await this.authenticate();
|
|
222759
|
+
const market = this.market(symbol);
|
|
222760
|
+
const url = this.urls['api']['ws'];
|
|
222761
|
+
const messageHash = this.requestId();
|
|
222762
|
+
const data = this.extend({
|
|
222763
|
+
'pair': [market['baseId'], market['quoteId']],
|
|
222764
|
+
'amount': amount,
|
|
222765
|
+
'price': price,
|
|
222766
|
+
'type': side,
|
|
222767
|
+
}, params);
|
|
222768
|
+
const request = {
|
|
222769
|
+
'e': 'place-order',
|
|
222770
|
+
'oid': messageHash,
|
|
222771
|
+
'data': data,
|
|
222772
|
+
};
|
|
222773
|
+
const rawOrder = await this.watch(url, messageHash, request, messageHash);
|
|
222774
|
+
return this.parseOrder(rawOrder, market);
|
|
222775
|
+
}
|
|
222776
|
+
async editOrderWs(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
|
|
222777
|
+
/**
|
|
222778
|
+
* @method
|
|
222779
|
+
* @name cex#editOrderWs
|
|
222780
|
+
* @description edit a trade order
|
|
222781
|
+
* @see https://docs.cex.io/#ws-api-cancel-replace
|
|
222782
|
+
* @param {string} id order id
|
|
222783
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
222784
|
+
* @param {string} type 'market' or 'limit'
|
|
222785
|
+
* @param {string} side 'buy' or 'sell'
|
|
222786
|
+
* @param {float} amount how much of the currency you want to trade in units of the base currency
|
|
222787
|
+
* @param {float|undefined} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
222788
|
+
* @param {object} [params] extra parameters specific to the cex api endpoint
|
|
222789
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
222790
|
+
*/
|
|
222791
|
+
if (amount === undefined) {
|
|
222792
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.ArgumentsRequired(this.id + ' editOrder() requires a amount argument');
|
|
222793
|
+
}
|
|
222794
|
+
if (price === undefined) {
|
|
222795
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.ArgumentsRequired(this.id + ' editOrder() requires a price argument');
|
|
222796
|
+
}
|
|
222797
|
+
await this.loadMarkets();
|
|
222798
|
+
await this.authenticate();
|
|
222799
|
+
const market = this.market(symbol);
|
|
222800
|
+
const data = this.extend({
|
|
222801
|
+
'pair': [market['baseId'], market['quoteId']],
|
|
222802
|
+
'type': side,
|
|
222803
|
+
'amount': amount,
|
|
222804
|
+
'price': price,
|
|
222805
|
+
'order_id': id,
|
|
222806
|
+
}, params);
|
|
222807
|
+
const messageHash = this.requestId();
|
|
222808
|
+
const url = this.urls['api']['ws'];
|
|
222809
|
+
const request = {
|
|
222810
|
+
'e': 'cancel-replace-order',
|
|
222811
|
+
'oid': messageHash,
|
|
222812
|
+
'data': data,
|
|
222813
|
+
};
|
|
222814
|
+
const response = await this.watch(url, messageHash, request, messageHash, messageHash);
|
|
222815
|
+
return this.parseOrder(response, market);
|
|
222816
|
+
}
|
|
222817
|
+
async cancelOrderWs(id, symbol = undefined, params = {}) {
|
|
222818
|
+
/**
|
|
222819
|
+
* @method
|
|
222820
|
+
* @name cex#cancelOrderWs
|
|
222821
|
+
* @see https://docs.cex.io/#ws-api-order-cancel
|
|
222822
|
+
* @description cancels an open order
|
|
222823
|
+
* @param {string} id order id
|
|
222824
|
+
* @param {string} symbol not used by cex cancelOrder ()
|
|
222825
|
+
* @param {object} [params] extra parameters specific to the cex api endpoint
|
|
222826
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
222827
|
+
*/
|
|
222828
|
+
await this.loadMarkets();
|
|
222829
|
+
await this.authenticate();
|
|
222830
|
+
let market = undefined;
|
|
222831
|
+
if (symbol !== undefined) {
|
|
222832
|
+
market = this.market(symbol);
|
|
222833
|
+
}
|
|
222834
|
+
const data = this.extend({
|
|
222835
|
+
'order_id': id,
|
|
222836
|
+
}, params);
|
|
222837
|
+
const messageHash = this.requestId();
|
|
222838
|
+
const url = this.urls['api']['ws'];
|
|
222839
|
+
const request = {
|
|
222840
|
+
'e': 'cancel-order',
|
|
222841
|
+
'oid': messageHash,
|
|
222842
|
+
'data': data,
|
|
222843
|
+
};
|
|
222844
|
+
const response = await this.watch(url, messageHash, request, messageHash, messageHash);
|
|
222845
|
+
return this.parseOrder(response, market);
|
|
222846
|
+
}
|
|
222847
|
+
async cancelOrdersWs(ids, symbol = undefined, params = {}) {
|
|
222848
|
+
/**
|
|
222849
|
+
* @method
|
|
222850
|
+
* @name cex#cancelOrdersWs
|
|
222851
|
+
* @description cancel multiple orders
|
|
222852
|
+
* @see https://docs.cex.io/#ws-api-mass-cancel-place
|
|
222853
|
+
* @param {string[]} ids order ids
|
|
222854
|
+
* @param {string} symbol not used by cex cancelOrders()
|
|
222855
|
+
* @param {object} [params] extra parameters specific to the cex api endpoint
|
|
222856
|
+
* @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
222857
|
+
*/
|
|
222858
|
+
if (symbol !== undefined) {
|
|
222859
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest(this.id + ' cancelOrderWs does not allow filtering by symbol');
|
|
222860
|
+
}
|
|
222861
|
+
await this.loadMarkets();
|
|
222862
|
+
await this.authenticate();
|
|
222863
|
+
const messageHash = this.requestId();
|
|
222864
|
+
const data = this.extend({
|
|
222865
|
+
'cancel-orders': ids,
|
|
222866
|
+
}, params);
|
|
222867
|
+
const url = this.urls['api']['ws'];
|
|
222868
|
+
const request = {
|
|
222869
|
+
'e': 'mass-cancel-place-orders',
|
|
222870
|
+
'oid': messageHash,
|
|
222871
|
+
'data': data,
|
|
222872
|
+
};
|
|
222873
|
+
const response = await this.watch(url, messageHash, request, messageHash, messageHash);
|
|
222874
|
+
//
|
|
222875
|
+
// {
|
|
222876
|
+
// "cancel-orders": [{
|
|
222877
|
+
// "order_id": 69202557979,
|
|
222878
|
+
// "fremains": "0.15000000"
|
|
222879
|
+
// }],
|
|
222880
|
+
// "place-orders": [],
|
|
222881
|
+
// "placed-cancelled": []
|
|
222882
|
+
// }
|
|
222883
|
+
//
|
|
222884
|
+
const canceledOrders = this.safeValue(response, 'cancel-orders');
|
|
222885
|
+
return this.parseOrders(canceledOrders, undefined, undefined, undefined, params);
|
|
222886
|
+
}
|
|
222887
|
+
resolveData(client, message) {
|
|
222888
|
+
//
|
|
222889
|
+
// "e": "open-orders",
|
|
222890
|
+
// "data": [
|
|
222891
|
+
// {
|
|
222892
|
+
// "id": "2477098",
|
|
222893
|
+
// "time": "1435927928618",
|
|
222894
|
+
// "type": "buy",
|
|
222895
|
+
// "price": "241.9477",
|
|
222896
|
+
// "amount": "0.02000000",
|
|
222897
|
+
// "pending": "0.02000000"
|
|
222898
|
+
// },
|
|
222899
|
+
// ...
|
|
222900
|
+
// ],
|
|
222901
|
+
// "oid": "1435927928274_9_open-orders",
|
|
222902
|
+
// "ok": "ok"
|
|
222903
|
+
// }
|
|
222904
|
+
//
|
|
222905
|
+
const data = this.safeValue(message, 'data');
|
|
222906
|
+
const messageHash = this.safeString(message, 'oid');
|
|
222907
|
+
client.resolve(data, messageHash);
|
|
222908
|
+
}
|
|
222482
222909
|
handleConnected(client, message) {
|
|
222483
222910
|
//
|
|
222484
222911
|
// {
|
|
@@ -222496,7 +222923,25 @@ class cex extends _cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
222496
222923
|
// "ok": "error"
|
|
222497
222924
|
// }
|
|
222498
222925
|
//
|
|
222499
|
-
|
|
222926
|
+
try {
|
|
222927
|
+
const data = this.safeValue(message, 'data', {});
|
|
222928
|
+
const error = this.safeString(data, 'error');
|
|
222929
|
+
const event = this.safeString(message, 'e', '');
|
|
222930
|
+
const feedback = this.id + ' ' + event + ' ' + error;
|
|
222931
|
+
this.throwExactlyMatchedException(this.exceptions['exact'], error, feedback);
|
|
222932
|
+
this.throwBroadlyMatchedException(this.exceptions['broad'], error, feedback);
|
|
222933
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.ExchangeError(feedback);
|
|
222934
|
+
}
|
|
222935
|
+
catch (error) {
|
|
222936
|
+
const messageHash = this.safeString(message, 'oid');
|
|
222937
|
+
const future = this.safeValue(client['futures'], messageHash);
|
|
222938
|
+
if (future !== undefined) {
|
|
222939
|
+
client.reject(error, messageHash);
|
|
222940
|
+
}
|
|
222941
|
+
else {
|
|
222942
|
+
throw error;
|
|
222943
|
+
}
|
|
222944
|
+
}
|
|
222500
222945
|
}
|
|
222501
222946
|
handleMessage(client, message) {
|
|
222502
222947
|
const ok = this.safeString(message, 'ok');
|
|
@@ -222516,11 +222961,16 @@ class cex extends _cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
222516
222961
|
'get-balance': this.handleBalance,
|
|
222517
222962
|
'order-book-subscribe': this.handleOrderBookSnapshot,
|
|
222518
222963
|
'md_update': this.handleOrderBookUpdate,
|
|
222519
|
-
'open-orders': this.
|
|
222964
|
+
'open-orders': this.resolveData,
|
|
222520
222965
|
'order': this.handleOrderUpdate,
|
|
222521
222966
|
'history-update': this.handleTrade,
|
|
222522
222967
|
'history': this.handleTradesSnapshot,
|
|
222523
222968
|
'tx': this.handleTransaction,
|
|
222969
|
+
'place-order': this.resolveData,
|
|
222970
|
+
'cancel-replace-order': this.resolveData,
|
|
222971
|
+
'cancel-order': this.resolveData,
|
|
222972
|
+
'mass-cancel-place-orders': this.resolveData,
|
|
222973
|
+
'get-order': this.resolveData,
|
|
222524
222974
|
};
|
|
222525
222975
|
const handler = this.safeValue(handlers, event);
|
|
222526
222976
|
if (handler !== undefined) {
|
|
@@ -263501,1083 +263951,6 @@ const stringToBytes = (type, str) => {
|
|
|
263501
263951
|
const bytes = (/* unused pure expression or super */ null && (stringToBytes));
|
|
263502
263952
|
|
|
263503
263953
|
|
|
263504
|
-
/***/ }),
|
|
263505
|
-
|
|
263506
|
-
/***/ 4224:
|
|
263507
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
263508
|
-
|
|
263509
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
263510
|
-
/* harmony export */ Z: () => (/* binding */ tidex)
|
|
263511
|
-
/* harmony export */ });
|
|
263512
|
-
/* harmony import */ var _abstract_tidex_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6057);
|
|
263513
|
-
/* harmony import */ var _base_errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6689);
|
|
263514
|
-
/* harmony import */ var _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2194);
|
|
263515
|
-
/* harmony import */ var _base_functions_number_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9292);
|
|
263516
|
-
/* harmony import */ var _static_dependencies_noble_hashes_sha512_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7110);
|
|
263517
|
-
|
|
263518
|
-
|
|
263519
|
-
|
|
263520
|
-
|
|
263521
|
-
|
|
263522
|
-
/**
|
|
263523
|
-
* @class tidex
|
|
263524
|
-
* @extends Exchange
|
|
263525
|
-
*/
|
|
263526
|
-
class tidex extends _abstract_tidex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
263527
|
-
describe() {
|
|
263528
|
-
return this.deepExtend(super.describe(), {
|
|
263529
|
-
'id': 'tidex',
|
|
263530
|
-
'name': 'Tidex',
|
|
263531
|
-
'countries': ['UK'],
|
|
263532
|
-
'rateLimit': 2000,
|
|
263533
|
-
'version': '3',
|
|
263534
|
-
'userAgent': this.userAgents['chrome'],
|
|
263535
|
-
'has': {
|
|
263536
|
-
'CORS': undefined,
|
|
263537
|
-
'spot': true,
|
|
263538
|
-
'margin': false,
|
|
263539
|
-
'swap': false,
|
|
263540
|
-
'future': false,
|
|
263541
|
-
'option': false,
|
|
263542
|
-
'addMargin': false,
|
|
263543
|
-
'cancelOrder': true,
|
|
263544
|
-
'createMarketOrder': false,
|
|
263545
|
-
'createOrder': true,
|
|
263546
|
-
'createReduceOnlyOrder': false,
|
|
263547
|
-
'fetchBalance': true,
|
|
263548
|
-
'fetchBorrowRateHistories': false,
|
|
263549
|
-
'fetchBorrowRateHistory': false,
|
|
263550
|
-
'fetchCrossBorrowRate': false,
|
|
263551
|
-
'fetchCrossBorrowRates': false,
|
|
263552
|
-
'fetchCurrencies': true,
|
|
263553
|
-
'fetchFundingHistory': false,
|
|
263554
|
-
'fetchFundingRate': false,
|
|
263555
|
-
'fetchFundingRateHistory': false,
|
|
263556
|
-
'fetchFundingRates': false,
|
|
263557
|
-
'fetchIndexOHLCV': false,
|
|
263558
|
-
'fetchIsolatedBorrowRate': false,
|
|
263559
|
-
'fetchIsolatedBorrowRates': false,
|
|
263560
|
-
'fetchLeverage': false,
|
|
263561
|
-
'fetchLeverageTiers': false,
|
|
263562
|
-
'fetchMarginMode': false,
|
|
263563
|
-
'fetchMarkets': true,
|
|
263564
|
-
'fetchMarkOHLCV': false,
|
|
263565
|
-
'fetchMyTrades': true,
|
|
263566
|
-
'fetchOpenInterestHistory': false,
|
|
263567
|
-
'fetchOpenOrders': true,
|
|
263568
|
-
'fetchOrder': true,
|
|
263569
|
-
'fetchOrderBook': true,
|
|
263570
|
-
'fetchOrderBooks': true,
|
|
263571
|
-
'fetchPosition': false,
|
|
263572
|
-
'fetchPositionMode': false,
|
|
263573
|
-
'fetchPositions': false,
|
|
263574
|
-
'fetchPositionsRisk': false,
|
|
263575
|
-
'fetchPremiumIndexOHLCV': false,
|
|
263576
|
-
'fetchTicker': true,
|
|
263577
|
-
'fetchTickers': true,
|
|
263578
|
-
'fetchTrades': true,
|
|
263579
|
-
'reduceMargin': false,
|
|
263580
|
-
'setLeverage': false,
|
|
263581
|
-
'setMarginMode': false,
|
|
263582
|
-
'setPositionMode': false,
|
|
263583
|
-
'withdraw': true,
|
|
263584
|
-
},
|
|
263585
|
-
'urls': {
|
|
263586
|
-
'logo': 'https://user-images.githubusercontent.com/1294454/30781780-03149dc4-a12e-11e7-82bb-313b269d24d4.jpg',
|
|
263587
|
-
'api': {
|
|
263588
|
-
'web': 'https://gate.tidex.com/api',
|
|
263589
|
-
'public': 'https://api.tidex.com/api/3',
|
|
263590
|
-
'private': 'https://api.tidex.com/tapi',
|
|
263591
|
-
},
|
|
263592
|
-
'www': 'https://tidex.com',
|
|
263593
|
-
'doc': 'https://tidex.com/exchange/public-api',
|
|
263594
|
-
'referral': 'https://tidex.com/exchange',
|
|
263595
|
-
'fees': [
|
|
263596
|
-
'https://tidex.com/exchange/assets-spec',
|
|
263597
|
-
'https://tidex.com/exchange/pairs-spec',
|
|
263598
|
-
],
|
|
263599
|
-
},
|
|
263600
|
-
'api': {
|
|
263601
|
-
'web': {
|
|
263602
|
-
'get': [
|
|
263603
|
-
'currency',
|
|
263604
|
-
'pairs',
|
|
263605
|
-
'tickers',
|
|
263606
|
-
'orders',
|
|
263607
|
-
'ordershistory',
|
|
263608
|
-
'trade-data',
|
|
263609
|
-
'trade-data/{id}',
|
|
263610
|
-
],
|
|
263611
|
-
},
|
|
263612
|
-
'public': {
|
|
263613
|
-
'get': [
|
|
263614
|
-
'info',
|
|
263615
|
-
'ticker/{pair}',
|
|
263616
|
-
'depth/{pair}',
|
|
263617
|
-
'trades/{pair}',
|
|
263618
|
-
],
|
|
263619
|
-
},
|
|
263620
|
-
'private': {
|
|
263621
|
-
'post': [
|
|
263622
|
-
'getInfoExt',
|
|
263623
|
-
'getInfo',
|
|
263624
|
-
'Trade',
|
|
263625
|
-
'ActiveOrders',
|
|
263626
|
-
'OrderInfo',
|
|
263627
|
-
'CancelOrder',
|
|
263628
|
-
'TradeHistory',
|
|
263629
|
-
'getDepositAddress',
|
|
263630
|
-
'createWithdraw',
|
|
263631
|
-
'getWithdraw',
|
|
263632
|
-
],
|
|
263633
|
-
},
|
|
263634
|
-
},
|
|
263635
|
-
'fees': {
|
|
263636
|
-
'trading': {
|
|
263637
|
-
'feeSide': 'get',
|
|
263638
|
-
'tierBased': false,
|
|
263639
|
-
'percentage': true,
|
|
263640
|
-
'taker': this.parseNumber('0.001'),
|
|
263641
|
-
'maker': this.parseNumber('0.001'),
|
|
263642
|
-
},
|
|
263643
|
-
},
|
|
263644
|
-
'commonCurrencies': {
|
|
263645
|
-
'DSH': 'DASH',
|
|
263646
|
-
'EMGO': 'MGO',
|
|
263647
|
-
'MGO': 'WMGO',
|
|
263648
|
-
},
|
|
263649
|
-
'precisionMode': _base_functions_number_js__WEBPACK_IMPORTED_MODULE_1__/* .TICK_SIZE */ .sh,
|
|
263650
|
-
'exceptions': {
|
|
263651
|
-
'exact': {
|
|
263652
|
-
'803': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder,
|
|
263653
|
-
'804': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder,
|
|
263654
|
-
'805': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder,
|
|
263655
|
-
'806': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder,
|
|
263656
|
-
'807': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder,
|
|
263657
|
-
'831': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InsufficientFunds,
|
|
263658
|
-
'832': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InsufficientFunds,
|
|
263659
|
-
'833': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.OrderNotFound, // "Order with id X was not found." (cancelling non-existent, closed and cancelled order)
|
|
263660
|
-
},
|
|
263661
|
-
'broad': {
|
|
263662
|
-
'Invalid pair name': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeError,
|
|
263663
|
-
'invalid api key': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.AuthenticationError,
|
|
263664
|
-
'invalid sign': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.AuthenticationError,
|
|
263665
|
-
'api key dont have trade permission': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.AuthenticationError,
|
|
263666
|
-
'invalid parameter': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder,
|
|
263667
|
-
'invalid order': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder,
|
|
263668
|
-
'Requests too often': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.DDoSProtection,
|
|
263669
|
-
'not available': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeNotAvailable,
|
|
263670
|
-
'data unavailable': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeNotAvailable,
|
|
263671
|
-
'external service unavailable': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeNotAvailable,
|
|
263672
|
-
'IP restricted': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.PermissionDenied, // {"success":0,"code":0,"error":"IP restricted (223.xxx.xxx.xxx)"}
|
|
263673
|
-
},
|
|
263674
|
-
},
|
|
263675
|
-
'options': {
|
|
263676
|
-
'fetchTickersMaxLength': 2048,
|
|
263677
|
-
},
|
|
263678
|
-
'orders': {}, // orders cache / emulation
|
|
263679
|
-
});
|
|
263680
|
-
}
|
|
263681
|
-
async fetchCurrencies(params = {}) {
|
|
263682
|
-
/**
|
|
263683
|
-
* @method
|
|
263684
|
-
* @name tidex#fetchCurrencies
|
|
263685
|
-
* @description fetches all available currencies on an exchange
|
|
263686
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
263687
|
-
* @returns {object} an associative dictionary of currencies
|
|
263688
|
-
*/
|
|
263689
|
-
const response = await this.webGetCurrency(params);
|
|
263690
|
-
//
|
|
263691
|
-
// [
|
|
263692
|
-
// {
|
|
263693
|
-
// "id":2,
|
|
263694
|
-
// "symbol":"BTC",
|
|
263695
|
-
// "type":2,
|
|
263696
|
-
// "name":"Bitcoin",
|
|
263697
|
-
// "amountPoint":8,
|
|
263698
|
-
// "depositEnable":true,
|
|
263699
|
-
// "depositMinAmount":0.0005,
|
|
263700
|
-
// "withdrawEnable":true,
|
|
263701
|
-
// "withdrawFee":0.0004,
|
|
263702
|
-
// "withdrawMinAmount":0.0005,
|
|
263703
|
-
// "settings":{
|
|
263704
|
-
// "Blockchain":"https://blockchair.com/bitcoin/",
|
|
263705
|
-
// "TxUrl":"https://blockchair.com/bitcoin/transaction/{0}",
|
|
263706
|
-
// "AddrUrl":"https://blockchair.com/bitcoin/address/{0}",
|
|
263707
|
-
// "ConfirmationCount":3,
|
|
263708
|
-
// "NeedMemo":false
|
|
263709
|
-
// },
|
|
263710
|
-
// "visible":true,
|
|
263711
|
-
// "isDelisted":false
|
|
263712
|
-
// }
|
|
263713
|
-
// ]
|
|
263714
|
-
//
|
|
263715
|
-
const result = {};
|
|
263716
|
-
for (let i = 0; i < response.length; i++) {
|
|
263717
|
-
const currency = response[i];
|
|
263718
|
-
const id = this.safeString(currency, 'symbol');
|
|
263719
|
-
const code = this.safeCurrencyCode(id);
|
|
263720
|
-
const visible = this.safeValue(currency, 'visible');
|
|
263721
|
-
let active = visible === true;
|
|
263722
|
-
const withdrawEnable = this.safeValue(currency, 'withdrawEnable', true);
|
|
263723
|
-
const depositEnable = this.safeValue(currency, 'depositEnable', true);
|
|
263724
|
-
if (!withdrawEnable || !depositEnable) {
|
|
263725
|
-
active = false;
|
|
263726
|
-
}
|
|
263727
|
-
const name = this.safeString(currency, 'name');
|
|
263728
|
-
const fee = this.safeNumber(currency, 'withdrawFee');
|
|
263729
|
-
result[code] = {
|
|
263730
|
-
'id': id,
|
|
263731
|
-
'code': code,
|
|
263732
|
-
'name': name,
|
|
263733
|
-
'active': active,
|
|
263734
|
-
'deposit': depositEnable,
|
|
263735
|
-
'withdraw': withdrawEnable,
|
|
263736
|
-
'precision': this.parseNumber(this.parsePrecision(this.safeString(currency, 'amountPoint'))),
|
|
263737
|
-
'funding': {
|
|
263738
|
-
'withdraw': {
|
|
263739
|
-
'active': withdrawEnable,
|
|
263740
|
-
'fee': fee,
|
|
263741
|
-
},
|
|
263742
|
-
'deposit': {
|
|
263743
|
-
'active': depositEnable,
|
|
263744
|
-
'fee': this.parseNumber('0'),
|
|
263745
|
-
},
|
|
263746
|
-
},
|
|
263747
|
-
'limits': {
|
|
263748
|
-
'amount': {
|
|
263749
|
-
'min': undefined,
|
|
263750
|
-
'max': undefined,
|
|
263751
|
-
},
|
|
263752
|
-
'withdraw': {
|
|
263753
|
-
'min': this.safeNumber(currency, 'withdrawMinAmount'),
|
|
263754
|
-
'max': undefined,
|
|
263755
|
-
},
|
|
263756
|
-
'deposit': {
|
|
263757
|
-
'min': this.safeNumber(currency, 'depositMinAmount'),
|
|
263758
|
-
'max': undefined,
|
|
263759
|
-
},
|
|
263760
|
-
},
|
|
263761
|
-
'info': currency,
|
|
263762
|
-
};
|
|
263763
|
-
}
|
|
263764
|
-
return result;
|
|
263765
|
-
}
|
|
263766
|
-
async fetchMarkets(params = {}) {
|
|
263767
|
-
/**
|
|
263768
|
-
* @method
|
|
263769
|
-
* @name tidex#fetchMarkets
|
|
263770
|
-
* @description retrieves data on all markets for tidex
|
|
263771
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
263772
|
-
* @returns {object[]} an array of objects representing market data
|
|
263773
|
-
*/
|
|
263774
|
-
const response = await this.publicGetInfo(params);
|
|
263775
|
-
//
|
|
263776
|
-
// {
|
|
263777
|
-
// "server_time":1615861869,
|
|
263778
|
-
// "pairs":{
|
|
263779
|
-
// "ltc_btc":{
|
|
263780
|
-
// "decimal_places":8,
|
|
263781
|
-
// "min_price":0.00000001,
|
|
263782
|
-
// "max_price":3.0,
|
|
263783
|
-
// "min_amount":0.001,
|
|
263784
|
-
// "max_amount":1000000.0,
|
|
263785
|
-
// "min_total":0.0001,
|
|
263786
|
-
// "hidden":0,
|
|
263787
|
-
// "fee":0.1,
|
|
263788
|
-
// },
|
|
263789
|
-
// },
|
|
263790
|
-
// }
|
|
263791
|
-
//
|
|
263792
|
-
const markets = response['pairs'];
|
|
263793
|
-
const keys = Object.keys(markets);
|
|
263794
|
-
const result = [];
|
|
263795
|
-
for (let i = 0; i < keys.length; i++) {
|
|
263796
|
-
const id = keys[i];
|
|
263797
|
-
const market = markets[id];
|
|
263798
|
-
const [baseId, quoteId] = id.split('_');
|
|
263799
|
-
const base = this.safeCurrencyCode(baseId);
|
|
263800
|
-
const quote = this.safeCurrencyCode(quoteId);
|
|
263801
|
-
const hidden = this.safeInteger(market, 'hidden');
|
|
263802
|
-
let takerFeeString = this.safeString(market, 'fee');
|
|
263803
|
-
takerFeeString = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringDiv(takerFeeString, '100');
|
|
263804
|
-
result.push({
|
|
263805
|
-
'id': id,
|
|
263806
|
-
'symbol': base + '/' + quote,
|
|
263807
|
-
'base': base,
|
|
263808
|
-
'quote': quote,
|
|
263809
|
-
'settle': undefined,
|
|
263810
|
-
'baseId': baseId,
|
|
263811
|
-
'quoteId': quoteId,
|
|
263812
|
-
'settleId': undefined,
|
|
263813
|
-
'type': 'spot',
|
|
263814
|
-
'spot': true,
|
|
263815
|
-
'margin': false,
|
|
263816
|
-
'swap': false,
|
|
263817
|
-
'future': false,
|
|
263818
|
-
'option': false,
|
|
263819
|
-
'active': (hidden === 0),
|
|
263820
|
-
'contract': false,
|
|
263821
|
-
'linear': undefined,
|
|
263822
|
-
'inverse': undefined,
|
|
263823
|
-
'taker': this.parseNumber(takerFeeString),
|
|
263824
|
-
'contractSize': undefined,
|
|
263825
|
-
'expiry': undefined,
|
|
263826
|
-
'expiryDatetime': undefined,
|
|
263827
|
-
'strike': undefined,
|
|
263828
|
-
'optionType': undefined,
|
|
263829
|
-
'precision': {
|
|
263830
|
-
'amount': this.parseNumber(this.parsePrecision(this.safeString(market, 'decimal_places'))),
|
|
263831
|
-
'price': this.parseNumber(this.parsePrecision(this.safeString(market, 'decimal_places'))),
|
|
263832
|
-
},
|
|
263833
|
-
'limits': {
|
|
263834
|
-
'leverage': {
|
|
263835
|
-
'min': undefined,
|
|
263836
|
-
'max': undefined,
|
|
263837
|
-
},
|
|
263838
|
-
'amount': {
|
|
263839
|
-
'min': this.safeNumber(market, 'min_amount'),
|
|
263840
|
-
'max': this.safeNumber(market, 'max_amount'),
|
|
263841
|
-
},
|
|
263842
|
-
'price': {
|
|
263843
|
-
'min': this.safeNumber(market, 'min_price'),
|
|
263844
|
-
'max': this.safeNumber(market, 'max_price'),
|
|
263845
|
-
},
|
|
263846
|
-
'cost': {
|
|
263847
|
-
'min': this.safeNumber(market, 'min_total'),
|
|
263848
|
-
'max': undefined,
|
|
263849
|
-
},
|
|
263850
|
-
},
|
|
263851
|
-
'created': undefined,
|
|
263852
|
-
'info': market,
|
|
263853
|
-
});
|
|
263854
|
-
}
|
|
263855
|
-
return result;
|
|
263856
|
-
}
|
|
263857
|
-
parseBalance(response) {
|
|
263858
|
-
const balances = this.safeValue(response, 'return');
|
|
263859
|
-
const timestamp = this.safeTimestamp(balances, 'server_time');
|
|
263860
|
-
const result = {
|
|
263861
|
-
'info': response,
|
|
263862
|
-
'timestamp': timestamp,
|
|
263863
|
-
'datetime': this.iso8601(timestamp),
|
|
263864
|
-
};
|
|
263865
|
-
const funds = this.safeValue(balances, 'funds', {});
|
|
263866
|
-
const currencyIds = Object.keys(funds);
|
|
263867
|
-
for (let i = 0; i < currencyIds.length; i++) {
|
|
263868
|
-
const currencyId = currencyIds[i];
|
|
263869
|
-
const code = this.safeCurrencyCode(currencyId);
|
|
263870
|
-
const balance = this.safeValue(funds, currencyId, {});
|
|
263871
|
-
const account = this.account();
|
|
263872
|
-
account['free'] = this.safeString(balance, 'value');
|
|
263873
|
-
account['used'] = this.safeString(balance, 'inOrders');
|
|
263874
|
-
result[code] = account;
|
|
263875
|
-
}
|
|
263876
|
-
return this.safeBalance(result);
|
|
263877
|
-
}
|
|
263878
|
-
async fetchBalance(params = {}) {
|
|
263879
|
-
/**
|
|
263880
|
-
* @method
|
|
263881
|
-
* @name tidex#fetchBalance
|
|
263882
|
-
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
263883
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
263884
|
-
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
263885
|
-
*/
|
|
263886
|
-
await this.loadMarkets();
|
|
263887
|
-
const response = await this.privatePostGetInfoExt(params);
|
|
263888
|
-
//
|
|
263889
|
-
// {
|
|
263890
|
-
// "success":1,
|
|
263891
|
-
// "return":{
|
|
263892
|
-
// "funds":{
|
|
263893
|
-
// "btc":{"value":0.0000499885629956,"inOrders":0.0},
|
|
263894
|
-
// "eth":{"value":0.000000030741708,"inOrders":0.0},
|
|
263895
|
-
// "tdx":{"value":0.0000000155385356,"inOrders":0.0}
|
|
263896
|
-
// },
|
|
263897
|
-
// "rights":{
|
|
263898
|
-
// "info":true,
|
|
263899
|
-
// "trade":true,
|
|
263900
|
-
// "withdraw":false
|
|
263901
|
-
// },
|
|
263902
|
-
// "transaction_count":0,
|
|
263903
|
-
// "open_orders":0,
|
|
263904
|
-
// "server_time":1619436907
|
|
263905
|
-
// },
|
|
263906
|
-
// "stat":{
|
|
263907
|
-
// "isSuccess":true,
|
|
263908
|
-
// "serverTime":"00:00:00.0001157",
|
|
263909
|
-
// "time":"00:00:00.0101364",
|
|
263910
|
-
// "errors":null
|
|
263911
|
-
// }
|
|
263912
|
-
// }
|
|
263913
|
-
//
|
|
263914
|
-
return this.parseBalance(response);
|
|
263915
|
-
}
|
|
263916
|
-
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
263917
|
-
/**
|
|
263918
|
-
* @method
|
|
263919
|
-
* @name tidex#fetchOrderBook
|
|
263920
|
-
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
263921
|
-
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
263922
|
-
* @param {int} [limit] the maximum amount of order book entries to return
|
|
263923
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
263924
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
263925
|
-
*/
|
|
263926
|
-
await this.loadMarkets();
|
|
263927
|
-
const market = this.market(symbol);
|
|
263928
|
-
const request = {
|
|
263929
|
-
'pair': market['id'],
|
|
263930
|
-
};
|
|
263931
|
-
if (limit !== undefined) {
|
|
263932
|
-
request['limit'] = limit; // default = 150, max = 2000
|
|
263933
|
-
}
|
|
263934
|
-
const response = await this.publicGetDepthPair(this.extend(request, params));
|
|
263935
|
-
const market_id_in_reponse = (market['id'] in response);
|
|
263936
|
-
if (!market_id_in_reponse) {
|
|
263937
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeError(this.id + ' ' + market['symbol'] + ' order book is empty or not available');
|
|
263938
|
-
}
|
|
263939
|
-
const orderbook = response[market['id']];
|
|
263940
|
-
return this.parseOrderBook(orderbook, symbol);
|
|
263941
|
-
}
|
|
263942
|
-
async fetchOrderBooks(symbols = undefined, limit = undefined, params = {}) {
|
|
263943
|
-
/**
|
|
263944
|
-
* @method
|
|
263945
|
-
* @name tidex#fetchOrderBooks
|
|
263946
|
-
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data for multiple markets
|
|
263947
|
-
* @param {string[]|undefined} symbols list of unified market symbols, all symbols fetched if undefined, default is undefined
|
|
263948
|
-
* @param {int} [limit] max number of entries per orderbook to return, default is undefined
|
|
263949
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
263950
|
-
* @returns {object} a dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbol
|
|
263951
|
-
*/
|
|
263952
|
-
await this.loadMarkets();
|
|
263953
|
-
let ids = undefined;
|
|
263954
|
-
if (symbols === undefined) {
|
|
263955
|
-
ids = this.ids.join('-');
|
|
263956
|
-
// max URL length is 2083 symbols, including http schema, hostname, tld, etc...
|
|
263957
|
-
if (ids.length > 2048) {
|
|
263958
|
-
const numIds = this.ids.length;
|
|
263959
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeError(this.id + ' fetchOrderBooks() has ' + numIds.toString() + ' symbols exceeding max URL length, you are required to specify a list of symbols in the first argument to fetchOrderBooks');
|
|
263960
|
-
}
|
|
263961
|
-
}
|
|
263962
|
-
else {
|
|
263963
|
-
ids = this.marketIds(symbols);
|
|
263964
|
-
ids = ids.join('-');
|
|
263965
|
-
}
|
|
263966
|
-
const request = {
|
|
263967
|
-
'pair': ids,
|
|
263968
|
-
};
|
|
263969
|
-
if (limit !== undefined) {
|
|
263970
|
-
request['limit'] = limit; // default = 150, max = 2000
|
|
263971
|
-
}
|
|
263972
|
-
const response = await this.publicGetDepthPair(this.extend(request, params));
|
|
263973
|
-
const result = {};
|
|
263974
|
-
ids = Object.keys(response);
|
|
263975
|
-
for (let i = 0; i < ids.length; i++) {
|
|
263976
|
-
const id = ids[i];
|
|
263977
|
-
const symbol = this.safeSymbol(id);
|
|
263978
|
-
result[symbol] = this.parseOrderBook(response[id], symbol);
|
|
263979
|
-
}
|
|
263980
|
-
return result;
|
|
263981
|
-
}
|
|
263982
|
-
parseTicker(ticker, market = undefined) {
|
|
263983
|
-
//
|
|
263984
|
-
// {
|
|
263985
|
-
// "high": 0.03497582,
|
|
263986
|
-
// "low": 0.03248474,
|
|
263987
|
-
// "avg": 0.03373028,
|
|
263988
|
-
// "vol": 120.11485715062999,
|
|
263989
|
-
// "vol_cur": 3572.24914074,
|
|
263990
|
-
// "last": 0.0337611,
|
|
263991
|
-
// "buy": 0.0337442,
|
|
263992
|
-
// "sell": 0.03377798,
|
|
263993
|
-
// "updated": 1537522009
|
|
263994
|
-
// }
|
|
263995
|
-
//
|
|
263996
|
-
const timestamp = this.safeTimestamp(ticker, 'updated');
|
|
263997
|
-
market = this.safeMarket(undefined, market);
|
|
263998
|
-
const last = this.safeString(ticker, 'last');
|
|
263999
|
-
return this.safeTicker({
|
|
264000
|
-
'symbol': market['symbol'],
|
|
264001
|
-
'timestamp': timestamp,
|
|
264002
|
-
'datetime': this.iso8601(timestamp),
|
|
264003
|
-
'high': this.safeString(ticker, 'high'),
|
|
264004
|
-
'low': this.safeString(ticker, 'low'),
|
|
264005
|
-
'bid': this.safeString(ticker, 'buy'),
|
|
264006
|
-
'bidVolume': undefined,
|
|
264007
|
-
'ask': this.safeString(ticker, 'sell'),
|
|
264008
|
-
'askVolume': undefined,
|
|
264009
|
-
'vwap': undefined,
|
|
264010
|
-
'open': undefined,
|
|
264011
|
-
'close': last,
|
|
264012
|
-
'last': last,
|
|
264013
|
-
'previousClose': undefined,
|
|
264014
|
-
'change': undefined,
|
|
264015
|
-
'percentage': undefined,
|
|
264016
|
-
'average': this.safeString(ticker, 'avg'),
|
|
264017
|
-
'baseVolume': this.safeString(ticker, 'vol_cur'),
|
|
264018
|
-
'quoteVolume': this.safeString(ticker, 'vol'),
|
|
264019
|
-
'info': ticker,
|
|
264020
|
-
}, market);
|
|
264021
|
-
}
|
|
264022
|
-
async fetchTickers(symbols = undefined, params = {}) {
|
|
264023
|
-
/**
|
|
264024
|
-
* @method
|
|
264025
|
-
* @name tidex#fetchTickers
|
|
264026
|
-
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
264027
|
-
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
264028
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
264029
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
264030
|
-
*/
|
|
264031
|
-
await this.loadMarkets();
|
|
264032
|
-
symbols = this.marketSymbols(symbols);
|
|
264033
|
-
let ids = undefined;
|
|
264034
|
-
if (symbols === undefined) {
|
|
264035
|
-
const numIds = this.ids.length;
|
|
264036
|
-
ids = this.ids.join('-');
|
|
264037
|
-
// max URL length is 2048 symbols, including http schema, hostname, tld, etc...
|
|
264038
|
-
if (ids.length > this.options['fetchTickersMaxLength']) {
|
|
264039
|
-
const maxLength = this.safeInteger(this.options, 'fetchTickersMaxLength', 2048);
|
|
264040
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' fetchTickers() has ' + numIds.toString() + ' markets exceeding max URL length for this endpoint (' + maxLength.toString() + ' characters), please, specify a list of symbols of interest in the first argument to fetchTickers');
|
|
264041
|
-
}
|
|
264042
|
-
}
|
|
264043
|
-
else {
|
|
264044
|
-
const newIds = this.marketIds(symbols);
|
|
264045
|
-
ids = newIds.join('-');
|
|
264046
|
-
}
|
|
264047
|
-
const request = {
|
|
264048
|
-
'pair': ids,
|
|
264049
|
-
};
|
|
264050
|
-
const response = await this.publicGetTickerPair(this.extend(request, params));
|
|
264051
|
-
const result = {};
|
|
264052
|
-
const keys = Object.keys(response);
|
|
264053
|
-
for (let i = 0; i < keys.length; i++) {
|
|
264054
|
-
const id = keys[i];
|
|
264055
|
-
const market = this.safeMarket(id);
|
|
264056
|
-
const symbol = market['symbol'];
|
|
264057
|
-
result[symbol] = this.parseTicker(response[id], market);
|
|
264058
|
-
}
|
|
264059
|
-
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
264060
|
-
}
|
|
264061
|
-
async fetchTicker(symbol, params = {}) {
|
|
264062
|
-
/**
|
|
264063
|
-
* @method
|
|
264064
|
-
* @name tidex#fetchTicker
|
|
264065
|
-
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
264066
|
-
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
264067
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
264068
|
-
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
264069
|
-
*/
|
|
264070
|
-
const tickers = await this.fetchTickers([symbol], params);
|
|
264071
|
-
return tickers[symbol];
|
|
264072
|
-
}
|
|
264073
|
-
parseTrade(trade, market = undefined) {
|
|
264074
|
-
const timestamp = this.safeTimestamp(trade, 'timestamp');
|
|
264075
|
-
let side = this.safeString(trade, 'type');
|
|
264076
|
-
if (side === 'ask') {
|
|
264077
|
-
side = 'sell';
|
|
264078
|
-
}
|
|
264079
|
-
else if (side === 'bid') {
|
|
264080
|
-
side = 'buy';
|
|
264081
|
-
}
|
|
264082
|
-
const priceString = this.safeString2(trade, 'rate', 'price');
|
|
264083
|
-
const id = this.safeString2(trade, 'trade_id', 'tid');
|
|
264084
|
-
const orderId = this.safeString(trade, 'order_id');
|
|
264085
|
-
const marketId = this.safeString(trade, 'pair');
|
|
264086
|
-
const symbol = this.safeSymbol(marketId, market);
|
|
264087
|
-
const amountString = this.safeString(trade, 'amount');
|
|
264088
|
-
const price = this.parseNumber(priceString);
|
|
264089
|
-
const amount = this.parseNumber(amountString);
|
|
264090
|
-
const cost = this.parseNumber(_base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringMul(priceString, amountString));
|
|
264091
|
-
const type = 'limit'; // all trades are still limit trades
|
|
264092
|
-
let takerOrMaker = undefined;
|
|
264093
|
-
let fee = undefined;
|
|
264094
|
-
const feeCost = this.safeNumber(trade, 'commission');
|
|
264095
|
-
if (feeCost !== undefined) {
|
|
264096
|
-
const feeCurrencyId = this.safeString(trade, 'commissionCurrency');
|
|
264097
|
-
const feeCurrencyCode = this.safeCurrencyCode(feeCurrencyId);
|
|
264098
|
-
fee = {
|
|
264099
|
-
'cost': feeCost,
|
|
264100
|
-
'currency': feeCurrencyCode,
|
|
264101
|
-
};
|
|
264102
|
-
}
|
|
264103
|
-
const isYourOrder = this.safeValue(trade, 'is_your_order');
|
|
264104
|
-
if (isYourOrder !== undefined) {
|
|
264105
|
-
takerOrMaker = 'taker';
|
|
264106
|
-
if (isYourOrder) {
|
|
264107
|
-
takerOrMaker = 'maker';
|
|
264108
|
-
}
|
|
264109
|
-
if (fee === undefined) {
|
|
264110
|
-
fee = this.calculateFee(symbol, type, side, amount, price, takerOrMaker);
|
|
264111
|
-
}
|
|
264112
|
-
}
|
|
264113
|
-
return {
|
|
264114
|
-
'id': id,
|
|
264115
|
-
'order': orderId,
|
|
264116
|
-
'timestamp': timestamp,
|
|
264117
|
-
'datetime': this.iso8601(timestamp),
|
|
264118
|
-
'symbol': symbol,
|
|
264119
|
-
'type': type,
|
|
264120
|
-
'side': side,
|
|
264121
|
-
'takerOrMaker': takerOrMaker,
|
|
264122
|
-
'price': price,
|
|
264123
|
-
'amount': amount,
|
|
264124
|
-
'cost': cost,
|
|
264125
|
-
'fee': fee,
|
|
264126
|
-
'info': trade,
|
|
264127
|
-
};
|
|
264128
|
-
}
|
|
264129
|
-
async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
|
|
264130
|
-
/**
|
|
264131
|
-
* @method
|
|
264132
|
-
* @name tidex#fetchTrades
|
|
264133
|
-
* @description get the list of most recent trades for a particular symbol
|
|
264134
|
-
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
264135
|
-
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
264136
|
-
* @param {int} [limit] the maximum amount of trades to fetch
|
|
264137
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
264138
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
264139
|
-
*/
|
|
264140
|
-
await this.loadMarkets();
|
|
264141
|
-
const market = this.market(symbol);
|
|
264142
|
-
const request = {
|
|
264143
|
-
'pair': market['id'],
|
|
264144
|
-
};
|
|
264145
|
-
if (limit !== undefined) {
|
|
264146
|
-
request['limit'] = limit;
|
|
264147
|
-
}
|
|
264148
|
-
const response = await this.publicGetTradesPair(this.extend(request, params));
|
|
264149
|
-
if (Array.isArray(response)) {
|
|
264150
|
-
const numElements = response.length;
|
|
264151
|
-
if (numElements === 0) {
|
|
264152
|
-
return [];
|
|
264153
|
-
}
|
|
264154
|
-
}
|
|
264155
|
-
return this.parseTrades(response[market['id']], market, since, limit);
|
|
264156
|
-
}
|
|
264157
|
-
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
264158
|
-
/**
|
|
264159
|
-
* @method
|
|
264160
|
-
* @name tidex#createOrder
|
|
264161
|
-
* @description create a trade order
|
|
264162
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
264163
|
-
* @param {string} type 'market' or 'limit'
|
|
264164
|
-
* @param {string} side 'buy' or 'sell'
|
|
264165
|
-
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
264166
|
-
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
264167
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
264168
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
264169
|
-
*/
|
|
264170
|
-
if (type === 'market') {
|
|
264171
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeError(this.id + ' createOrder() allows limit orders only');
|
|
264172
|
-
}
|
|
264173
|
-
const amountString = amount.toString();
|
|
264174
|
-
const priceString = price.toString();
|
|
264175
|
-
await this.loadMarkets();
|
|
264176
|
-
const market = this.market(symbol);
|
|
264177
|
-
const request = {
|
|
264178
|
-
'pair': market['id'],
|
|
264179
|
-
'type': side,
|
|
264180
|
-
'amount': this.amountToPrecision(symbol, amount),
|
|
264181
|
-
'rate': this.priceToPrecision(symbol, price),
|
|
264182
|
-
};
|
|
264183
|
-
const response = await this.privatePostTrade(this.extend(request, params));
|
|
264184
|
-
let id = undefined;
|
|
264185
|
-
let status = 'open';
|
|
264186
|
-
let filledString = '0.0';
|
|
264187
|
-
let remainingString = amountString;
|
|
264188
|
-
const returnResult = this.safeValue(response, 'return');
|
|
264189
|
-
if (returnResult !== undefined) {
|
|
264190
|
-
id = this.safeString(returnResult, 'order_id');
|
|
264191
|
-
if (id === '0') {
|
|
264192
|
-
id = this.safeString(returnResult, 'init_order_id');
|
|
264193
|
-
status = 'closed';
|
|
264194
|
-
}
|
|
264195
|
-
filledString = this.safeString(returnResult, 'received', filledString);
|
|
264196
|
-
remainingString = this.safeString(returnResult, 'remains', amountString);
|
|
264197
|
-
}
|
|
264198
|
-
const timestamp = this.milliseconds();
|
|
264199
|
-
return this.safeOrder({
|
|
264200
|
-
'id': id,
|
|
264201
|
-
'timestamp': timestamp,
|
|
264202
|
-
'datetime': this.iso8601(timestamp),
|
|
264203
|
-
'lastTradeTimestamp': undefined,
|
|
264204
|
-
'status': status,
|
|
264205
|
-
'symbol': symbol,
|
|
264206
|
-
'type': type,
|
|
264207
|
-
'side': side,
|
|
264208
|
-
'price': priceString,
|
|
264209
|
-
'cost': undefined,
|
|
264210
|
-
'amount': amountString,
|
|
264211
|
-
'remaining': remainingString,
|
|
264212
|
-
'filled': filledString,
|
|
264213
|
-
'fee': undefined,
|
|
264214
|
-
// 'trades': this.parseTrades (order['trades'], market),
|
|
264215
|
-
'info': response,
|
|
264216
|
-
'clientOrderId': undefined,
|
|
264217
|
-
'average': undefined,
|
|
264218
|
-
'trades': undefined,
|
|
264219
|
-
}, market);
|
|
264220
|
-
}
|
|
264221
|
-
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
264222
|
-
/**
|
|
264223
|
-
* @method
|
|
264224
|
-
* @name tidex#cancelOrder
|
|
264225
|
-
* @description cancels an open order
|
|
264226
|
-
* @param {string} id order id
|
|
264227
|
-
* @param {string} symbol not used by tidex cancelOrder ()
|
|
264228
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
264229
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
264230
|
-
*/
|
|
264231
|
-
await this.loadMarkets();
|
|
264232
|
-
const request = {
|
|
264233
|
-
'order_id': parseInt(id),
|
|
264234
|
-
};
|
|
264235
|
-
return await this.privatePostCancelOrder(this.extend(request, params));
|
|
264236
|
-
}
|
|
264237
|
-
parseOrderStatus(status) {
|
|
264238
|
-
const statuses = {
|
|
264239
|
-
'0': 'open',
|
|
264240
|
-
'1': 'closed',
|
|
264241
|
-
'2': 'canceled',
|
|
264242
|
-
'3': 'canceled', // or partially-filled and still open? https://github.com/ccxt/ccxt/issues/1594
|
|
264243
|
-
};
|
|
264244
|
-
return this.safeString(statuses, status, status);
|
|
264245
|
-
}
|
|
264246
|
-
parseOrder(order, market = undefined) {
|
|
264247
|
-
const id = this.safeString(order, 'id');
|
|
264248
|
-
const status = this.parseOrderStatus(this.safeString(order, 'status'));
|
|
264249
|
-
const timestamp = this.safeTimestamp(order, 'timestamp_created');
|
|
264250
|
-
const marketId = this.safeString(order, 'pair');
|
|
264251
|
-
const symbol = this.safeSymbol(marketId, market);
|
|
264252
|
-
let remaining;
|
|
264253
|
-
let amount;
|
|
264254
|
-
const price = this.safeString(order, 'rate');
|
|
264255
|
-
if ('start_amount' in order) {
|
|
264256
|
-
amount = this.safeString(order, 'start_amount');
|
|
264257
|
-
remaining = this.safeString(order, 'amount');
|
|
264258
|
-
}
|
|
264259
|
-
else {
|
|
264260
|
-
remaining = this.safeString(order, 'amount');
|
|
264261
|
-
}
|
|
264262
|
-
const fee = undefined;
|
|
264263
|
-
return this.safeOrder({
|
|
264264
|
-
'info': order,
|
|
264265
|
-
'id': id,
|
|
264266
|
-
'clientOrderId': undefined,
|
|
264267
|
-
'symbol': symbol,
|
|
264268
|
-
'timestamp': timestamp,
|
|
264269
|
-
'datetime': this.iso8601(timestamp),
|
|
264270
|
-
'lastTradeTimestamp': undefined,
|
|
264271
|
-
'type': 'limit',
|
|
264272
|
-
'timeInForce': undefined,
|
|
264273
|
-
'postOnly': undefined,
|
|
264274
|
-
'side': this.safeString(order, 'type'),
|
|
264275
|
-
'price': price,
|
|
264276
|
-
'stopPrice': undefined,
|
|
264277
|
-
'triggerPrice': undefined,
|
|
264278
|
-
'cost': undefined,
|
|
264279
|
-
'amount': amount,
|
|
264280
|
-
'remaining': remaining,
|
|
264281
|
-
'filled': undefined,
|
|
264282
|
-
'status': status,
|
|
264283
|
-
'fee': fee,
|
|
264284
|
-
'average': undefined,
|
|
264285
|
-
'trades': undefined,
|
|
264286
|
-
}, market);
|
|
264287
|
-
}
|
|
264288
|
-
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
264289
|
-
/**
|
|
264290
|
-
* @method
|
|
264291
|
-
* @name tidex#fetchOrder
|
|
264292
|
-
* @description fetches information on an order made by the user
|
|
264293
|
-
* @param {string} symbol not used by tidex fetchOrder
|
|
264294
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
264295
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
264296
|
-
*/
|
|
264297
|
-
await this.loadMarkets();
|
|
264298
|
-
const request = {
|
|
264299
|
-
'order_id': parseInt(id),
|
|
264300
|
-
};
|
|
264301
|
-
const response = await this.privatePostOrderInfo(this.extend(request, params));
|
|
264302
|
-
id = id.toString();
|
|
264303
|
-
const result = this.safeValue(response, 'return', {});
|
|
264304
|
-
const order = this.safeValue(result, id);
|
|
264305
|
-
return this.parseOrder(this.extend({ 'id': id }, order));
|
|
264306
|
-
}
|
|
264307
|
-
async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
264308
|
-
/**
|
|
264309
|
-
* @method
|
|
264310
|
-
* @name tidex#fetchOpenOrders
|
|
264311
|
-
* @description fetch all unfilled currently open orders
|
|
264312
|
-
* @param {string} symbol unified market symbol
|
|
264313
|
-
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
264314
|
-
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
264315
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
264316
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
264317
|
-
*/
|
|
264318
|
-
await this.loadMarkets();
|
|
264319
|
-
const request = {};
|
|
264320
|
-
let market = undefined;
|
|
264321
|
-
if (symbol !== undefined) {
|
|
264322
|
-
market = this.market(symbol);
|
|
264323
|
-
request['pair'] = market['id'];
|
|
264324
|
-
}
|
|
264325
|
-
const response = await this.privatePostActiveOrders(this.extend(request, params));
|
|
264326
|
-
//
|
|
264327
|
-
// {
|
|
264328
|
-
// "success":1,
|
|
264329
|
-
// "return":{
|
|
264330
|
-
// "1255468911":{
|
|
264331
|
-
// "status":0,
|
|
264332
|
-
// "pair":"spike_usdt",
|
|
264333
|
-
// "type":"sell",
|
|
264334
|
-
// "amount":35028.44256388,
|
|
264335
|
-
// "rate":0.00199989,
|
|
264336
|
-
// "timestamp_created":1602684432
|
|
264337
|
-
// }
|
|
264338
|
-
// },
|
|
264339
|
-
// "stat":{
|
|
264340
|
-
// "isSuccess":true,
|
|
264341
|
-
// "serverTime":"00:00:00.0000826",
|
|
264342
|
-
// "time":"00:00:00.0091423",
|
|
264343
|
-
// "errors":null
|
|
264344
|
-
// }
|
|
264345
|
-
// }
|
|
264346
|
-
//
|
|
264347
|
-
// it can only return 'open' orders (i.e. no way to fetch 'closed' orders)
|
|
264348
|
-
const orders = this.safeValue(response, 'return', []);
|
|
264349
|
-
return this.parseOrders(orders, market, since, limit);
|
|
264350
|
-
}
|
|
264351
|
-
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
264352
|
-
/**
|
|
264353
|
-
* @method
|
|
264354
|
-
* @name tidex#fetchMyTrades
|
|
264355
|
-
* @description fetch all trades made by the user
|
|
264356
|
-
* @param {string} symbol unified market symbol
|
|
264357
|
-
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
264358
|
-
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
264359
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
264360
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
264361
|
-
*/
|
|
264362
|
-
await this.loadMarkets();
|
|
264363
|
-
let market = undefined;
|
|
264364
|
-
// some derived classes use camelcase notation for request fields
|
|
264365
|
-
const request = {
|
|
264366
|
-
// 'from': 123456789, // trade ID, from which the display starts numerical 0 (test result: liqui ignores this field)
|
|
264367
|
-
// 'count': 1000, // the number of trades for display numerical, default = 1000
|
|
264368
|
-
// 'from_id': trade ID, from which the display starts numerical 0
|
|
264369
|
-
// 'end_id': trade ID on which the display ends numerical ∞
|
|
264370
|
-
// 'order': 'ASC', // sorting, default = DESC (test result: liqui ignores this field, most recent trade always goes last)
|
|
264371
|
-
// 'since': 1234567890, // UTC start time, default = 0 (test result: liqui ignores this field)
|
|
264372
|
-
// 'end': 1234567890, // UTC end time, default = ∞ (test result: liqui ignores this field)
|
|
264373
|
-
// 'pair': 'eth_btc', // default = all markets
|
|
264374
|
-
};
|
|
264375
|
-
if (symbol !== undefined) {
|
|
264376
|
-
market = this.market(symbol);
|
|
264377
|
-
request['pair'] = market['id'];
|
|
264378
|
-
}
|
|
264379
|
-
if (limit !== undefined) {
|
|
264380
|
-
request['count'] = limit;
|
|
264381
|
-
}
|
|
264382
|
-
if (since !== undefined) {
|
|
264383
|
-
request['since'] = this.parseToInt(since / 1000);
|
|
264384
|
-
}
|
|
264385
|
-
const response = await this.privatePostTradeHistory(this.extend(request, params));
|
|
264386
|
-
const trades = this.safeValue(response, 'return', []);
|
|
264387
|
-
return this.parseTrades(trades, market, since, limit);
|
|
264388
|
-
}
|
|
264389
|
-
async withdraw(code, amount, address, tag = undefined, params = {}) {
|
|
264390
|
-
/**
|
|
264391
|
-
* @method
|
|
264392
|
-
* @name tidex#withdraw
|
|
264393
|
-
* @description make a withdrawal
|
|
264394
|
-
* @param {string} code unified currency code
|
|
264395
|
-
* @param {float} amount the amount to withdraw
|
|
264396
|
-
* @param {string} address the address to withdraw to
|
|
264397
|
-
* @param {string} tag
|
|
264398
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
264399
|
-
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
264400
|
-
*/
|
|
264401
|
-
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
264402
|
-
this.checkAddress(address);
|
|
264403
|
-
await this.loadMarkets();
|
|
264404
|
-
const currency = this.currency(code);
|
|
264405
|
-
const request = {
|
|
264406
|
-
'asset': currency['id'],
|
|
264407
|
-
'amount': parseFloat(amount),
|
|
264408
|
-
'address': address,
|
|
264409
|
-
};
|
|
264410
|
-
if (tag !== undefined) {
|
|
264411
|
-
request['memo'] = tag;
|
|
264412
|
-
}
|
|
264413
|
-
const response = await this.privatePostCreateWithdraw(this.extend(request, params));
|
|
264414
|
-
//
|
|
264415
|
-
// {
|
|
264416
|
-
// "success":1,
|
|
264417
|
-
// "return":{
|
|
264418
|
-
// "withdraw_id":1111,
|
|
264419
|
-
// "withdraw_info":{
|
|
264420
|
-
// "id":1111,
|
|
264421
|
-
// "asset_id":1,
|
|
264422
|
-
// "asset":"BTC",
|
|
264423
|
-
// "amount":0.0093,
|
|
264424
|
-
// "fee":0.0007,
|
|
264425
|
-
// "create_time":1575128018,
|
|
264426
|
-
// "status":"Created",
|
|
264427
|
-
// "data":{
|
|
264428
|
-
// "address":"1KFHE7w8BhaENAswwryaoccDb6qcT6DbYY",
|
|
264429
|
-
// "memo":"memo",
|
|
264430
|
-
// "tx":null,
|
|
264431
|
-
// "error":null
|
|
264432
|
-
// },
|
|
264433
|
-
// "in_blockchain":false
|
|
264434
|
-
// }
|
|
264435
|
-
// }
|
|
264436
|
-
// }
|
|
264437
|
-
//
|
|
264438
|
-
const result = this.safeValue(response, 'return', {});
|
|
264439
|
-
const withdrawInfo = this.safeValue(result, 'withdraw_info', {});
|
|
264440
|
-
return this.parseTransaction(withdrawInfo, currency);
|
|
264441
|
-
}
|
|
264442
|
-
parseTransaction(transaction, currency = undefined) {
|
|
264443
|
-
//
|
|
264444
|
-
// {
|
|
264445
|
-
// "id":1111,
|
|
264446
|
-
// "asset_id":1,
|
|
264447
|
-
// "asset":"BTC",
|
|
264448
|
-
// "amount":0.0093,
|
|
264449
|
-
// "fee":0.0007,
|
|
264450
|
-
// "create_time":1575128018,
|
|
264451
|
-
// "status":"Created",
|
|
264452
|
-
// "data":{
|
|
264453
|
-
// "address":"1KFHE7w8BhaENAswwryaoccDb6qcT6DbYY",
|
|
264454
|
-
// "memo":"memo",
|
|
264455
|
-
// "tx":null,
|
|
264456
|
-
// "error":null
|
|
264457
|
-
// },
|
|
264458
|
-
// "in_blockchain":false
|
|
264459
|
-
// }
|
|
264460
|
-
//
|
|
264461
|
-
currency = this.safeCurrency(undefined, currency);
|
|
264462
|
-
return {
|
|
264463
|
-
'id': this.safeString(transaction, 'id'),
|
|
264464
|
-
'txid': undefined,
|
|
264465
|
-
'timestamp': undefined,
|
|
264466
|
-
'datetime': undefined,
|
|
264467
|
-
'network': undefined,
|
|
264468
|
-
'addressFrom': undefined,
|
|
264469
|
-
'address': undefined,
|
|
264470
|
-
'addressTo': undefined,
|
|
264471
|
-
'amount': undefined,
|
|
264472
|
-
'type': undefined,
|
|
264473
|
-
'currency': currency['code'],
|
|
264474
|
-
'status': undefined,
|
|
264475
|
-
'updated': undefined,
|
|
264476
|
-
'tagFrom': undefined,
|
|
264477
|
-
'tag': undefined,
|
|
264478
|
-
'tagTo': undefined,
|
|
264479
|
-
'comment': undefined,
|
|
264480
|
-
'internal': undefined,
|
|
264481
|
-
'fee': undefined,
|
|
264482
|
-
'info': transaction,
|
|
264483
|
-
};
|
|
264484
|
-
}
|
|
264485
|
-
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
|
|
264486
|
-
let url = this.urls['api'][api];
|
|
264487
|
-
const query = this.omit(params, this.extractParams(path));
|
|
264488
|
-
if (api === 'private') {
|
|
264489
|
-
this.checkRequiredCredentials();
|
|
264490
|
-
const nonce = this.nonce();
|
|
264491
|
-
body = this.urlencode(this.extend({
|
|
264492
|
-
'nonce': nonce,
|
|
264493
|
-
'method': path,
|
|
264494
|
-
}, query));
|
|
264495
|
-
const signature = this.hmac(this.encode(body), this.encode(this.secret), _static_dependencies_noble_hashes_sha512_js__WEBPACK_IMPORTED_MODULE_4__/* .sha512 */ .o);
|
|
264496
|
-
headers = {
|
|
264497
|
-
'Content-Type': 'application/x-www-form-urlencoded',
|
|
264498
|
-
'Key': this.apiKey,
|
|
264499
|
-
'Sign': signature,
|
|
264500
|
-
};
|
|
264501
|
-
}
|
|
264502
|
-
else if (api === 'public') {
|
|
264503
|
-
url += '/' + this.implodeParams(path, params);
|
|
264504
|
-
if (Object.keys(query).length) {
|
|
264505
|
-
url += '?' + this.urlencode(query);
|
|
264506
|
-
}
|
|
264507
|
-
}
|
|
264508
|
-
else {
|
|
264509
|
-
url += '/' + this.implodeParams(path, params);
|
|
264510
|
-
if (method === 'GET') {
|
|
264511
|
-
if (Object.keys(query).length) {
|
|
264512
|
-
url += '?' + this.urlencode(query);
|
|
264513
|
-
}
|
|
264514
|
-
}
|
|
264515
|
-
else {
|
|
264516
|
-
if (Object.keys(query).length) {
|
|
264517
|
-
body = this.json(query);
|
|
264518
|
-
headers = {
|
|
264519
|
-
'Content-Type': 'application/json',
|
|
264520
|
-
};
|
|
264521
|
-
}
|
|
264522
|
-
}
|
|
264523
|
-
}
|
|
264524
|
-
return { 'url': url, 'method': method, 'body': body, 'headers': headers };
|
|
264525
|
-
}
|
|
264526
|
-
handleErrors(httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody) {
|
|
264527
|
-
if (response === undefined) {
|
|
264528
|
-
return undefined; // fallback to default error handler
|
|
264529
|
-
}
|
|
264530
|
-
if ('success' in response) {
|
|
264531
|
-
//
|
|
264532
|
-
// 1 - The exchange only returns the integer 'success' key from their private API
|
|
264533
|
-
//
|
|
264534
|
-
// { "success": 1, ... } httpCode === 200
|
|
264535
|
-
// { "success": 0, ... } httpCode === 200
|
|
264536
|
-
//
|
|
264537
|
-
// 2 - However, derived exchanges can return non-integers
|
|
264538
|
-
//
|
|
264539
|
-
// It can be a numeric string
|
|
264540
|
-
// { "sucesss": "1", ... }
|
|
264541
|
-
// { "sucesss": "0", ... }, httpCode >= 200 (can be 403, 502, etc)
|
|
264542
|
-
//
|
|
264543
|
-
// Or just a string
|
|
264544
|
-
// { "success": "true", ... }
|
|
264545
|
-
// { "success": "false", ... }, httpCode >= 200
|
|
264546
|
-
//
|
|
264547
|
-
// Or a boolean
|
|
264548
|
-
// { "success": true, ... }
|
|
264549
|
-
// { "success": false, ... }, httpCode >= 200
|
|
264550
|
-
//
|
|
264551
|
-
// 3 - Oversimplified, Python PEP8 forbids comparison operator (===) of different types
|
|
264552
|
-
//
|
|
264553
|
-
// 4 - We do not want to copy-paste and duplicate the code of this handler to other exchanges derived from Liqui
|
|
264554
|
-
//
|
|
264555
|
-
// To cover points 1, 2, 3 and 4 combined this handler should work like this:
|
|
264556
|
-
//
|
|
264557
|
-
let success = this.safeValue(response, 'success', false);
|
|
264558
|
-
if (typeof success === 'string') {
|
|
264559
|
-
if ((success === 'true') || (success === '1')) {
|
|
264560
|
-
success = true;
|
|
264561
|
-
}
|
|
264562
|
-
else {
|
|
264563
|
-
success = false;
|
|
264564
|
-
}
|
|
264565
|
-
}
|
|
264566
|
-
if (!success) {
|
|
264567
|
-
const code = this.safeString(response, 'code');
|
|
264568
|
-
const message = this.safeString(response, 'error');
|
|
264569
|
-
const feedback = this.id + ' ' + body;
|
|
264570
|
-
this.throwExactlyMatchedException(this.exceptions['exact'], code, feedback);
|
|
264571
|
-
this.throwExactlyMatchedException(this.exceptions['exact'], message, feedback);
|
|
264572
|
-
this.throwBroadlyMatchedException(this.exceptions['broad'], message, feedback);
|
|
264573
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeError(feedback); // unknown message
|
|
264574
|
-
}
|
|
264575
|
-
}
|
|
264576
|
-
return undefined;
|
|
264577
|
-
}
|
|
264578
|
-
}
|
|
264579
|
-
|
|
264580
|
-
|
|
264581
263954
|
/***/ }),
|
|
264582
263955
|
|
|
264583
263956
|
/***/ 1067:
|
|
@@ -288215,39 +287588,39 @@ var __webpack_exports__ = {};
|
|
|
288215
287588
|
(() => {
|
|
288216
287589
|
__webpack_require__.r(__webpack_exports__);
|
|
288217
287590
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
288218
|
-
/* harmony export */ AccountNotEnabled: () => (/* reexport safe */
|
|
288219
|
-
/* harmony export */ AccountSuspended: () => (/* reexport safe */
|
|
288220
|
-
/* harmony export */ AddressPending: () => (/* reexport safe */
|
|
288221
|
-
/* harmony export */ ArgumentsRequired: () => (/* reexport safe */
|
|
288222
|
-
/* harmony export */ AuthenticationError: () => (/* reexport safe */
|
|
288223
|
-
/* harmony export */ BadRequest: () => (/* reexport safe */
|
|
288224
|
-
/* harmony export */ BadResponse: () => (/* reexport safe */
|
|
288225
|
-
/* harmony export */ BadSymbol: () => (/* reexport safe */
|
|
288226
|
-
/* harmony export */ BaseError: () => (/* reexport safe */
|
|
288227
|
-
/* harmony export */ CancelPending: () => (/* reexport safe */
|
|
288228
|
-
/* harmony export */ DDoSProtection: () => (/* reexport safe */
|
|
288229
|
-
/* harmony export */ DuplicateOrderId: () => (/* reexport safe */
|
|
287591
|
+
/* harmony export */ AccountNotEnabled: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__.AccountNotEnabled),
|
|
287592
|
+
/* harmony export */ AccountSuspended: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__.AccountSuspended),
|
|
287593
|
+
/* harmony export */ AddressPending: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__.AddressPending),
|
|
287594
|
+
/* harmony export */ ArgumentsRequired: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__.ArgumentsRequired),
|
|
287595
|
+
/* harmony export */ AuthenticationError: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__.AuthenticationError),
|
|
287596
|
+
/* harmony export */ BadRequest: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__.BadRequest),
|
|
287597
|
+
/* harmony export */ BadResponse: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__.BadResponse),
|
|
287598
|
+
/* harmony export */ BadSymbol: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__.BadSymbol),
|
|
287599
|
+
/* harmony export */ BaseError: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__.BaseError),
|
|
287600
|
+
/* harmony export */ CancelPending: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__.CancelPending),
|
|
287601
|
+
/* harmony export */ DDoSProtection: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__.DDoSProtection),
|
|
287602
|
+
/* harmony export */ DuplicateOrderId: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__.DuplicateOrderId),
|
|
288230
287603
|
/* harmony export */ Exchange: () => (/* reexport safe */ _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__.e),
|
|
288231
|
-
/* harmony export */ ExchangeError: () => (/* reexport safe */
|
|
288232
|
-
/* harmony export */ ExchangeNotAvailable: () => (/* reexport safe */
|
|
288233
|
-
/* harmony export */ InsufficientFunds: () => (/* reexport safe */
|
|
288234
|
-
/* harmony export */ InvalidAddress: () => (/* reexport safe */
|
|
288235
|
-
/* harmony export */ InvalidNonce: () => (/* reexport safe */
|
|
288236
|
-
/* harmony export */ InvalidOrder: () => (/* reexport safe */
|
|
288237
|
-
/* harmony export */ MarginModeAlreadySet: () => (/* reexport safe */
|
|
288238
|
-
/* harmony export */ NetworkError: () => (/* reexport safe */
|
|
288239
|
-
/* harmony export */ NoChange: () => (/* reexport safe */
|
|
288240
|
-
/* harmony export */ NotSupported: () => (/* reexport safe */
|
|
288241
|
-
/* harmony export */ NullResponse: () => (/* reexport safe */
|
|
288242
|
-
/* harmony export */ OnMaintenance: () => (/* reexport safe */
|
|
288243
|
-
/* harmony export */ OrderImmediatelyFillable: () => (/* reexport safe */
|
|
288244
|
-
/* harmony export */ OrderNotCached: () => (/* reexport safe */
|
|
288245
|
-
/* harmony export */ OrderNotFillable: () => (/* reexport safe */
|
|
288246
|
-
/* harmony export */ OrderNotFound: () => (/* reexport safe */
|
|
288247
|
-
/* harmony export */ PermissionDenied: () => (/* reexport safe */
|
|
288248
|
-
/* harmony export */ Precise: () => (/* reexport safe */
|
|
288249
|
-
/* harmony export */ RateLimitExceeded: () => (/* reexport safe */
|
|
288250
|
-
/* harmony export */ RequestTimeout: () => (/* reexport safe */
|
|
287604
|
+
/* harmony export */ ExchangeError: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__.ExchangeError),
|
|
287605
|
+
/* harmony export */ ExchangeNotAvailable: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__.ExchangeNotAvailable),
|
|
287606
|
+
/* harmony export */ InsufficientFunds: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__.InsufficientFunds),
|
|
287607
|
+
/* harmony export */ InvalidAddress: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__.InvalidAddress),
|
|
287608
|
+
/* harmony export */ InvalidNonce: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__.InvalidNonce),
|
|
287609
|
+
/* harmony export */ InvalidOrder: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__.InvalidOrder),
|
|
287610
|
+
/* harmony export */ MarginModeAlreadySet: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__.MarginModeAlreadySet),
|
|
287611
|
+
/* harmony export */ NetworkError: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__.NetworkError),
|
|
287612
|
+
/* harmony export */ NoChange: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__.NoChange),
|
|
287613
|
+
/* harmony export */ NotSupported: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__.NotSupported),
|
|
287614
|
+
/* harmony export */ NullResponse: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__.NullResponse),
|
|
287615
|
+
/* harmony export */ OnMaintenance: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__.OnMaintenance),
|
|
287616
|
+
/* harmony export */ OrderImmediatelyFillable: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__.OrderImmediatelyFillable),
|
|
287617
|
+
/* harmony export */ OrderNotCached: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__.OrderNotCached),
|
|
287618
|
+
/* harmony export */ OrderNotFillable: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__.OrderNotFillable),
|
|
287619
|
+
/* harmony export */ OrderNotFound: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__.OrderNotFound),
|
|
287620
|
+
/* harmony export */ PermissionDenied: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__.PermissionDenied),
|
|
287621
|
+
/* harmony export */ Precise: () => (/* reexport safe */ _src_base_Precise_js__WEBPACK_IMPORTED_MODULE_158__.O),
|
|
287622
|
+
/* harmony export */ RateLimitExceeded: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__.RateLimitExceeded),
|
|
287623
|
+
/* harmony export */ RequestTimeout: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__.RequestTimeout),
|
|
288251
287624
|
/* harmony export */ ace: () => (/* reexport safe */ _src_ace_js__WEBPACK_IMPORTED_MODULE_1__.Z),
|
|
288252
287625
|
/* harmony export */ alpaca: () => (/* reexport safe */ _src_alpaca_js__WEBPACK_IMPORTED_MODULE_2__.Z),
|
|
288253
287626
|
/* harmony export */ ascendex: () => (/* reexport safe */ _src_ascendex_js__WEBPACK_IMPORTED_MODULE_3__.Z),
|
|
@@ -288302,11 +287675,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
288302
287675
|
/* harmony export */ delta: () => (/* reexport safe */ _src_delta_js__WEBPACK_IMPORTED_MODULE_51__.Z),
|
|
288303
287676
|
/* harmony export */ deribit: () => (/* reexport safe */ _src_deribit_js__WEBPACK_IMPORTED_MODULE_52__.Z),
|
|
288304
287677
|
/* harmony export */ digifinex: () => (/* reexport safe */ _src_digifinex_js__WEBPACK_IMPORTED_MODULE_53__.Z),
|
|
288305
|
-
/* harmony export */ errors: () => (/* reexport module object */
|
|
287678
|
+
/* harmony export */ errors: () => (/* reexport module object */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__),
|
|
288306
287679
|
/* harmony export */ exchanges: () => (/* binding */ exchanges),
|
|
288307
287680
|
/* harmony export */ exmo: () => (/* reexport safe */ _src_exmo_js__WEBPACK_IMPORTED_MODULE_54__.Z),
|
|
288308
287681
|
/* harmony export */ fmfwio: () => (/* reexport safe */ _src_fmfwio_js__WEBPACK_IMPORTED_MODULE_55__.Z),
|
|
288309
|
-
/* harmony export */ functions: () => (/* reexport module object */
|
|
287682
|
+
/* harmony export */ functions: () => (/* reexport module object */ _src_base_functions_js__WEBPACK_IMPORTED_MODULE_159__),
|
|
288310
287683
|
/* harmony export */ gate: () => (/* reexport safe */ _src_gate_js__WEBPACK_IMPORTED_MODULE_56__.Z),
|
|
288311
287684
|
/* harmony export */ gateio: () => (/* reexport safe */ _src_gateio_js__WEBPACK_IMPORTED_MODULE_57__.Z),
|
|
288312
287685
|
/* harmony export */ gemini: () => (/* reexport safe */ _src_gemini_js__WEBPACK_IMPORTED_MODULE_58__.Z),
|
|
@@ -288342,23 +287715,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
288342
287715
|
/* harmony export */ poloniexfutures: () => (/* reexport safe */ _src_poloniexfutures_js__WEBPACK_IMPORTED_MODULE_88__.Z),
|
|
288343
287716
|
/* harmony export */ pro: () => (/* binding */ pro),
|
|
288344
287717
|
/* harmony export */ probit: () => (/* reexport safe */ _src_probit_js__WEBPACK_IMPORTED_MODULE_89__.Z),
|
|
288345
|
-
/* harmony export */
|
|
288346
|
-
/* harmony export */
|
|
288347
|
-
/* harmony export */
|
|
288348
|
-
/* harmony export */ upbit: () => (/* reexport safe */ _src_upbit_js__WEBPACK_IMPORTED_MODULE_93__.Z),
|
|
287718
|
+
/* harmony export */ timex: () => (/* reexport safe */ _src_timex_js__WEBPACK_IMPORTED_MODULE_90__.Z),
|
|
287719
|
+
/* harmony export */ tokocrypto: () => (/* reexport safe */ _src_tokocrypto_js__WEBPACK_IMPORTED_MODULE_91__.Z),
|
|
287720
|
+
/* harmony export */ upbit: () => (/* reexport safe */ _src_upbit_js__WEBPACK_IMPORTED_MODULE_92__.Z),
|
|
288349
287721
|
/* harmony export */ version: () => (/* binding */ version),
|
|
288350
|
-
/* harmony export */ wavesexchange: () => (/* reexport safe */
|
|
288351
|
-
/* harmony export */ wazirx: () => (/* reexport safe */
|
|
288352
|
-
/* harmony export */ whitebit: () => (/* reexport safe */
|
|
288353
|
-
/* harmony export */ woo: () => (/* reexport safe */
|
|
288354
|
-
/* harmony export */ yobit: () => (/* reexport safe */
|
|
288355
|
-
/* harmony export */ zaif: () => (/* reexport safe */
|
|
288356
|
-
/* harmony export */ zonda: () => (/* reexport safe */
|
|
287722
|
+
/* harmony export */ wavesexchange: () => (/* reexport safe */ _src_wavesexchange_js__WEBPACK_IMPORTED_MODULE_93__.Z),
|
|
287723
|
+
/* harmony export */ wazirx: () => (/* reexport safe */ _src_wazirx_js__WEBPACK_IMPORTED_MODULE_94__.Z),
|
|
287724
|
+
/* harmony export */ whitebit: () => (/* reexport safe */ _src_whitebit_js__WEBPACK_IMPORTED_MODULE_95__.Z),
|
|
287725
|
+
/* harmony export */ woo: () => (/* reexport safe */ _src_woo_js__WEBPACK_IMPORTED_MODULE_96__.Z),
|
|
287726
|
+
/* harmony export */ yobit: () => (/* reexport safe */ _src_yobit_js__WEBPACK_IMPORTED_MODULE_97__.Z),
|
|
287727
|
+
/* harmony export */ zaif: () => (/* reexport safe */ _src_zaif_js__WEBPACK_IMPORTED_MODULE_98__.Z),
|
|
287728
|
+
/* harmony export */ zonda: () => (/* reexport safe */ _src_zonda_js__WEBPACK_IMPORTED_MODULE_99__.Z)
|
|
288357
287729
|
/* harmony export */ });
|
|
288358
287730
|
/* harmony import */ var _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3043);
|
|
288359
|
-
/* harmony import */ var
|
|
288360
|
-
/* harmony import */ var
|
|
288361
|
-
/* harmony import */ var
|
|
287731
|
+
/* harmony import */ var _src_base_Precise_js__WEBPACK_IMPORTED_MODULE_158__ = __webpack_require__(2194);
|
|
287732
|
+
/* harmony import */ var _src_base_functions_js__WEBPACK_IMPORTED_MODULE_159__ = __webpack_require__(7100);
|
|
287733
|
+
/* harmony import */ var _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__ = __webpack_require__(6689);
|
|
288362
287734
|
/* harmony import */ var _src_ace_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9869);
|
|
288363
287735
|
/* harmony import */ var _src_alpaca_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5660);
|
|
288364
287736
|
/* harmony import */ var _src_ascendex_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9612);
|
|
@@ -288448,75 +287820,74 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
288448
287820
|
/* harmony import */ var _src_poloniex_js__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(8891);
|
|
288449
287821
|
/* harmony import */ var _src_poloniexfutures_js__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(6877);
|
|
288450
287822
|
/* harmony import */ var _src_probit_js__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(3657);
|
|
288451
|
-
/* harmony import */ var
|
|
288452
|
-
/* harmony import */ var
|
|
288453
|
-
/* harmony import */ var
|
|
288454
|
-
/* harmony import */ var
|
|
288455
|
-
/* harmony import */ var
|
|
288456
|
-
/* harmony import */ var
|
|
288457
|
-
/* harmony import */ var
|
|
288458
|
-
/* harmony import */ var
|
|
288459
|
-
/* harmony import */ var
|
|
288460
|
-
/* harmony import */ var
|
|
288461
|
-
/* harmony import */ var
|
|
288462
|
-
/* harmony import */ var
|
|
288463
|
-
/* harmony import */ var
|
|
288464
|
-
/* harmony import */ var
|
|
288465
|
-
/* harmony import */ var
|
|
288466
|
-
/* harmony import */ var
|
|
288467
|
-
/* harmony import */ var
|
|
288468
|
-
/* harmony import */ var
|
|
288469
|
-
/* harmony import */ var
|
|
288470
|
-
/* harmony import */ var
|
|
288471
|
-
/* harmony import */ var
|
|
288472
|
-
/* harmony import */ var
|
|
288473
|
-
/* harmony import */ var
|
|
288474
|
-
/* harmony import */ var
|
|
288475
|
-
/* harmony import */ var
|
|
288476
|
-
/* harmony import */ var
|
|
288477
|
-
/* harmony import */ var
|
|
288478
|
-
/* harmony import */ var
|
|
288479
|
-
/* harmony import */ var
|
|
288480
|
-
/* harmony import */ var
|
|
288481
|
-
/* harmony import */ var
|
|
288482
|
-
/* harmony import */ var
|
|
288483
|
-
/* harmony import */ var
|
|
288484
|
-
/* harmony import */ var
|
|
288485
|
-
/* harmony import */ var
|
|
288486
|
-
/* harmony import */ var
|
|
288487
|
-
/* harmony import */ var
|
|
288488
|
-
/* harmony import */ var
|
|
288489
|
-
/* harmony import */ var
|
|
288490
|
-
/* harmony import */ var
|
|
288491
|
-
/* harmony import */ var
|
|
288492
|
-
/* harmony import */ var
|
|
288493
|
-
/* harmony import */ var
|
|
288494
|
-
/* harmony import */ var
|
|
288495
|
-
/* harmony import */ var
|
|
288496
|
-
/* harmony import */ var
|
|
288497
|
-
/* harmony import */ var
|
|
288498
|
-
/* harmony import */ var
|
|
288499
|
-
/* harmony import */ var
|
|
288500
|
-
/* harmony import */ var
|
|
288501
|
-
/* harmony import */ var
|
|
288502
|
-
/* harmony import */ var
|
|
288503
|
-
/* harmony import */ var
|
|
288504
|
-
/* harmony import */ var
|
|
288505
|
-
/* harmony import */ var
|
|
288506
|
-
/* harmony import */ var
|
|
288507
|
-
/* harmony import */ var
|
|
288508
|
-
/* harmony import */ var
|
|
288509
|
-
/* harmony import */ var
|
|
288510
|
-
/* harmony import */ var
|
|
288511
|
-
/* harmony import */ var
|
|
288512
|
-
/* harmony import */ var
|
|
288513
|
-
/* harmony import */ var
|
|
288514
|
-
/* harmony import */ var
|
|
288515
|
-
/* harmony import */ var
|
|
288516
|
-
/* harmony import */ var
|
|
288517
|
-
/* harmony import */ var
|
|
288518
|
-
/* harmony import */ var
|
|
288519
|
-
/* harmony import */ var _src_pro_woo_js__WEBPACK_IMPORTED_MODULE_158__ = __webpack_require__(3910);
|
|
287823
|
+
/* harmony import */ var _src_timex_js__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(1067);
|
|
287824
|
+
/* harmony import */ var _src_tokocrypto_js__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(5261);
|
|
287825
|
+
/* harmony import */ var _src_upbit_js__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(7584);
|
|
287826
|
+
/* harmony import */ var _src_wavesexchange_js__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(3853);
|
|
287827
|
+
/* harmony import */ var _src_wazirx_js__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(6536);
|
|
287828
|
+
/* harmony import */ var _src_whitebit_js__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(5467);
|
|
287829
|
+
/* harmony import */ var _src_woo_js__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(517);
|
|
287830
|
+
/* harmony import */ var _src_yobit_js__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(3850);
|
|
287831
|
+
/* harmony import */ var _src_zaif_js__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(5934);
|
|
287832
|
+
/* harmony import */ var _src_zonda_js__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(5140);
|
|
287833
|
+
/* harmony import */ var _src_pro_alpaca_js__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(2467);
|
|
287834
|
+
/* harmony import */ var _src_pro_ascendex_js__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(2383);
|
|
287835
|
+
/* harmony import */ var _src_pro_bequant_js__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(8848);
|
|
287836
|
+
/* harmony import */ var _src_pro_binance_js__WEBPACK_IMPORTED_MODULE_103__ = __webpack_require__(8764);
|
|
287837
|
+
/* harmony import */ var _src_pro_binancecoinm_js__WEBPACK_IMPORTED_MODULE_104__ = __webpack_require__(5078);
|
|
287838
|
+
/* harmony import */ var _src_pro_binanceus_js__WEBPACK_IMPORTED_MODULE_105__ = __webpack_require__(1326);
|
|
287839
|
+
/* harmony import */ var _src_pro_binanceusdm_js__WEBPACK_IMPORTED_MODULE_106__ = __webpack_require__(1230);
|
|
287840
|
+
/* harmony import */ var _src_pro_bingx_js__WEBPACK_IMPORTED_MODULE_107__ = __webpack_require__(6955);
|
|
287841
|
+
/* harmony import */ var _src_pro_bitcoincom_js__WEBPACK_IMPORTED_MODULE_108__ = __webpack_require__(453);
|
|
287842
|
+
/* harmony import */ var _src_pro_bitfinex_js__WEBPACK_IMPORTED_MODULE_109__ = __webpack_require__(9772);
|
|
287843
|
+
/* harmony import */ var _src_pro_bitfinex2_js__WEBPACK_IMPORTED_MODULE_110__ = __webpack_require__(588);
|
|
287844
|
+
/* harmony import */ var _src_pro_bitget_js__WEBPACK_IMPORTED_MODULE_111__ = __webpack_require__(1885);
|
|
287845
|
+
/* harmony import */ var _src_pro_bitmart_js__WEBPACK_IMPORTED_MODULE_112__ = __webpack_require__(7504);
|
|
287846
|
+
/* harmony import */ var _src_pro_bitmex_js__WEBPACK_IMPORTED_MODULE_113__ = __webpack_require__(2302);
|
|
287847
|
+
/* harmony import */ var _src_pro_bitopro_js__WEBPACK_IMPORTED_MODULE_114__ = __webpack_require__(2191);
|
|
287848
|
+
/* harmony import */ var _src_pro_bitpanda_js__WEBPACK_IMPORTED_MODULE_115__ = __webpack_require__(1297);
|
|
287849
|
+
/* harmony import */ var _src_pro_bitrue_js__WEBPACK_IMPORTED_MODULE_116__ = __webpack_require__(3005);
|
|
287850
|
+
/* harmony import */ var _src_pro_bitstamp_js__WEBPACK_IMPORTED_MODULE_117__ = __webpack_require__(2317);
|
|
287851
|
+
/* harmony import */ var _src_pro_bittrex_js__WEBPACK_IMPORTED_MODULE_118__ = __webpack_require__(2883);
|
|
287852
|
+
/* harmony import */ var _src_pro_bitvavo_js__WEBPACK_IMPORTED_MODULE_119__ = __webpack_require__(6977);
|
|
287853
|
+
/* harmony import */ var _src_pro_blockchaincom_js__WEBPACK_IMPORTED_MODULE_120__ = __webpack_require__(2519);
|
|
287854
|
+
/* harmony import */ var _src_pro_bybit_js__WEBPACK_IMPORTED_MODULE_121__ = __webpack_require__(5030);
|
|
287855
|
+
/* harmony import */ var _src_pro_cex_js__WEBPACK_IMPORTED_MODULE_122__ = __webpack_require__(5272);
|
|
287856
|
+
/* harmony import */ var _src_pro_coinbase_js__WEBPACK_IMPORTED_MODULE_123__ = __webpack_require__(3414);
|
|
287857
|
+
/* harmony import */ var _src_pro_coinbaseprime_js__WEBPACK_IMPORTED_MODULE_124__ = __webpack_require__(3848);
|
|
287858
|
+
/* harmony import */ var _src_pro_coinbasepro_js__WEBPACK_IMPORTED_MODULE_125__ = __webpack_require__(8368);
|
|
287859
|
+
/* harmony import */ var _src_pro_coinex_js__WEBPACK_IMPORTED_MODULE_126__ = __webpack_require__(204);
|
|
287860
|
+
/* harmony import */ var _src_pro_cryptocom_js__WEBPACK_IMPORTED_MODULE_127__ = __webpack_require__(6820);
|
|
287861
|
+
/* harmony import */ var _src_pro_currencycom_js__WEBPACK_IMPORTED_MODULE_128__ = __webpack_require__(2952);
|
|
287862
|
+
/* harmony import */ var _src_pro_deribit_js__WEBPACK_IMPORTED_MODULE_129__ = __webpack_require__(1788);
|
|
287863
|
+
/* harmony import */ var _src_pro_exmo_js__WEBPACK_IMPORTED_MODULE_130__ = __webpack_require__(9004);
|
|
287864
|
+
/* harmony import */ var _src_pro_gate_js__WEBPACK_IMPORTED_MODULE_131__ = __webpack_require__(8335);
|
|
287865
|
+
/* harmony import */ var _src_pro_gateio_js__WEBPACK_IMPORTED_MODULE_132__ = __webpack_require__(1465);
|
|
287866
|
+
/* harmony import */ var _src_pro_gemini_js__WEBPACK_IMPORTED_MODULE_133__ = __webpack_require__(9488);
|
|
287867
|
+
/* harmony import */ var _src_pro_hitbtc_js__WEBPACK_IMPORTED_MODULE_134__ = __webpack_require__(5189);
|
|
287868
|
+
/* harmony import */ var _src_pro_hollaex_js__WEBPACK_IMPORTED_MODULE_135__ = __webpack_require__(8559);
|
|
287869
|
+
/* harmony import */ var _src_pro_htx_js__WEBPACK_IMPORTED_MODULE_136__ = __webpack_require__(7474);
|
|
287870
|
+
/* harmony import */ var _src_pro_huobi_js__WEBPACK_IMPORTED_MODULE_137__ = __webpack_require__(8384);
|
|
287871
|
+
/* harmony import */ var _src_pro_huobijp_js__WEBPACK_IMPORTED_MODULE_138__ = __webpack_require__(9021);
|
|
287872
|
+
/* harmony import */ var _src_pro_idex_js__WEBPACK_IMPORTED_MODULE_139__ = __webpack_require__(3484);
|
|
287873
|
+
/* harmony import */ var _src_pro_independentreserve_js__WEBPACK_IMPORTED_MODULE_140__ = __webpack_require__(1311);
|
|
287874
|
+
/* harmony import */ var _src_pro_kraken_js__WEBPACK_IMPORTED_MODULE_141__ = __webpack_require__(736);
|
|
287875
|
+
/* harmony import */ var _src_pro_krakenfutures_js__WEBPACK_IMPORTED_MODULE_142__ = __webpack_require__(449);
|
|
287876
|
+
/* harmony import */ var _src_pro_kucoin_js__WEBPACK_IMPORTED_MODULE_143__ = __webpack_require__(2387);
|
|
287877
|
+
/* harmony import */ var _src_pro_kucoinfutures_js__WEBPACK_IMPORTED_MODULE_144__ = __webpack_require__(7181);
|
|
287878
|
+
/* harmony import */ var _src_pro_luno_js__WEBPACK_IMPORTED_MODULE_145__ = __webpack_require__(627);
|
|
287879
|
+
/* harmony import */ var _src_pro_mexc_js__WEBPACK_IMPORTED_MODULE_146__ = __webpack_require__(6484);
|
|
287880
|
+
/* harmony import */ var _src_pro_ndax_js__WEBPACK_IMPORTED_MODULE_147__ = __webpack_require__(8080);
|
|
287881
|
+
/* harmony import */ var _src_pro_okcoin_js__WEBPACK_IMPORTED_MODULE_148__ = __webpack_require__(7105);
|
|
287882
|
+
/* harmony import */ var _src_pro_okx_js__WEBPACK_IMPORTED_MODULE_149__ = __webpack_require__(2214);
|
|
287883
|
+
/* harmony import */ var _src_pro_phemex_js__WEBPACK_IMPORTED_MODULE_150__ = __webpack_require__(4360);
|
|
287884
|
+
/* harmony import */ var _src_pro_poloniex_js__WEBPACK_IMPORTED_MODULE_151__ = __webpack_require__(7924);
|
|
287885
|
+
/* harmony import */ var _src_pro_poloniexfutures_js__WEBPACK_IMPORTED_MODULE_152__ = __webpack_require__(3541);
|
|
287886
|
+
/* harmony import */ var _src_pro_probit_js__WEBPACK_IMPORTED_MODULE_153__ = __webpack_require__(9782);
|
|
287887
|
+
/* harmony import */ var _src_pro_upbit_js__WEBPACK_IMPORTED_MODULE_154__ = __webpack_require__(7614);
|
|
287888
|
+
/* harmony import */ var _src_pro_wazirx_js__WEBPACK_IMPORTED_MODULE_155__ = __webpack_require__(4828);
|
|
287889
|
+
/* harmony import */ var _src_pro_whitebit_js__WEBPACK_IMPORTED_MODULE_156__ = __webpack_require__(5630);
|
|
287890
|
+
/* harmony import */ var _src_pro_woo_js__WEBPACK_IMPORTED_MODULE_157__ = __webpack_require__(3910);
|
|
288520
287891
|
/*
|
|
288521
287892
|
|
|
288522
287893
|
MIT License
|
|
@@ -288551,7 +287922,7 @@ SOFTWARE.
|
|
|
288551
287922
|
|
|
288552
287923
|
//-----------------------------------------------------------------------------
|
|
288553
287924
|
// this is updated by vss.js when building
|
|
288554
|
-
const version = '4.1.
|
|
287925
|
+
const version = '4.1.74';
|
|
288555
287926
|
_src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e.ccxtVersion = version;
|
|
288556
287927
|
//-----------------------------------------------------------------------------
|
|
288557
287928
|
|
|
@@ -288651,7 +288022,6 @@ _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e.ccxtVersion
|
|
|
288651
288022
|
|
|
288652
288023
|
|
|
288653
288024
|
|
|
288654
|
-
|
|
288655
288025
|
|
|
288656
288026
|
|
|
288657
288027
|
// pro exchanges
|
|
@@ -288803,77 +288173,76 @@ const exchanges = {
|
|
|
288803
288173
|
'poloniex': _src_poloniex_js__WEBPACK_IMPORTED_MODULE_87__/* ["default"] */ .Z,
|
|
288804
288174
|
'poloniexfutures': _src_poloniexfutures_js__WEBPACK_IMPORTED_MODULE_88__/* ["default"] */ .Z,
|
|
288805
288175
|
'probit': _src_probit_js__WEBPACK_IMPORTED_MODULE_89__/* ["default"] */ .Z,
|
|
288806
|
-
'
|
|
288807
|
-
'
|
|
288808
|
-
'
|
|
288809
|
-
'
|
|
288810
|
-
'
|
|
288811
|
-
'
|
|
288812
|
-
'
|
|
288813
|
-
'
|
|
288814
|
-
'
|
|
288815
|
-
'
|
|
288816
|
-
'zonda': _src_zonda_js__WEBPACK_IMPORTED_MODULE_100__/* ["default"] */ .Z,
|
|
288176
|
+
'timex': _src_timex_js__WEBPACK_IMPORTED_MODULE_90__/* ["default"] */ .Z,
|
|
288177
|
+
'tokocrypto': _src_tokocrypto_js__WEBPACK_IMPORTED_MODULE_91__/* ["default"] */ .Z,
|
|
288178
|
+
'upbit': _src_upbit_js__WEBPACK_IMPORTED_MODULE_92__/* ["default"] */ .Z,
|
|
288179
|
+
'wavesexchange': _src_wavesexchange_js__WEBPACK_IMPORTED_MODULE_93__/* ["default"] */ .Z,
|
|
288180
|
+
'wazirx': _src_wazirx_js__WEBPACK_IMPORTED_MODULE_94__/* ["default"] */ .Z,
|
|
288181
|
+
'whitebit': _src_whitebit_js__WEBPACK_IMPORTED_MODULE_95__/* ["default"] */ .Z,
|
|
288182
|
+
'woo': _src_woo_js__WEBPACK_IMPORTED_MODULE_96__/* ["default"] */ .Z,
|
|
288183
|
+
'yobit': _src_yobit_js__WEBPACK_IMPORTED_MODULE_97__/* ["default"] */ .Z,
|
|
288184
|
+
'zaif': _src_zaif_js__WEBPACK_IMPORTED_MODULE_98__/* ["default"] */ .Z,
|
|
288185
|
+
'zonda': _src_zonda_js__WEBPACK_IMPORTED_MODULE_99__/* ["default"] */ .Z,
|
|
288817
288186
|
};
|
|
288818
288187
|
const pro = {
|
|
288819
|
-
'alpaca':
|
|
288820
|
-
'ascendex':
|
|
288821
|
-
'bequant':
|
|
288822
|
-
'binance':
|
|
288823
|
-
'binancecoinm':
|
|
288824
|
-
'binanceus':
|
|
288825
|
-
'binanceusdm':
|
|
288826
|
-
'bingx':
|
|
288827
|
-
'bitcoincom':
|
|
288828
|
-
'bitfinex':
|
|
288829
|
-
'bitfinex2':
|
|
288830
|
-
'bitget':
|
|
288831
|
-
'bitmart':
|
|
288832
|
-
'bitmex':
|
|
288833
|
-
'bitopro':
|
|
288834
|
-
'bitpanda':
|
|
288835
|
-
'bitrue':
|
|
288836
|
-
'bitstamp':
|
|
288837
|
-
'bittrex':
|
|
288838
|
-
'bitvavo':
|
|
288839
|
-
'blockchaincom':
|
|
288840
|
-
'bybit':
|
|
288841
|
-
'cex':
|
|
288842
|
-
'coinbase':
|
|
288843
|
-
'coinbaseprime':
|
|
288844
|
-
'coinbasepro':
|
|
288845
|
-
'coinex':
|
|
288846
|
-
'cryptocom':
|
|
288847
|
-
'currencycom':
|
|
288848
|
-
'deribit':
|
|
288849
|
-
'exmo':
|
|
288850
|
-
'gate':
|
|
288851
|
-
'gateio':
|
|
288852
|
-
'gemini':
|
|
288853
|
-
'hitbtc':
|
|
288854
|
-
'hollaex':
|
|
288855
|
-
'htx':
|
|
288856
|
-
'huobi':
|
|
288857
|
-
'huobijp':
|
|
288858
|
-
'idex':
|
|
288859
|
-
'independentreserve':
|
|
288860
|
-
'kraken':
|
|
288861
|
-
'krakenfutures':
|
|
288862
|
-
'kucoin':
|
|
288863
|
-
'kucoinfutures':
|
|
288864
|
-
'luno':
|
|
288865
|
-
'mexc':
|
|
288866
|
-
'ndax':
|
|
288867
|
-
'okcoin':
|
|
288868
|
-
'okx':
|
|
288869
|
-
'phemex':
|
|
288870
|
-
'poloniex':
|
|
288871
|
-
'poloniexfutures':
|
|
288872
|
-
'probit':
|
|
288873
|
-
'upbit':
|
|
288874
|
-
'wazirx':
|
|
288875
|
-
'whitebit':
|
|
288876
|
-
'woo':
|
|
288188
|
+
'alpaca': _src_pro_alpaca_js__WEBPACK_IMPORTED_MODULE_100__/* ["default"] */ .Z,
|
|
288189
|
+
'ascendex': _src_pro_ascendex_js__WEBPACK_IMPORTED_MODULE_101__/* ["default"] */ .Z,
|
|
288190
|
+
'bequant': _src_pro_bequant_js__WEBPACK_IMPORTED_MODULE_102__/* ["default"] */ .Z,
|
|
288191
|
+
'binance': _src_pro_binance_js__WEBPACK_IMPORTED_MODULE_103__/* ["default"] */ .Z,
|
|
288192
|
+
'binancecoinm': _src_pro_binancecoinm_js__WEBPACK_IMPORTED_MODULE_104__/* ["default"] */ .Z,
|
|
288193
|
+
'binanceus': _src_pro_binanceus_js__WEBPACK_IMPORTED_MODULE_105__/* ["default"] */ .Z,
|
|
288194
|
+
'binanceusdm': _src_pro_binanceusdm_js__WEBPACK_IMPORTED_MODULE_106__/* ["default"] */ .Z,
|
|
288195
|
+
'bingx': _src_pro_bingx_js__WEBPACK_IMPORTED_MODULE_107__/* ["default"] */ .Z,
|
|
288196
|
+
'bitcoincom': _src_pro_bitcoincom_js__WEBPACK_IMPORTED_MODULE_108__/* ["default"] */ .Z,
|
|
288197
|
+
'bitfinex': _src_pro_bitfinex_js__WEBPACK_IMPORTED_MODULE_109__/* ["default"] */ .Z,
|
|
288198
|
+
'bitfinex2': _src_pro_bitfinex2_js__WEBPACK_IMPORTED_MODULE_110__/* ["default"] */ .Z,
|
|
288199
|
+
'bitget': _src_pro_bitget_js__WEBPACK_IMPORTED_MODULE_111__/* ["default"] */ .Z,
|
|
288200
|
+
'bitmart': _src_pro_bitmart_js__WEBPACK_IMPORTED_MODULE_112__/* ["default"] */ .Z,
|
|
288201
|
+
'bitmex': _src_pro_bitmex_js__WEBPACK_IMPORTED_MODULE_113__/* ["default"] */ .Z,
|
|
288202
|
+
'bitopro': _src_pro_bitopro_js__WEBPACK_IMPORTED_MODULE_114__/* ["default"] */ .Z,
|
|
288203
|
+
'bitpanda': _src_pro_bitpanda_js__WEBPACK_IMPORTED_MODULE_115__/* ["default"] */ .Z,
|
|
288204
|
+
'bitrue': _src_pro_bitrue_js__WEBPACK_IMPORTED_MODULE_116__/* ["default"] */ .Z,
|
|
288205
|
+
'bitstamp': _src_pro_bitstamp_js__WEBPACK_IMPORTED_MODULE_117__/* ["default"] */ .Z,
|
|
288206
|
+
'bittrex': _src_pro_bittrex_js__WEBPACK_IMPORTED_MODULE_118__/* ["default"] */ .Z,
|
|
288207
|
+
'bitvavo': _src_pro_bitvavo_js__WEBPACK_IMPORTED_MODULE_119__/* ["default"] */ .Z,
|
|
288208
|
+
'blockchaincom': _src_pro_blockchaincom_js__WEBPACK_IMPORTED_MODULE_120__/* ["default"] */ .Z,
|
|
288209
|
+
'bybit': _src_pro_bybit_js__WEBPACK_IMPORTED_MODULE_121__/* ["default"] */ .Z,
|
|
288210
|
+
'cex': _src_pro_cex_js__WEBPACK_IMPORTED_MODULE_122__/* ["default"] */ .Z,
|
|
288211
|
+
'coinbase': _src_pro_coinbase_js__WEBPACK_IMPORTED_MODULE_123__/* ["default"] */ .Z,
|
|
288212
|
+
'coinbaseprime': _src_pro_coinbaseprime_js__WEBPACK_IMPORTED_MODULE_124__/* ["default"] */ .Z,
|
|
288213
|
+
'coinbasepro': _src_pro_coinbasepro_js__WEBPACK_IMPORTED_MODULE_125__/* ["default"] */ .Z,
|
|
288214
|
+
'coinex': _src_pro_coinex_js__WEBPACK_IMPORTED_MODULE_126__/* ["default"] */ .Z,
|
|
288215
|
+
'cryptocom': _src_pro_cryptocom_js__WEBPACK_IMPORTED_MODULE_127__/* ["default"] */ .Z,
|
|
288216
|
+
'currencycom': _src_pro_currencycom_js__WEBPACK_IMPORTED_MODULE_128__/* ["default"] */ .Z,
|
|
288217
|
+
'deribit': _src_pro_deribit_js__WEBPACK_IMPORTED_MODULE_129__/* ["default"] */ .Z,
|
|
288218
|
+
'exmo': _src_pro_exmo_js__WEBPACK_IMPORTED_MODULE_130__/* ["default"] */ .Z,
|
|
288219
|
+
'gate': _src_pro_gate_js__WEBPACK_IMPORTED_MODULE_131__/* ["default"] */ .Z,
|
|
288220
|
+
'gateio': _src_pro_gateio_js__WEBPACK_IMPORTED_MODULE_132__/* ["default"] */ .Z,
|
|
288221
|
+
'gemini': _src_pro_gemini_js__WEBPACK_IMPORTED_MODULE_133__/* ["default"] */ .Z,
|
|
288222
|
+
'hitbtc': _src_pro_hitbtc_js__WEBPACK_IMPORTED_MODULE_134__/* ["default"] */ .Z,
|
|
288223
|
+
'hollaex': _src_pro_hollaex_js__WEBPACK_IMPORTED_MODULE_135__/* ["default"] */ .Z,
|
|
288224
|
+
'htx': _src_pro_htx_js__WEBPACK_IMPORTED_MODULE_136__/* ["default"] */ .Z,
|
|
288225
|
+
'huobi': _src_pro_huobi_js__WEBPACK_IMPORTED_MODULE_137__/* ["default"] */ .Z,
|
|
288226
|
+
'huobijp': _src_pro_huobijp_js__WEBPACK_IMPORTED_MODULE_138__/* ["default"] */ .Z,
|
|
288227
|
+
'idex': _src_pro_idex_js__WEBPACK_IMPORTED_MODULE_139__/* ["default"] */ .Z,
|
|
288228
|
+
'independentreserve': _src_pro_independentreserve_js__WEBPACK_IMPORTED_MODULE_140__/* ["default"] */ .Z,
|
|
288229
|
+
'kraken': _src_pro_kraken_js__WEBPACK_IMPORTED_MODULE_141__/* ["default"] */ .Z,
|
|
288230
|
+
'krakenfutures': _src_pro_krakenfutures_js__WEBPACK_IMPORTED_MODULE_142__/* ["default"] */ .Z,
|
|
288231
|
+
'kucoin': _src_pro_kucoin_js__WEBPACK_IMPORTED_MODULE_143__/* ["default"] */ .Z,
|
|
288232
|
+
'kucoinfutures': _src_pro_kucoinfutures_js__WEBPACK_IMPORTED_MODULE_144__/* ["default"] */ .Z,
|
|
288233
|
+
'luno': _src_pro_luno_js__WEBPACK_IMPORTED_MODULE_145__/* ["default"] */ .Z,
|
|
288234
|
+
'mexc': _src_pro_mexc_js__WEBPACK_IMPORTED_MODULE_146__/* ["default"] */ .Z,
|
|
288235
|
+
'ndax': _src_pro_ndax_js__WEBPACK_IMPORTED_MODULE_147__/* ["default"] */ .Z,
|
|
288236
|
+
'okcoin': _src_pro_okcoin_js__WEBPACK_IMPORTED_MODULE_148__/* ["default"] */ .Z,
|
|
288237
|
+
'okx': _src_pro_okx_js__WEBPACK_IMPORTED_MODULE_149__/* ["default"] */ .Z,
|
|
288238
|
+
'phemex': _src_pro_phemex_js__WEBPACK_IMPORTED_MODULE_150__/* ["default"] */ .Z,
|
|
288239
|
+
'poloniex': _src_pro_poloniex_js__WEBPACK_IMPORTED_MODULE_151__/* ["default"] */ .Z,
|
|
288240
|
+
'poloniexfutures': _src_pro_poloniexfutures_js__WEBPACK_IMPORTED_MODULE_152__/* ["default"] */ .Z,
|
|
288241
|
+
'probit': _src_pro_probit_js__WEBPACK_IMPORTED_MODULE_153__/* ["default"] */ .Z,
|
|
288242
|
+
'upbit': _src_pro_upbit_js__WEBPACK_IMPORTED_MODULE_154__/* ["default"] */ .Z,
|
|
288243
|
+
'wazirx': _src_pro_wazirx_js__WEBPACK_IMPORTED_MODULE_155__/* ["default"] */ .Z,
|
|
288244
|
+
'whitebit': _src_pro_whitebit_js__WEBPACK_IMPORTED_MODULE_156__/* ["default"] */ .Z,
|
|
288245
|
+
'woo': _src_pro_woo_js__WEBPACK_IMPORTED_MODULE_157__/* ["default"] */ .Z,
|
|
288877
288246
|
};
|
|
288878
288247
|
for (const exchange in pro) {
|
|
288879
288248
|
// const ccxtExchange = exchanges[exchange]
|
|
@@ -288886,7 +288255,7 @@ for (const exchange in pro) {
|
|
|
288886
288255
|
pro.exchanges = Object.keys(pro);
|
|
288887
288256
|
pro['Exchange'] = _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e; // now the same for rest and ts
|
|
288888
288257
|
//-----------------------------------------------------------------------------
|
|
288889
|
-
const ccxt = Object.assign({ version, Exchange: _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e, Precise:
|
|
288258
|
+
const ccxt = Object.assign({ version, Exchange: _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e, Precise: _src_base_Precise_js__WEBPACK_IMPORTED_MODULE_158__/* .Precise */ .O, 'exchanges': Object.keys(exchanges), 'pro': pro }, exchanges, _src_base_functions_js__WEBPACK_IMPORTED_MODULE_159__, _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__);
|
|
288890
288259
|
|
|
288891
288260
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ccxt);
|
|
288892
288261
|
//-----------------------------------------------------------------------------
|