ccxt 4.2.69 → 4.2.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/build.sh +1 -1
- package/dist/ccxt.browser.js +991 -211
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +3 -1
- package/dist/cjs/src/base/Exchange.js +32 -30
- package/dist/cjs/src/bitget.js +14 -6
- package/dist/cjs/src/coinbase.js +108 -89
- package/dist/cjs/src/digifinex.js +2 -1
- package/dist/cjs/src/gate.js +174 -1
- package/dist/cjs/src/hyperliquid.js +1 -1
- package/dist/cjs/src/kraken.js +1 -0
- package/dist/cjs/src/mexc.js +9 -0
- package/dist/cjs/src/pro/hyperliquid.js +556 -0
- package/js/ccxt.d.ts +4 -1
- package/js/ccxt.js +3 -1
- package/js/src/abstract/coinbase.d.ts +2 -0
- package/js/src/base/Exchange.d.ts +2 -2
- package/js/src/base/Exchange.js +32 -30
- package/js/src/base/types.d.ts +48 -48
- package/js/src/bitget.js +14 -6
- package/js/src/coinbase.d.ts +1 -1
- package/js/src/coinbase.js +108 -89
- package/js/src/digifinex.js +2 -1
- package/js/src/gate.d.ts +4 -1
- package/js/src/gate.js +174 -1
- package/js/src/hyperliquid.js +1 -1
- package/js/src/kraken.js +1 -0
- package/js/src/mexc.js +9 -0
- package/js/src/pro/hyperliquid.d.ts +23 -0
- package/js/src/pro/hyperliquid.js +557 -0
- package/package.json +1 -1
- package/skip-tests.json +49 -58
package/dist/ccxt.browser.js
CHANGED
|
@@ -7254,7 +7254,7 @@ class Exchange {
|
|
|
7254
7254
|
this.socksProxyAgentModule = undefined;
|
|
7255
7255
|
this.socksProxyAgentModuleChecked = false;
|
|
7256
7256
|
this.proxyDictionaries = {};
|
|
7257
|
-
this.
|
|
7257
|
+
this.proxiesModulesLoading = undefined;
|
|
7258
7258
|
Object.assign(this, _functions_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
7259
7259
|
//
|
|
7260
7260
|
// if (isNode) {
|
|
@@ -7755,36 +7755,38 @@ class Exchange {
|
|
|
7755
7755
|
console.log(...args);
|
|
7756
7756
|
}
|
|
7757
7757
|
async loadProxyModules() {
|
|
7758
|
-
|
|
7759
|
-
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
-
|
|
7767
|
-
|
|
7768
|
-
|
|
7769
|
-
|
|
7770
|
-
|
|
7771
|
-
|
|
7772
|
-
|
|
7773
|
-
|
|
7774
|
-
|
|
7775
|
-
|
|
7776
|
-
|
|
7777
|
-
|
|
7778
|
-
|
|
7779
|
-
|
|
7780
|
-
|
|
7781
|
-
|
|
7782
|
-
|
|
7783
|
-
|
|
7784
|
-
|
|
7785
|
-
|
|
7786
|
-
|
|
7758
|
+
// when loading markets, multiple parallel calls are made, so need one promise
|
|
7759
|
+
if (this.proxiesModulesLoading === undefined) {
|
|
7760
|
+
this.proxiesModulesLoading = (async () => {
|
|
7761
|
+
// we have to handle it with below nested way, because of dynamic
|
|
7762
|
+
// import issues (https://github.com/ccxt/ccxt/pull/20687)
|
|
7763
|
+
try {
|
|
7764
|
+
// todo: possible sync alternatives: https://stackoverflow.com/questions/51069002/convert-import-to-synchronous
|
|
7765
|
+
this.httpProxyAgentModule = await import(/* webpackIgnore: true */ '../static_dependencies/proxies/http-proxy-agent/index.js');
|
|
7766
|
+
this.httpsProxyAgentModule = await import(/* webpackIgnore: true */ '../static_dependencies/proxies/https-proxy-agent/index.js');
|
|
7767
|
+
}
|
|
7768
|
+
catch (e) {
|
|
7769
|
+
// if several users are using those frameworks which cause exceptions,
|
|
7770
|
+
// let them to be able to load modules still, by installing them
|
|
7771
|
+
try {
|
|
7772
|
+
// @ts-ignore
|
|
7773
|
+
this.httpProxyAgentModule = await import(/* webpackIgnore: true */ 'http-proxy-agent');
|
|
7774
|
+
// @ts-ignore
|
|
7775
|
+
this.httpProxyAgentModule = await import(/* webpackIgnore: true */ 'https-proxy-agent');
|
|
7776
|
+
}
|
|
7777
|
+
catch (e) { }
|
|
7778
|
+
}
|
|
7779
|
+
if (this.socksProxyAgentModuleChecked === false) {
|
|
7780
|
+
try {
|
|
7781
|
+
// @ts-ignore
|
|
7782
|
+
this.socksProxyAgentModule = await import(/* webpackIgnore: true */ 'socks-proxy-agent');
|
|
7783
|
+
}
|
|
7784
|
+
catch (e) { }
|
|
7785
|
+
this.socksProxyAgentModuleChecked = true;
|
|
7786
|
+
}
|
|
7787
|
+
})();
|
|
7787
7788
|
}
|
|
7789
|
+
return await this.proxiesModulesLoading;
|
|
7788
7790
|
}
|
|
7789
7791
|
setProxyAgents(httpProxy, httpsProxy, socksProxy) {
|
|
7790
7792
|
let chosenAgent = undefined;
|
|
@@ -51215,11 +51217,13 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
51215
51217
|
* @description fetch all open positions
|
|
51216
51218
|
* @see https://www.bitget.com/api-doc/contract/position/get-all-position
|
|
51217
51219
|
* @see https://www.bitget.com/api-doc/contract/position/Get-History-Position
|
|
51218
|
-
* @param {string[]
|
|
51220
|
+
* @param {string[]} [symbols] list of unified market symbols
|
|
51219
51221
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
51220
51222
|
* @param {string} [params.marginCoin] the settle currency of the positions, needs to match the productType
|
|
51221
51223
|
* @param {string} [params.productType] 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
|
51222
51224
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
51225
|
+
* @param {boolean} [params.useHistoryEndpoint] default false, when true will use the historic endpoint to fetch positions
|
|
51226
|
+
* @param {string} [params.method] either (default) 'privateMixGetV2MixPositionAllPosition' or 'privateMixGetV2MixPositionHistoryPosition'
|
|
51223
51227
|
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
51224
51228
|
*/
|
|
51225
51229
|
await this.loadMarkets();
|
|
@@ -51228,8 +51232,14 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
51228
51232
|
if (paginate) {
|
|
51229
51233
|
return await this.fetchPaginatedCallCursor('fetchPositions', undefined, undefined, undefined, params, 'endId', 'idLessThan');
|
|
51230
51234
|
}
|
|
51231
|
-
|
|
51232
|
-
const
|
|
51235
|
+
let method = undefined;
|
|
51236
|
+
const useHistoryEndpoint = this.safeBool(params, 'useHistoryEndpoint', false);
|
|
51237
|
+
if (useHistoryEndpoint) {
|
|
51238
|
+
method = 'privateMixGetV2MixPositionHistoryPosition';
|
|
51239
|
+
}
|
|
51240
|
+
else {
|
|
51241
|
+
[method, params] = this.handleOptionAndParams(params, 'fetchPositions', 'method', 'privateMixGetV2MixPositionAllPosition');
|
|
51242
|
+
}
|
|
51233
51243
|
let market = undefined;
|
|
51234
51244
|
if (symbols !== undefined) {
|
|
51235
51245
|
const first = this.safeString(symbols, 0);
|
|
@@ -51345,11 +51355,11 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
51345
51355
|
//
|
|
51346
51356
|
let position = [];
|
|
51347
51357
|
if (!isHistory) {
|
|
51348
|
-
position = this.
|
|
51358
|
+
position = this.safeList(response, 'data', []);
|
|
51349
51359
|
}
|
|
51350
51360
|
else {
|
|
51351
|
-
const data = this.
|
|
51352
|
-
position = this.
|
|
51361
|
+
const data = this.safeDict(response, 'data', {});
|
|
51362
|
+
position = this.safeList(data, 'list', []);
|
|
51353
51363
|
}
|
|
51354
51364
|
const result = [];
|
|
51355
51365
|
for (let i = 0; i < position.length; i++) {
|
|
@@ -93274,6 +93284,8 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
93274
93284
|
'brokerage/intx/portfolio/{portfolio_uuid}': 1,
|
|
93275
93285
|
'brokerage/intx/positions/{portfolio_uuid}': 1,
|
|
93276
93286
|
'brokerage/intx/positions/{portfolio_uuid}/{symbol}': 1,
|
|
93287
|
+
'brokerage/payment_methods': 1,
|
|
93288
|
+
'brokerage/payment_methods/{payment_method_id}': 1,
|
|
93277
93289
|
},
|
|
93278
93290
|
'post': {
|
|
93279
93291
|
'brokerage/orders': 1,
|
|
@@ -93426,7 +93438,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
93426
93438
|
// }
|
|
93427
93439
|
// }
|
|
93428
93440
|
//
|
|
93429
|
-
response = this.
|
|
93441
|
+
response = this.safeDict(response, 'data', {});
|
|
93430
93442
|
}
|
|
93431
93443
|
else {
|
|
93432
93444
|
response = await this.v3PublicGetBrokerageTime(params);
|
|
@@ -93518,7 +93530,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
93518
93530
|
const accounts = this.safeList(response, 'data', []);
|
|
93519
93531
|
const length = accounts.length;
|
|
93520
93532
|
const lastIndex = length - 1;
|
|
93521
|
-
const last = this.
|
|
93533
|
+
const last = this.safeDict(accounts, lastIndex);
|
|
93522
93534
|
if ((cursor !== undefined) && (cursor !== '')) {
|
|
93523
93535
|
last['next_starting_after'] = cursor;
|
|
93524
93536
|
accounts[lastIndex] = last;
|
|
@@ -93569,7 +93581,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
93569
93581
|
const accounts = this.safeList(response, 'accounts', []);
|
|
93570
93582
|
const length = accounts.length;
|
|
93571
93583
|
const lastIndex = length - 1;
|
|
93572
|
-
const last = this.
|
|
93584
|
+
const last = this.safeDict(accounts, lastIndex);
|
|
93573
93585
|
const cursor = this.safeString(response, 'cursor');
|
|
93574
93586
|
if ((cursor !== undefined) && (cursor !== '')) {
|
|
93575
93587
|
last['cursor'] = cursor;
|
|
@@ -93633,9 +93645,9 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
93633
93645
|
// }
|
|
93634
93646
|
// }
|
|
93635
93647
|
//
|
|
93636
|
-
const active = this.
|
|
93648
|
+
const active = this.safeBool(account, 'active');
|
|
93637
93649
|
const currencyIdV3 = this.safeString(account, 'currency');
|
|
93638
|
-
const currency = this.
|
|
93650
|
+
const currency = this.safeDict(account, 'currency', {});
|
|
93639
93651
|
const currencyId = this.safeString(currency, 'code', currencyIdV3);
|
|
93640
93652
|
const typeV3 = this.safeString(account, 'name');
|
|
93641
93653
|
const typeV2 = this.safeString(account, 'type');
|
|
@@ -93712,7 +93724,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
93712
93724
|
// }
|
|
93713
93725
|
// }
|
|
93714
93726
|
//
|
|
93715
|
-
const data = this.
|
|
93727
|
+
const data = this.safeDict(response, 'data', {});
|
|
93716
93728
|
const tag = this.safeString(data, 'destination_tag');
|
|
93717
93729
|
const address = this.safeString(data, 'address');
|
|
93718
93730
|
return {
|
|
@@ -93926,24 +93938,24 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
93926
93938
|
let amountAndCurrencyObject = undefined;
|
|
93927
93939
|
let feeObject = undefined;
|
|
93928
93940
|
if (transactionType === 'send') {
|
|
93929
|
-
const network = this.
|
|
93930
|
-
amountAndCurrencyObject = this.
|
|
93931
|
-
feeObject = this.
|
|
93941
|
+
const network = this.safeDict(transaction, 'network', {});
|
|
93942
|
+
amountAndCurrencyObject = this.safeDict(network, 'transaction_amount', {});
|
|
93943
|
+
feeObject = this.safeDict(network, 'transaction_fee', {});
|
|
93932
93944
|
}
|
|
93933
93945
|
else {
|
|
93934
|
-
amountAndCurrencyObject = this.
|
|
93935
|
-
feeObject = this.
|
|
93946
|
+
amountAndCurrencyObject = this.safeDict(transaction, 'subtotal', {});
|
|
93947
|
+
feeObject = this.safeDict(transaction, 'fee', {});
|
|
93936
93948
|
}
|
|
93937
93949
|
let status = this.parseTransactionStatus(this.safeString(transaction, 'status'));
|
|
93938
93950
|
if (status === undefined) {
|
|
93939
|
-
const committed = this.
|
|
93951
|
+
const committed = this.safeBool(transaction, 'committed');
|
|
93940
93952
|
status = committed ? 'ok' : 'pending';
|
|
93941
93953
|
}
|
|
93942
93954
|
const id = this.safeString(transaction, 'id');
|
|
93943
93955
|
const currencyId = this.safeString(amountAndCurrencyObject, 'currency');
|
|
93944
93956
|
const feeCurrencyId = this.safeString(feeObject, 'currency');
|
|
93945
|
-
const datetime = this.
|
|
93946
|
-
const toObject = this.
|
|
93957
|
+
const datetime = this.safeString(transaction, 'created_at');
|
|
93958
|
+
const toObject = this.safeDict(transaction, 'to', {});
|
|
93947
93959
|
const toAddress = this.safeString(toObject, 'address');
|
|
93948
93960
|
return {
|
|
93949
93961
|
'info': transaction,
|
|
@@ -93962,7 +93974,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
93962
93974
|
'amount': this.safeNumber(amountAndCurrencyObject, 'amount'),
|
|
93963
93975
|
'currency': this.safeCurrencyCode(currencyId, currency),
|
|
93964
93976
|
'status': status,
|
|
93965
|
-
'updated': this.parse8601(this.
|
|
93977
|
+
'updated': this.parse8601(this.safeString(transaction, 'updated_at')),
|
|
93966
93978
|
'fee': {
|
|
93967
93979
|
'cost': this.safeNumber(feeObject, 'amount'),
|
|
93968
93980
|
'currency': this.safeCurrencyCode(feeCurrencyId),
|
|
@@ -94032,10 +94044,10 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
94032
94044
|
// }
|
|
94033
94045
|
//
|
|
94034
94046
|
let symbol = undefined;
|
|
94035
|
-
const totalObject = this.
|
|
94036
|
-
const amountObject = this.
|
|
94037
|
-
const subtotalObject = this.
|
|
94038
|
-
const feeObject = this.
|
|
94047
|
+
const totalObject = this.safeDict(trade, 'total', {});
|
|
94048
|
+
const amountObject = this.safeDict(trade, 'amount', {});
|
|
94049
|
+
const subtotalObject = this.safeDict(trade, 'subtotal', {});
|
|
94050
|
+
const feeObject = this.safeDict(trade, 'fee', {});
|
|
94039
94051
|
const marketId = this.safeString(trade, 'product_id');
|
|
94040
94052
|
market = this.safeMarket(marketId, market, '-');
|
|
94041
94053
|
if (market !== undefined) {
|
|
@@ -94050,7 +94062,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
94050
94062
|
symbol = base + '/' + quote;
|
|
94051
94063
|
}
|
|
94052
94064
|
}
|
|
94053
|
-
const sizeInQuote = this.
|
|
94065
|
+
const sizeInQuote = this.safeBool(trade, 'size_in_quote');
|
|
94054
94066
|
const v3Price = this.safeString(trade, 'price');
|
|
94055
94067
|
let v3Cost = undefined;
|
|
94056
94068
|
let v3Amount = this.safeString(trade, 'size');
|
|
@@ -94119,11 +94131,11 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
94119
94131
|
}
|
|
94120
94132
|
async fetchMarketsV2(params = {}) {
|
|
94121
94133
|
const response = await this.fetchCurrenciesFromCache(params);
|
|
94122
|
-
const currencies = this.
|
|
94123
|
-
const exchangeRates = this.
|
|
94124
|
-
const data = this.
|
|
94134
|
+
const currencies = this.safeDict(response, 'currencies', {});
|
|
94135
|
+
const exchangeRates = this.safeDict(response, 'exchangeRates', {});
|
|
94136
|
+
const data = this.safeList(currencies, 'data', []);
|
|
94125
94137
|
const dataById = this.indexBy(data, 'id');
|
|
94126
|
-
const rates = this.
|
|
94138
|
+
const rates = this.safeDict(this.safeDict(exchangeRates, 'data', {}), 'rates', {});
|
|
94127
94139
|
const baseIds = Object.keys(rates);
|
|
94128
94140
|
const result = [];
|
|
94129
94141
|
for (let i = 0; i < baseIds.length; i++) {
|
|
@@ -94245,8 +94257,8 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
94245
94257
|
// "coinbase_pro_fees": 0
|
|
94246
94258
|
// }
|
|
94247
94259
|
//
|
|
94248
|
-
const feeTier = this.
|
|
94249
|
-
const data = this.
|
|
94260
|
+
const feeTier = this.safeDict(fees, 'fee_tier', {});
|
|
94261
|
+
const data = this.safeList(response, 'products', []);
|
|
94250
94262
|
const result = [];
|
|
94251
94263
|
for (let i = 0; i < data.length; i++) {
|
|
94252
94264
|
const market = data[i];
|
|
@@ -94256,8 +94268,8 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
94256
94268
|
const base = this.safeCurrencyCode(baseId);
|
|
94257
94269
|
const quote = this.safeCurrencyCode(quoteId);
|
|
94258
94270
|
const marketType = this.safeStringLower(market, 'product_type');
|
|
94259
|
-
const tradingDisabled = this.
|
|
94260
|
-
const stablePairs = this.
|
|
94271
|
+
const tradingDisabled = this.safeBool(market, 'trading_disabled');
|
|
94272
|
+
const stablePairs = this.safeList(this.options, 'stablePairs', []);
|
|
94261
94273
|
result.push({
|
|
94262
94274
|
'id': id,
|
|
94263
94275
|
'symbol': base + '/' + quote,
|
|
@@ -94313,7 +94325,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
94313
94325
|
return result;
|
|
94314
94326
|
}
|
|
94315
94327
|
async fetchCurrenciesFromCache(params = {}) {
|
|
94316
|
-
const options = this.
|
|
94328
|
+
const options = this.safeDict(this.options, 'fetchCurrencies', {});
|
|
94317
94329
|
const timestamp = this.safeInteger(options, 'timestamp');
|
|
94318
94330
|
const expires = this.safeInteger(options, 'expires', 1000);
|
|
94319
94331
|
const now = this.milliseconds();
|
|
@@ -94369,7 +94381,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
94369
94381
|
* @returns {object} an associative dictionary of currencies
|
|
94370
94382
|
*/
|
|
94371
94383
|
const response = await this.fetchCurrenciesFromCache(params);
|
|
94372
|
-
const currencies = this.
|
|
94384
|
+
const currencies = this.safeDict(response, 'currencies', {});
|
|
94373
94385
|
//
|
|
94374
94386
|
// fiat
|
|
94375
94387
|
//
|
|
@@ -94486,8 +94498,8 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
94486
94498
|
// }
|
|
94487
94499
|
// }
|
|
94488
94500
|
//
|
|
94489
|
-
const data = this.
|
|
94490
|
-
const rates = this.
|
|
94501
|
+
const data = this.safeDict(response, 'data', {});
|
|
94502
|
+
const rates = this.safeDict(data, 'rates', {});
|
|
94491
94503
|
const quoteId = this.safeString(data, 'currency');
|
|
94492
94504
|
const result = {};
|
|
94493
94505
|
const baseIds = Object.keys(rates);
|
|
@@ -94546,7 +94558,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
94546
94558
|
// "num_products": 549
|
|
94547
94559
|
// }
|
|
94548
94560
|
//
|
|
94549
|
-
const data = this.
|
|
94561
|
+
const data = this.safeList(response, 'products', []);
|
|
94550
94562
|
const result = {};
|
|
94551
94563
|
for (let i = 0; i < data.length; i++) {
|
|
94552
94564
|
const entry = data[i];
|
|
@@ -94594,9 +94606,9 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
94594
94606
|
//
|
|
94595
94607
|
// {"data":{"base":"BTC","currency":"USD","amount":"48691.23"}}
|
|
94596
94608
|
//
|
|
94597
|
-
const spotData = this.
|
|
94598
|
-
const askData = this.
|
|
94599
|
-
const bidData = this.
|
|
94609
|
+
const spotData = this.safeDict(spot, 'data', {});
|
|
94610
|
+
const askData = this.safeDict(ask, 'data', {});
|
|
94611
|
+
const bidData = this.safeDict(bid, 'data', {});
|
|
94600
94612
|
const bidAskLast = {
|
|
94601
94613
|
'bid': this.safeNumber(bidData, 'amount'),
|
|
94602
94614
|
'ask': this.safeNumber(askData, 'amount'),
|
|
@@ -94630,7 +94642,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
94630
94642
|
// "best_ask": "28208.62"
|
|
94631
94643
|
// }
|
|
94632
94644
|
//
|
|
94633
|
-
const data = this.
|
|
94645
|
+
const data = this.safeList(response, 'trades', []);
|
|
94634
94646
|
const ticker = this.parseTicker(data[0], market);
|
|
94635
94647
|
ticker['bid'] = this.safeNumber(response, 'best_bid');
|
|
94636
94648
|
ticker['ask'] = this.safeNumber(response, 'best_ask');
|
|
@@ -94722,8 +94734,8 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
94722
94734
|
let bidVolume = undefined;
|
|
94723
94735
|
let askVolume = undefined;
|
|
94724
94736
|
if (('bids' in ticker)) {
|
|
94725
|
-
const bids = this.
|
|
94726
|
-
const asks = this.
|
|
94737
|
+
const bids = this.safeList(ticker, 'bids', []);
|
|
94738
|
+
const asks = this.safeList(ticker, 'asks', []);
|
|
94727
94739
|
bid = this.safeNumber(bids[0], 'price');
|
|
94728
94740
|
bidVolume = this.safeNumber(bids[0], 'size');
|
|
94729
94741
|
ask = this.safeNumber(asks[0], 'price');
|
|
@@ -94756,21 +94768,21 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
94756
94768
|
}, market);
|
|
94757
94769
|
}
|
|
94758
94770
|
parseCustomBalance(response, params = {}) {
|
|
94759
|
-
const balances = this.
|
|
94760
|
-
const accounts = this.
|
|
94761
|
-
const v3Accounts = this.
|
|
94771
|
+
const balances = this.safeList2(response, 'data', 'accounts', []);
|
|
94772
|
+
const accounts = this.safeList(params, 'type', this.options['accounts']);
|
|
94773
|
+
const v3Accounts = this.safeList(params, 'type', this.options['v3Accounts']);
|
|
94762
94774
|
const result = { 'info': response };
|
|
94763
94775
|
for (let b = 0; b < balances.length; b++) {
|
|
94764
94776
|
const balance = balances[b];
|
|
94765
94777
|
const type = this.safeString(balance, 'type');
|
|
94766
94778
|
if (this.inArray(type, accounts)) {
|
|
94767
|
-
const value = this.
|
|
94779
|
+
const value = this.safeDict(balance, 'balance');
|
|
94768
94780
|
if (value !== undefined) {
|
|
94769
94781
|
const currencyId = this.safeString(value, 'currency');
|
|
94770
94782
|
const code = this.safeCurrencyCode(currencyId);
|
|
94771
94783
|
const total = this.safeString(value, 'amount');
|
|
94772
94784
|
const free = total;
|
|
94773
|
-
let account = this.
|
|
94785
|
+
let account = this.safeDict(result, code);
|
|
94774
94786
|
if (account === undefined) {
|
|
94775
94787
|
account = this.account();
|
|
94776
94788
|
account['free'] = free;
|
|
@@ -94784,15 +94796,15 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
94784
94796
|
}
|
|
94785
94797
|
}
|
|
94786
94798
|
else if (this.inArray(type, v3Accounts)) {
|
|
94787
|
-
const available = this.
|
|
94788
|
-
const hold = this.
|
|
94799
|
+
const available = this.safeDict(balance, 'available_balance');
|
|
94800
|
+
const hold = this.safeDict(balance, 'hold');
|
|
94789
94801
|
if (available !== undefined && hold !== undefined) {
|
|
94790
94802
|
const currencyId = this.safeString(available, 'currency');
|
|
94791
94803
|
const code = this.safeCurrencyCode(currencyId);
|
|
94792
94804
|
const used = this.safeString(hold, 'value');
|
|
94793
94805
|
const free = this.safeString(available, 'value');
|
|
94794
94806
|
const total = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringAdd(used, free);
|
|
94795
|
-
let account = this.
|
|
94807
|
+
let account = this.safeDict(result, code);
|
|
94796
94808
|
if (account === undefined) {
|
|
94797
94809
|
account = this.account();
|
|
94798
94810
|
account['free'] = free;
|
|
@@ -95200,7 +95212,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
95200
95212
|
// }
|
|
95201
95213
|
// }
|
|
95202
95214
|
//
|
|
95203
|
-
const amountInfo = this.
|
|
95215
|
+
const amountInfo = this.safeDict(item, 'amount', {});
|
|
95204
95216
|
let amount = this.safeString(amountInfo, 'amount');
|
|
95205
95217
|
let direction = undefined;
|
|
95206
95218
|
if (_base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringLt(amount, '0')) {
|
|
@@ -95222,9 +95234,9 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
95222
95234
|
// let txid = undefined;
|
|
95223
95235
|
//
|
|
95224
95236
|
let fee = undefined;
|
|
95225
|
-
const networkInfo = this.
|
|
95237
|
+
const networkInfo = this.safeDict(item, 'network', {});
|
|
95226
95238
|
// txid = network['hash']; // txid does not belong to the unified ledger structure
|
|
95227
|
-
const feeInfo = this.
|
|
95239
|
+
const feeInfo = this.safeDict(networkInfo, 'transaction_fee');
|
|
95228
95240
|
if (feeInfo !== undefined) {
|
|
95229
95241
|
const feeCurrencyId = this.safeString(feeInfo, 'currency');
|
|
95230
95242
|
const feeCurrencyCode = this.safeCurrencyCode(feeCurrencyId, currency);
|
|
@@ -95234,7 +95246,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
95234
95246
|
'currency': feeCurrencyCode,
|
|
95235
95247
|
};
|
|
95236
95248
|
}
|
|
95237
|
-
const timestamp = this.parse8601(this.
|
|
95249
|
+
const timestamp = this.parse8601(this.safeString(item, 'created_at'));
|
|
95238
95250
|
const id = this.safeString(item, 'id');
|
|
95239
95251
|
const type = this.parseLedgerEntryType(this.safeString(item, 'type'));
|
|
95240
95252
|
const status = this.parseLedgerEntryStatus(this.safeString(item, 'status'));
|
|
@@ -95366,7 +95378,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
95366
95378
|
const isStopLoss = stopLossPrice !== undefined;
|
|
95367
95379
|
const isTakeProfit = takeProfitPrice !== undefined;
|
|
95368
95380
|
const timeInForce = this.safeString(params, 'timeInForce');
|
|
95369
|
-
const postOnly = (timeInForce === 'PO') ? true : this.
|
|
95381
|
+
const postOnly = (timeInForce === 'PO') ? true : this.safeBool2(params, 'postOnly', 'post_only', false);
|
|
95370
95382
|
const endTime = this.safeString(params, 'end_time');
|
|
95371
95383
|
let stopDirection = this.safeString(params, 'stop_direction');
|
|
95372
95384
|
if (type === 'limit') {
|
|
@@ -95436,6 +95448,14 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
95436
95448
|
},
|
|
95437
95449
|
};
|
|
95438
95450
|
}
|
|
95451
|
+
else if (timeInForce === 'IOC') {
|
|
95452
|
+
request['order_configuration'] = {
|
|
95453
|
+
'sor_limit_ioc': {
|
|
95454
|
+
'base_size': this.amountToPrecision(symbol, amount),
|
|
95455
|
+
'limit_price': this.priceToPrecision(symbol, price),
|
|
95456
|
+
},
|
|
95457
|
+
};
|
|
95458
|
+
}
|
|
95439
95459
|
else {
|
|
95440
95460
|
request['order_configuration'] = {
|
|
95441
95461
|
'limit_limit_gtc': {
|
|
@@ -95489,7 +95509,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
95489
95509
|
}
|
|
95490
95510
|
}
|
|
95491
95511
|
params = this.omit(params, ['timeInForce', 'triggerPrice', 'stopLossPrice', 'takeProfitPrice', 'stopPrice', 'stop_price', 'stopDirection', 'stop_direction', 'clientOrderId', 'postOnly', 'post_only', 'end_time']);
|
|
95492
|
-
const preview = this.
|
|
95512
|
+
const preview = this.safeBool2(params, 'preview', 'test', false);
|
|
95493
95513
|
let response = undefined;
|
|
95494
95514
|
if (preview) {
|
|
95495
95515
|
params = this.omit(params, ['preview', 'test']);
|
|
@@ -95536,9 +95556,9 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
95536
95556
|
// }
|
|
95537
95557
|
// }
|
|
95538
95558
|
//
|
|
95539
|
-
const success = this.
|
|
95559
|
+
const success = this.safeBool(response, 'success');
|
|
95540
95560
|
if (success !== true) {
|
|
95541
|
-
const errorResponse = this.
|
|
95561
|
+
const errorResponse = this.safeDict(response, 'error_response');
|
|
95542
95562
|
const errorTitle = this.safeString(errorResponse, 'error');
|
|
95543
95563
|
const errorMessage = this.safeString(errorResponse, 'message');
|
|
95544
95564
|
if (errorResponse !== undefined) {
|
|
@@ -95547,7 +95567,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
95547
95567
|
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeError(errorMessage);
|
|
95548
95568
|
}
|
|
95549
95569
|
}
|
|
95550
|
-
const data = this.
|
|
95570
|
+
const data = this.safeDict(response, 'success_response', {});
|
|
95551
95571
|
return this.parseOrder(data, market);
|
|
95552
95572
|
}
|
|
95553
95573
|
parseOrder(order, market = undefined) {
|
|
@@ -95618,29 +95638,39 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
95618
95638
|
if (symbol !== undefined) {
|
|
95619
95639
|
market = this.market(symbol);
|
|
95620
95640
|
}
|
|
95621
|
-
const orderConfiguration = this.
|
|
95622
|
-
const limitGTC = this.
|
|
95623
|
-
const limitGTD = this.
|
|
95624
|
-
const
|
|
95625
|
-
const
|
|
95626
|
-
const
|
|
95627
|
-
const
|
|
95641
|
+
const orderConfiguration = this.safeDict(order, 'order_configuration', {});
|
|
95642
|
+
const limitGTC = this.safeDict(orderConfiguration, 'limit_limit_gtc');
|
|
95643
|
+
const limitGTD = this.safeDict(orderConfiguration, 'limit_limit_gtd');
|
|
95644
|
+
const limitIOC = this.safeDict(orderConfiguration, 'sor_limit_ioc');
|
|
95645
|
+
const stopLimitGTC = this.safeDict(orderConfiguration, 'stop_limit_stop_limit_gtc');
|
|
95646
|
+
const stopLimitGTD = this.safeDict(orderConfiguration, 'stop_limit_stop_limit_gtd');
|
|
95647
|
+
const marketIOC = this.safeDict(orderConfiguration, 'market_market_ioc');
|
|
95648
|
+
const isLimit = ((limitGTC !== undefined) || (limitGTD !== undefined) || (limitIOC !== undefined));
|
|
95628
95649
|
const isStop = ((stopLimitGTC !== undefined) || (stopLimitGTD !== undefined));
|
|
95629
95650
|
let price = undefined;
|
|
95630
95651
|
let amount = undefined;
|
|
95631
95652
|
let postOnly = undefined;
|
|
95632
95653
|
let triggerPrice = undefined;
|
|
95633
95654
|
if (isLimit) {
|
|
95634
|
-
|
|
95655
|
+
let target = undefined;
|
|
95656
|
+
if (limitGTC !== undefined) {
|
|
95657
|
+
target = limitGTC;
|
|
95658
|
+
}
|
|
95659
|
+
else if (limitGTD !== undefined) {
|
|
95660
|
+
target = limitGTD;
|
|
95661
|
+
}
|
|
95662
|
+
else {
|
|
95663
|
+
target = limitIOC;
|
|
95664
|
+
}
|
|
95635
95665
|
price = this.safeString(target, 'limit_price');
|
|
95636
95666
|
amount = this.safeString(target, 'base_size');
|
|
95637
|
-
postOnly = this.
|
|
95667
|
+
postOnly = this.safeBool(target, 'post_only');
|
|
95638
95668
|
}
|
|
95639
95669
|
else if (isStop) {
|
|
95640
95670
|
const stopTarget = (stopLimitGTC !== undefined) ? stopLimitGTC : stopLimitGTD;
|
|
95641
95671
|
price = this.safeString(stopTarget, 'limit_price');
|
|
95642
95672
|
amount = this.safeString(stopTarget, 'base_size');
|
|
95643
|
-
postOnly = this.
|
|
95673
|
+
postOnly = this.safeBool(stopTarget, 'post_only');
|
|
95644
95674
|
triggerPrice = this.safeString(stopTarget, 'stop_price');
|
|
95645
95675
|
}
|
|
95646
95676
|
else {
|
|
@@ -95726,7 +95756,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
95726
95756
|
*/
|
|
95727
95757
|
await this.loadMarkets();
|
|
95728
95758
|
const orders = await this.cancelOrders([id], symbol, params);
|
|
95729
|
-
return this.
|
|
95759
|
+
return this.safeDict(orders, 0, {});
|
|
95730
95760
|
}
|
|
95731
95761
|
async cancelOrders(ids, symbol = undefined, params = {}) {
|
|
95732
95762
|
/**
|
|
@@ -95759,9 +95789,9 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
95759
95789
|
// ]
|
|
95760
95790
|
// }
|
|
95761
95791
|
//
|
|
95762
|
-
const orders = this.
|
|
95792
|
+
const orders = this.safeList(response, 'results', []);
|
|
95763
95793
|
for (let i = 0; i < orders.length; i++) {
|
|
95764
|
-
const success = this.
|
|
95794
|
+
const success = this.safeBool(orders[i], 'success');
|
|
95765
95795
|
if (success !== true) {
|
|
95766
95796
|
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.BadRequest(this.id + ' cancelOrders() has failed, check your arguments and parameters');
|
|
95767
95797
|
}
|
|
@@ -95795,7 +95825,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
95795
95825
|
if (price !== undefined) {
|
|
95796
95826
|
request['price'] = this.priceToPrecision(symbol, price);
|
|
95797
95827
|
}
|
|
95798
|
-
const preview = this.
|
|
95828
|
+
const preview = this.safeBool2(params, 'preview', 'test', false);
|
|
95799
95829
|
let response = undefined;
|
|
95800
95830
|
if (preview) {
|
|
95801
95831
|
params = this.omit(params, ['preview', 'test']);
|
|
@@ -95874,7 +95904,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
95874
95904
|
// }
|
|
95875
95905
|
// }
|
|
95876
95906
|
//
|
|
95877
|
-
const order = this.
|
|
95907
|
+
const order = this.safeDict(response, 'order', {});
|
|
95878
95908
|
return this.parseOrder(order, market);
|
|
95879
95909
|
}
|
|
95880
95910
|
async fetchOrders(symbol = undefined, since = undefined, limit = 100, params = {}) {
|
|
@@ -95911,7 +95941,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
95911
95941
|
if (since !== undefined) {
|
|
95912
95942
|
request['start_date'] = this.iso8601(since);
|
|
95913
95943
|
}
|
|
95914
|
-
const until = this.
|
|
95944
|
+
const until = this.safeIntegerN(params, ['until', 'till']);
|
|
95915
95945
|
if (until !== undefined) {
|
|
95916
95946
|
params = this.omit(params, ['until', 'till']);
|
|
95917
95947
|
request['end_date'] = this.iso8601(until);
|
|
@@ -95959,8 +95989,8 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
95959
95989
|
// "cursor": ""
|
|
95960
95990
|
// }
|
|
95961
95991
|
//
|
|
95962
|
-
const orders = this.
|
|
95963
|
-
const first = this.
|
|
95992
|
+
const orders = this.safeList(response, 'orders', []);
|
|
95993
|
+
const first = this.safeDict(orders, 0);
|
|
95964
95994
|
const cursor = this.safeString(response, 'cursor');
|
|
95965
95995
|
if ((cursor !== undefined) && (cursor !== '')) {
|
|
95966
95996
|
first['cursor'] = cursor;
|
|
@@ -95987,7 +96017,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
95987
96017
|
if (since !== undefined) {
|
|
95988
96018
|
request['start_date'] = this.iso8601(since);
|
|
95989
96019
|
}
|
|
95990
|
-
const until = this.
|
|
96020
|
+
const until = this.safeIntegerN(params, ['until', 'till']);
|
|
95991
96021
|
if (until !== undefined) {
|
|
95992
96022
|
params = this.omit(params, ['until', 'till']);
|
|
95993
96023
|
request['end_date'] = this.iso8601(until);
|
|
@@ -96035,8 +96065,8 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
96035
96065
|
// "cursor": ""
|
|
96036
96066
|
// }
|
|
96037
96067
|
//
|
|
96038
|
-
const orders = this.
|
|
96039
|
-
const first = this.
|
|
96068
|
+
const orders = this.safeList(response, 'orders', []);
|
|
96069
|
+
const first = this.safeDict(orders, 0);
|
|
96040
96070
|
const cursor = this.safeString(response, 'cursor');
|
|
96041
96071
|
if ((cursor !== undefined) && (cursor !== '')) {
|
|
96042
96072
|
first['cursor'] = cursor;
|
|
@@ -96130,7 +96160,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
96130
96160
|
'product_id': market['id'],
|
|
96131
96161
|
'granularity': this.safeString(this.timeframes, timeframe, timeframe),
|
|
96132
96162
|
};
|
|
96133
|
-
const until = this.
|
|
96163
|
+
const until = this.safeIntegerN(params, ['until', 'till', 'end']);
|
|
96134
96164
|
params = this.omit(params, ['until', 'till']);
|
|
96135
96165
|
const duration = this.parseTimeframe(timeframe);
|
|
96136
96166
|
const requestedDuration = limit * duration;
|
|
@@ -96164,7 +96194,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
96164
96194
|
// ]
|
|
96165
96195
|
// }
|
|
96166
96196
|
//
|
|
96167
|
-
const candles = this.
|
|
96197
|
+
const candles = this.safeList(response, 'candles', []);
|
|
96168
96198
|
return this.parseOHLCVs(candles, market, timeframe, since, limit);
|
|
96169
96199
|
}
|
|
96170
96200
|
parseOHLCV(ohlcv, market = undefined) {
|
|
@@ -96237,7 +96267,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
96237
96267
|
// ]
|
|
96238
96268
|
// }
|
|
96239
96269
|
//
|
|
96240
|
-
const trades = this.
|
|
96270
|
+
const trades = this.safeList(response, 'trades', []);
|
|
96241
96271
|
return this.parseTrades(trades, market, since, limit);
|
|
96242
96272
|
}
|
|
96243
96273
|
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
@@ -96274,7 +96304,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
96274
96304
|
if (since !== undefined) {
|
|
96275
96305
|
request['start_sequence_timestamp'] = this.iso8601(since);
|
|
96276
96306
|
}
|
|
96277
|
-
const until = this.
|
|
96307
|
+
const until = this.safeIntegerN(params, ['until', 'till']);
|
|
96278
96308
|
if (until !== undefined) {
|
|
96279
96309
|
params = this.omit(params, ['until', 'till']);
|
|
96280
96310
|
request['end_sequence_timestamp'] = this.iso8601(until);
|
|
@@ -96303,8 +96333,8 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
96303
96333
|
// "cursor": ""
|
|
96304
96334
|
// }
|
|
96305
96335
|
//
|
|
96306
|
-
const trades = this.
|
|
96307
|
-
const first = this.
|
|
96336
|
+
const trades = this.safeList(response, 'fills', []);
|
|
96337
|
+
const first = this.safeDict(trades, 0);
|
|
96308
96338
|
const cursor = this.safeString(response, 'cursor');
|
|
96309
96339
|
if ((cursor !== undefined) && (cursor !== '')) {
|
|
96310
96340
|
first['cursor'] = cursor;
|
|
@@ -96396,7 +96426,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
96396
96426
|
// ]
|
|
96397
96427
|
// }
|
|
96398
96428
|
//
|
|
96399
|
-
const tickers = this.
|
|
96429
|
+
const tickers = this.safeList(response, 'pricebooks', []);
|
|
96400
96430
|
return this.parseTickers(tickers, symbols);
|
|
96401
96431
|
}
|
|
96402
96432
|
async withdraw(code, amount, address, tag = undefined, params = {}) {
|
|
@@ -96490,7 +96520,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
96490
96520
|
// }
|
|
96491
96521
|
// }
|
|
96492
96522
|
//
|
|
96493
|
-
const data = this.
|
|
96523
|
+
const data = this.safeDict(response, 'data', {});
|
|
96494
96524
|
return this.parseTransaction(data, currency);
|
|
96495
96525
|
}
|
|
96496
96526
|
async fetchDepositAddressesByNetwork(code, params = {}) {
|
|
@@ -96763,7 +96793,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
96763
96793
|
// }
|
|
96764
96794
|
// }
|
|
96765
96795
|
//
|
|
96766
|
-
const data = this.
|
|
96796
|
+
const data = this.safeDict(response, 'data', {});
|
|
96767
96797
|
return this.parseTransaction(data);
|
|
96768
96798
|
}
|
|
96769
96799
|
sign(path, api = [], method = 'GET', params = {}, headers = undefined, body = undefined) {
|
|
@@ -96863,7 +96893,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
96863
96893
|
this.throwBroadlyMatchedException(this.exceptions['broad'], errorMessage, feedback);
|
|
96864
96894
|
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeError(feedback);
|
|
96865
96895
|
}
|
|
96866
|
-
const errors = this.
|
|
96896
|
+
const errors = this.safeList(response, 'errors');
|
|
96867
96897
|
if (errors !== undefined) {
|
|
96868
96898
|
if (Array.isArray(errors)) {
|
|
96869
96899
|
const numErrors = errors.length;
|
|
@@ -96879,8 +96909,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
96879
96909
|
}
|
|
96880
96910
|
}
|
|
96881
96911
|
const advancedTrade = this.options['advanced'];
|
|
96882
|
-
|
|
96883
|
-
if ((data === undefined) && (!advancedTrade)) {
|
|
96912
|
+
if (!('data' in response) && (!advancedTrade)) {
|
|
96884
96913
|
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeError(this.id + ' failed due to a malformed response ' + this.json(response));
|
|
96885
96914
|
}
|
|
96886
96915
|
return undefined;
|
|
@@ -127781,7 +127810,8 @@ class digifinex extends _abstract_digifinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
127781
127810
|
else if (limit !== undefined) {
|
|
127782
127811
|
const endTime = this.seconds();
|
|
127783
127812
|
const duration = this.parseTimeframe(timeframe);
|
|
127784
|
-
|
|
127813
|
+
const auxLimit = limit; // in c# -limit is mutating the arg
|
|
127814
|
+
request['start_time'] = this.sum(endTime, -auxLimit * duration);
|
|
127785
127815
|
}
|
|
127786
127816
|
response = await this.publicSpotGetKline(this.extend(request, params));
|
|
127787
127817
|
}
|
|
@@ -133439,7 +133469,8 @@ class gate extends _abstract_gate_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
133439
133469
|
'fetchIsolatedBorrowRate': false,
|
|
133440
133470
|
'fetchIsolatedBorrowRates': false,
|
|
133441
133471
|
'fetchLedger': true,
|
|
133442
|
-
'fetchLeverage':
|
|
133472
|
+
'fetchLeverage': true,
|
|
133473
|
+
'fetchLeverages': true,
|
|
133443
133474
|
'fetchLeverageTiers': true,
|
|
133444
133475
|
'fetchLiquidations': true,
|
|
133445
133476
|
'fetchMarginMode': false,
|
|
@@ -140339,6 +140370,178 @@ class gate extends _abstract_gate_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
140339
140370
|
}
|
|
140340
140371
|
return await this.createOrder(symbol, 'market', side, 0, undefined, params);
|
|
140341
140372
|
}
|
|
140373
|
+
async fetchLeverage(symbol, params = {}) {
|
|
140374
|
+
/**
|
|
140375
|
+
* @method
|
|
140376
|
+
* @name gate#fetchLeverage
|
|
140377
|
+
* @description fetch the set leverage for a market
|
|
140378
|
+
* @see https://www.gate.io/docs/developers/apiv4/en/#get-unified-account-information
|
|
140379
|
+
* @see https://www.gate.io/docs/developers/apiv4/en/#get-detail-of-lending-market
|
|
140380
|
+
* @see https://www.gate.io/docs/developers/apiv4/en/#query-one-single-margin-currency-pair-deprecated
|
|
140381
|
+
* @param {string} symbol unified market symbol
|
|
140382
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
140383
|
+
* @param {boolean} [params.unified] default false, set to true for fetching the unified accounts leverage
|
|
140384
|
+
* @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
|
|
140385
|
+
*/
|
|
140386
|
+
await this.loadMarkets();
|
|
140387
|
+
let market = undefined;
|
|
140388
|
+
if (symbol !== undefined) {
|
|
140389
|
+
// unified account does not require a symbol
|
|
140390
|
+
market = this.market(symbol);
|
|
140391
|
+
}
|
|
140392
|
+
const request = {};
|
|
140393
|
+
let response = undefined;
|
|
140394
|
+
const isUnified = this.safeBool(params, 'unified');
|
|
140395
|
+
params = this.omit(params, 'unified');
|
|
140396
|
+
if (market['spot']) {
|
|
140397
|
+
request['currency_pair'] = market['id'];
|
|
140398
|
+
if (isUnified) {
|
|
140399
|
+
response = await this.publicMarginGetUniCurrencyPairsCurrencyPair(this.extend(request, params));
|
|
140400
|
+
//
|
|
140401
|
+
// {
|
|
140402
|
+
// "currency_pair": "BTC_USDT",
|
|
140403
|
+
// "base_min_borrow_amount": "0.0001",
|
|
140404
|
+
// "quote_min_borrow_amount": "1",
|
|
140405
|
+
// "leverage": "10"
|
|
140406
|
+
// }
|
|
140407
|
+
//
|
|
140408
|
+
}
|
|
140409
|
+
else {
|
|
140410
|
+
response = await this.publicMarginGetCurrencyPairsCurrencyPair(this.extend(request, params));
|
|
140411
|
+
//
|
|
140412
|
+
// {
|
|
140413
|
+
// "id": "BTC_USDT",
|
|
140414
|
+
// "base": "BTC",
|
|
140415
|
+
// "quote": "USDT",
|
|
140416
|
+
// "leverage": 10,
|
|
140417
|
+
// "min_base_amount": "0.0001",
|
|
140418
|
+
// "min_quote_amount": "1",
|
|
140419
|
+
// "max_quote_amount": "40000000",
|
|
140420
|
+
// "status": 1
|
|
140421
|
+
// }
|
|
140422
|
+
//
|
|
140423
|
+
}
|
|
140424
|
+
}
|
|
140425
|
+
else if (isUnified) {
|
|
140426
|
+
response = await this.privateUnifiedGetAccounts(this.extend(request, params));
|
|
140427
|
+
//
|
|
140428
|
+
// {
|
|
140429
|
+
// "user_id": 10001,
|
|
140430
|
+
// "locked": false,
|
|
140431
|
+
// "balances": {
|
|
140432
|
+
// "ETH": {
|
|
140433
|
+
// "available": "0",
|
|
140434
|
+
// "freeze": "0",
|
|
140435
|
+
// "borrowed": "0.075393666654",
|
|
140436
|
+
// "negative_liab": "0",
|
|
140437
|
+
// "futures_pos_liab": "0",
|
|
140438
|
+
// "equity": "1016.1",
|
|
140439
|
+
// "total_freeze": "0",
|
|
140440
|
+
// "total_liab": "0"
|
|
140441
|
+
// },
|
|
140442
|
+
// "POINT": {
|
|
140443
|
+
// "available": "9999999999.017023138734",
|
|
140444
|
+
// "freeze": "0",
|
|
140445
|
+
// "borrowed": "0",
|
|
140446
|
+
// "negative_liab": "0",
|
|
140447
|
+
// "futures_pos_liab": "0",
|
|
140448
|
+
// "equity": "12016.1",
|
|
140449
|
+
// "total_freeze": "0",
|
|
140450
|
+
// "total_liab": "0"
|
|
140451
|
+
// },
|
|
140452
|
+
// "USDT": {
|
|
140453
|
+
// "available": "0.00000062023",
|
|
140454
|
+
// "freeze": "0",
|
|
140455
|
+
// "borrowed": "0",
|
|
140456
|
+
// "negative_liab": "0",
|
|
140457
|
+
// "futures_pos_liab": "0",
|
|
140458
|
+
// "equity": "16.1",
|
|
140459
|
+
// "total_freeze": "0",
|
|
140460
|
+
// "total_liab": "0"
|
|
140461
|
+
// }
|
|
140462
|
+
// },
|
|
140463
|
+
// "total": "230.94621713",
|
|
140464
|
+
// "borrowed": "161.66395521",
|
|
140465
|
+
// "total_initial_margin": "1025.0524665088",
|
|
140466
|
+
// "total_margin_balance": "3382495.944473949183",
|
|
140467
|
+
// "total_maintenance_margin": "205.01049330176",
|
|
140468
|
+
// "total_initial_margin_rate": "3299.827135672679",
|
|
140469
|
+
// "total_maintenance_margin_rate": "16499.135678363399",
|
|
140470
|
+
// "total_available_margin": "3381470.892007440383",
|
|
140471
|
+
// "unified_account_total": "3381470.892007440383",
|
|
140472
|
+
// "unified_account_total_liab": "0",
|
|
140473
|
+
// "unified_account_total_equity": "100016.1",
|
|
140474
|
+
// "leverage": "2"
|
|
140475
|
+
// }
|
|
140476
|
+
//
|
|
140477
|
+
}
|
|
140478
|
+
else {
|
|
140479
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.NotSupported(this.id + ' fetchLeverage() does not support ' + market['type'] + ' markets');
|
|
140480
|
+
}
|
|
140481
|
+
return this.parseLeverage(response, market);
|
|
140482
|
+
}
|
|
140483
|
+
async fetchLeverages(symbols = undefined, params = {}) {
|
|
140484
|
+
/**
|
|
140485
|
+
* @method
|
|
140486
|
+
* @name gate#fetchLeverages
|
|
140487
|
+
* @description fetch the set leverage for all leverage markets, only spot margin is supported on gate
|
|
140488
|
+
* @see https://www.gate.io/docs/developers/apiv4/en/#list-lending-markets
|
|
140489
|
+
* @see https://www.gate.io/docs/developers/apiv4/en/#list-all-supported-currency-pairs-supported-in-margin-trading-deprecated
|
|
140490
|
+
* @param {string[]} symbols a list of unified market symbols
|
|
140491
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
140492
|
+
* @param {boolean} [params.unified] default false, set to true for fetching unified account leverages
|
|
140493
|
+
* @returns {object} a list of [leverage structures]{@link https://docs.ccxt.com/#/?id=leverage-structure}
|
|
140494
|
+
*/
|
|
140495
|
+
await this.loadMarkets();
|
|
140496
|
+
symbols = this.marketSymbols(symbols);
|
|
140497
|
+
let response = undefined;
|
|
140498
|
+
const isUnified = this.safeBool(params, 'unified');
|
|
140499
|
+
params = this.omit(params, 'unified');
|
|
140500
|
+
let marketIdRequest = 'id';
|
|
140501
|
+
if (isUnified) {
|
|
140502
|
+
marketIdRequest = 'currency_pair';
|
|
140503
|
+
response = await this.publicMarginGetUniCurrencyPairs(params);
|
|
140504
|
+
//
|
|
140505
|
+
// [
|
|
140506
|
+
// {
|
|
140507
|
+
// "currency_pair": "1INCH_USDT",
|
|
140508
|
+
// "base_min_borrow_amount": "8",
|
|
140509
|
+
// "quote_min_borrow_amount": "1",
|
|
140510
|
+
// "leverage": "3"
|
|
140511
|
+
// },
|
|
140512
|
+
// ]
|
|
140513
|
+
//
|
|
140514
|
+
}
|
|
140515
|
+
else {
|
|
140516
|
+
response = await this.publicMarginGetCurrencyPairs(params);
|
|
140517
|
+
//
|
|
140518
|
+
// [
|
|
140519
|
+
// {
|
|
140520
|
+
// "id": "1CAT_USDT",
|
|
140521
|
+
// "base": "1CAT",
|
|
140522
|
+
// "quote": "USDT",
|
|
140523
|
+
// "leverage": 3,
|
|
140524
|
+
// "min_base_amount": "71",
|
|
140525
|
+
// "min_quote_amount": "1",
|
|
140526
|
+
// "max_quote_amount": "10000",
|
|
140527
|
+
// "status": 1
|
|
140528
|
+
// },
|
|
140529
|
+
// ]
|
|
140530
|
+
//
|
|
140531
|
+
}
|
|
140532
|
+
return this.parseLeverages(response, symbols, marketIdRequest, 'spot');
|
|
140533
|
+
}
|
|
140534
|
+
parseLeverage(leverage, market = undefined) {
|
|
140535
|
+
const marketId = this.safeString2(leverage, 'currency_pair', 'id');
|
|
140536
|
+
const leverageValue = this.safeInteger(leverage, 'leverage');
|
|
140537
|
+
return {
|
|
140538
|
+
'info': leverage,
|
|
140539
|
+
'symbol': this.safeSymbol(marketId, market, '_', 'spot'),
|
|
140540
|
+
'marginMode': undefined,
|
|
140541
|
+
'longLeverage': leverageValue,
|
|
140542
|
+
'shortLeverage': leverageValue,
|
|
140543
|
+
};
|
|
140544
|
+
}
|
|
140342
140545
|
handleErrors(code, reason, url, method, headers, body, response, requestHeaders, requestBody) {
|
|
140343
140546
|
if (response === undefined) {
|
|
140344
140547
|
return undefined;
|
|
@@ -159115,7 +159318,7 @@ class hyperliquid extends _abstract_hyperliquid_js__WEBPACK_IMPORTED_MODULE_0__/
|
|
|
159115
159318
|
'version': 'v1',
|
|
159116
159319
|
'rateLimit': 50,
|
|
159117
159320
|
'certified': false,
|
|
159118
|
-
'pro':
|
|
159321
|
+
'pro': true,
|
|
159119
159322
|
'has': {
|
|
159120
159323
|
'CORS': undefined,
|
|
159121
159324
|
'spot': false,
|
|
@@ -166431,6 +166634,7 @@ class kraken extends _abstract_kraken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
166431
166634
|
const lastTrade = trades[length - 1];
|
|
166432
166635
|
const lastTradeId = this.safeString(result, 'last');
|
|
166433
166636
|
lastTrade.push(lastTradeId);
|
|
166637
|
+
trades[length - 1] = lastTrade;
|
|
166434
166638
|
return this.parseTrades(trades, market, since, limit);
|
|
166435
166639
|
}
|
|
166436
166640
|
parseBalance(response) {
|
|
@@ -187894,6 +188098,7 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
187894
188098
|
'createMarketSellOrderWithCost': false,
|
|
187895
188099
|
'createOrder': true,
|
|
187896
188100
|
'createOrders': true,
|
|
188101
|
+
'createPostOnlyOrder': true,
|
|
187897
188102
|
'createReduceOnlyOrder': true,
|
|
187898
188103
|
'deposit': undefined,
|
|
187899
188104
|
'editOrder': undefined,
|
|
@@ -190060,6 +190265,14 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
190060
190265
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
190061
190266
|
* @param {string} [params.marginMode] only 'isolated' is supported for spot-margin trading
|
|
190062
190267
|
* @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
|
|
190268
|
+
* @param {bool} [params.postOnly] if true, the order will only be posted if it will be a maker order
|
|
190269
|
+
* @param {bool} [params.reduceOnly] *contract only* indicates if this order is to reduce the size of a position
|
|
190270
|
+
*
|
|
190271
|
+
* EXCHANGE SPECIFIC PARAMETERS
|
|
190272
|
+
* @param {int} [params.leverage] *contract only* leverage is necessary on isolated margin
|
|
190273
|
+
* @param {long} [params.positionId] *contract only* it is recommended to fill in this parameter when closing a position
|
|
190274
|
+
* @param {string} [params.externalOid] *contract only* external order ID
|
|
190275
|
+
* @param {int} [params.positionMode] *contract only* 1:hedge, 2:one-way, default: the user's current config
|
|
190063
190276
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
190064
190277
|
*/
|
|
190065
190278
|
await this.loadMarkets();
|
|
@@ -255605,6 +255818,570 @@ class huobijp extends _huobijp_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
255605
255818
|
}
|
|
255606
255819
|
|
|
255607
255820
|
|
|
255821
|
+
/***/ }),
|
|
255822
|
+
|
|
255823
|
+
/***/ 8354:
|
|
255824
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
255825
|
+
|
|
255826
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
255827
|
+
/* harmony export */ Z: () => (/* binding */ hyperliquid)
|
|
255828
|
+
/* harmony export */ });
|
|
255829
|
+
/* harmony import */ var _hyperliquid_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5959);
|
|
255830
|
+
/* harmony import */ var _base_errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6689);
|
|
255831
|
+
/* harmony import */ var _base_ws_Cache_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3020);
|
|
255832
|
+
// ---------------------------------------------------------------------------
|
|
255833
|
+
|
|
255834
|
+
|
|
255835
|
+
|
|
255836
|
+
// ---------------------------------------------------------------------------
|
|
255837
|
+
class hyperliquid extends _hyperliquid_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
255838
|
+
describe() {
|
|
255839
|
+
return this.deepExtend(super.describe(), {
|
|
255840
|
+
'has': {
|
|
255841
|
+
'ws': true,
|
|
255842
|
+
'watchBalance': false,
|
|
255843
|
+
'watchMyTrades': true,
|
|
255844
|
+
'watchOHLCV': true,
|
|
255845
|
+
'watchOrderBook': true,
|
|
255846
|
+
'watchOrders': true,
|
|
255847
|
+
'watchTicker': false,
|
|
255848
|
+
'watchTickers': false,
|
|
255849
|
+
'watchTrades': true,
|
|
255850
|
+
'watchPosition': false,
|
|
255851
|
+
},
|
|
255852
|
+
'urls': {
|
|
255853
|
+
'api': {
|
|
255854
|
+
'ws': {
|
|
255855
|
+
'public': 'wss://api.hyperliquid.xyz/ws',
|
|
255856
|
+
},
|
|
255857
|
+
},
|
|
255858
|
+
'test': {
|
|
255859
|
+
'ws': {
|
|
255860
|
+
'public': 'wss://api.hyperliquid-testnet.xyz/ws',
|
|
255861
|
+
},
|
|
255862
|
+
},
|
|
255863
|
+
},
|
|
255864
|
+
'options': {},
|
|
255865
|
+
'streaming': {
|
|
255866
|
+
'ping': this.ping,
|
|
255867
|
+
'keepAlive': 20000,
|
|
255868
|
+
},
|
|
255869
|
+
'exceptions': {
|
|
255870
|
+
'ws': {
|
|
255871
|
+
'exact': {},
|
|
255872
|
+
},
|
|
255873
|
+
},
|
|
255874
|
+
});
|
|
255875
|
+
}
|
|
255876
|
+
async watchOrderBook(symbol, limit = undefined, params = {}) {
|
|
255877
|
+
/**
|
|
255878
|
+
* @method
|
|
255879
|
+
* @name hyperliquid#watchOrderBook
|
|
255880
|
+
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
255881
|
+
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
255882
|
+
* @param {int} [limit] the maximum amount of order book entries to return
|
|
255883
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
255884
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
255885
|
+
*/
|
|
255886
|
+
await this.loadMarkets();
|
|
255887
|
+
const market = this.market(symbol);
|
|
255888
|
+
symbol = market['symbol'];
|
|
255889
|
+
const messageHash = 'orderbook:' + symbol;
|
|
255890
|
+
const url = this.urls['api']['ws']['public'];
|
|
255891
|
+
const request = {
|
|
255892
|
+
'method': 'subscribe',
|
|
255893
|
+
'subscription': {
|
|
255894
|
+
'type': 'l2Book',
|
|
255895
|
+
'coin': market['base'],
|
|
255896
|
+
},
|
|
255897
|
+
};
|
|
255898
|
+
const message = this.extend(request, params);
|
|
255899
|
+
const orderbook = await this.watch(url, messageHash, message, messageHash);
|
|
255900
|
+
return orderbook.limit();
|
|
255901
|
+
}
|
|
255902
|
+
handleOrderBook(client, message) {
|
|
255903
|
+
//
|
|
255904
|
+
// {
|
|
255905
|
+
// "channel": "l2Book",
|
|
255906
|
+
// "data": {
|
|
255907
|
+
// "coin": "BTC",
|
|
255908
|
+
// "time": 1710131872708,
|
|
255909
|
+
// "levels": [
|
|
255910
|
+
// [
|
|
255911
|
+
// {
|
|
255912
|
+
// "px": "68674.0",
|
|
255913
|
+
// "sz": "0.97139",
|
|
255914
|
+
// "n": 4
|
|
255915
|
+
// }
|
|
255916
|
+
// ],
|
|
255917
|
+
// [
|
|
255918
|
+
// {
|
|
255919
|
+
// "px": "68675.0",
|
|
255920
|
+
// "sz": "0.04396",
|
|
255921
|
+
// "n": 1
|
|
255922
|
+
// }
|
|
255923
|
+
// ]
|
|
255924
|
+
// ]
|
|
255925
|
+
// }
|
|
255926
|
+
// }
|
|
255927
|
+
//
|
|
255928
|
+
const entry = this.safeDict(message, 'data', {});
|
|
255929
|
+
const coin = this.safeString(entry, 'coin');
|
|
255930
|
+
const marketId = coin + '/USDC:USDC';
|
|
255931
|
+
const market = this.market(marketId);
|
|
255932
|
+
const symbol = market['symbol'];
|
|
255933
|
+
const rawData = this.safeList(entry, 'levels', []);
|
|
255934
|
+
const data = {
|
|
255935
|
+
'bids': this.safeList(rawData, 0, []),
|
|
255936
|
+
'asks': this.safeList(rawData, 1, []),
|
|
255937
|
+
};
|
|
255938
|
+
const timestamp = this.safeInteger(entry, 'time');
|
|
255939
|
+
const snapshot = this.parseOrderBook(data, symbol, timestamp, 'bids', 'asks', 'px', 'sz');
|
|
255940
|
+
if (!(symbol in this.orderbooks)) {
|
|
255941
|
+
const ob = this.orderBook(snapshot);
|
|
255942
|
+
this.orderbooks[symbol] = ob;
|
|
255943
|
+
}
|
|
255944
|
+
const orderbook = this.orderbooks[symbol];
|
|
255945
|
+
orderbook.reset(snapshot);
|
|
255946
|
+
const messageHash = 'orderbook:' + symbol;
|
|
255947
|
+
client.resolve(orderbook, messageHash);
|
|
255948
|
+
}
|
|
255949
|
+
async watchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
255950
|
+
/**
|
|
255951
|
+
* @method
|
|
255952
|
+
* @name hyperliquid#watchMyTrades
|
|
255953
|
+
* @description watches information on multiple trades made by the user
|
|
255954
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
255955
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
255956
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
255957
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
255958
|
+
* @param {string} [params.user] user address, will default to this.walletAddress if not provided
|
|
255959
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure
|
|
255960
|
+
*/
|
|
255961
|
+
let userAddress = undefined;
|
|
255962
|
+
[userAddress, params] = this.handlePublicAddress('watchMyTrades', params);
|
|
255963
|
+
await this.loadMarkets();
|
|
255964
|
+
let messageHash = 'myTrades';
|
|
255965
|
+
if (symbol !== undefined) {
|
|
255966
|
+
symbol = this.symbol(symbol);
|
|
255967
|
+
messageHash += ':' + symbol;
|
|
255968
|
+
}
|
|
255969
|
+
const url = this.urls['api']['ws']['public'];
|
|
255970
|
+
const request = {
|
|
255971
|
+
'method': 'subscribe',
|
|
255972
|
+
'subscription': {
|
|
255973
|
+
'type': 'userFills',
|
|
255974
|
+
'user': userAddress,
|
|
255975
|
+
},
|
|
255976
|
+
};
|
|
255977
|
+
const message = this.extend(request, params);
|
|
255978
|
+
const trades = await this.watch(url, messageHash, message, messageHash);
|
|
255979
|
+
if (this.newUpdates) {
|
|
255980
|
+
limit = trades.getLimit(symbol, limit);
|
|
255981
|
+
}
|
|
255982
|
+
return this.filterBySymbolSinceLimit(trades, symbol, since, limit, true);
|
|
255983
|
+
}
|
|
255984
|
+
handleMyTrades(client, message) {
|
|
255985
|
+
//
|
|
255986
|
+
// {
|
|
255987
|
+
// "channel": "userFills",
|
|
255988
|
+
// "data": {
|
|
255989
|
+
// "isSnapshot": true,
|
|
255990
|
+
// "user": "0x15f43d1f2dee81424afd891943262aa90f22cc2a",
|
|
255991
|
+
// "fills": [
|
|
255992
|
+
// {
|
|
255993
|
+
// "coin": "BTC",
|
|
255994
|
+
// "px": "72528.0",
|
|
255995
|
+
// "sz": "0.11693",
|
|
255996
|
+
// "side": "A",
|
|
255997
|
+
// "time": 1710208712815,
|
|
255998
|
+
// "startPosition": "0.11693",
|
|
255999
|
+
// "dir": "Close Long",
|
|
256000
|
+
// "closedPnl": "-0.81851",
|
|
256001
|
+
// "hash": "0xc5adaf35f8402750c218040b0a7bc301130051521273b6f398b3caad3e1f3f5f",
|
|
256002
|
+
// "oid": 7484888874,
|
|
256003
|
+
// "crossed": true,
|
|
256004
|
+
// "fee": "2.968244",
|
|
256005
|
+
// "liquidationMarkPx": null,
|
|
256006
|
+
// "tid": 567547935839686,
|
|
256007
|
+
// "cloid": null
|
|
256008
|
+
// }
|
|
256009
|
+
// ]
|
|
256010
|
+
// }
|
|
256011
|
+
// }
|
|
256012
|
+
//
|
|
256013
|
+
const entry = this.safeDict(message, 'data', {});
|
|
256014
|
+
if (this.myTrades === undefined) {
|
|
256015
|
+
const limit = this.safeInteger(this.options, 'tradesLimit', 1000);
|
|
256016
|
+
this.myTrades = new _base_ws_Cache_js__WEBPACK_IMPORTED_MODULE_1__/* .ArrayCacheBySymbolById */ .hl(limit);
|
|
256017
|
+
}
|
|
256018
|
+
const trades = this.myTrades;
|
|
256019
|
+
const symbols = {};
|
|
256020
|
+
const data = this.safeList(entry, 'fills', []);
|
|
256021
|
+
const dataLength = data.length;
|
|
256022
|
+
if (dataLength === 0) {
|
|
256023
|
+
return;
|
|
256024
|
+
}
|
|
256025
|
+
for (let i = 0; i < data.length; i++) {
|
|
256026
|
+
const rawTrade = data[i];
|
|
256027
|
+
const parsed = this.parseWsTrade(rawTrade);
|
|
256028
|
+
const symbol = parsed['symbol'];
|
|
256029
|
+
symbols[symbol] = true;
|
|
256030
|
+
trades.append(parsed);
|
|
256031
|
+
}
|
|
256032
|
+
const keys = Object.keys(symbols);
|
|
256033
|
+
for (let i = 0; i < keys.length; i++) {
|
|
256034
|
+
const currentMessageHash = 'myTrades:' + keys[i];
|
|
256035
|
+
client.resolve(trades, currentMessageHash);
|
|
256036
|
+
}
|
|
256037
|
+
// non-symbol specific
|
|
256038
|
+
const messageHash = 'myTrades';
|
|
256039
|
+
client.resolve(trades, messageHash);
|
|
256040
|
+
}
|
|
256041
|
+
async watchTrades(symbol, since = undefined, limit = undefined, params = {}) {
|
|
256042
|
+
/**
|
|
256043
|
+
* @method
|
|
256044
|
+
* @name hyperliquid#watchTrades
|
|
256045
|
+
* @description watches information on multiple trades made in a market
|
|
256046
|
+
* @param {string} symbol unified market symbol of the market trades were made in
|
|
256047
|
+
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
256048
|
+
* @param {int} [limit] the maximum number of trade structures to retrieve
|
|
256049
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
256050
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure
|
|
256051
|
+
*/
|
|
256052
|
+
await this.loadMarkets();
|
|
256053
|
+
const market = this.market(symbol);
|
|
256054
|
+
symbol = market['symbol'];
|
|
256055
|
+
const messageHash = 'trade:' + symbol;
|
|
256056
|
+
const url = this.urls['api']['ws']['public'];
|
|
256057
|
+
const request = {
|
|
256058
|
+
'method': 'subscribe',
|
|
256059
|
+
'subscription': {
|
|
256060
|
+
'type': 'trades',
|
|
256061
|
+
'coin': market['base'],
|
|
256062
|
+
},
|
|
256063
|
+
};
|
|
256064
|
+
const message = this.extend(request, params);
|
|
256065
|
+
const trades = await this.watch(url, messageHash, message, messageHash);
|
|
256066
|
+
if (this.newUpdates) {
|
|
256067
|
+
limit = trades.getLimit(symbol, limit);
|
|
256068
|
+
}
|
|
256069
|
+
return this.filterBySinceLimit(trades, since, limit, 'timestamp', true);
|
|
256070
|
+
}
|
|
256071
|
+
handleTrades(client, message) {
|
|
256072
|
+
//
|
|
256073
|
+
// {
|
|
256074
|
+
// "channel": "trades",
|
|
256075
|
+
// "data": [
|
|
256076
|
+
// {
|
|
256077
|
+
// "coin": "BTC",
|
|
256078
|
+
// "side": "A",
|
|
256079
|
+
// "px": "68517.0",
|
|
256080
|
+
// "sz": "0.005",
|
|
256081
|
+
// "time": 1710125266669,
|
|
256082
|
+
// "hash": "0xc872699f116e012186620407fc08a802015e0097c5cce74710697f7272e6e959",
|
|
256083
|
+
// "tid": 981894269203506
|
|
256084
|
+
// }
|
|
256085
|
+
// ]
|
|
256086
|
+
// }
|
|
256087
|
+
//
|
|
256088
|
+
const entry = this.safeList(message, 'data', []);
|
|
256089
|
+
const first = this.safeDict(entry, 0, {});
|
|
256090
|
+
const coin = this.safeString(first, 'coin');
|
|
256091
|
+
const marketId = coin + '/USDC:USDC';
|
|
256092
|
+
const market = this.market(marketId);
|
|
256093
|
+
const symbol = market['symbol'];
|
|
256094
|
+
if (!(symbol in this.trades)) {
|
|
256095
|
+
const limit = this.safeInteger(this.options, 'tradesLimit', 1000);
|
|
256096
|
+
const stored = new _base_ws_Cache_js__WEBPACK_IMPORTED_MODULE_1__/* .ArrayCache */ .ZL(limit);
|
|
256097
|
+
this.trades[symbol] = stored;
|
|
256098
|
+
}
|
|
256099
|
+
const trades = this.trades[symbol];
|
|
256100
|
+
for (let i = 0; i < entry.length; i++) {
|
|
256101
|
+
const data = this.safeDict(entry, i);
|
|
256102
|
+
const trade = this.parseWsTrade(data);
|
|
256103
|
+
trades.append(trade);
|
|
256104
|
+
}
|
|
256105
|
+
const messageHash = 'trade:' + symbol;
|
|
256106
|
+
client.resolve(trades, messageHash);
|
|
256107
|
+
}
|
|
256108
|
+
parseWsTrade(trade, market = undefined) {
|
|
256109
|
+
//
|
|
256110
|
+
// fetchMyTrades
|
|
256111
|
+
//
|
|
256112
|
+
// {
|
|
256113
|
+
// "coin": "BTC",
|
|
256114
|
+
// "px": "72528.0",
|
|
256115
|
+
// "sz": "0.11693",
|
|
256116
|
+
// "side": "A",
|
|
256117
|
+
// "time": 1710208712815,
|
|
256118
|
+
// "startPosition": "0.11693",
|
|
256119
|
+
// "dir": "Close Long",
|
|
256120
|
+
// "closedPnl": "-0.81851",
|
|
256121
|
+
// "hash": "0xc5adaf35f8402750c218040b0a7bc301130051521273b6f398b3caad3e1f3f5f",
|
|
256122
|
+
// "oid": 7484888874,
|
|
256123
|
+
// "crossed": true,
|
|
256124
|
+
// "fee": "2.968244",
|
|
256125
|
+
// "liquidationMarkPx": null,
|
|
256126
|
+
// "tid": 567547935839686,
|
|
256127
|
+
// "cloid": null
|
|
256128
|
+
// }
|
|
256129
|
+
//
|
|
256130
|
+
// fetchTrades
|
|
256131
|
+
//
|
|
256132
|
+
// {
|
|
256133
|
+
// "coin": "BTC",
|
|
256134
|
+
// "side": "A",
|
|
256135
|
+
// "px": "68517.0",
|
|
256136
|
+
// "sz": "0.005",
|
|
256137
|
+
// "time": 1710125266669,
|
|
256138
|
+
// "hash": "0xc872699f116e012186620407fc08a802015e0097c5cce74710697f7272e6e959",
|
|
256139
|
+
// "tid": 981894269203506
|
|
256140
|
+
// }
|
|
256141
|
+
//
|
|
256142
|
+
const timestamp = this.safeInteger(trade, 'time');
|
|
256143
|
+
const price = this.safeString(trade, 'px');
|
|
256144
|
+
const amount = this.safeString(trade, 'sz');
|
|
256145
|
+
const coin = this.safeString(trade, 'coin');
|
|
256146
|
+
const marketId = coin + '/USDC:USDC';
|
|
256147
|
+
market = this.safeMarket(marketId, undefined);
|
|
256148
|
+
const symbol = market['symbol'];
|
|
256149
|
+
const id = this.safeString(trade, 'tid');
|
|
256150
|
+
let side = this.safeString(trade, 'side');
|
|
256151
|
+
if (side !== undefined) {
|
|
256152
|
+
side = (side === 'A') ? 'sell' : 'buy';
|
|
256153
|
+
}
|
|
256154
|
+
const fee = this.safeString(trade, 'fee');
|
|
256155
|
+
return this.safeTrade({
|
|
256156
|
+
'info': trade,
|
|
256157
|
+
'timestamp': timestamp,
|
|
256158
|
+
'datetime': this.iso8601(timestamp),
|
|
256159
|
+
'symbol': symbol,
|
|
256160
|
+
'id': id,
|
|
256161
|
+
'order': undefined,
|
|
256162
|
+
'type': undefined,
|
|
256163
|
+
'side': side,
|
|
256164
|
+
'takerOrMaker': undefined,
|
|
256165
|
+
'price': price,
|
|
256166
|
+
'amount': amount,
|
|
256167
|
+
'cost': undefined,
|
|
256168
|
+
'fee': { 'cost': fee, 'currency': 'USDC' },
|
|
256169
|
+
}, market);
|
|
256170
|
+
}
|
|
256171
|
+
async watchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
256172
|
+
/**
|
|
256173
|
+
* @method
|
|
256174
|
+
* @name hyperliquid#watchOHLCV
|
|
256175
|
+
* @description watches historical candlestick data containing the open, high, low, close price, and the volume of a market
|
|
256176
|
+
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
256177
|
+
* @param {string} timeframe the length of time each candle represents
|
|
256178
|
+
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
256179
|
+
* @param {int} [limit] the maximum amount of candles to fetch
|
|
256180
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
256181
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
256182
|
+
*/
|
|
256183
|
+
await this.loadMarkets();
|
|
256184
|
+
const market = this.market(symbol);
|
|
256185
|
+
symbol = market['symbol'];
|
|
256186
|
+
const url = this.urls['api']['ws']['public'];
|
|
256187
|
+
const request = {
|
|
256188
|
+
'method': 'subscribe',
|
|
256189
|
+
'subscription': {
|
|
256190
|
+
'type': 'candle',
|
|
256191
|
+
'coin': market['base'],
|
|
256192
|
+
'interval': timeframe,
|
|
256193
|
+
},
|
|
256194
|
+
};
|
|
256195
|
+
const messageHash = 'candles:' + timeframe + ':' + symbol;
|
|
256196
|
+
const message = this.extend(request, params);
|
|
256197
|
+
const ohlcv = await this.watch(url, messageHash, message, messageHash);
|
|
256198
|
+
if (this.newUpdates) {
|
|
256199
|
+
limit = ohlcv.getLimit(symbol, limit);
|
|
256200
|
+
}
|
|
256201
|
+
return this.filterBySinceLimit(ohlcv, since, limit, 0, true);
|
|
256202
|
+
}
|
|
256203
|
+
handleOHLCV(client, message) {
|
|
256204
|
+
//
|
|
256205
|
+
// {
|
|
256206
|
+
// channel: 'candle',
|
|
256207
|
+
// data: {
|
|
256208
|
+
// t: 1710146280000,
|
|
256209
|
+
// T: 1710146339999,
|
|
256210
|
+
// s: 'BTC',
|
|
256211
|
+
// i: '1m',
|
|
256212
|
+
// o: '71400.0',
|
|
256213
|
+
// c: '71411.0',
|
|
256214
|
+
// h: '71422.0',
|
|
256215
|
+
// l: '71389.0',
|
|
256216
|
+
// v: '1.20407',
|
|
256217
|
+
// n: 20
|
|
256218
|
+
// }
|
|
256219
|
+
// }
|
|
256220
|
+
//
|
|
256221
|
+
const data = this.safeDict(message, 'data', {});
|
|
256222
|
+
const base = this.safeString(data, 's');
|
|
256223
|
+
const symbol = base + '/USDC:USDC';
|
|
256224
|
+
const timeframe = this.safeString(data, 'i');
|
|
256225
|
+
if (!(symbol in this.ohlcvs)) {
|
|
256226
|
+
this.ohlcvs[symbol] = {};
|
|
256227
|
+
}
|
|
256228
|
+
if (!(timeframe in this.ohlcvs[symbol])) {
|
|
256229
|
+
const limit = this.safeInteger(this.options, 'OHLCVLimit', 1000);
|
|
256230
|
+
const stored = new _base_ws_Cache_js__WEBPACK_IMPORTED_MODULE_1__/* .ArrayCacheByTimestamp */ .Py(limit);
|
|
256231
|
+
this.ohlcvs[symbol][timeframe] = stored;
|
|
256232
|
+
}
|
|
256233
|
+
const ohlcv = this.ohlcvs[symbol][timeframe];
|
|
256234
|
+
const parsed = this.parseOHLCV(data);
|
|
256235
|
+
ohlcv.append(parsed);
|
|
256236
|
+
const messageHash = 'candles:' + timeframe + ':' + symbol;
|
|
256237
|
+
client.resolve(ohlcv, messageHash);
|
|
256238
|
+
}
|
|
256239
|
+
async watchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
256240
|
+
/**
|
|
256241
|
+
* @method
|
|
256242
|
+
* @name hyperliquid#watchOrders
|
|
256243
|
+
* @description watches information on multiple orders made by the user
|
|
256244
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
256245
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
256246
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
256247
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
256248
|
+
* @param {string} [params.user] user address, will default to this.walletAddress if not provided
|
|
256249
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure
|
|
256250
|
+
*/
|
|
256251
|
+
await this.loadMarkets();
|
|
256252
|
+
let userAddress = undefined;
|
|
256253
|
+
[userAddress, params] = this.handlePublicAddress('watchOrders', params);
|
|
256254
|
+
let market = undefined;
|
|
256255
|
+
let messageHash = 'order';
|
|
256256
|
+
if (symbol !== undefined) {
|
|
256257
|
+
market = this.market(symbol);
|
|
256258
|
+
symbol = market['symbol'];
|
|
256259
|
+
messageHash = messageHash + ':' + symbol;
|
|
256260
|
+
}
|
|
256261
|
+
const url = this.urls['api']['ws']['public'];
|
|
256262
|
+
const request = {
|
|
256263
|
+
'method': 'subscribe',
|
|
256264
|
+
'subscription': {
|
|
256265
|
+
'type': 'orderUpdates',
|
|
256266
|
+
'user': userAddress,
|
|
256267
|
+
},
|
|
256268
|
+
};
|
|
256269
|
+
const message = this.extend(request, params);
|
|
256270
|
+
const orders = await this.watch(url, messageHash, message, messageHash);
|
|
256271
|
+
if (this.newUpdates) {
|
|
256272
|
+
limit = orders.getLimit(symbol, limit);
|
|
256273
|
+
}
|
|
256274
|
+
return this.filterBySymbolSinceLimit(orders, symbol, since, limit, true);
|
|
256275
|
+
}
|
|
256276
|
+
handleOrder(client, message) {
|
|
256277
|
+
//
|
|
256278
|
+
// {
|
|
256279
|
+
// channel: 'orderUpdates',
|
|
256280
|
+
// data: [
|
|
256281
|
+
// {
|
|
256282
|
+
// order: {
|
|
256283
|
+
// coin: 'BTC',
|
|
256284
|
+
// side: 'B',
|
|
256285
|
+
// limitPx: '30000.0',
|
|
256286
|
+
// sz: '0.001',
|
|
256287
|
+
// oid: 7456484275,
|
|
256288
|
+
// timestamp: 1710163596492,
|
|
256289
|
+
// origSz: '0.001'
|
|
256290
|
+
// },
|
|
256291
|
+
// status: 'open',
|
|
256292
|
+
// statusTimestamp: 1710163596492
|
|
256293
|
+
// }
|
|
256294
|
+
// ]
|
|
256295
|
+
// }
|
|
256296
|
+
//
|
|
256297
|
+
const data = this.safeList(message, 'data', []);
|
|
256298
|
+
if (this.orders === undefined) {
|
|
256299
|
+
const limit = this.safeInteger(this.options, 'ordersLimit', 1000);
|
|
256300
|
+
this.orders = new _base_ws_Cache_js__WEBPACK_IMPORTED_MODULE_1__/* .ArrayCacheBySymbolById */ .hl(limit);
|
|
256301
|
+
}
|
|
256302
|
+
const dataLength = data.length;
|
|
256303
|
+
if (dataLength === 0) {
|
|
256304
|
+
return;
|
|
256305
|
+
}
|
|
256306
|
+
const stored = this.orders;
|
|
256307
|
+
const messageHash = 'order';
|
|
256308
|
+
const marketSymbols = {};
|
|
256309
|
+
for (let i = 0; i < data.length; i++) {
|
|
256310
|
+
const rawOrder = data[i];
|
|
256311
|
+
const order = this.parseOrder(rawOrder);
|
|
256312
|
+
stored.append(order);
|
|
256313
|
+
const symbol = this.safeString(order, 'symbol');
|
|
256314
|
+
marketSymbols[symbol] = true;
|
|
256315
|
+
}
|
|
256316
|
+
const keys = Object.keys(marketSymbols);
|
|
256317
|
+
for (let i = 0; i < keys.length; i++) {
|
|
256318
|
+
const symbol = keys[i];
|
|
256319
|
+
const innerMessageHash = messageHash + ':' + symbol;
|
|
256320
|
+
client.resolve(stored, innerMessageHash);
|
|
256321
|
+
}
|
|
256322
|
+
client.resolve(stored, messageHash);
|
|
256323
|
+
}
|
|
256324
|
+
handleErrorMessage(client, message) {
|
|
256325
|
+
//
|
|
256326
|
+
// {
|
|
256327
|
+
// "channel": "error",
|
|
256328
|
+
// "data": "Error parsing JSON into valid websocket request: { \"type\": \"allMids\" }"
|
|
256329
|
+
// }
|
|
256330
|
+
//
|
|
256331
|
+
const channel = this.safeString(message, 'channel', '');
|
|
256332
|
+
const ret_msg = this.safeString(message, 'data', '');
|
|
256333
|
+
if (channel === 'error') {
|
|
256334
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeError(this.id + ' ' + ret_msg);
|
|
256335
|
+
}
|
|
256336
|
+
else {
|
|
256337
|
+
return false;
|
|
256338
|
+
}
|
|
256339
|
+
}
|
|
256340
|
+
handleMessage(client, message) {
|
|
256341
|
+
if (this.handleErrorMessage(client, message)) {
|
|
256342
|
+
return;
|
|
256343
|
+
}
|
|
256344
|
+
const topic = this.safeString(message, 'channel', '');
|
|
256345
|
+
const methods = {
|
|
256346
|
+
'pong': this.handlePong,
|
|
256347
|
+
'trades': this.handleTrades,
|
|
256348
|
+
'l2Book': this.handleOrderBook,
|
|
256349
|
+
'candle': this.handleOHLCV,
|
|
256350
|
+
'orderUpdates': this.handleOrder,
|
|
256351
|
+
'userFills': this.handleMyTrades,
|
|
256352
|
+
};
|
|
256353
|
+
const exacMethod = this.safeValue(methods, topic);
|
|
256354
|
+
if (exacMethod !== undefined) {
|
|
256355
|
+
exacMethod.call(this, client, message);
|
|
256356
|
+
return;
|
|
256357
|
+
}
|
|
256358
|
+
const keys = Object.keys(methods);
|
|
256359
|
+
for (let i = 0; i < keys.length; i++) {
|
|
256360
|
+
const key = keys[i];
|
|
256361
|
+
if (topic.indexOf(keys[i]) >= 0) {
|
|
256362
|
+
const method = methods[key];
|
|
256363
|
+
method.call(this, client, message);
|
|
256364
|
+
return;
|
|
256365
|
+
}
|
|
256366
|
+
}
|
|
256367
|
+
}
|
|
256368
|
+
ping(client) {
|
|
256369
|
+
return {
|
|
256370
|
+
'method': 'ping',
|
|
256371
|
+
};
|
|
256372
|
+
}
|
|
256373
|
+
handlePong(client, message) {
|
|
256374
|
+
//
|
|
256375
|
+
// {
|
|
256376
|
+
// "channel": "pong"
|
|
256377
|
+
// }
|
|
256378
|
+
//
|
|
256379
|
+
client.lastPong = this.safeInteger(message, 'pong');
|
|
256380
|
+
return message;
|
|
256381
|
+
}
|
|
256382
|
+
}
|
|
256383
|
+
|
|
256384
|
+
|
|
255608
256385
|
/***/ }),
|
|
255609
256386
|
|
|
255610
256387
|
/***/ 3484:
|
|
@@ -316760,39 +317537,39 @@ var __webpack_exports__ = {};
|
|
|
316760
317537
|
(() => {
|
|
316761
317538
|
__webpack_require__.r(__webpack_exports__);
|
|
316762
317539
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
316763
|
-
/* harmony export */ AccountNotEnabled: () => (/* reexport safe */
|
|
316764
|
-
/* harmony export */ AccountSuspended: () => (/* reexport safe */
|
|
316765
|
-
/* harmony export */ AddressPending: () => (/* reexport safe */
|
|
316766
|
-
/* harmony export */ ArgumentsRequired: () => (/* reexport safe */
|
|
316767
|
-
/* harmony export */ AuthenticationError: () => (/* reexport safe */
|
|
316768
|
-
/* harmony export */ BadRequest: () => (/* reexport safe */
|
|
316769
|
-
/* harmony export */ BadResponse: () => (/* reexport safe */
|
|
316770
|
-
/* harmony export */ BadSymbol: () => (/* reexport safe */
|
|
316771
|
-
/* harmony export */ BaseError: () => (/* reexport safe */
|
|
316772
|
-
/* harmony export */ CancelPending: () => (/* reexport safe */
|
|
316773
|
-
/* harmony export */ DDoSProtection: () => (/* reexport safe */
|
|
316774
|
-
/* harmony export */ DuplicateOrderId: () => (/* reexport safe */
|
|
317540
|
+
/* harmony export */ AccountNotEnabled: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__.AccountNotEnabled),
|
|
317541
|
+
/* harmony export */ AccountSuspended: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__.AccountSuspended),
|
|
317542
|
+
/* harmony export */ AddressPending: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__.AddressPending),
|
|
317543
|
+
/* harmony export */ ArgumentsRequired: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__.ArgumentsRequired),
|
|
317544
|
+
/* harmony export */ AuthenticationError: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__.AuthenticationError),
|
|
317545
|
+
/* harmony export */ BadRequest: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__.BadRequest),
|
|
317546
|
+
/* harmony export */ BadResponse: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__.BadResponse),
|
|
317547
|
+
/* harmony export */ BadSymbol: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__.BadSymbol),
|
|
317548
|
+
/* harmony export */ BaseError: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__.BaseError),
|
|
317549
|
+
/* harmony export */ CancelPending: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__.CancelPending),
|
|
317550
|
+
/* harmony export */ DDoSProtection: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__.DDoSProtection),
|
|
317551
|
+
/* harmony export */ DuplicateOrderId: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__.DuplicateOrderId),
|
|
316775
317552
|
/* harmony export */ Exchange: () => (/* reexport safe */ _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__.e),
|
|
316776
|
-
/* harmony export */ ExchangeError: () => (/* reexport safe */
|
|
316777
|
-
/* harmony export */ ExchangeNotAvailable: () => (/* reexport safe */
|
|
316778
|
-
/* harmony export */ InsufficientFunds: () => (/* reexport safe */
|
|
316779
|
-
/* harmony export */ InvalidAddress: () => (/* reexport safe */
|
|
316780
|
-
/* harmony export */ InvalidNonce: () => (/* reexport safe */
|
|
316781
|
-
/* harmony export */ InvalidOrder: () => (/* reexport safe */
|
|
316782
|
-
/* harmony export */ MarginModeAlreadySet: () => (/* reexport safe */
|
|
316783
|
-
/* harmony export */ NetworkError: () => (/* reexport safe */
|
|
316784
|
-
/* harmony export */ NoChange: () => (/* reexport safe */
|
|
316785
|
-
/* harmony export */ NotSupported: () => (/* reexport safe */
|
|
316786
|
-
/* harmony export */ NullResponse: () => (/* reexport safe */
|
|
316787
|
-
/* harmony export */ OnMaintenance: () => (/* reexport safe */
|
|
316788
|
-
/* harmony export */ OrderImmediatelyFillable: () => (/* reexport safe */
|
|
316789
|
-
/* harmony export */ OrderNotCached: () => (/* reexport safe */
|
|
316790
|
-
/* harmony export */ OrderNotFillable: () => (/* reexport safe */
|
|
316791
|
-
/* harmony export */ OrderNotFound: () => (/* reexport safe */
|
|
316792
|
-
/* harmony export */ PermissionDenied: () => (/* reexport safe */
|
|
316793
|
-
/* harmony export */ Precise: () => (/* reexport safe */
|
|
316794
|
-
/* harmony export */ RateLimitExceeded: () => (/* reexport safe */
|
|
316795
|
-
/* harmony export */ RequestTimeout: () => (/* reexport safe */
|
|
317553
|
+
/* harmony export */ ExchangeError: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__.ExchangeError),
|
|
317554
|
+
/* harmony export */ ExchangeNotAvailable: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__.ExchangeNotAvailable),
|
|
317555
|
+
/* harmony export */ InsufficientFunds: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__.InsufficientFunds),
|
|
317556
|
+
/* harmony export */ InvalidAddress: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__.InvalidAddress),
|
|
317557
|
+
/* harmony export */ InvalidNonce: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__.InvalidNonce),
|
|
317558
|
+
/* harmony export */ InvalidOrder: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__.InvalidOrder),
|
|
317559
|
+
/* harmony export */ MarginModeAlreadySet: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__.MarginModeAlreadySet),
|
|
317560
|
+
/* harmony export */ NetworkError: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__.NetworkError),
|
|
317561
|
+
/* harmony export */ NoChange: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__.NoChange),
|
|
317562
|
+
/* harmony export */ NotSupported: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__.NotSupported),
|
|
317563
|
+
/* harmony export */ NullResponse: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__.NullResponse),
|
|
317564
|
+
/* harmony export */ OnMaintenance: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__.OnMaintenance),
|
|
317565
|
+
/* harmony export */ OrderImmediatelyFillable: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__.OrderImmediatelyFillable),
|
|
317566
|
+
/* harmony export */ OrderNotCached: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__.OrderNotCached),
|
|
317567
|
+
/* harmony export */ OrderNotFillable: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__.OrderNotFillable),
|
|
317568
|
+
/* harmony export */ OrderNotFound: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__.OrderNotFound),
|
|
317569
|
+
/* harmony export */ PermissionDenied: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__.PermissionDenied),
|
|
317570
|
+
/* harmony export */ Precise: () => (/* reexport safe */ _src_base_Precise_js__WEBPACK_IMPORTED_MODULE_164__.O),
|
|
317571
|
+
/* harmony export */ RateLimitExceeded: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__.RateLimitExceeded),
|
|
317572
|
+
/* harmony export */ RequestTimeout: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__.RequestTimeout),
|
|
316796
317573
|
/* harmony export */ ace: () => (/* reexport safe */ _src_ace_js__WEBPACK_IMPORTED_MODULE_1__.Z),
|
|
316797
317574
|
/* harmony export */ alpaca: () => (/* reexport safe */ _src_alpaca_js__WEBPACK_IMPORTED_MODULE_2__.Z),
|
|
316798
317575
|
/* harmony export */ ascendex: () => (/* reexport safe */ _src_ascendex_js__WEBPACK_IMPORTED_MODULE_3__.Z),
|
|
@@ -316847,11 +317624,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
316847
317624
|
/* harmony export */ delta: () => (/* reexport safe */ _src_delta_js__WEBPACK_IMPORTED_MODULE_51__.Z),
|
|
316848
317625
|
/* harmony export */ deribit: () => (/* reexport safe */ _src_deribit_js__WEBPACK_IMPORTED_MODULE_52__.Z),
|
|
316849
317626
|
/* harmony export */ digifinex: () => (/* reexport safe */ _src_digifinex_js__WEBPACK_IMPORTED_MODULE_53__.Z),
|
|
316850
|
-
/* harmony export */ errors: () => (/* reexport module object */
|
|
317627
|
+
/* harmony export */ errors: () => (/* reexport module object */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__),
|
|
316851
317628
|
/* harmony export */ exchanges: () => (/* binding */ exchanges),
|
|
316852
317629
|
/* harmony export */ exmo: () => (/* reexport safe */ _src_exmo_js__WEBPACK_IMPORTED_MODULE_54__.Z),
|
|
316853
317630
|
/* harmony export */ fmfwio: () => (/* reexport safe */ _src_fmfwio_js__WEBPACK_IMPORTED_MODULE_55__.Z),
|
|
316854
|
-
/* harmony export */ functions: () => (/* reexport module object */
|
|
317631
|
+
/* harmony export */ functions: () => (/* reexport module object */ _src_base_functions_js__WEBPACK_IMPORTED_MODULE_165__),
|
|
316855
317632
|
/* harmony export */ gate: () => (/* reexport safe */ _src_gate_js__WEBPACK_IMPORTED_MODULE_56__.Z),
|
|
316856
317633
|
/* harmony export */ gateio: () => (/* reexport safe */ _src_gateio_js__WEBPACK_IMPORTED_MODULE_57__.Z),
|
|
316857
317634
|
/* harmony export */ gemini: () => (/* reexport safe */ _src_gemini_js__WEBPACK_IMPORTED_MODULE_58__.Z),
|
|
@@ -316902,9 +317679,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
316902
317679
|
/* harmony export */ zonda: () => (/* reexport safe */ _src_zonda_js__WEBPACK_IMPORTED_MODULE_101__.Z)
|
|
316903
317680
|
/* harmony export */ });
|
|
316904
317681
|
/* harmony import */ var _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3043);
|
|
316905
|
-
/* harmony import */ var
|
|
316906
|
-
/* harmony import */ var
|
|
316907
|
-
/* harmony import */ var
|
|
317682
|
+
/* harmony import */ var _src_base_Precise_js__WEBPACK_IMPORTED_MODULE_164__ = __webpack_require__(2194);
|
|
317683
|
+
/* harmony import */ var _src_base_functions_js__WEBPACK_IMPORTED_MODULE_165__ = __webpack_require__(7100);
|
|
317684
|
+
/* harmony import */ var _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__ = __webpack_require__(6689);
|
|
316908
317685
|
/* harmony import */ var _src_ace_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9869);
|
|
316909
317686
|
/* harmony import */ var _src_alpaca_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5660);
|
|
316910
317687
|
/* harmony import */ var _src_ascendex_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9612);
|
|
@@ -317045,28 +317822,29 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
317045
317822
|
/* harmony import */ var _src_pro_htx_js__WEBPACK_IMPORTED_MODULE_138__ = __webpack_require__(7474);
|
|
317046
317823
|
/* harmony import */ var _src_pro_huobi_js__WEBPACK_IMPORTED_MODULE_139__ = __webpack_require__(8384);
|
|
317047
317824
|
/* harmony import */ var _src_pro_huobijp_js__WEBPACK_IMPORTED_MODULE_140__ = __webpack_require__(9021);
|
|
317048
|
-
/* harmony import */ var
|
|
317049
|
-
/* harmony import */ var
|
|
317050
|
-
/* harmony import */ var
|
|
317051
|
-
/* harmony import */ var
|
|
317052
|
-
/* harmony import */ var
|
|
317053
|
-
/* harmony import */ var
|
|
317054
|
-
/* harmony import */ var
|
|
317055
|
-
/* harmony import */ var
|
|
317056
|
-
/* harmony import */ var
|
|
317057
|
-
/* harmony import */ var
|
|
317058
|
-
/* harmony import */ var
|
|
317059
|
-
/* harmony import */ var
|
|
317060
|
-
/* harmony import */ var
|
|
317061
|
-
/* harmony import */ var
|
|
317062
|
-
/* harmony import */ var
|
|
317063
|
-
/* harmony import */ var
|
|
317064
|
-
/* harmony import */ var
|
|
317065
|
-
/* harmony import */ var
|
|
317066
|
-
/* harmony import */ var
|
|
317067
|
-
/* harmony import */ var
|
|
317068
|
-
/* harmony import */ var
|
|
317069
|
-
/* harmony import */ var
|
|
317825
|
+
/* harmony import */ var _src_pro_hyperliquid_js__WEBPACK_IMPORTED_MODULE_141__ = __webpack_require__(8354);
|
|
317826
|
+
/* harmony import */ var _src_pro_idex_js__WEBPACK_IMPORTED_MODULE_142__ = __webpack_require__(3484);
|
|
317827
|
+
/* harmony import */ var _src_pro_independentreserve_js__WEBPACK_IMPORTED_MODULE_143__ = __webpack_require__(1311);
|
|
317828
|
+
/* harmony import */ var _src_pro_kraken_js__WEBPACK_IMPORTED_MODULE_144__ = __webpack_require__(736);
|
|
317829
|
+
/* harmony import */ var _src_pro_krakenfutures_js__WEBPACK_IMPORTED_MODULE_145__ = __webpack_require__(449);
|
|
317830
|
+
/* harmony import */ var _src_pro_kucoin_js__WEBPACK_IMPORTED_MODULE_146__ = __webpack_require__(2387);
|
|
317831
|
+
/* harmony import */ var _src_pro_kucoinfutures_js__WEBPACK_IMPORTED_MODULE_147__ = __webpack_require__(7181);
|
|
317832
|
+
/* harmony import */ var _src_pro_lbank_js__WEBPACK_IMPORTED_MODULE_148__ = __webpack_require__(1267);
|
|
317833
|
+
/* harmony import */ var _src_pro_luno_js__WEBPACK_IMPORTED_MODULE_149__ = __webpack_require__(627);
|
|
317834
|
+
/* harmony import */ var _src_pro_mexc_js__WEBPACK_IMPORTED_MODULE_150__ = __webpack_require__(6484);
|
|
317835
|
+
/* harmony import */ var _src_pro_ndax_js__WEBPACK_IMPORTED_MODULE_151__ = __webpack_require__(8080);
|
|
317836
|
+
/* harmony import */ var _src_pro_okcoin_js__WEBPACK_IMPORTED_MODULE_152__ = __webpack_require__(7105);
|
|
317837
|
+
/* harmony import */ var _src_pro_okx_js__WEBPACK_IMPORTED_MODULE_153__ = __webpack_require__(2214);
|
|
317838
|
+
/* harmony import */ var _src_pro_onetrading_js__WEBPACK_IMPORTED_MODULE_154__ = __webpack_require__(9419);
|
|
317839
|
+
/* harmony import */ var _src_pro_p2b_js__WEBPACK_IMPORTED_MODULE_155__ = __webpack_require__(8516);
|
|
317840
|
+
/* harmony import */ var _src_pro_phemex_js__WEBPACK_IMPORTED_MODULE_156__ = __webpack_require__(4360);
|
|
317841
|
+
/* harmony import */ var _src_pro_poloniex_js__WEBPACK_IMPORTED_MODULE_157__ = __webpack_require__(7924);
|
|
317842
|
+
/* harmony import */ var _src_pro_poloniexfutures_js__WEBPACK_IMPORTED_MODULE_158__ = __webpack_require__(3541);
|
|
317843
|
+
/* harmony import */ var _src_pro_probit_js__WEBPACK_IMPORTED_MODULE_159__ = __webpack_require__(9782);
|
|
317844
|
+
/* harmony import */ var _src_pro_upbit_js__WEBPACK_IMPORTED_MODULE_160__ = __webpack_require__(7614);
|
|
317845
|
+
/* harmony import */ var _src_pro_wazirx_js__WEBPACK_IMPORTED_MODULE_161__ = __webpack_require__(4828);
|
|
317846
|
+
/* harmony import */ var _src_pro_whitebit_js__WEBPACK_IMPORTED_MODULE_162__ = __webpack_require__(5630);
|
|
317847
|
+
/* harmony import */ var _src_pro_woo_js__WEBPACK_IMPORTED_MODULE_163__ = __webpack_require__(3910);
|
|
317070
317848
|
/*
|
|
317071
317849
|
|
|
317072
317850
|
MIT License
|
|
@@ -317101,7 +317879,7 @@ SOFTWARE.
|
|
|
317101
317879
|
|
|
317102
317880
|
//-----------------------------------------------------------------------------
|
|
317103
317881
|
// this is updated by vss.js when building
|
|
317104
|
-
const version = '4.2.
|
|
317882
|
+
const version = '4.2.71';
|
|
317105
317883
|
_src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e.ccxtVersion = version;
|
|
317106
317884
|
//-----------------------------------------------------------------------------
|
|
317107
317885
|
|
|
@@ -317265,6 +318043,7 @@ _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e.ccxtVersion
|
|
|
317265
318043
|
|
|
317266
318044
|
|
|
317267
318045
|
|
|
318046
|
+
|
|
317268
318047
|
|
|
317269
318048
|
|
|
317270
318049
|
const exchanges = {
|
|
@@ -317410,28 +318189,29 @@ const pro = {
|
|
|
317410
318189
|
'htx': _src_pro_htx_js__WEBPACK_IMPORTED_MODULE_138__/* ["default"] */ .Z,
|
|
317411
318190
|
'huobi': _src_pro_huobi_js__WEBPACK_IMPORTED_MODULE_139__/* ["default"] */ .Z,
|
|
317412
318191
|
'huobijp': _src_pro_huobijp_js__WEBPACK_IMPORTED_MODULE_140__/* ["default"] */ .Z,
|
|
317413
|
-
'
|
|
317414
|
-
'
|
|
317415
|
-
'
|
|
317416
|
-
'
|
|
317417
|
-
'
|
|
317418
|
-
'
|
|
317419
|
-
'
|
|
317420
|
-
'
|
|
317421
|
-
'
|
|
317422
|
-
'
|
|
317423
|
-
'
|
|
317424
|
-
'
|
|
317425
|
-
'
|
|
317426
|
-
'
|
|
317427
|
-
'
|
|
317428
|
-
'
|
|
317429
|
-
'
|
|
317430
|
-
'
|
|
317431
|
-
'
|
|
317432
|
-
'
|
|
317433
|
-
'
|
|
317434
|
-
'
|
|
318192
|
+
'hyperliquid': _src_pro_hyperliquid_js__WEBPACK_IMPORTED_MODULE_141__/* ["default"] */ .Z,
|
|
318193
|
+
'idex': _src_pro_idex_js__WEBPACK_IMPORTED_MODULE_142__/* ["default"] */ .Z,
|
|
318194
|
+
'independentreserve': _src_pro_independentreserve_js__WEBPACK_IMPORTED_MODULE_143__/* ["default"] */ .Z,
|
|
318195
|
+
'kraken': _src_pro_kraken_js__WEBPACK_IMPORTED_MODULE_144__/* ["default"] */ .Z,
|
|
318196
|
+
'krakenfutures': _src_pro_krakenfutures_js__WEBPACK_IMPORTED_MODULE_145__/* ["default"] */ .Z,
|
|
318197
|
+
'kucoin': _src_pro_kucoin_js__WEBPACK_IMPORTED_MODULE_146__/* ["default"] */ .Z,
|
|
318198
|
+
'kucoinfutures': _src_pro_kucoinfutures_js__WEBPACK_IMPORTED_MODULE_147__/* ["default"] */ .Z,
|
|
318199
|
+
'lbank': _src_pro_lbank_js__WEBPACK_IMPORTED_MODULE_148__/* ["default"] */ .Z,
|
|
318200
|
+
'luno': _src_pro_luno_js__WEBPACK_IMPORTED_MODULE_149__/* ["default"] */ .Z,
|
|
318201
|
+
'mexc': _src_pro_mexc_js__WEBPACK_IMPORTED_MODULE_150__/* ["default"] */ .Z,
|
|
318202
|
+
'ndax': _src_pro_ndax_js__WEBPACK_IMPORTED_MODULE_151__/* ["default"] */ .Z,
|
|
318203
|
+
'okcoin': _src_pro_okcoin_js__WEBPACK_IMPORTED_MODULE_152__/* ["default"] */ .Z,
|
|
318204
|
+
'okx': _src_pro_okx_js__WEBPACK_IMPORTED_MODULE_153__/* ["default"] */ .Z,
|
|
318205
|
+
'onetrading': _src_pro_onetrading_js__WEBPACK_IMPORTED_MODULE_154__/* ["default"] */ .Z,
|
|
318206
|
+
'p2b': _src_pro_p2b_js__WEBPACK_IMPORTED_MODULE_155__/* ["default"] */ .Z,
|
|
318207
|
+
'phemex': _src_pro_phemex_js__WEBPACK_IMPORTED_MODULE_156__/* ["default"] */ .Z,
|
|
318208
|
+
'poloniex': _src_pro_poloniex_js__WEBPACK_IMPORTED_MODULE_157__/* ["default"] */ .Z,
|
|
318209
|
+
'poloniexfutures': _src_pro_poloniexfutures_js__WEBPACK_IMPORTED_MODULE_158__/* ["default"] */ .Z,
|
|
318210
|
+
'probit': _src_pro_probit_js__WEBPACK_IMPORTED_MODULE_159__/* ["default"] */ .Z,
|
|
318211
|
+
'upbit': _src_pro_upbit_js__WEBPACK_IMPORTED_MODULE_160__/* ["default"] */ .Z,
|
|
318212
|
+
'wazirx': _src_pro_wazirx_js__WEBPACK_IMPORTED_MODULE_161__/* ["default"] */ .Z,
|
|
318213
|
+
'whitebit': _src_pro_whitebit_js__WEBPACK_IMPORTED_MODULE_162__/* ["default"] */ .Z,
|
|
318214
|
+
'woo': _src_pro_woo_js__WEBPACK_IMPORTED_MODULE_163__/* ["default"] */ .Z,
|
|
317435
318215
|
};
|
|
317436
318216
|
for (const exchange in pro) {
|
|
317437
318217
|
// const ccxtExchange = exchanges[exchange]
|
|
@@ -317444,7 +318224,7 @@ for (const exchange in pro) {
|
|
|
317444
318224
|
pro.exchanges = Object.keys(pro);
|
|
317445
318225
|
pro['Exchange'] = _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e; // now the same for rest and ts
|
|
317446
318226
|
//-----------------------------------------------------------------------------
|
|
317447
|
-
const ccxt = Object.assign({ version, Exchange: _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e, Precise:
|
|
318227
|
+
const ccxt = Object.assign({ version, Exchange: _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e, Precise: _src_base_Precise_js__WEBPACK_IMPORTED_MODULE_164__/* .Precise */ .O, 'exchanges': Object.keys(exchanges), 'pro': pro }, exchanges, _src_base_functions_js__WEBPACK_IMPORTED_MODULE_165__, _src_base_errors_js__WEBPACK_IMPORTED_MODULE_166__);
|
|
317448
318228
|
|
|
317449
318229
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ccxt);
|
|
317450
318230
|
//-----------------------------------------------------------------------------
|