ccxt 4.1.73 → 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 +699 -1337
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -4
- package/dist/cjs/src/base/Exchange.js +25 -2
- package/dist/cjs/src/bybit.js +30 -7
- package/dist/cjs/src/cex.js +61 -3
- package/dist/cjs/src/exmo.js +34 -31
- package/dist/cjs/src/kraken.js +2 -0
- 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 +2 -0
- package/js/src/base/Exchange.js +25 -2
- 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/exmo.d.ts +1 -1
- package/js/src/exmo.js +34 -31
- package/js/src/kraken.js +2 -0
- 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 = {}) {
|
|
@@ -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
|
|
@@ -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
|
|
@@ -185352,6 +185445,8 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
185352
185445
|
'cancelOrder': true,
|
|
185353
185446
|
'cancelOrders': true,
|
|
185354
185447
|
'createDepositAddress': false,
|
|
185448
|
+
'createMarketBuyOrderWithCost': true,
|
|
185449
|
+
'createMarketSellOrderWithCost': true,
|
|
185355
185450
|
'createOrder': true,
|
|
185356
185451
|
'createOrders': true,
|
|
185357
185452
|
'createPostOnlyOrder': true,
|
|
@@ -187806,6 +187901,46 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
187806
187901
|
//
|
|
187807
187902
|
return this.parseBalanceByType(marketType, response);
|
|
187808
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
|
+
}
|
|
187809
187944
|
createOrderRequest(symbol, type, side, amount, price = undefined, params = {}) {
|
|
187810
187945
|
const market = this.market(symbol);
|
|
187811
187946
|
const request = {
|
|
@@ -187899,8 +188034,10 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
187899
188034
|
// see documentation: https://www.okx.com/docs-v5/en/#rest-api-trade-place-order
|
|
187900
188035
|
if (tgtCcy === 'quote_ccy') {
|
|
187901
188036
|
// quote_ccy: sz refers to units of quote currency
|
|
188037
|
+
let createMarketBuyOrderRequiresPrice = true;
|
|
188038
|
+
[createMarketBuyOrderRequiresPrice, params] = this.handleOptionAndParams(params, 'createOrder', 'createMarketBuyOrderRequiresPrice', true);
|
|
187902
188039
|
let notional = this.safeNumber2(params, 'cost', 'sz');
|
|
187903
|
-
|
|
188040
|
+
params = this.omit(params, ['cost', 'sz']);
|
|
187904
188041
|
if (createMarketBuyOrderRequiresPrice) {
|
|
187905
188042
|
if (price !== undefined) {
|
|
187906
188043
|
if (notional === undefined) {
|
|
@@ -187918,7 +188055,6 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
187918
188055
|
notional = (notional === undefined) ? amount : notional;
|
|
187919
188056
|
}
|
|
187920
188057
|
request['sz'] = this.costToPrecision(symbol, notional);
|
|
187921
|
-
params = this.omit(params, ['cost', 'sz']);
|
|
187922
188058
|
}
|
|
187923
188059
|
}
|
|
187924
188060
|
if (marketIOC && contract) {
|
|
@@ -221373,10 +221509,10 @@ class bybit extends _bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
221373
221509
|
/* harmony export */ Z: () => (/* binding */ cex)
|
|
221374
221510
|
/* harmony export */ });
|
|
221375
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);
|
|
221376
221513
|
/* harmony import */ var _base_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6689);
|
|
221377
221514
|
/* harmony import */ var _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2194);
|
|
221378
221515
|
/* harmony import */ var _base_ws_Cache_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3020);
|
|
221379
|
-
/* harmony import */ var _static_dependencies_noble_hashes_sha256_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1372);
|
|
221380
221516
|
// ---------------------------------------------------------------------------
|
|
221381
221517
|
|
|
221382
221518
|
|
|
@@ -221398,6 +221534,14 @@ class cex extends _cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
221398
221534
|
'watchOrderBook': true,
|
|
221399
221535
|
'watchOHLCV': true,
|
|
221400
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,
|
|
221401
221545
|
},
|
|
221402
221546
|
'urls': {
|
|
221403
221547
|
'api': {
|
|
@@ -221414,7 +221558,7 @@ class cex extends _cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
221414
221558
|
requestId() {
|
|
221415
221559
|
const requestId = this.sum(this.safeInteger(this.options, 'requestId', 0), 1);
|
|
221416
221560
|
this.options['requestId'] = requestId;
|
|
221417
|
-
return requestId;
|
|
221561
|
+
return requestId.toString();
|
|
221418
221562
|
}
|
|
221419
221563
|
async watchBalance(params = {}) {
|
|
221420
221564
|
/**
|
|
@@ -221426,7 +221570,7 @@ class cex extends _cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
221426
221570
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
221427
221571
|
*/
|
|
221428
221572
|
await this.authenticate(params);
|
|
221429
|
-
const messageHash =
|
|
221573
|
+
const messageHash = this.requestId();
|
|
221430
221574
|
const url = this.urls['api']['ws'];
|
|
221431
221575
|
const subscribe = {
|
|
221432
221576
|
'e': 'get-balance',
|
|
@@ -221473,7 +221617,8 @@ class cex extends _cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
221473
221617
|
result[code] = account;
|
|
221474
221618
|
}
|
|
221475
221619
|
this.balance = this.safeBalance(result);
|
|
221476
|
-
|
|
221620
|
+
const messageHash = this.safeString(message, 'oid');
|
|
221621
|
+
client.resolve(this.balance, messageHash);
|
|
221477
221622
|
}
|
|
221478
221623
|
async watchTrades(symbol, since = undefined, limit = undefined, params = {}) {
|
|
221479
221624
|
/**
|
|
@@ -221663,6 +221808,27 @@ class cex extends _cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
221663
221808
|
}
|
|
221664
221809
|
return this.filterByArray(this.tickers, 'symbol', symbols);
|
|
221665
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
|
+
}
|
|
221666
221832
|
handleTicker(client, message) {
|
|
221667
221833
|
//
|
|
221668
221834
|
// {
|
|
@@ -221679,10 +221845,12 @@ class cex extends _cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
221679
221845
|
const data = this.safeValue(message, 'data', {});
|
|
221680
221846
|
const ticker = this.parseWsTicker(data);
|
|
221681
221847
|
const symbol = ticker['symbol'];
|
|
221682
|
-
const messageHash = 'ticker:' + symbol;
|
|
221683
221848
|
this.tickers[symbol] = ticker;
|
|
221849
|
+
let messageHash = 'ticker:' + symbol;
|
|
221684
221850
|
client.resolve(ticker, messageHash);
|
|
221685
221851
|
client.resolve(ticker, 'tickers');
|
|
221852
|
+
messageHash = this.safeString(message, 'oid');
|
|
221853
|
+
client.resolve(ticker, messageHash);
|
|
221686
221854
|
}
|
|
221687
221855
|
parseWsTicker(ticker, market = undefined) {
|
|
221688
221856
|
//
|
|
@@ -221747,6 +221915,25 @@ class cex extends _cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
221747
221915
|
'info': ticker,
|
|
221748
221916
|
}, market);
|
|
221749
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
|
+
}
|
|
221750
221937
|
async watchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
221751
221938
|
/**
|
|
221752
221939
|
* @method
|
|
@@ -222035,7 +222222,8 @@ class cex extends _cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
222035
222222
|
const limit = this.safeInteger(this.options, 'ordersLimit', 1000);
|
|
222036
222223
|
this.orders = new _base_ws_Cache_js__WEBPACK_IMPORTED_MODULE_2__/* .ArrayCacheBySymbolById */ .hl(limit);
|
|
222037
222224
|
}
|
|
222038
|
-
const
|
|
222225
|
+
const storedOrders = this.orders;
|
|
222226
|
+
const ordersBySymbol = this.safeValue(storedOrders.hashmap, symbol, {});
|
|
222039
222227
|
let order = this.safeValue(ordersBySymbol, orderId);
|
|
222040
222228
|
if (order === undefined) {
|
|
222041
222229
|
order = this.parseWsOrderUpdate(data, market);
|
|
@@ -222060,7 +222248,6 @@ class cex extends _cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
222060
222248
|
order['timestamp'] = timestamp;
|
|
222061
222249
|
order['datetime'] = this.iso8601(timestamp);
|
|
222062
222250
|
order = this.safeOrder(order);
|
|
222063
|
-
const storedOrders = this.orders;
|
|
222064
222251
|
storedOrders.append(order);
|
|
222065
222252
|
const messageHash = 'orders:' + symbol;
|
|
222066
222253
|
client.resolve(storedOrders, messageHash);
|
|
@@ -222121,7 +222308,10 @@ class cex extends _cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
222121
222308
|
}
|
|
222122
222309
|
const base = this.safeCurrencyCode(baseId);
|
|
222123
222310
|
const quote = this.safeCurrencyCode(quoteId);
|
|
222124
|
-
|
|
222311
|
+
let symbol = undefined;
|
|
222312
|
+
if (base !== undefined && quote !== undefined) {
|
|
222313
|
+
symbol = base + '/' + quote;
|
|
222314
|
+
}
|
|
222125
222315
|
market = this.safeMarket(symbol, market);
|
|
222126
222316
|
const time = this.safeInteger(order, 'time', this.milliseconds());
|
|
222127
222317
|
let timestamp = time;
|
|
@@ -222486,6 +222676,236 @@ class cex extends _cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
222486
222676
|
client.resolve(stored, messageHash);
|
|
222487
222677
|
}
|
|
222488
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
|
+
}
|
|
222489
222909
|
handleConnected(client, message) {
|
|
222490
222910
|
//
|
|
222491
222911
|
// {
|
|
@@ -222503,7 +222923,25 @@ class cex extends _cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
222503
222923
|
// "ok": "error"
|
|
222504
222924
|
// }
|
|
222505
222925
|
//
|
|
222506
|
-
|
|
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
|
+
}
|
|
222507
222945
|
}
|
|
222508
222946
|
handleMessage(client, message) {
|
|
222509
222947
|
const ok = this.safeString(message, 'ok');
|
|
@@ -222523,11 +222961,16 @@ class cex extends _cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
222523
222961
|
'get-balance': this.handleBalance,
|
|
222524
222962
|
'order-book-subscribe': this.handleOrderBookSnapshot,
|
|
222525
222963
|
'md_update': this.handleOrderBookUpdate,
|
|
222526
|
-
'open-orders': this.
|
|
222964
|
+
'open-orders': this.resolveData,
|
|
222527
222965
|
'order': this.handleOrderUpdate,
|
|
222528
222966
|
'history-update': this.handleTrade,
|
|
222529
222967
|
'history': this.handleTradesSnapshot,
|
|
222530
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,
|
|
222531
222974
|
};
|
|
222532
222975
|
const handler = this.safeValue(handlers, event);
|
|
222533
222976
|
if (handler !== undefined) {
|
|
@@ -263508,1083 +263951,6 @@ const stringToBytes = (type, str) => {
|
|
|
263508
263951
|
const bytes = (/* unused pure expression or super */ null && (stringToBytes));
|
|
263509
263952
|
|
|
263510
263953
|
|
|
263511
|
-
/***/ }),
|
|
263512
|
-
|
|
263513
|
-
/***/ 4224:
|
|
263514
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
263515
|
-
|
|
263516
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
263517
|
-
/* harmony export */ Z: () => (/* binding */ tidex)
|
|
263518
|
-
/* harmony export */ });
|
|
263519
|
-
/* harmony import */ var _abstract_tidex_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6057);
|
|
263520
|
-
/* harmony import */ var _base_errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6689);
|
|
263521
|
-
/* harmony import */ var _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2194);
|
|
263522
|
-
/* harmony import */ var _base_functions_number_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9292);
|
|
263523
|
-
/* harmony import */ var _static_dependencies_noble_hashes_sha512_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7110);
|
|
263524
|
-
|
|
263525
|
-
|
|
263526
|
-
|
|
263527
|
-
|
|
263528
|
-
|
|
263529
|
-
/**
|
|
263530
|
-
* @class tidex
|
|
263531
|
-
* @extends Exchange
|
|
263532
|
-
*/
|
|
263533
|
-
class tidex extends _abstract_tidex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
263534
|
-
describe() {
|
|
263535
|
-
return this.deepExtend(super.describe(), {
|
|
263536
|
-
'id': 'tidex',
|
|
263537
|
-
'name': 'Tidex',
|
|
263538
|
-
'countries': ['UK'],
|
|
263539
|
-
'rateLimit': 2000,
|
|
263540
|
-
'version': '3',
|
|
263541
|
-
'userAgent': this.userAgents['chrome'],
|
|
263542
|
-
'has': {
|
|
263543
|
-
'CORS': undefined,
|
|
263544
|
-
'spot': true,
|
|
263545
|
-
'margin': false,
|
|
263546
|
-
'swap': false,
|
|
263547
|
-
'future': false,
|
|
263548
|
-
'option': false,
|
|
263549
|
-
'addMargin': false,
|
|
263550
|
-
'cancelOrder': true,
|
|
263551
|
-
'createMarketOrder': false,
|
|
263552
|
-
'createOrder': true,
|
|
263553
|
-
'createReduceOnlyOrder': false,
|
|
263554
|
-
'fetchBalance': true,
|
|
263555
|
-
'fetchBorrowRateHistories': false,
|
|
263556
|
-
'fetchBorrowRateHistory': false,
|
|
263557
|
-
'fetchCrossBorrowRate': false,
|
|
263558
|
-
'fetchCrossBorrowRates': false,
|
|
263559
|
-
'fetchCurrencies': true,
|
|
263560
|
-
'fetchFundingHistory': false,
|
|
263561
|
-
'fetchFundingRate': false,
|
|
263562
|
-
'fetchFundingRateHistory': false,
|
|
263563
|
-
'fetchFundingRates': false,
|
|
263564
|
-
'fetchIndexOHLCV': false,
|
|
263565
|
-
'fetchIsolatedBorrowRate': false,
|
|
263566
|
-
'fetchIsolatedBorrowRates': false,
|
|
263567
|
-
'fetchLeverage': false,
|
|
263568
|
-
'fetchLeverageTiers': false,
|
|
263569
|
-
'fetchMarginMode': false,
|
|
263570
|
-
'fetchMarkets': true,
|
|
263571
|
-
'fetchMarkOHLCV': false,
|
|
263572
|
-
'fetchMyTrades': true,
|
|
263573
|
-
'fetchOpenInterestHistory': false,
|
|
263574
|
-
'fetchOpenOrders': true,
|
|
263575
|
-
'fetchOrder': true,
|
|
263576
|
-
'fetchOrderBook': true,
|
|
263577
|
-
'fetchOrderBooks': true,
|
|
263578
|
-
'fetchPosition': false,
|
|
263579
|
-
'fetchPositionMode': false,
|
|
263580
|
-
'fetchPositions': false,
|
|
263581
|
-
'fetchPositionsRisk': false,
|
|
263582
|
-
'fetchPremiumIndexOHLCV': false,
|
|
263583
|
-
'fetchTicker': true,
|
|
263584
|
-
'fetchTickers': true,
|
|
263585
|
-
'fetchTrades': true,
|
|
263586
|
-
'reduceMargin': false,
|
|
263587
|
-
'setLeverage': false,
|
|
263588
|
-
'setMarginMode': false,
|
|
263589
|
-
'setPositionMode': false,
|
|
263590
|
-
'withdraw': true,
|
|
263591
|
-
},
|
|
263592
|
-
'urls': {
|
|
263593
|
-
'logo': 'https://user-images.githubusercontent.com/1294454/30781780-03149dc4-a12e-11e7-82bb-313b269d24d4.jpg',
|
|
263594
|
-
'api': {
|
|
263595
|
-
'web': 'https://gate.tidex.com/api',
|
|
263596
|
-
'public': 'https://api.tidex.com/api/3',
|
|
263597
|
-
'private': 'https://api.tidex.com/tapi',
|
|
263598
|
-
},
|
|
263599
|
-
'www': 'https://tidex.com',
|
|
263600
|
-
'doc': 'https://tidex.com/exchange/public-api',
|
|
263601
|
-
'referral': 'https://tidex.com/exchange',
|
|
263602
|
-
'fees': [
|
|
263603
|
-
'https://tidex.com/exchange/assets-spec',
|
|
263604
|
-
'https://tidex.com/exchange/pairs-spec',
|
|
263605
|
-
],
|
|
263606
|
-
},
|
|
263607
|
-
'api': {
|
|
263608
|
-
'web': {
|
|
263609
|
-
'get': [
|
|
263610
|
-
'currency',
|
|
263611
|
-
'pairs',
|
|
263612
|
-
'tickers',
|
|
263613
|
-
'orders',
|
|
263614
|
-
'ordershistory',
|
|
263615
|
-
'trade-data',
|
|
263616
|
-
'trade-data/{id}',
|
|
263617
|
-
],
|
|
263618
|
-
},
|
|
263619
|
-
'public': {
|
|
263620
|
-
'get': [
|
|
263621
|
-
'info',
|
|
263622
|
-
'ticker/{pair}',
|
|
263623
|
-
'depth/{pair}',
|
|
263624
|
-
'trades/{pair}',
|
|
263625
|
-
],
|
|
263626
|
-
},
|
|
263627
|
-
'private': {
|
|
263628
|
-
'post': [
|
|
263629
|
-
'getInfoExt',
|
|
263630
|
-
'getInfo',
|
|
263631
|
-
'Trade',
|
|
263632
|
-
'ActiveOrders',
|
|
263633
|
-
'OrderInfo',
|
|
263634
|
-
'CancelOrder',
|
|
263635
|
-
'TradeHistory',
|
|
263636
|
-
'getDepositAddress',
|
|
263637
|
-
'createWithdraw',
|
|
263638
|
-
'getWithdraw',
|
|
263639
|
-
],
|
|
263640
|
-
},
|
|
263641
|
-
},
|
|
263642
|
-
'fees': {
|
|
263643
|
-
'trading': {
|
|
263644
|
-
'feeSide': 'get',
|
|
263645
|
-
'tierBased': false,
|
|
263646
|
-
'percentage': true,
|
|
263647
|
-
'taker': this.parseNumber('0.001'),
|
|
263648
|
-
'maker': this.parseNumber('0.001'),
|
|
263649
|
-
},
|
|
263650
|
-
},
|
|
263651
|
-
'commonCurrencies': {
|
|
263652
|
-
'DSH': 'DASH',
|
|
263653
|
-
'EMGO': 'MGO',
|
|
263654
|
-
'MGO': 'WMGO',
|
|
263655
|
-
},
|
|
263656
|
-
'precisionMode': _base_functions_number_js__WEBPACK_IMPORTED_MODULE_1__/* .TICK_SIZE */ .sh,
|
|
263657
|
-
'exceptions': {
|
|
263658
|
-
'exact': {
|
|
263659
|
-
'803': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder,
|
|
263660
|
-
'804': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder,
|
|
263661
|
-
'805': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder,
|
|
263662
|
-
'806': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder,
|
|
263663
|
-
'807': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder,
|
|
263664
|
-
'831': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InsufficientFunds,
|
|
263665
|
-
'832': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InsufficientFunds,
|
|
263666
|
-
'833': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.OrderNotFound, // "Order with id X was not found." (cancelling non-existent, closed and cancelled order)
|
|
263667
|
-
},
|
|
263668
|
-
'broad': {
|
|
263669
|
-
'Invalid pair name': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeError,
|
|
263670
|
-
'invalid api key': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.AuthenticationError,
|
|
263671
|
-
'invalid sign': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.AuthenticationError,
|
|
263672
|
-
'api key dont have trade permission': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.AuthenticationError,
|
|
263673
|
-
'invalid parameter': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder,
|
|
263674
|
-
'invalid order': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder,
|
|
263675
|
-
'Requests too often': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.DDoSProtection,
|
|
263676
|
-
'not available': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeNotAvailable,
|
|
263677
|
-
'data unavailable': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeNotAvailable,
|
|
263678
|
-
'external service unavailable': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeNotAvailable,
|
|
263679
|
-
'IP restricted': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.PermissionDenied, // {"success":0,"code":0,"error":"IP restricted (223.xxx.xxx.xxx)"}
|
|
263680
|
-
},
|
|
263681
|
-
},
|
|
263682
|
-
'options': {
|
|
263683
|
-
'fetchTickersMaxLength': 2048,
|
|
263684
|
-
},
|
|
263685
|
-
'orders': {}, // orders cache / emulation
|
|
263686
|
-
});
|
|
263687
|
-
}
|
|
263688
|
-
async fetchCurrencies(params = {}) {
|
|
263689
|
-
/**
|
|
263690
|
-
* @method
|
|
263691
|
-
* @name tidex#fetchCurrencies
|
|
263692
|
-
* @description fetches all available currencies on an exchange
|
|
263693
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
263694
|
-
* @returns {object} an associative dictionary of currencies
|
|
263695
|
-
*/
|
|
263696
|
-
const response = await this.webGetCurrency(params);
|
|
263697
|
-
//
|
|
263698
|
-
// [
|
|
263699
|
-
// {
|
|
263700
|
-
// "id":2,
|
|
263701
|
-
// "symbol":"BTC",
|
|
263702
|
-
// "type":2,
|
|
263703
|
-
// "name":"Bitcoin",
|
|
263704
|
-
// "amountPoint":8,
|
|
263705
|
-
// "depositEnable":true,
|
|
263706
|
-
// "depositMinAmount":0.0005,
|
|
263707
|
-
// "withdrawEnable":true,
|
|
263708
|
-
// "withdrawFee":0.0004,
|
|
263709
|
-
// "withdrawMinAmount":0.0005,
|
|
263710
|
-
// "settings":{
|
|
263711
|
-
// "Blockchain":"https://blockchair.com/bitcoin/",
|
|
263712
|
-
// "TxUrl":"https://blockchair.com/bitcoin/transaction/{0}",
|
|
263713
|
-
// "AddrUrl":"https://blockchair.com/bitcoin/address/{0}",
|
|
263714
|
-
// "ConfirmationCount":3,
|
|
263715
|
-
// "NeedMemo":false
|
|
263716
|
-
// },
|
|
263717
|
-
// "visible":true,
|
|
263718
|
-
// "isDelisted":false
|
|
263719
|
-
// }
|
|
263720
|
-
// ]
|
|
263721
|
-
//
|
|
263722
|
-
const result = {};
|
|
263723
|
-
for (let i = 0; i < response.length; i++) {
|
|
263724
|
-
const currency = response[i];
|
|
263725
|
-
const id = this.safeString(currency, 'symbol');
|
|
263726
|
-
const code = this.safeCurrencyCode(id);
|
|
263727
|
-
const visible = this.safeValue(currency, 'visible');
|
|
263728
|
-
let active = visible === true;
|
|
263729
|
-
const withdrawEnable = this.safeValue(currency, 'withdrawEnable', true);
|
|
263730
|
-
const depositEnable = this.safeValue(currency, 'depositEnable', true);
|
|
263731
|
-
if (!withdrawEnable || !depositEnable) {
|
|
263732
|
-
active = false;
|
|
263733
|
-
}
|
|
263734
|
-
const name = this.safeString(currency, 'name');
|
|
263735
|
-
const fee = this.safeNumber(currency, 'withdrawFee');
|
|
263736
|
-
result[code] = {
|
|
263737
|
-
'id': id,
|
|
263738
|
-
'code': code,
|
|
263739
|
-
'name': name,
|
|
263740
|
-
'active': active,
|
|
263741
|
-
'deposit': depositEnable,
|
|
263742
|
-
'withdraw': withdrawEnable,
|
|
263743
|
-
'precision': this.parseNumber(this.parsePrecision(this.safeString(currency, 'amountPoint'))),
|
|
263744
|
-
'funding': {
|
|
263745
|
-
'withdraw': {
|
|
263746
|
-
'active': withdrawEnable,
|
|
263747
|
-
'fee': fee,
|
|
263748
|
-
},
|
|
263749
|
-
'deposit': {
|
|
263750
|
-
'active': depositEnable,
|
|
263751
|
-
'fee': this.parseNumber('0'),
|
|
263752
|
-
},
|
|
263753
|
-
},
|
|
263754
|
-
'limits': {
|
|
263755
|
-
'amount': {
|
|
263756
|
-
'min': undefined,
|
|
263757
|
-
'max': undefined,
|
|
263758
|
-
},
|
|
263759
|
-
'withdraw': {
|
|
263760
|
-
'min': this.safeNumber(currency, 'withdrawMinAmount'),
|
|
263761
|
-
'max': undefined,
|
|
263762
|
-
},
|
|
263763
|
-
'deposit': {
|
|
263764
|
-
'min': this.safeNumber(currency, 'depositMinAmount'),
|
|
263765
|
-
'max': undefined,
|
|
263766
|
-
},
|
|
263767
|
-
},
|
|
263768
|
-
'info': currency,
|
|
263769
|
-
};
|
|
263770
|
-
}
|
|
263771
|
-
return result;
|
|
263772
|
-
}
|
|
263773
|
-
async fetchMarkets(params = {}) {
|
|
263774
|
-
/**
|
|
263775
|
-
* @method
|
|
263776
|
-
* @name tidex#fetchMarkets
|
|
263777
|
-
* @description retrieves data on all markets for tidex
|
|
263778
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
263779
|
-
* @returns {object[]} an array of objects representing market data
|
|
263780
|
-
*/
|
|
263781
|
-
const response = await this.publicGetInfo(params);
|
|
263782
|
-
//
|
|
263783
|
-
// {
|
|
263784
|
-
// "server_time":1615861869,
|
|
263785
|
-
// "pairs":{
|
|
263786
|
-
// "ltc_btc":{
|
|
263787
|
-
// "decimal_places":8,
|
|
263788
|
-
// "min_price":0.00000001,
|
|
263789
|
-
// "max_price":3.0,
|
|
263790
|
-
// "min_amount":0.001,
|
|
263791
|
-
// "max_amount":1000000.0,
|
|
263792
|
-
// "min_total":0.0001,
|
|
263793
|
-
// "hidden":0,
|
|
263794
|
-
// "fee":0.1,
|
|
263795
|
-
// },
|
|
263796
|
-
// },
|
|
263797
|
-
// }
|
|
263798
|
-
//
|
|
263799
|
-
const markets = response['pairs'];
|
|
263800
|
-
const keys = Object.keys(markets);
|
|
263801
|
-
const result = [];
|
|
263802
|
-
for (let i = 0; i < keys.length; i++) {
|
|
263803
|
-
const id = keys[i];
|
|
263804
|
-
const market = markets[id];
|
|
263805
|
-
const [baseId, quoteId] = id.split('_');
|
|
263806
|
-
const base = this.safeCurrencyCode(baseId);
|
|
263807
|
-
const quote = this.safeCurrencyCode(quoteId);
|
|
263808
|
-
const hidden = this.safeInteger(market, 'hidden');
|
|
263809
|
-
let takerFeeString = this.safeString(market, 'fee');
|
|
263810
|
-
takerFeeString = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringDiv(takerFeeString, '100');
|
|
263811
|
-
result.push({
|
|
263812
|
-
'id': id,
|
|
263813
|
-
'symbol': base + '/' + quote,
|
|
263814
|
-
'base': base,
|
|
263815
|
-
'quote': quote,
|
|
263816
|
-
'settle': undefined,
|
|
263817
|
-
'baseId': baseId,
|
|
263818
|
-
'quoteId': quoteId,
|
|
263819
|
-
'settleId': undefined,
|
|
263820
|
-
'type': 'spot',
|
|
263821
|
-
'spot': true,
|
|
263822
|
-
'margin': false,
|
|
263823
|
-
'swap': false,
|
|
263824
|
-
'future': false,
|
|
263825
|
-
'option': false,
|
|
263826
|
-
'active': (hidden === 0),
|
|
263827
|
-
'contract': false,
|
|
263828
|
-
'linear': undefined,
|
|
263829
|
-
'inverse': undefined,
|
|
263830
|
-
'taker': this.parseNumber(takerFeeString),
|
|
263831
|
-
'contractSize': undefined,
|
|
263832
|
-
'expiry': undefined,
|
|
263833
|
-
'expiryDatetime': undefined,
|
|
263834
|
-
'strike': undefined,
|
|
263835
|
-
'optionType': undefined,
|
|
263836
|
-
'precision': {
|
|
263837
|
-
'amount': this.parseNumber(this.parsePrecision(this.safeString(market, 'decimal_places'))),
|
|
263838
|
-
'price': this.parseNumber(this.parsePrecision(this.safeString(market, 'decimal_places'))),
|
|
263839
|
-
},
|
|
263840
|
-
'limits': {
|
|
263841
|
-
'leverage': {
|
|
263842
|
-
'min': undefined,
|
|
263843
|
-
'max': undefined,
|
|
263844
|
-
},
|
|
263845
|
-
'amount': {
|
|
263846
|
-
'min': this.safeNumber(market, 'min_amount'),
|
|
263847
|
-
'max': this.safeNumber(market, 'max_amount'),
|
|
263848
|
-
},
|
|
263849
|
-
'price': {
|
|
263850
|
-
'min': this.safeNumber(market, 'min_price'),
|
|
263851
|
-
'max': this.safeNumber(market, 'max_price'),
|
|
263852
|
-
},
|
|
263853
|
-
'cost': {
|
|
263854
|
-
'min': this.safeNumber(market, 'min_total'),
|
|
263855
|
-
'max': undefined,
|
|
263856
|
-
},
|
|
263857
|
-
},
|
|
263858
|
-
'created': undefined,
|
|
263859
|
-
'info': market,
|
|
263860
|
-
});
|
|
263861
|
-
}
|
|
263862
|
-
return result;
|
|
263863
|
-
}
|
|
263864
|
-
parseBalance(response) {
|
|
263865
|
-
const balances = this.safeValue(response, 'return');
|
|
263866
|
-
const timestamp = this.safeTimestamp(balances, 'server_time');
|
|
263867
|
-
const result = {
|
|
263868
|
-
'info': response,
|
|
263869
|
-
'timestamp': timestamp,
|
|
263870
|
-
'datetime': this.iso8601(timestamp),
|
|
263871
|
-
};
|
|
263872
|
-
const funds = this.safeValue(balances, 'funds', {});
|
|
263873
|
-
const currencyIds = Object.keys(funds);
|
|
263874
|
-
for (let i = 0; i < currencyIds.length; i++) {
|
|
263875
|
-
const currencyId = currencyIds[i];
|
|
263876
|
-
const code = this.safeCurrencyCode(currencyId);
|
|
263877
|
-
const balance = this.safeValue(funds, currencyId, {});
|
|
263878
|
-
const account = this.account();
|
|
263879
|
-
account['free'] = this.safeString(balance, 'value');
|
|
263880
|
-
account['used'] = this.safeString(balance, 'inOrders');
|
|
263881
|
-
result[code] = account;
|
|
263882
|
-
}
|
|
263883
|
-
return this.safeBalance(result);
|
|
263884
|
-
}
|
|
263885
|
-
async fetchBalance(params = {}) {
|
|
263886
|
-
/**
|
|
263887
|
-
* @method
|
|
263888
|
-
* @name tidex#fetchBalance
|
|
263889
|
-
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
263890
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
263891
|
-
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
263892
|
-
*/
|
|
263893
|
-
await this.loadMarkets();
|
|
263894
|
-
const response = await this.privatePostGetInfoExt(params);
|
|
263895
|
-
//
|
|
263896
|
-
// {
|
|
263897
|
-
// "success":1,
|
|
263898
|
-
// "return":{
|
|
263899
|
-
// "funds":{
|
|
263900
|
-
// "btc":{"value":0.0000499885629956,"inOrders":0.0},
|
|
263901
|
-
// "eth":{"value":0.000000030741708,"inOrders":0.0},
|
|
263902
|
-
// "tdx":{"value":0.0000000155385356,"inOrders":0.0}
|
|
263903
|
-
// },
|
|
263904
|
-
// "rights":{
|
|
263905
|
-
// "info":true,
|
|
263906
|
-
// "trade":true,
|
|
263907
|
-
// "withdraw":false
|
|
263908
|
-
// },
|
|
263909
|
-
// "transaction_count":0,
|
|
263910
|
-
// "open_orders":0,
|
|
263911
|
-
// "server_time":1619436907
|
|
263912
|
-
// },
|
|
263913
|
-
// "stat":{
|
|
263914
|
-
// "isSuccess":true,
|
|
263915
|
-
// "serverTime":"00:00:00.0001157",
|
|
263916
|
-
// "time":"00:00:00.0101364",
|
|
263917
|
-
// "errors":null
|
|
263918
|
-
// }
|
|
263919
|
-
// }
|
|
263920
|
-
//
|
|
263921
|
-
return this.parseBalance(response);
|
|
263922
|
-
}
|
|
263923
|
-
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
263924
|
-
/**
|
|
263925
|
-
* @method
|
|
263926
|
-
* @name tidex#fetchOrderBook
|
|
263927
|
-
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
263928
|
-
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
263929
|
-
* @param {int} [limit] the maximum amount of order book entries to return
|
|
263930
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
263931
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
263932
|
-
*/
|
|
263933
|
-
await this.loadMarkets();
|
|
263934
|
-
const market = this.market(symbol);
|
|
263935
|
-
const request = {
|
|
263936
|
-
'pair': market['id'],
|
|
263937
|
-
};
|
|
263938
|
-
if (limit !== undefined) {
|
|
263939
|
-
request['limit'] = limit; // default = 150, max = 2000
|
|
263940
|
-
}
|
|
263941
|
-
const response = await this.publicGetDepthPair(this.extend(request, params));
|
|
263942
|
-
const market_id_in_reponse = (market['id'] in response);
|
|
263943
|
-
if (!market_id_in_reponse) {
|
|
263944
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeError(this.id + ' ' + market['symbol'] + ' order book is empty or not available');
|
|
263945
|
-
}
|
|
263946
|
-
const orderbook = response[market['id']];
|
|
263947
|
-
return this.parseOrderBook(orderbook, symbol);
|
|
263948
|
-
}
|
|
263949
|
-
async fetchOrderBooks(symbols = undefined, limit = undefined, params = {}) {
|
|
263950
|
-
/**
|
|
263951
|
-
* @method
|
|
263952
|
-
* @name tidex#fetchOrderBooks
|
|
263953
|
-
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data for multiple markets
|
|
263954
|
-
* @param {string[]|undefined} symbols list of unified market symbols, all symbols fetched if undefined, default is undefined
|
|
263955
|
-
* @param {int} [limit] max number of entries per orderbook to return, default is undefined
|
|
263956
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
263957
|
-
* @returns {object} a dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbol
|
|
263958
|
-
*/
|
|
263959
|
-
await this.loadMarkets();
|
|
263960
|
-
let ids = undefined;
|
|
263961
|
-
if (symbols === undefined) {
|
|
263962
|
-
ids = this.ids.join('-');
|
|
263963
|
-
// max URL length is 2083 symbols, including http schema, hostname, tld, etc...
|
|
263964
|
-
if (ids.length > 2048) {
|
|
263965
|
-
const numIds = this.ids.length;
|
|
263966
|
-
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');
|
|
263967
|
-
}
|
|
263968
|
-
}
|
|
263969
|
-
else {
|
|
263970
|
-
ids = this.marketIds(symbols);
|
|
263971
|
-
ids = ids.join('-');
|
|
263972
|
-
}
|
|
263973
|
-
const request = {
|
|
263974
|
-
'pair': ids,
|
|
263975
|
-
};
|
|
263976
|
-
if (limit !== undefined) {
|
|
263977
|
-
request['limit'] = limit; // default = 150, max = 2000
|
|
263978
|
-
}
|
|
263979
|
-
const response = await this.publicGetDepthPair(this.extend(request, params));
|
|
263980
|
-
const result = {};
|
|
263981
|
-
ids = Object.keys(response);
|
|
263982
|
-
for (let i = 0; i < ids.length; i++) {
|
|
263983
|
-
const id = ids[i];
|
|
263984
|
-
const symbol = this.safeSymbol(id);
|
|
263985
|
-
result[symbol] = this.parseOrderBook(response[id], symbol);
|
|
263986
|
-
}
|
|
263987
|
-
return result;
|
|
263988
|
-
}
|
|
263989
|
-
parseTicker(ticker, market = undefined) {
|
|
263990
|
-
//
|
|
263991
|
-
// {
|
|
263992
|
-
// "high": 0.03497582,
|
|
263993
|
-
// "low": 0.03248474,
|
|
263994
|
-
// "avg": 0.03373028,
|
|
263995
|
-
// "vol": 120.11485715062999,
|
|
263996
|
-
// "vol_cur": 3572.24914074,
|
|
263997
|
-
// "last": 0.0337611,
|
|
263998
|
-
// "buy": 0.0337442,
|
|
263999
|
-
// "sell": 0.03377798,
|
|
264000
|
-
// "updated": 1537522009
|
|
264001
|
-
// }
|
|
264002
|
-
//
|
|
264003
|
-
const timestamp = this.safeTimestamp(ticker, 'updated');
|
|
264004
|
-
market = this.safeMarket(undefined, market);
|
|
264005
|
-
const last = this.safeString(ticker, 'last');
|
|
264006
|
-
return this.safeTicker({
|
|
264007
|
-
'symbol': market['symbol'],
|
|
264008
|
-
'timestamp': timestamp,
|
|
264009
|
-
'datetime': this.iso8601(timestamp),
|
|
264010
|
-
'high': this.safeString(ticker, 'high'),
|
|
264011
|
-
'low': this.safeString(ticker, 'low'),
|
|
264012
|
-
'bid': this.safeString(ticker, 'buy'),
|
|
264013
|
-
'bidVolume': undefined,
|
|
264014
|
-
'ask': this.safeString(ticker, 'sell'),
|
|
264015
|
-
'askVolume': undefined,
|
|
264016
|
-
'vwap': undefined,
|
|
264017
|
-
'open': undefined,
|
|
264018
|
-
'close': last,
|
|
264019
|
-
'last': last,
|
|
264020
|
-
'previousClose': undefined,
|
|
264021
|
-
'change': undefined,
|
|
264022
|
-
'percentage': undefined,
|
|
264023
|
-
'average': this.safeString(ticker, 'avg'),
|
|
264024
|
-
'baseVolume': this.safeString(ticker, 'vol_cur'),
|
|
264025
|
-
'quoteVolume': this.safeString(ticker, 'vol'),
|
|
264026
|
-
'info': ticker,
|
|
264027
|
-
}, market);
|
|
264028
|
-
}
|
|
264029
|
-
async fetchTickers(symbols = undefined, params = {}) {
|
|
264030
|
-
/**
|
|
264031
|
-
* @method
|
|
264032
|
-
* @name tidex#fetchTickers
|
|
264033
|
-
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
264034
|
-
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
264035
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
264036
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
264037
|
-
*/
|
|
264038
|
-
await this.loadMarkets();
|
|
264039
|
-
symbols = this.marketSymbols(symbols);
|
|
264040
|
-
let ids = undefined;
|
|
264041
|
-
if (symbols === undefined) {
|
|
264042
|
-
const numIds = this.ids.length;
|
|
264043
|
-
ids = this.ids.join('-');
|
|
264044
|
-
// max URL length is 2048 symbols, including http schema, hostname, tld, etc...
|
|
264045
|
-
if (ids.length > this.options['fetchTickersMaxLength']) {
|
|
264046
|
-
const maxLength = this.safeInteger(this.options, 'fetchTickersMaxLength', 2048);
|
|
264047
|
-
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');
|
|
264048
|
-
}
|
|
264049
|
-
}
|
|
264050
|
-
else {
|
|
264051
|
-
const newIds = this.marketIds(symbols);
|
|
264052
|
-
ids = newIds.join('-');
|
|
264053
|
-
}
|
|
264054
|
-
const request = {
|
|
264055
|
-
'pair': ids,
|
|
264056
|
-
};
|
|
264057
|
-
const response = await this.publicGetTickerPair(this.extend(request, params));
|
|
264058
|
-
const result = {};
|
|
264059
|
-
const keys = Object.keys(response);
|
|
264060
|
-
for (let i = 0; i < keys.length; i++) {
|
|
264061
|
-
const id = keys[i];
|
|
264062
|
-
const market = this.safeMarket(id);
|
|
264063
|
-
const symbol = market['symbol'];
|
|
264064
|
-
result[symbol] = this.parseTicker(response[id], market);
|
|
264065
|
-
}
|
|
264066
|
-
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
264067
|
-
}
|
|
264068
|
-
async fetchTicker(symbol, params = {}) {
|
|
264069
|
-
/**
|
|
264070
|
-
* @method
|
|
264071
|
-
* @name tidex#fetchTicker
|
|
264072
|
-
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
264073
|
-
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
264074
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
264075
|
-
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
264076
|
-
*/
|
|
264077
|
-
const tickers = await this.fetchTickers([symbol], params);
|
|
264078
|
-
return tickers[symbol];
|
|
264079
|
-
}
|
|
264080
|
-
parseTrade(trade, market = undefined) {
|
|
264081
|
-
const timestamp = this.safeTimestamp(trade, 'timestamp');
|
|
264082
|
-
let side = this.safeString(trade, 'type');
|
|
264083
|
-
if (side === 'ask') {
|
|
264084
|
-
side = 'sell';
|
|
264085
|
-
}
|
|
264086
|
-
else if (side === 'bid') {
|
|
264087
|
-
side = 'buy';
|
|
264088
|
-
}
|
|
264089
|
-
const priceString = this.safeString2(trade, 'rate', 'price');
|
|
264090
|
-
const id = this.safeString2(trade, 'trade_id', 'tid');
|
|
264091
|
-
const orderId = this.safeString(trade, 'order_id');
|
|
264092
|
-
const marketId = this.safeString(trade, 'pair');
|
|
264093
|
-
const symbol = this.safeSymbol(marketId, market);
|
|
264094
|
-
const amountString = this.safeString(trade, 'amount');
|
|
264095
|
-
const price = this.parseNumber(priceString);
|
|
264096
|
-
const amount = this.parseNumber(amountString);
|
|
264097
|
-
const cost = this.parseNumber(_base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringMul(priceString, amountString));
|
|
264098
|
-
const type = 'limit'; // all trades are still limit trades
|
|
264099
|
-
let takerOrMaker = undefined;
|
|
264100
|
-
let fee = undefined;
|
|
264101
|
-
const feeCost = this.safeNumber(trade, 'commission');
|
|
264102
|
-
if (feeCost !== undefined) {
|
|
264103
|
-
const feeCurrencyId = this.safeString(trade, 'commissionCurrency');
|
|
264104
|
-
const feeCurrencyCode = this.safeCurrencyCode(feeCurrencyId);
|
|
264105
|
-
fee = {
|
|
264106
|
-
'cost': feeCost,
|
|
264107
|
-
'currency': feeCurrencyCode,
|
|
264108
|
-
};
|
|
264109
|
-
}
|
|
264110
|
-
const isYourOrder = this.safeValue(trade, 'is_your_order');
|
|
264111
|
-
if (isYourOrder !== undefined) {
|
|
264112
|
-
takerOrMaker = 'taker';
|
|
264113
|
-
if (isYourOrder) {
|
|
264114
|
-
takerOrMaker = 'maker';
|
|
264115
|
-
}
|
|
264116
|
-
if (fee === undefined) {
|
|
264117
|
-
fee = this.calculateFee(symbol, type, side, amount, price, takerOrMaker);
|
|
264118
|
-
}
|
|
264119
|
-
}
|
|
264120
|
-
return {
|
|
264121
|
-
'id': id,
|
|
264122
|
-
'order': orderId,
|
|
264123
|
-
'timestamp': timestamp,
|
|
264124
|
-
'datetime': this.iso8601(timestamp),
|
|
264125
|
-
'symbol': symbol,
|
|
264126
|
-
'type': type,
|
|
264127
|
-
'side': side,
|
|
264128
|
-
'takerOrMaker': takerOrMaker,
|
|
264129
|
-
'price': price,
|
|
264130
|
-
'amount': amount,
|
|
264131
|
-
'cost': cost,
|
|
264132
|
-
'fee': fee,
|
|
264133
|
-
'info': trade,
|
|
264134
|
-
};
|
|
264135
|
-
}
|
|
264136
|
-
async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
|
|
264137
|
-
/**
|
|
264138
|
-
* @method
|
|
264139
|
-
* @name tidex#fetchTrades
|
|
264140
|
-
* @description get the list of most recent trades for a particular symbol
|
|
264141
|
-
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
264142
|
-
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
264143
|
-
* @param {int} [limit] the maximum amount of trades to fetch
|
|
264144
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
264145
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
264146
|
-
*/
|
|
264147
|
-
await this.loadMarkets();
|
|
264148
|
-
const market = this.market(symbol);
|
|
264149
|
-
const request = {
|
|
264150
|
-
'pair': market['id'],
|
|
264151
|
-
};
|
|
264152
|
-
if (limit !== undefined) {
|
|
264153
|
-
request['limit'] = limit;
|
|
264154
|
-
}
|
|
264155
|
-
const response = await this.publicGetTradesPair(this.extend(request, params));
|
|
264156
|
-
if (Array.isArray(response)) {
|
|
264157
|
-
const numElements = response.length;
|
|
264158
|
-
if (numElements === 0) {
|
|
264159
|
-
return [];
|
|
264160
|
-
}
|
|
264161
|
-
}
|
|
264162
|
-
return this.parseTrades(response[market['id']], market, since, limit);
|
|
264163
|
-
}
|
|
264164
|
-
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
264165
|
-
/**
|
|
264166
|
-
* @method
|
|
264167
|
-
* @name tidex#createOrder
|
|
264168
|
-
* @description create a trade order
|
|
264169
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
264170
|
-
* @param {string} type 'market' or 'limit'
|
|
264171
|
-
* @param {string} side 'buy' or 'sell'
|
|
264172
|
-
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
264173
|
-
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
264174
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
264175
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
264176
|
-
*/
|
|
264177
|
-
if (type === 'market') {
|
|
264178
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeError(this.id + ' createOrder() allows limit orders only');
|
|
264179
|
-
}
|
|
264180
|
-
const amountString = amount.toString();
|
|
264181
|
-
const priceString = price.toString();
|
|
264182
|
-
await this.loadMarkets();
|
|
264183
|
-
const market = this.market(symbol);
|
|
264184
|
-
const request = {
|
|
264185
|
-
'pair': market['id'],
|
|
264186
|
-
'type': side,
|
|
264187
|
-
'amount': this.amountToPrecision(symbol, amount),
|
|
264188
|
-
'rate': this.priceToPrecision(symbol, price),
|
|
264189
|
-
};
|
|
264190
|
-
const response = await this.privatePostTrade(this.extend(request, params));
|
|
264191
|
-
let id = undefined;
|
|
264192
|
-
let status = 'open';
|
|
264193
|
-
let filledString = '0.0';
|
|
264194
|
-
let remainingString = amountString;
|
|
264195
|
-
const returnResult = this.safeValue(response, 'return');
|
|
264196
|
-
if (returnResult !== undefined) {
|
|
264197
|
-
id = this.safeString(returnResult, 'order_id');
|
|
264198
|
-
if (id === '0') {
|
|
264199
|
-
id = this.safeString(returnResult, 'init_order_id');
|
|
264200
|
-
status = 'closed';
|
|
264201
|
-
}
|
|
264202
|
-
filledString = this.safeString(returnResult, 'received', filledString);
|
|
264203
|
-
remainingString = this.safeString(returnResult, 'remains', amountString);
|
|
264204
|
-
}
|
|
264205
|
-
const timestamp = this.milliseconds();
|
|
264206
|
-
return this.safeOrder({
|
|
264207
|
-
'id': id,
|
|
264208
|
-
'timestamp': timestamp,
|
|
264209
|
-
'datetime': this.iso8601(timestamp),
|
|
264210
|
-
'lastTradeTimestamp': undefined,
|
|
264211
|
-
'status': status,
|
|
264212
|
-
'symbol': symbol,
|
|
264213
|
-
'type': type,
|
|
264214
|
-
'side': side,
|
|
264215
|
-
'price': priceString,
|
|
264216
|
-
'cost': undefined,
|
|
264217
|
-
'amount': amountString,
|
|
264218
|
-
'remaining': remainingString,
|
|
264219
|
-
'filled': filledString,
|
|
264220
|
-
'fee': undefined,
|
|
264221
|
-
// 'trades': this.parseTrades (order['trades'], market),
|
|
264222
|
-
'info': response,
|
|
264223
|
-
'clientOrderId': undefined,
|
|
264224
|
-
'average': undefined,
|
|
264225
|
-
'trades': undefined,
|
|
264226
|
-
}, market);
|
|
264227
|
-
}
|
|
264228
|
-
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
264229
|
-
/**
|
|
264230
|
-
* @method
|
|
264231
|
-
* @name tidex#cancelOrder
|
|
264232
|
-
* @description cancels an open order
|
|
264233
|
-
* @param {string} id order id
|
|
264234
|
-
* @param {string} symbol not used by tidex cancelOrder ()
|
|
264235
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
264236
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
264237
|
-
*/
|
|
264238
|
-
await this.loadMarkets();
|
|
264239
|
-
const request = {
|
|
264240
|
-
'order_id': parseInt(id),
|
|
264241
|
-
};
|
|
264242
|
-
return await this.privatePostCancelOrder(this.extend(request, params));
|
|
264243
|
-
}
|
|
264244
|
-
parseOrderStatus(status) {
|
|
264245
|
-
const statuses = {
|
|
264246
|
-
'0': 'open',
|
|
264247
|
-
'1': 'closed',
|
|
264248
|
-
'2': 'canceled',
|
|
264249
|
-
'3': 'canceled', // or partially-filled and still open? https://github.com/ccxt/ccxt/issues/1594
|
|
264250
|
-
};
|
|
264251
|
-
return this.safeString(statuses, status, status);
|
|
264252
|
-
}
|
|
264253
|
-
parseOrder(order, market = undefined) {
|
|
264254
|
-
const id = this.safeString(order, 'id');
|
|
264255
|
-
const status = this.parseOrderStatus(this.safeString(order, 'status'));
|
|
264256
|
-
const timestamp = this.safeTimestamp(order, 'timestamp_created');
|
|
264257
|
-
const marketId = this.safeString(order, 'pair');
|
|
264258
|
-
const symbol = this.safeSymbol(marketId, market);
|
|
264259
|
-
let remaining;
|
|
264260
|
-
let amount;
|
|
264261
|
-
const price = this.safeString(order, 'rate');
|
|
264262
|
-
if ('start_amount' in order) {
|
|
264263
|
-
amount = this.safeString(order, 'start_amount');
|
|
264264
|
-
remaining = this.safeString(order, 'amount');
|
|
264265
|
-
}
|
|
264266
|
-
else {
|
|
264267
|
-
remaining = this.safeString(order, 'amount');
|
|
264268
|
-
}
|
|
264269
|
-
const fee = undefined;
|
|
264270
|
-
return this.safeOrder({
|
|
264271
|
-
'info': order,
|
|
264272
|
-
'id': id,
|
|
264273
|
-
'clientOrderId': undefined,
|
|
264274
|
-
'symbol': symbol,
|
|
264275
|
-
'timestamp': timestamp,
|
|
264276
|
-
'datetime': this.iso8601(timestamp),
|
|
264277
|
-
'lastTradeTimestamp': undefined,
|
|
264278
|
-
'type': 'limit',
|
|
264279
|
-
'timeInForce': undefined,
|
|
264280
|
-
'postOnly': undefined,
|
|
264281
|
-
'side': this.safeString(order, 'type'),
|
|
264282
|
-
'price': price,
|
|
264283
|
-
'stopPrice': undefined,
|
|
264284
|
-
'triggerPrice': undefined,
|
|
264285
|
-
'cost': undefined,
|
|
264286
|
-
'amount': amount,
|
|
264287
|
-
'remaining': remaining,
|
|
264288
|
-
'filled': undefined,
|
|
264289
|
-
'status': status,
|
|
264290
|
-
'fee': fee,
|
|
264291
|
-
'average': undefined,
|
|
264292
|
-
'trades': undefined,
|
|
264293
|
-
}, market);
|
|
264294
|
-
}
|
|
264295
|
-
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
264296
|
-
/**
|
|
264297
|
-
* @method
|
|
264298
|
-
* @name tidex#fetchOrder
|
|
264299
|
-
* @description fetches information on an order made by the user
|
|
264300
|
-
* @param {string} symbol not used by tidex fetchOrder
|
|
264301
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
264302
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
264303
|
-
*/
|
|
264304
|
-
await this.loadMarkets();
|
|
264305
|
-
const request = {
|
|
264306
|
-
'order_id': parseInt(id),
|
|
264307
|
-
};
|
|
264308
|
-
const response = await this.privatePostOrderInfo(this.extend(request, params));
|
|
264309
|
-
id = id.toString();
|
|
264310
|
-
const result = this.safeValue(response, 'return', {});
|
|
264311
|
-
const order = this.safeValue(result, id);
|
|
264312
|
-
return this.parseOrder(this.extend({ 'id': id }, order));
|
|
264313
|
-
}
|
|
264314
|
-
async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
264315
|
-
/**
|
|
264316
|
-
* @method
|
|
264317
|
-
* @name tidex#fetchOpenOrders
|
|
264318
|
-
* @description fetch all unfilled currently open orders
|
|
264319
|
-
* @param {string} symbol unified market symbol
|
|
264320
|
-
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
264321
|
-
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
264322
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
264323
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
264324
|
-
*/
|
|
264325
|
-
await this.loadMarkets();
|
|
264326
|
-
const request = {};
|
|
264327
|
-
let market = undefined;
|
|
264328
|
-
if (symbol !== undefined) {
|
|
264329
|
-
market = this.market(symbol);
|
|
264330
|
-
request['pair'] = market['id'];
|
|
264331
|
-
}
|
|
264332
|
-
const response = await this.privatePostActiveOrders(this.extend(request, params));
|
|
264333
|
-
//
|
|
264334
|
-
// {
|
|
264335
|
-
// "success":1,
|
|
264336
|
-
// "return":{
|
|
264337
|
-
// "1255468911":{
|
|
264338
|
-
// "status":0,
|
|
264339
|
-
// "pair":"spike_usdt",
|
|
264340
|
-
// "type":"sell",
|
|
264341
|
-
// "amount":35028.44256388,
|
|
264342
|
-
// "rate":0.00199989,
|
|
264343
|
-
// "timestamp_created":1602684432
|
|
264344
|
-
// }
|
|
264345
|
-
// },
|
|
264346
|
-
// "stat":{
|
|
264347
|
-
// "isSuccess":true,
|
|
264348
|
-
// "serverTime":"00:00:00.0000826",
|
|
264349
|
-
// "time":"00:00:00.0091423",
|
|
264350
|
-
// "errors":null
|
|
264351
|
-
// }
|
|
264352
|
-
// }
|
|
264353
|
-
//
|
|
264354
|
-
// it can only return 'open' orders (i.e. no way to fetch 'closed' orders)
|
|
264355
|
-
const orders = this.safeValue(response, 'return', []);
|
|
264356
|
-
return this.parseOrders(orders, market, since, limit);
|
|
264357
|
-
}
|
|
264358
|
-
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
264359
|
-
/**
|
|
264360
|
-
* @method
|
|
264361
|
-
* @name tidex#fetchMyTrades
|
|
264362
|
-
* @description fetch all trades made by the user
|
|
264363
|
-
* @param {string} symbol unified market symbol
|
|
264364
|
-
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
264365
|
-
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
264366
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
264367
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
264368
|
-
*/
|
|
264369
|
-
await this.loadMarkets();
|
|
264370
|
-
let market = undefined;
|
|
264371
|
-
// some derived classes use camelcase notation for request fields
|
|
264372
|
-
const request = {
|
|
264373
|
-
// 'from': 123456789, // trade ID, from which the display starts numerical 0 (test result: liqui ignores this field)
|
|
264374
|
-
// 'count': 1000, // the number of trades for display numerical, default = 1000
|
|
264375
|
-
// 'from_id': trade ID, from which the display starts numerical 0
|
|
264376
|
-
// 'end_id': trade ID on which the display ends numerical ∞
|
|
264377
|
-
// 'order': 'ASC', // sorting, default = DESC (test result: liqui ignores this field, most recent trade always goes last)
|
|
264378
|
-
// 'since': 1234567890, // UTC start time, default = 0 (test result: liqui ignores this field)
|
|
264379
|
-
// 'end': 1234567890, // UTC end time, default = ∞ (test result: liqui ignores this field)
|
|
264380
|
-
// 'pair': 'eth_btc', // default = all markets
|
|
264381
|
-
};
|
|
264382
|
-
if (symbol !== undefined) {
|
|
264383
|
-
market = this.market(symbol);
|
|
264384
|
-
request['pair'] = market['id'];
|
|
264385
|
-
}
|
|
264386
|
-
if (limit !== undefined) {
|
|
264387
|
-
request['count'] = limit;
|
|
264388
|
-
}
|
|
264389
|
-
if (since !== undefined) {
|
|
264390
|
-
request['since'] = this.parseToInt(since / 1000);
|
|
264391
|
-
}
|
|
264392
|
-
const response = await this.privatePostTradeHistory(this.extend(request, params));
|
|
264393
|
-
const trades = this.safeValue(response, 'return', []);
|
|
264394
|
-
return this.parseTrades(trades, market, since, limit);
|
|
264395
|
-
}
|
|
264396
|
-
async withdraw(code, amount, address, tag = undefined, params = {}) {
|
|
264397
|
-
/**
|
|
264398
|
-
* @method
|
|
264399
|
-
* @name tidex#withdraw
|
|
264400
|
-
* @description make a withdrawal
|
|
264401
|
-
* @param {string} code unified currency code
|
|
264402
|
-
* @param {float} amount the amount to withdraw
|
|
264403
|
-
* @param {string} address the address to withdraw to
|
|
264404
|
-
* @param {string} tag
|
|
264405
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
264406
|
-
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
264407
|
-
*/
|
|
264408
|
-
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
264409
|
-
this.checkAddress(address);
|
|
264410
|
-
await this.loadMarkets();
|
|
264411
|
-
const currency = this.currency(code);
|
|
264412
|
-
const request = {
|
|
264413
|
-
'asset': currency['id'],
|
|
264414
|
-
'amount': parseFloat(amount),
|
|
264415
|
-
'address': address,
|
|
264416
|
-
};
|
|
264417
|
-
if (tag !== undefined) {
|
|
264418
|
-
request['memo'] = tag;
|
|
264419
|
-
}
|
|
264420
|
-
const response = await this.privatePostCreateWithdraw(this.extend(request, params));
|
|
264421
|
-
//
|
|
264422
|
-
// {
|
|
264423
|
-
// "success":1,
|
|
264424
|
-
// "return":{
|
|
264425
|
-
// "withdraw_id":1111,
|
|
264426
|
-
// "withdraw_info":{
|
|
264427
|
-
// "id":1111,
|
|
264428
|
-
// "asset_id":1,
|
|
264429
|
-
// "asset":"BTC",
|
|
264430
|
-
// "amount":0.0093,
|
|
264431
|
-
// "fee":0.0007,
|
|
264432
|
-
// "create_time":1575128018,
|
|
264433
|
-
// "status":"Created",
|
|
264434
|
-
// "data":{
|
|
264435
|
-
// "address":"1KFHE7w8BhaENAswwryaoccDb6qcT6DbYY",
|
|
264436
|
-
// "memo":"memo",
|
|
264437
|
-
// "tx":null,
|
|
264438
|
-
// "error":null
|
|
264439
|
-
// },
|
|
264440
|
-
// "in_blockchain":false
|
|
264441
|
-
// }
|
|
264442
|
-
// }
|
|
264443
|
-
// }
|
|
264444
|
-
//
|
|
264445
|
-
const result = this.safeValue(response, 'return', {});
|
|
264446
|
-
const withdrawInfo = this.safeValue(result, 'withdraw_info', {});
|
|
264447
|
-
return this.parseTransaction(withdrawInfo, currency);
|
|
264448
|
-
}
|
|
264449
|
-
parseTransaction(transaction, currency = undefined) {
|
|
264450
|
-
//
|
|
264451
|
-
// {
|
|
264452
|
-
// "id":1111,
|
|
264453
|
-
// "asset_id":1,
|
|
264454
|
-
// "asset":"BTC",
|
|
264455
|
-
// "amount":0.0093,
|
|
264456
|
-
// "fee":0.0007,
|
|
264457
|
-
// "create_time":1575128018,
|
|
264458
|
-
// "status":"Created",
|
|
264459
|
-
// "data":{
|
|
264460
|
-
// "address":"1KFHE7w8BhaENAswwryaoccDb6qcT6DbYY",
|
|
264461
|
-
// "memo":"memo",
|
|
264462
|
-
// "tx":null,
|
|
264463
|
-
// "error":null
|
|
264464
|
-
// },
|
|
264465
|
-
// "in_blockchain":false
|
|
264466
|
-
// }
|
|
264467
|
-
//
|
|
264468
|
-
currency = this.safeCurrency(undefined, currency);
|
|
264469
|
-
return {
|
|
264470
|
-
'id': this.safeString(transaction, 'id'),
|
|
264471
|
-
'txid': undefined,
|
|
264472
|
-
'timestamp': undefined,
|
|
264473
|
-
'datetime': undefined,
|
|
264474
|
-
'network': undefined,
|
|
264475
|
-
'addressFrom': undefined,
|
|
264476
|
-
'address': undefined,
|
|
264477
|
-
'addressTo': undefined,
|
|
264478
|
-
'amount': undefined,
|
|
264479
|
-
'type': undefined,
|
|
264480
|
-
'currency': currency['code'],
|
|
264481
|
-
'status': undefined,
|
|
264482
|
-
'updated': undefined,
|
|
264483
|
-
'tagFrom': undefined,
|
|
264484
|
-
'tag': undefined,
|
|
264485
|
-
'tagTo': undefined,
|
|
264486
|
-
'comment': undefined,
|
|
264487
|
-
'internal': undefined,
|
|
264488
|
-
'fee': undefined,
|
|
264489
|
-
'info': transaction,
|
|
264490
|
-
};
|
|
264491
|
-
}
|
|
264492
|
-
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
|
|
264493
|
-
let url = this.urls['api'][api];
|
|
264494
|
-
const query = this.omit(params, this.extractParams(path));
|
|
264495
|
-
if (api === 'private') {
|
|
264496
|
-
this.checkRequiredCredentials();
|
|
264497
|
-
const nonce = this.nonce();
|
|
264498
|
-
body = this.urlencode(this.extend({
|
|
264499
|
-
'nonce': nonce,
|
|
264500
|
-
'method': path,
|
|
264501
|
-
}, query));
|
|
264502
|
-
const signature = this.hmac(this.encode(body), this.encode(this.secret), _static_dependencies_noble_hashes_sha512_js__WEBPACK_IMPORTED_MODULE_4__/* .sha512 */ .o);
|
|
264503
|
-
headers = {
|
|
264504
|
-
'Content-Type': 'application/x-www-form-urlencoded',
|
|
264505
|
-
'Key': this.apiKey,
|
|
264506
|
-
'Sign': signature,
|
|
264507
|
-
};
|
|
264508
|
-
}
|
|
264509
|
-
else if (api === 'public') {
|
|
264510
|
-
url += '/' + this.implodeParams(path, params);
|
|
264511
|
-
if (Object.keys(query).length) {
|
|
264512
|
-
url += '?' + this.urlencode(query);
|
|
264513
|
-
}
|
|
264514
|
-
}
|
|
264515
|
-
else {
|
|
264516
|
-
url += '/' + this.implodeParams(path, params);
|
|
264517
|
-
if (method === 'GET') {
|
|
264518
|
-
if (Object.keys(query).length) {
|
|
264519
|
-
url += '?' + this.urlencode(query);
|
|
264520
|
-
}
|
|
264521
|
-
}
|
|
264522
|
-
else {
|
|
264523
|
-
if (Object.keys(query).length) {
|
|
264524
|
-
body = this.json(query);
|
|
264525
|
-
headers = {
|
|
264526
|
-
'Content-Type': 'application/json',
|
|
264527
|
-
};
|
|
264528
|
-
}
|
|
264529
|
-
}
|
|
264530
|
-
}
|
|
264531
|
-
return { 'url': url, 'method': method, 'body': body, 'headers': headers };
|
|
264532
|
-
}
|
|
264533
|
-
handleErrors(httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody) {
|
|
264534
|
-
if (response === undefined) {
|
|
264535
|
-
return undefined; // fallback to default error handler
|
|
264536
|
-
}
|
|
264537
|
-
if ('success' in response) {
|
|
264538
|
-
//
|
|
264539
|
-
// 1 - The exchange only returns the integer 'success' key from their private API
|
|
264540
|
-
//
|
|
264541
|
-
// { "success": 1, ... } httpCode === 200
|
|
264542
|
-
// { "success": 0, ... } httpCode === 200
|
|
264543
|
-
//
|
|
264544
|
-
// 2 - However, derived exchanges can return non-integers
|
|
264545
|
-
//
|
|
264546
|
-
// It can be a numeric string
|
|
264547
|
-
// { "sucesss": "1", ... }
|
|
264548
|
-
// { "sucesss": "0", ... }, httpCode >= 200 (can be 403, 502, etc)
|
|
264549
|
-
//
|
|
264550
|
-
// Or just a string
|
|
264551
|
-
// { "success": "true", ... }
|
|
264552
|
-
// { "success": "false", ... }, httpCode >= 200
|
|
264553
|
-
//
|
|
264554
|
-
// Or a boolean
|
|
264555
|
-
// { "success": true, ... }
|
|
264556
|
-
// { "success": false, ... }, httpCode >= 200
|
|
264557
|
-
//
|
|
264558
|
-
// 3 - Oversimplified, Python PEP8 forbids comparison operator (===) of different types
|
|
264559
|
-
//
|
|
264560
|
-
// 4 - We do not want to copy-paste and duplicate the code of this handler to other exchanges derived from Liqui
|
|
264561
|
-
//
|
|
264562
|
-
// To cover points 1, 2, 3 and 4 combined this handler should work like this:
|
|
264563
|
-
//
|
|
264564
|
-
let success = this.safeValue(response, 'success', false);
|
|
264565
|
-
if (typeof success === 'string') {
|
|
264566
|
-
if ((success === 'true') || (success === '1')) {
|
|
264567
|
-
success = true;
|
|
264568
|
-
}
|
|
264569
|
-
else {
|
|
264570
|
-
success = false;
|
|
264571
|
-
}
|
|
264572
|
-
}
|
|
264573
|
-
if (!success) {
|
|
264574
|
-
const code = this.safeString(response, 'code');
|
|
264575
|
-
const message = this.safeString(response, 'error');
|
|
264576
|
-
const feedback = this.id + ' ' + body;
|
|
264577
|
-
this.throwExactlyMatchedException(this.exceptions['exact'], code, feedback);
|
|
264578
|
-
this.throwExactlyMatchedException(this.exceptions['exact'], message, feedback);
|
|
264579
|
-
this.throwBroadlyMatchedException(this.exceptions['broad'], message, feedback);
|
|
264580
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeError(feedback); // unknown message
|
|
264581
|
-
}
|
|
264582
|
-
}
|
|
264583
|
-
return undefined;
|
|
264584
|
-
}
|
|
264585
|
-
}
|
|
264586
|
-
|
|
264587
|
-
|
|
264588
263954
|
/***/ }),
|
|
264589
263955
|
|
|
264590
263956
|
/***/ 1067:
|
|
@@ -288222,39 +287588,39 @@ var __webpack_exports__ = {};
|
|
|
288222
287588
|
(() => {
|
|
288223
287589
|
__webpack_require__.r(__webpack_exports__);
|
|
288224
287590
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
288225
|
-
/* harmony export */ AccountNotEnabled: () => (/* reexport safe */
|
|
288226
|
-
/* harmony export */ AccountSuspended: () => (/* reexport safe */
|
|
288227
|
-
/* harmony export */ AddressPending: () => (/* reexport safe */
|
|
288228
|
-
/* harmony export */ ArgumentsRequired: () => (/* reexport safe */
|
|
288229
|
-
/* harmony export */ AuthenticationError: () => (/* reexport safe */
|
|
288230
|
-
/* harmony export */ BadRequest: () => (/* reexport safe */
|
|
288231
|
-
/* harmony export */ BadResponse: () => (/* reexport safe */
|
|
288232
|
-
/* harmony export */ BadSymbol: () => (/* reexport safe */
|
|
288233
|
-
/* harmony export */ BaseError: () => (/* reexport safe */
|
|
288234
|
-
/* harmony export */ CancelPending: () => (/* reexport safe */
|
|
288235
|
-
/* harmony export */ DDoSProtection: () => (/* reexport safe */
|
|
288236
|
-
/* 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),
|
|
288237
287603
|
/* harmony export */ Exchange: () => (/* reexport safe */ _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__.e),
|
|
288238
|
-
/* harmony export */ ExchangeError: () => (/* reexport safe */
|
|
288239
|
-
/* harmony export */ ExchangeNotAvailable: () => (/* reexport safe */
|
|
288240
|
-
/* harmony export */ InsufficientFunds: () => (/* reexport safe */
|
|
288241
|
-
/* harmony export */ InvalidAddress: () => (/* reexport safe */
|
|
288242
|
-
/* harmony export */ InvalidNonce: () => (/* reexport safe */
|
|
288243
|
-
/* harmony export */ InvalidOrder: () => (/* reexport safe */
|
|
288244
|
-
/* harmony export */ MarginModeAlreadySet: () => (/* reexport safe */
|
|
288245
|
-
/* harmony export */ NetworkError: () => (/* reexport safe */
|
|
288246
|
-
/* harmony export */ NoChange: () => (/* reexport safe */
|
|
288247
|
-
/* harmony export */ NotSupported: () => (/* reexport safe */
|
|
288248
|
-
/* harmony export */ NullResponse: () => (/* reexport safe */
|
|
288249
|
-
/* harmony export */ OnMaintenance: () => (/* reexport safe */
|
|
288250
|
-
/* harmony export */ OrderImmediatelyFillable: () => (/* reexport safe */
|
|
288251
|
-
/* harmony export */ OrderNotCached: () => (/* reexport safe */
|
|
288252
|
-
/* harmony export */ OrderNotFillable: () => (/* reexport safe */
|
|
288253
|
-
/* harmony export */ OrderNotFound: () => (/* reexport safe */
|
|
288254
|
-
/* harmony export */ PermissionDenied: () => (/* reexport safe */
|
|
288255
|
-
/* harmony export */ Precise: () => (/* reexport safe */
|
|
288256
|
-
/* harmony export */ RateLimitExceeded: () => (/* reexport safe */
|
|
288257
|
-
/* 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),
|
|
288258
287624
|
/* harmony export */ ace: () => (/* reexport safe */ _src_ace_js__WEBPACK_IMPORTED_MODULE_1__.Z),
|
|
288259
287625
|
/* harmony export */ alpaca: () => (/* reexport safe */ _src_alpaca_js__WEBPACK_IMPORTED_MODULE_2__.Z),
|
|
288260
287626
|
/* harmony export */ ascendex: () => (/* reexport safe */ _src_ascendex_js__WEBPACK_IMPORTED_MODULE_3__.Z),
|
|
@@ -288309,11 +287675,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
288309
287675
|
/* harmony export */ delta: () => (/* reexport safe */ _src_delta_js__WEBPACK_IMPORTED_MODULE_51__.Z),
|
|
288310
287676
|
/* harmony export */ deribit: () => (/* reexport safe */ _src_deribit_js__WEBPACK_IMPORTED_MODULE_52__.Z),
|
|
288311
287677
|
/* harmony export */ digifinex: () => (/* reexport safe */ _src_digifinex_js__WEBPACK_IMPORTED_MODULE_53__.Z),
|
|
288312
|
-
/* harmony export */ errors: () => (/* reexport module object */
|
|
287678
|
+
/* harmony export */ errors: () => (/* reexport module object */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_160__),
|
|
288313
287679
|
/* harmony export */ exchanges: () => (/* binding */ exchanges),
|
|
288314
287680
|
/* harmony export */ exmo: () => (/* reexport safe */ _src_exmo_js__WEBPACK_IMPORTED_MODULE_54__.Z),
|
|
288315
287681
|
/* harmony export */ fmfwio: () => (/* reexport safe */ _src_fmfwio_js__WEBPACK_IMPORTED_MODULE_55__.Z),
|
|
288316
|
-
/* harmony export */ functions: () => (/* reexport module object */
|
|
287682
|
+
/* harmony export */ functions: () => (/* reexport module object */ _src_base_functions_js__WEBPACK_IMPORTED_MODULE_159__),
|
|
288317
287683
|
/* harmony export */ gate: () => (/* reexport safe */ _src_gate_js__WEBPACK_IMPORTED_MODULE_56__.Z),
|
|
288318
287684
|
/* harmony export */ gateio: () => (/* reexport safe */ _src_gateio_js__WEBPACK_IMPORTED_MODULE_57__.Z),
|
|
288319
287685
|
/* harmony export */ gemini: () => (/* reexport safe */ _src_gemini_js__WEBPACK_IMPORTED_MODULE_58__.Z),
|
|
@@ -288349,23 +287715,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
288349
287715
|
/* harmony export */ poloniexfutures: () => (/* reexport safe */ _src_poloniexfutures_js__WEBPACK_IMPORTED_MODULE_88__.Z),
|
|
288350
287716
|
/* harmony export */ pro: () => (/* binding */ pro),
|
|
288351
287717
|
/* harmony export */ probit: () => (/* reexport safe */ _src_probit_js__WEBPACK_IMPORTED_MODULE_89__.Z),
|
|
288352
|
-
/* harmony export */
|
|
288353
|
-
/* harmony export */
|
|
288354
|
-
/* harmony export */
|
|
288355
|
-
/* 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),
|
|
288356
287721
|
/* harmony export */ version: () => (/* binding */ version),
|
|
288357
|
-
/* harmony export */ wavesexchange: () => (/* reexport safe */
|
|
288358
|
-
/* harmony export */ wazirx: () => (/* reexport safe */
|
|
288359
|
-
/* harmony export */ whitebit: () => (/* reexport safe */
|
|
288360
|
-
/* harmony export */ woo: () => (/* reexport safe */
|
|
288361
|
-
/* harmony export */ yobit: () => (/* reexport safe */
|
|
288362
|
-
/* harmony export */ zaif: () => (/* reexport safe */
|
|
288363
|
-
/* 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)
|
|
288364
287729
|
/* harmony export */ });
|
|
288365
287730
|
/* harmony import */ var _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3043);
|
|
288366
|
-
/* harmony import */ var
|
|
288367
|
-
/* harmony import */ var
|
|
288368
|
-
/* 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);
|
|
288369
287734
|
/* harmony import */ var _src_ace_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9869);
|
|
288370
287735
|
/* harmony import */ var _src_alpaca_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5660);
|
|
288371
287736
|
/* harmony import */ var _src_ascendex_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9612);
|
|
@@ -288455,75 +287820,74 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
288455
287820
|
/* harmony import */ var _src_poloniex_js__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(8891);
|
|
288456
287821
|
/* harmony import */ var _src_poloniexfutures_js__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(6877);
|
|
288457
287822
|
/* harmony import */ var _src_probit_js__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(3657);
|
|
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
|
|
288520
|
-
/* harmony import */ var
|
|
288521
|
-
/* harmony import */ var
|
|
288522
|
-
/* harmony import */ var
|
|
288523
|
-
/* harmony import */ var
|
|
288524
|
-
/* harmony import */ var
|
|
288525
|
-
/* harmony import */ var
|
|
288526
|
-
/* 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);
|
|
288527
287891
|
/*
|
|
288528
287892
|
|
|
288529
287893
|
MIT License
|
|
@@ -288558,7 +287922,7 @@ SOFTWARE.
|
|
|
288558
287922
|
|
|
288559
287923
|
//-----------------------------------------------------------------------------
|
|
288560
287924
|
// this is updated by vss.js when building
|
|
288561
|
-
const version = '4.1.
|
|
287925
|
+
const version = '4.1.74';
|
|
288562
287926
|
_src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e.ccxtVersion = version;
|
|
288563
287927
|
//-----------------------------------------------------------------------------
|
|
288564
287928
|
|
|
@@ -288658,7 +288022,6 @@ _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e.ccxtVersion
|
|
|
288658
288022
|
|
|
288659
288023
|
|
|
288660
288024
|
|
|
288661
|
-
|
|
288662
288025
|
|
|
288663
288026
|
|
|
288664
288027
|
// pro exchanges
|
|
@@ -288810,77 +288173,76 @@ const exchanges = {
|
|
|
288810
288173
|
'poloniex': _src_poloniex_js__WEBPACK_IMPORTED_MODULE_87__/* ["default"] */ .Z,
|
|
288811
288174
|
'poloniexfutures': _src_poloniexfutures_js__WEBPACK_IMPORTED_MODULE_88__/* ["default"] */ .Z,
|
|
288812
288175
|
'probit': _src_probit_js__WEBPACK_IMPORTED_MODULE_89__/* ["default"] */ .Z,
|
|
288813
|
-
'
|
|
288814
|
-
'
|
|
288815
|
-
'
|
|
288816
|
-
'
|
|
288817
|
-
'
|
|
288818
|
-
'
|
|
288819
|
-
'
|
|
288820
|
-
'
|
|
288821
|
-
'
|
|
288822
|
-
'
|
|
288823
|
-
'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,
|
|
288824
288186
|
};
|
|
288825
288187
|
const pro = {
|
|
288826
|
-
'alpaca':
|
|
288827
|
-
'ascendex':
|
|
288828
|
-
'bequant':
|
|
288829
|
-
'binance':
|
|
288830
|
-
'binancecoinm':
|
|
288831
|
-
'binanceus':
|
|
288832
|
-
'binanceusdm':
|
|
288833
|
-
'bingx':
|
|
288834
|
-
'bitcoincom':
|
|
288835
|
-
'bitfinex':
|
|
288836
|
-
'bitfinex2':
|
|
288837
|
-
'bitget':
|
|
288838
|
-
'bitmart':
|
|
288839
|
-
'bitmex':
|
|
288840
|
-
'bitopro':
|
|
288841
|
-
'bitpanda':
|
|
288842
|
-
'bitrue':
|
|
288843
|
-
'bitstamp':
|
|
288844
|
-
'bittrex':
|
|
288845
|
-
'bitvavo':
|
|
288846
|
-
'blockchaincom':
|
|
288847
|
-
'bybit':
|
|
288848
|
-
'cex':
|
|
288849
|
-
'coinbase':
|
|
288850
|
-
'coinbaseprime':
|
|
288851
|
-
'coinbasepro':
|
|
288852
|
-
'coinex':
|
|
288853
|
-
'cryptocom':
|
|
288854
|
-
'currencycom':
|
|
288855
|
-
'deribit':
|
|
288856
|
-
'exmo':
|
|
288857
|
-
'gate':
|
|
288858
|
-
'gateio':
|
|
288859
|
-
'gemini':
|
|
288860
|
-
'hitbtc':
|
|
288861
|
-
'hollaex':
|
|
288862
|
-
'htx':
|
|
288863
|
-
'huobi':
|
|
288864
|
-
'huobijp':
|
|
288865
|
-
'idex':
|
|
288866
|
-
'independentreserve':
|
|
288867
|
-
'kraken':
|
|
288868
|
-
'krakenfutures':
|
|
288869
|
-
'kucoin':
|
|
288870
|
-
'kucoinfutures':
|
|
288871
|
-
'luno':
|
|
288872
|
-
'mexc':
|
|
288873
|
-
'ndax':
|
|
288874
|
-
'okcoin':
|
|
288875
|
-
'okx':
|
|
288876
|
-
'phemex':
|
|
288877
|
-
'poloniex':
|
|
288878
|
-
'poloniexfutures':
|
|
288879
|
-
'probit':
|
|
288880
|
-
'upbit':
|
|
288881
|
-
'wazirx':
|
|
288882
|
-
'whitebit':
|
|
288883
|
-
'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,
|
|
288884
288246
|
};
|
|
288885
288247
|
for (const exchange in pro) {
|
|
288886
288248
|
// const ccxtExchange = exchanges[exchange]
|
|
@@ -288893,7 +288255,7 @@ for (const exchange in pro) {
|
|
|
288893
288255
|
pro.exchanges = Object.keys(pro);
|
|
288894
288256
|
pro['Exchange'] = _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e; // now the same for rest and ts
|
|
288895
288257
|
//-----------------------------------------------------------------------------
|
|
288896
|
-
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__);
|
|
288897
288259
|
|
|
288898
288260
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ccxt);
|
|
288899
288261
|
//-----------------------------------------------------------------------------
|