ccxt 4.0.80 → 4.0.82
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/CHANGELOG.md +169 -0
- package/README.md +3 -3
- package/dist/ccxt.browser.js +212 -116
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/binance.js +10 -0
- package/dist/cjs/src/bitget.js +9 -4
- package/dist/cjs/src/bitmex.js +3 -1
- package/dist/cjs/src/bybit.js +0 -9
- package/dist/cjs/src/delta.js +3 -0
- package/dist/cjs/src/exmo.js +64 -25
- package/dist/cjs/src/gate.js +2 -0
- package/dist/cjs/src/hitbtc.js +3 -1
- package/dist/cjs/src/huobi.js +2 -0
- package/dist/cjs/src/kucoin.js +96 -69
- package/dist/cjs/src/pro/krakenfutures.js +1 -1
- package/dist/cjs/src/pro/okx.js +8 -3
- package/dist/cjs/src/pro/probit.js +2 -2
- package/dist/cjs/src/upbit.js +8 -0
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/binance.d.ts +10 -0
- package/js/src/abstract/binancecoinm.d.ts +10 -0
- package/js/src/abstract/binanceus.d.ts +10 -0
- package/js/src/abstract/binanceusdm.d.ts +10 -0
- package/js/src/abstract/gate.d.ts +2 -0
- package/js/src/abstract/gateio.d.ts +2 -0
- package/js/src/abstract/huobi.d.ts +2 -0
- package/js/src/abstract/huobipro.d.ts +2 -0
- package/js/src/binance.js +10 -0
- package/js/src/bitget.js +9 -4
- package/js/src/bitmex.d.ts +1 -1
- package/js/src/bitmex.js +3 -1
- package/js/src/bybit.js +0 -9
- package/js/src/delta.js +3 -0
- package/js/src/exmo.js +64 -25
- package/js/src/gate.js +2 -0
- package/js/src/hitbtc.js +3 -1
- package/js/src/huobi.js +2 -0
- package/js/src/kucoin.js +96 -69
- package/js/src/pro/krakenfutures.js +1 -1
- package/js/src/pro/okx.js +8 -3
- package/js/src/pro/probit.js +2 -2
- package/js/src/upbit.js +9 -1
- package/package.json +1 -1
- package/skip-tests.json +7 -2
package/dist/ccxt.browser.js
CHANGED
|
@@ -15783,6 +15783,7 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
15783
15783
|
'margin/exchange-small-liability': 0.6667,
|
|
15784
15784
|
'margin/exchange-small-liability-history': 0.6667,
|
|
15785
15785
|
'margin/next-hourly-interest-rate': 0.6667,
|
|
15786
|
+
'margin/capital-flow': 10,
|
|
15786
15787
|
'margin/delist-schedule': 0.6667,
|
|
15787
15788
|
'loan/vip/loanable/data': 40,
|
|
15788
15789
|
'loan/vip/collateral/data': 40,
|
|
@@ -15795,6 +15796,12 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
15795
15796
|
'loan/loanable/data': 40,
|
|
15796
15797
|
'loan/collateral/data': 40,
|
|
15797
15798
|
'loan/repay/collateral/rate': 600,
|
|
15799
|
+
'loan/flexible/ongoing/orders': 30,
|
|
15800
|
+
'loan/flexible/borrow/history': 40,
|
|
15801
|
+
'loan/flexible/repay/history': 40,
|
|
15802
|
+
'loan/flexible/ltv/adjustment/history': 40,
|
|
15803
|
+
'loan/flexible/loanable/data': 40,
|
|
15804
|
+
'loan/flexible/collateral/data': 40,
|
|
15798
15805
|
'loan/vip/ongoing/orders': 40,
|
|
15799
15806
|
'loan/vip/repay/history': 40,
|
|
15800
15807
|
'loan/vip/collateral/account': 600,
|
|
@@ -16060,6 +16067,9 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
16060
16067
|
'loan/repay': 40.002,
|
|
16061
16068
|
'loan/adjust/ltv': 40.002,
|
|
16062
16069
|
'loan/customize/margin_call': 40.002,
|
|
16070
|
+
'loan/flexible/borrow': 40.002,
|
|
16071
|
+
'loan/flexible/repay': 40.002,
|
|
16072
|
+
'loan/flexible/adjust/ltv': 40.002,
|
|
16063
16073
|
'loan/vip/repay': 40.002,
|
|
16064
16074
|
'convert/getQuote': 1.3334,
|
|
16065
16075
|
'convert/acceptQuote': 3.3335,
|
|
@@ -40924,6 +40934,8 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
40924
40934
|
* @method
|
|
40925
40935
|
* @name bitget#fetchMyTrades
|
|
40926
40936
|
* @description fetch all trades made by the user
|
|
40937
|
+
* @see https://bitgetlimited.github.io/apidoc/en/spot/#get-transaction-details
|
|
40938
|
+
* @see https://bitgetlimited.github.io/apidoc/en/mix/#get-order-fill-detail
|
|
40927
40939
|
* @param {string} symbol unified market symbol
|
|
40928
40940
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
40929
40941
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
@@ -40933,16 +40945,19 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
40933
40945
|
this.checkRequiredSymbol('fetchMyTrades', symbol);
|
|
40934
40946
|
await this.loadMarkets();
|
|
40935
40947
|
const market = this.market(symbol);
|
|
40936
|
-
if (market['swap']) {
|
|
40937
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadSymbol(this.id + ' fetchMyTrades() only supports spot markets');
|
|
40938
|
-
}
|
|
40939
40948
|
const request = {
|
|
40940
40949
|
'symbol': market['id'],
|
|
40941
40950
|
};
|
|
40942
40951
|
if (limit !== undefined) {
|
|
40943
40952
|
request['limit'] = limit;
|
|
40944
40953
|
}
|
|
40945
|
-
|
|
40954
|
+
let response = undefined;
|
|
40955
|
+
if (market['spot']) {
|
|
40956
|
+
response = await this.privateSpotPostTradeFills(this.extend(request, params));
|
|
40957
|
+
}
|
|
40958
|
+
else {
|
|
40959
|
+
response = await this.privateMixGetOrderFills(this.extend(request, params));
|
|
40960
|
+
}
|
|
40946
40961
|
//
|
|
40947
40962
|
// {
|
|
40948
40963
|
// code: '00000',
|
|
@@ -48771,7 +48786,9 @@ class bitmex extends _abstract_bitmex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
48771
48786
|
filteredResponse.push(item);
|
|
48772
48787
|
}
|
|
48773
48788
|
}
|
|
48774
|
-
|
|
48789
|
+
symbols = this.marketSymbols(symbols);
|
|
48790
|
+
const result = this.parseFundingRates(filteredResponse);
|
|
48791
|
+
return this.filterByArray(result, 'symbol', symbols);
|
|
48775
48792
|
}
|
|
48776
48793
|
parseFundingRate(contract, market = undefined) {
|
|
48777
48794
|
// see response sample under "fetchMarkets" because same endpoint is being used here
|
|
@@ -75732,9 +75749,6 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
75732
75749
|
return this.parseOrder(order);
|
|
75733
75750
|
}
|
|
75734
75751
|
async editUnifiedAccountOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
|
|
75735
|
-
if (amount === undefined && price === undefined) {
|
|
75736
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder(this.id + ' editOrder requires either a price argument or an amount argument');
|
|
75737
|
-
}
|
|
75738
75752
|
await this.loadMarkets();
|
|
75739
75753
|
const market = this.market(symbol);
|
|
75740
75754
|
if (!market['linear'] && !market['option']) {
|
|
@@ -75813,9 +75827,6 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
75813
75827
|
});
|
|
75814
75828
|
}
|
|
75815
75829
|
async editUnifiedMarginOrder(id, symbol, type, side, amount, price = undefined, params = {}) {
|
|
75816
|
-
if (amount === undefined && price === undefined) {
|
|
75817
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder(this.id + ' editOrder requires either a price argument or an amount argument');
|
|
75818
|
-
}
|
|
75819
75830
|
await this.loadMarkets();
|
|
75820
75831
|
const market = this.market(symbol);
|
|
75821
75832
|
if (!market['linear'] && !market['option']) {
|
|
@@ -75912,9 +75923,6 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
75912
75923
|
return this.parseOrder(order);
|
|
75913
75924
|
}
|
|
75914
75925
|
async editContractV3Order(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
|
|
75915
|
-
if (amount === undefined && price === undefined) {
|
|
75916
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder(this.id + ' editOrder requires either a price argument or an amount argument');
|
|
75917
|
-
}
|
|
75918
75926
|
await this.loadMarkets();
|
|
75919
75927
|
const market = this.market(symbol);
|
|
75920
75928
|
const request = {
|
|
@@ -103886,6 +103894,9 @@ class delta extends _abstract_delta_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
103886
103894
|
for (let i = 0; i < markets.length; i++) {
|
|
103887
103895
|
const market = markets[i];
|
|
103888
103896
|
let type = this.safeString(market, 'contract_type');
|
|
103897
|
+
if (type === 'options_combos') {
|
|
103898
|
+
continue;
|
|
103899
|
+
}
|
|
103889
103900
|
// const settlingAsset = this.safeValue (market, 'settling_asset', {});
|
|
103890
103901
|
const quotingAsset = this.safeValue(market, 'quoting_asset', {});
|
|
103891
103902
|
const underlyingAsset = this.safeValue(market, 'underlying_asset', {});
|
|
@@ -114009,20 +114020,36 @@ class exmo extends _abstract_exmo_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
114009
114020
|
}
|
|
114010
114021
|
parseBalance(response) {
|
|
114011
114022
|
const result = { 'info': response };
|
|
114012
|
-
const
|
|
114013
|
-
|
|
114014
|
-
|
|
114015
|
-
|
|
114016
|
-
|
|
114017
|
-
|
|
114018
|
-
|
|
114019
|
-
|
|
114020
|
-
account['
|
|
114023
|
+
const wallets = this.safeValue(response, 'wallets');
|
|
114024
|
+
if (wallets !== undefined) {
|
|
114025
|
+
const currencyIds = Object.keys(wallets);
|
|
114026
|
+
for (let i = 0; i < currencyIds.length; i++) {
|
|
114027
|
+
const currencyId = currencyIds[i];
|
|
114028
|
+
const item = wallets[currencyId];
|
|
114029
|
+
const currency = this.safeCurrencyCode(currencyId);
|
|
114030
|
+
const account = this.account();
|
|
114031
|
+
account['used'] = this.safeString(item, 'used');
|
|
114032
|
+
account['free'] = this.safeString(item, 'free');
|
|
114033
|
+
account['total'] = this.safeString(item, 'balance');
|
|
114034
|
+
result[currency] = account;
|
|
114021
114035
|
}
|
|
114022
|
-
|
|
114023
|
-
|
|
114036
|
+
}
|
|
114037
|
+
else {
|
|
114038
|
+
const free = this.safeValue(response, 'balances', {});
|
|
114039
|
+
const used = this.safeValue(response, 'reserved', {});
|
|
114040
|
+
const currencyIds = Object.keys(free);
|
|
114041
|
+
for (let i = 0; i < currencyIds.length; i++) {
|
|
114042
|
+
const currencyId = currencyIds[i];
|
|
114043
|
+
const code = this.safeCurrencyCode(currencyId);
|
|
114044
|
+
const account = this.account();
|
|
114045
|
+
if (currencyId in free) {
|
|
114046
|
+
account['free'] = this.safeString(free, currencyId);
|
|
114047
|
+
}
|
|
114048
|
+
if (currencyId in used) {
|
|
114049
|
+
account['used'] = this.safeString(used, currencyId);
|
|
114050
|
+
}
|
|
114051
|
+
result[code] = account;
|
|
114024
114052
|
}
|
|
114025
|
-
result[code] = account;
|
|
114026
114053
|
}
|
|
114027
114054
|
return this.safeBalance(result);
|
|
114028
114055
|
}
|
|
@@ -114032,22 +114059,45 @@ class exmo extends _abstract_exmo_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
114032
114059
|
* @name exmo#fetchBalance
|
|
114033
114060
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
114034
114061
|
* @param {object} [params] extra parameters specific to the exmo api endpoint
|
|
114062
|
+
* @param {string} [params.marginMode] *isolated* fetches the isolated margin balance
|
|
114035
114063
|
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
114036
114064
|
*/
|
|
114037
114065
|
await this.loadMarkets();
|
|
114038
|
-
|
|
114039
|
-
|
|
114040
|
-
|
|
114041
|
-
|
|
114042
|
-
|
|
114043
|
-
|
|
114044
|
-
|
|
114045
|
-
|
|
114046
|
-
|
|
114047
|
-
|
|
114048
|
-
|
|
114049
|
-
|
|
114050
|
-
|
|
114066
|
+
let marginMode = undefined;
|
|
114067
|
+
[marginMode, params] = this.handleMarginModeAndParams('fetchBalance', params);
|
|
114068
|
+
if (marginMode === 'cross') {
|
|
114069
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.BadRequest(this.id + ' does not support cross margin');
|
|
114070
|
+
}
|
|
114071
|
+
let response = undefined;
|
|
114072
|
+
if (marginMode === 'isolated') {
|
|
114073
|
+
response = await this.privatePostMarginUserWalletList(params);
|
|
114074
|
+
//
|
|
114075
|
+
// {
|
|
114076
|
+
// "wallets": {
|
|
114077
|
+
// "USD": {
|
|
114078
|
+
// "balance": "1000",
|
|
114079
|
+
// "free": "600",
|
|
114080
|
+
// "used": "400"
|
|
114081
|
+
// }
|
|
114082
|
+
// }
|
|
114083
|
+
// }
|
|
114084
|
+
//
|
|
114085
|
+
}
|
|
114086
|
+
else {
|
|
114087
|
+
response = await this.privatePostUserInfo(params);
|
|
114088
|
+
//
|
|
114089
|
+
// {
|
|
114090
|
+
// "uid":131685,
|
|
114091
|
+
// "server_date":1628999600,
|
|
114092
|
+
// "balances":{
|
|
114093
|
+
// "EXM":"0",
|
|
114094
|
+
// "USD":"0",
|
|
114095
|
+
// "EUR":"0",
|
|
114096
|
+
// "GBP":"0",
|
|
114097
|
+
// },
|
|
114098
|
+
// }
|
|
114099
|
+
//
|
|
114100
|
+
}
|
|
114051
114101
|
return this.parseBalance(response);
|
|
114052
114102
|
}
|
|
114053
114103
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
@@ -115567,6 +115617,8 @@ class gate extends _abstract_gate_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
115567
115617
|
},
|
|
115568
115618
|
'portfolio': {
|
|
115569
115619
|
'get': {
|
|
115620
|
+
'spot/currency_pairs': 1.5,
|
|
115621
|
+
'spot/currency_pairs/{currency_pair}': 1.5,
|
|
115570
115622
|
'accounts': 1.5,
|
|
115571
115623
|
'account_mode': 1.5,
|
|
115572
115624
|
'borrowable': 1.5,
|
|
@@ -123952,7 +124004,6 @@ class hitbtc extends _abstract_hitbtc_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
123952
124004
|
'STEPN': 'GMT',
|
|
123953
124005
|
'STX': 'STOX',
|
|
123954
124006
|
'TV': 'Tokenville',
|
|
123955
|
-
'USD': 'USDT',
|
|
123956
124007
|
'XMT': 'MTL',
|
|
123957
124008
|
'XPNT': 'PNT',
|
|
123958
124009
|
},
|
|
@@ -124004,6 +124055,9 @@ class hitbtc extends _abstract_hitbtc_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
124004
124055
|
const ids = Object.keys(response);
|
|
124005
124056
|
for (let i = 0; i < ids.length; i++) {
|
|
124006
124057
|
const id = ids[i];
|
|
124058
|
+
if (id.endsWith('_BQX')) {
|
|
124059
|
+
continue; // seems like an invalid symbol and if we try to access it individually we get: {"timestamp":"2023-09-02T14:38:20.351Z","error":{"description":"Try get /public/symbol, to get list of all available symbols.","code":2001,"message":"No such symbol: EOSUSD_BQX"},"path":"/api/3/public/symbol/EOSUSD_BQX","requestId":"e1e9fce6-16374591"}
|
|
124060
|
+
}
|
|
124007
124061
|
const market = this.safeValue(response, id);
|
|
124008
124062
|
const marketType = this.safeString(market, 'type');
|
|
124009
124063
|
const expiry = this.safeInteger(market, 'expiry');
|
|
@@ -128988,6 +129042,7 @@ class huobi extends _abstract_huobi_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
128988
129042
|
'linear-swap-api/v3/unified_account_info': 1,
|
|
128989
129043
|
'linear-swap-api/v3/fix_position_margin_change_record': 1,
|
|
128990
129044
|
'linear-swap-api/v3/swap_unified_account_type': 1,
|
|
129045
|
+
'linear-swap-api/v3/linear_swap_overview_account_info': 1,
|
|
128991
129046
|
},
|
|
128992
129047
|
'post': {
|
|
128993
129048
|
// Future Account Interface
|
|
@@ -129182,6 +129237,7 @@ class huobi extends _abstract_huobi_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
129182
129237
|
'linear-swap-api/v3/swap_cross_hisorders_exact': 1,
|
|
129183
129238
|
'linear-swap-api/v3/fix_position_margin_change': 1,
|
|
129184
129239
|
'linear-swap-api/v3/swap_switch_account_type': 1,
|
|
129240
|
+
'linear-swap-api/v3/linear_swap_fee_switch': 1,
|
|
129185
129241
|
// Swap Strategy Order Interface
|
|
129186
129242
|
'linear-swap-api/v1/swap_trigger_order': 1,
|
|
129187
129243
|
'linear-swap-api/v1/swap_cross_trigger_order': 1,
|
|
@@ -147387,6 +147443,7 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
147387
147443
|
'versions': {
|
|
147388
147444
|
'public': {
|
|
147389
147445
|
'GET': {
|
|
147446
|
+
'currencies': 'v3',
|
|
147390
147447
|
'currencies/{currency}': 'v2',
|
|
147391
147448
|
'status': 'v1',
|
|
147392
147449
|
'market/orderbook/level2_20': 'v1',
|
|
@@ -147892,19 +147949,34 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
147892
147949
|
const promises = [];
|
|
147893
147950
|
promises.push(this.publicGetCurrencies(params));
|
|
147894
147951
|
//
|
|
147895
|
-
//
|
|
147896
|
-
//
|
|
147897
|
-
//
|
|
147898
|
-
//
|
|
147899
|
-
//
|
|
147900
|
-
//
|
|
147901
|
-
//
|
|
147902
|
-
//
|
|
147903
|
-
//
|
|
147904
|
-
//
|
|
147905
|
-
//
|
|
147906
|
-
//
|
|
147907
|
-
//
|
|
147952
|
+
// {
|
|
147953
|
+
// "code":"200000",
|
|
147954
|
+
// "data":[
|
|
147955
|
+
// {
|
|
147956
|
+
// "currency":"CSP",
|
|
147957
|
+
// "name":"CSP",
|
|
147958
|
+
// "fullName":"Caspian",
|
|
147959
|
+
// "precision":8,
|
|
147960
|
+
// "confirms":null,
|
|
147961
|
+
// "contractAddress":null,
|
|
147962
|
+
// "isMarginEnabled":false,
|
|
147963
|
+
// "isDebitEnabled":false,
|
|
147964
|
+
// "chains":[
|
|
147965
|
+
// {
|
|
147966
|
+
// "chainName":"ERC20",
|
|
147967
|
+
// "chain":"eth",
|
|
147968
|
+
// "withdrawalMinSize":"2999",
|
|
147969
|
+
// "withdrawalMinFee":"2999",
|
|
147970
|
+
// "isWithdrawEnabled":false,
|
|
147971
|
+
// "isDepositEnabled":false,
|
|
147972
|
+
// "confirms":12,
|
|
147973
|
+
// "preConfirms":12,
|
|
147974
|
+
// "contractAddress":"0xa6446d655a0c34bc4f05042ee88170d056cbaf45",
|
|
147975
|
+
// "depositFeeRate": "0.001", // present for some currencies/networks
|
|
147976
|
+
// }
|
|
147977
|
+
// ]
|
|
147978
|
+
// },
|
|
147979
|
+
// }
|
|
147908
147980
|
//
|
|
147909
147981
|
promises.push(this.fetchWebEndpoint('fetchCurrencies', 'webExchangeGetCurrencyCurrencyChainInfo', true));
|
|
147910
147982
|
//
|
|
@@ -147915,90 +147987,101 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
147915
147987
|
// "retry": false,
|
|
147916
147988
|
// "data": [
|
|
147917
147989
|
// {
|
|
147918
|
-
// "
|
|
147919
|
-
// "
|
|
147920
|
-
// "preDepositTipEnabled": "false",
|
|
147921
|
-
// "chain": "btc",
|
|
147990
|
+
// "status": "enabled",
|
|
147991
|
+
// "currency": "BTC",
|
|
147922
147992
|
// "isChainEnabled": "true",
|
|
147923
|
-
// "
|
|
147924
|
-
// "
|
|
147993
|
+
// "chain": "btc",
|
|
147994
|
+
// "chainName": "BTC",
|
|
147925
147995
|
// "chainFullName": "Bitcoin",
|
|
147926
|
-
// "
|
|
147996
|
+
// "walletPrecision": "8",
|
|
147927
147997
|
// "isDepositEnabled": "true",
|
|
147928
|
-
// "withdrawMinSize": "0.001",
|
|
147929
|
-
// "depositDisabledTip": "",
|
|
147930
|
-
// "userAddressName": "",
|
|
147931
|
-
// "txUrl": "https://blockchain.info/tx/{txId}",
|
|
147932
|
-
// "preWithdrawTipEnabled": "false",
|
|
147933
|
-
// "withdrawFeeRate": "0",
|
|
147934
|
-
// "confirmationCount": "2",
|
|
147935
|
-
// "currency": "BTC",
|
|
147936
147998
|
// "depositMinSize": "0.00005",
|
|
147999
|
+
// "confirmationCount": "2",
|
|
147937
148000
|
// "isWithdrawEnabled": "true",
|
|
147938
|
-
// "
|
|
148001
|
+
// "withdrawMinSize": "0.001",
|
|
148002
|
+
// "withdrawMinFee": "0.0005",
|
|
148003
|
+
// "withdrawFeeRate": "0",
|
|
148004
|
+
// "depositDisabledTip": "Wallet Maintenance",
|
|
148005
|
+
// "preDepositTipEnabled": "true",
|
|
148006
|
+
// "preDepositTip": "Do not transfer from ETH network directly",
|
|
148007
|
+
// "withdrawDisabledTip": "",
|
|
148008
|
+
// "preWithdrawTipEnabled": "false",
|
|
147939
148009
|
// "preWithdrawTip": "",
|
|
147940
|
-
// "
|
|
148010
|
+
// "orgAddress": "",
|
|
148011
|
+
// "userAddressName": "Memo",
|
|
147941
148012
|
// },
|
|
147942
148013
|
// ]
|
|
147943
148014
|
// }
|
|
147944
148015
|
//
|
|
147945
148016
|
const responses = await Promise.all(promises);
|
|
147946
|
-
const
|
|
147947
|
-
const
|
|
147948
|
-
const
|
|
147949
|
-
const
|
|
147950
|
-
const
|
|
148017
|
+
const currenciesResponse = this.safeValue(responses, 0, {});
|
|
148018
|
+
const currenciesData = this.safeValue(currenciesResponse, 'data', []);
|
|
148019
|
+
const additionalResponse = this.safeValue(responses, 1, {});
|
|
148020
|
+
const additionalData = this.safeValue(additionalResponse, 'data', []);
|
|
148021
|
+
const additionalDataGrouped = this.groupBy(additionalData, 'currency');
|
|
147951
148022
|
const result = {};
|
|
147952
|
-
for (let i = 0; i <
|
|
147953
|
-
const entry =
|
|
148023
|
+
for (let i = 0; i < currenciesData.length; i++) {
|
|
148024
|
+
const entry = currenciesData[i];
|
|
147954
148025
|
const id = this.safeString(entry, 'currency');
|
|
147955
148026
|
const name = this.safeString(entry, 'fullName');
|
|
147956
148027
|
const code = this.safeCurrencyCode(id);
|
|
147957
|
-
|
|
147958
|
-
|
|
147959
|
-
const fee = this.safeNumber(entry, 'withdrawalMinFee');
|
|
147960
|
-
const active = (isWithdrawEnabled && isDepositEnabled);
|
|
148028
|
+
let isWithdrawEnabled = undefined;
|
|
148029
|
+
let isDepositEnabled = undefined;
|
|
147961
148030
|
const networks = {};
|
|
147962
|
-
const chains = this.safeValue(
|
|
148031
|
+
const chains = this.safeValue(entry, 'chains', []);
|
|
148032
|
+
const extraChainsData = this.indexBy(this.safeValue(additionalDataGrouped, id, []), 'chain');
|
|
148033
|
+
const precision = this.parseNumber(this.parsePrecision(this.safeString(entry, 'precision')));
|
|
147963
148034
|
for (let j = 0; j < chains.length; j++) {
|
|
147964
148035
|
const chain = chains[j];
|
|
147965
148036
|
const chainId = this.safeString(chain, 'chain');
|
|
147966
|
-
const
|
|
147967
|
-
|
|
147968
|
-
|
|
147969
|
-
|
|
147970
|
-
|
|
147971
|
-
|
|
147972
|
-
|
|
147973
|
-
|
|
147974
|
-
|
|
147975
|
-
|
|
147976
|
-
|
|
147977
|
-
'fee': this.safeNumber(chain, 'withdrawMinFee'),
|
|
147978
|
-
'precision': this.parseNumber(this.parsePrecision(this.safeString(chain, 'walletPrecision'))),
|
|
147979
|
-
'limits': {
|
|
147980
|
-
'withdraw': {
|
|
147981
|
-
'min': this.safeNumber(chain, 'withdrawMinSize'),
|
|
147982
|
-
'max': undefined,
|
|
147983
|
-
},
|
|
147984
|
-
'deposit': {
|
|
147985
|
-
'min': this.safeNumber(chain, 'depositMinSize'),
|
|
147986
|
-
'max': undefined,
|
|
147987
|
-
},
|
|
147988
|
-
},
|
|
147989
|
-
};
|
|
148037
|
+
const networkCode = this.networkIdToCode(chainId);
|
|
148038
|
+
const chainWithdrawEnabled = this.safeValue(chain, 'isWithdrawEnabled', false);
|
|
148039
|
+
if (isWithdrawEnabled === undefined) {
|
|
148040
|
+
isWithdrawEnabled = chainWithdrawEnabled;
|
|
148041
|
+
}
|
|
148042
|
+
else {
|
|
148043
|
+
isWithdrawEnabled = isWithdrawEnabled || chainWithdrawEnabled;
|
|
148044
|
+
}
|
|
148045
|
+
const chainDepositEnabled = this.safeValue(chain, 'isDepositEnabled', false);
|
|
148046
|
+
if (isDepositEnabled === undefined) {
|
|
148047
|
+
isDepositEnabled = chainDepositEnabled;
|
|
147990
148048
|
}
|
|
148049
|
+
else {
|
|
148050
|
+
isDepositEnabled = isDepositEnabled || chainDepositEnabled;
|
|
148051
|
+
}
|
|
148052
|
+
const chainExtraData = this.safeValue(extraChainsData, chainId, {});
|
|
148053
|
+
networks[networkCode] = {
|
|
148054
|
+
'info': chain,
|
|
148055
|
+
'id': chainId,
|
|
148056
|
+
'name': this.safeString(chain, 'chainName'),
|
|
148057
|
+
'code': networkCode,
|
|
148058
|
+
'active': chainWithdrawEnabled && chainDepositEnabled,
|
|
148059
|
+
'fee': this.safeNumber(chain, 'withdrawalMinFee'),
|
|
148060
|
+
'deposit': chainDepositEnabled,
|
|
148061
|
+
'withdraw': chainWithdrawEnabled,
|
|
148062
|
+
'precision': this.parseNumber(this.parsePrecision(this.safeString(chainExtraData, 'walletPrecision'))),
|
|
148063
|
+
'limits': {
|
|
148064
|
+
'withdraw': {
|
|
148065
|
+
'min': this.safeNumber(chain, 'withdrawalMinSize'),
|
|
148066
|
+
'max': undefined,
|
|
148067
|
+
},
|
|
148068
|
+
'deposit': {
|
|
148069
|
+
'min': this.safeNumber(chainExtraData, 'depositMinSize'),
|
|
148070
|
+
'max': undefined,
|
|
148071
|
+
},
|
|
148072
|
+
},
|
|
148073
|
+
};
|
|
147991
148074
|
}
|
|
147992
148075
|
result[code] = {
|
|
147993
148076
|
'id': id,
|
|
147994
148077
|
'name': name,
|
|
147995
148078
|
'code': code,
|
|
147996
|
-
'precision':
|
|
148079
|
+
'precision': precision,
|
|
147997
148080
|
'info': entry,
|
|
147998
|
-
'active':
|
|
148081
|
+
'active': (isDepositEnabled || isWithdrawEnabled),
|
|
147999
148082
|
'deposit': isDepositEnabled,
|
|
148000
148083
|
'withdraw': isWithdrawEnabled,
|
|
148001
|
-
'fee':
|
|
148084
|
+
'fee': undefined,
|
|
148002
148085
|
'limits': this.limits,
|
|
148003
148086
|
'networks': networks,
|
|
148004
148087
|
};
|
|
@@ -224377,7 +224460,7 @@ class krakenfutures extends _krakenfutures_js__WEBPACK_IMPORTED_MODULE_0__/* ["d
|
|
|
224377
224460
|
symbols[symbol] = true;
|
|
224378
224461
|
cachedOrders.append(parsed);
|
|
224379
224462
|
}
|
|
224380
|
-
if (this.orders.length
|
|
224463
|
+
if (this.orders.length) {
|
|
224381
224464
|
client.resolve(this.orders, 'orders');
|
|
224382
224465
|
const keys = Object.keys(symbols);
|
|
224383
224466
|
for (let i = 0; i < keys.length; i++) {
|
|
@@ -229612,15 +229695,17 @@ class okx extends _okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
229612
229695
|
}
|
|
229613
229696
|
getUrl(channel, access = 'public') {
|
|
229614
229697
|
// for context: https://www.okx.com/help-center/changes-to-v5-api-websocket-subscription-parameter-and-url
|
|
229698
|
+
const isSandbox = this.options['sandboxMode'];
|
|
229699
|
+
const sandboxSuffix = isSandbox ? '?brokerId=9999' : '';
|
|
229615
229700
|
const isPublic = (access === 'public');
|
|
229616
229701
|
const url = this.urls['api']['ws'];
|
|
229617
229702
|
if ((channel.indexOf('candle') > -1) || (channel === 'orders-algo')) {
|
|
229618
|
-
return url + '/business';
|
|
229703
|
+
return url + '/business' + sandboxSuffix;
|
|
229619
229704
|
}
|
|
229620
229705
|
else if (isPublic) {
|
|
229621
|
-
return url + '/public';
|
|
229706
|
+
return url + '/public' + sandboxSuffix;
|
|
229622
229707
|
}
|
|
229623
|
-
return url + '/private';
|
|
229708
|
+
return url + '/private' + sandboxSuffix;
|
|
229624
229709
|
}
|
|
229625
229710
|
async subscribeMultiple(access, channel, symbols = undefined, params = {}) {
|
|
229626
229711
|
await this.loadMarkets();
|
|
@@ -230767,6 +230852,9 @@ class okx extends _okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
230767
230852
|
}
|
|
230768
230853
|
return false;
|
|
230769
230854
|
}
|
|
230855
|
+
else {
|
|
230856
|
+
client.reject(e);
|
|
230857
|
+
}
|
|
230770
230858
|
}
|
|
230771
230859
|
return message;
|
|
230772
230860
|
}
|
|
@@ -234990,11 +235078,11 @@ class probit extends _probit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
|
|
|
234990
235078
|
this.handleTicker(client, message);
|
|
234991
235079
|
}
|
|
234992
235080
|
const trades = this.safeValue(message, 'recent_trades', []);
|
|
234993
|
-
if (trades.length
|
|
235081
|
+
if (trades.length) {
|
|
234994
235082
|
this.handleTrades(client, message);
|
|
234995
235083
|
}
|
|
234996
235084
|
const orderBook = this.safeValueN(message, ['order_books', 'order_books_l1', 'order_books_l2', 'order_books_l3', 'order_books_l4'], []);
|
|
234997
|
-
if (orderBook.length
|
|
235085
|
+
if (orderBook.length) {
|
|
234998
235086
|
this.handleOrderBook(client, message, orderBook);
|
|
234999
235087
|
}
|
|
235000
235088
|
}
|
|
@@ -255401,12 +255489,20 @@ class upbit extends _abstract_upbit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
255401
255489
|
};
|
|
255402
255490
|
let method = 'privatePostWithdraws';
|
|
255403
255491
|
if (code !== 'KRW') {
|
|
255492
|
+
// 2023-05-23 Change to required parameters for digital assets
|
|
255493
|
+
const network = this.safeStringUpper2(params, 'network', 'net_type');
|
|
255494
|
+
if (network === undefined) {
|
|
255495
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' withdraw() requires a network argument');
|
|
255496
|
+
}
|
|
255497
|
+
params = this.omit(params, ['network']);
|
|
255498
|
+
request['net_type'] = network;
|
|
255404
255499
|
method += 'Coin';
|
|
255405
255500
|
request['currency'] = currency['id'];
|
|
255406
255501
|
request['address'] = address;
|
|
255407
255502
|
if (tag !== undefined) {
|
|
255408
255503
|
request['secondary_address'] = tag;
|
|
255409
255504
|
}
|
|
255505
|
+
params = this.omit(params, 'network');
|
|
255410
255506
|
}
|
|
255411
255507
|
else {
|
|
255412
255508
|
method += 'Krw';
|
|
@@ -273464,7 +273560,7 @@ SOFTWARE.
|
|
|
273464
273560
|
|
|
273465
273561
|
//-----------------------------------------------------------------------------
|
|
273466
273562
|
// this is updated by vss.js when building
|
|
273467
|
-
const version = '4.0.
|
|
273563
|
+
const version = '4.0.82';
|
|
273468
273564
|
_src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange.ccxtVersion */ .e.ccxtVersion = version;
|
|
273469
273565
|
//-----------------------------------------------------------------------------
|
|
273470
273566
|
|