ccxt 4.5.55 → 4.5.57
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 +215 -10
- package/dist/ccxt.browser.min.js +10 -10
- package/dist/cjs/ccxt.js +6 -11
- package/dist/cjs/src/aftermath.js +10 -5
- package/dist/cjs/src/alpaca.js +2 -2
- package/dist/cjs/src/apex.js +26 -17
- package/dist/cjs/src/arkham.js +10 -7
- package/dist/cjs/src/ascendex.js +8 -5
- package/dist/cjs/src/aster.js +7 -4
- package/dist/cjs/src/backpack.js +4 -4
- package/dist/cjs/src/base/Exchange.js +72 -35
- package/dist/cjs/src/base/functions/io.js +25 -0
- package/dist/cjs/src/base/functions.js +1 -0
- package/dist/cjs/src/bigone.js +10 -7
- package/dist/cjs/src/binance.js +196 -198
- package/dist/cjs/src/bingx.js +7 -7
- package/dist/cjs/src/bitfinex.js +71 -58
- package/dist/cjs/src/bitflyer.js +2 -1
- package/dist/cjs/src/bitget.js +16 -5
- package/dist/cjs/src/bitmart.js +18 -10
- package/dist/cjs/src/bitmex.js +8 -5
- package/dist/cjs/src/bitopro.js +2 -2
- package/dist/cjs/src/bitrue.js +4 -3
- package/dist/cjs/src/bitso.js +7 -4
- package/dist/cjs/src/bitstamp.js +7 -4
- package/dist/cjs/src/bitteam.js +1 -1
- package/dist/cjs/src/bittrade.js +2 -2
- package/dist/cjs/src/bitvavo.js +457 -34
- package/dist/cjs/src/blofin.js +28 -4
- package/dist/cjs/src/bullish.js +6 -5
- package/dist/cjs/src/bybit.js +19 -17
- package/dist/cjs/src/bybiteu.js +1 -0
- package/dist/cjs/src/bydfi.js +1 -1
- package/dist/cjs/src/cex.js +3 -3
- package/dist/cjs/src/coinbase.js +75 -65
- package/dist/cjs/src/coinbaseexchange.js +4 -3
- package/dist/cjs/src/coinbaseinternational.js +17 -10
- package/dist/cjs/src/coinex.js +79 -77
- package/dist/cjs/src/coinmetro.js +1 -1
- package/dist/cjs/src/coinsph.js +5 -5
- package/dist/cjs/src/cryptocom.js +52 -54
- package/dist/cjs/src/cryptomus.js +43 -39
- package/dist/cjs/src/deepcoin.js +9 -5
- package/dist/cjs/src/delta.js +53 -53
- package/dist/cjs/src/deribit.js +35 -35
- package/dist/cjs/src/derive.js +31 -31
- package/dist/cjs/src/digifinex.js +45 -45
- package/dist/cjs/src/exmo.js +104 -122
- package/dist/cjs/src/extended.js +3497 -0
- package/dist/cjs/src/foxbit.js +72 -76
- package/dist/cjs/src/gate.js +53 -53
- package/dist/cjs/src/gemini.js +45 -45
- package/dist/cjs/src/grvt.js +17 -11
- package/dist/cjs/src/hashkey.js +56 -58
- package/dist/cjs/src/hibachi.js +1 -1
- package/dist/cjs/src/hitbtc.js +5 -14
- package/dist/cjs/src/hollaex.js +51 -54
- package/dist/cjs/src/htx.js +84 -72
- package/dist/cjs/src/hyperliquid.js +60 -55
- package/dist/cjs/src/indodax.js +4 -3
- package/dist/cjs/src/kraken.js +71 -71
- package/dist/cjs/src/krakenfutures.js +2 -1
- package/dist/cjs/src/kucoin.js +3 -2
- package/dist/cjs/src/latoken.js +30 -32
- package/dist/cjs/src/lbank.js +64 -60
- package/dist/cjs/src/lighter.js +36 -38
- package/dist/cjs/src/luno.js +36 -44
- package/dist/cjs/src/mercado.js +2 -1
- package/dist/cjs/src/mexc.js +72 -63
- package/dist/cjs/src/modetrade.js +51 -53
- package/dist/cjs/src/ndax.js +35 -37
- package/dist/cjs/src/okx.js +23 -5
- package/dist/cjs/src/onetrading.js +21 -23
- package/dist/cjs/src/p2b.js +8 -4
- package/dist/cjs/src/paradex.js +3 -2
- package/dist/cjs/src/phemex.js +47 -47
- package/dist/cjs/src/poloniex.js +19 -13
- package/dist/cjs/src/pro/alpaca.js +1 -1
- package/dist/cjs/src/pro/apex.js +11 -2
- package/dist/cjs/src/pro/arkham.js +1 -1
- package/dist/cjs/src/pro/aster.js +10 -9
- package/dist/cjs/src/pro/backpack.js +1 -1
- package/dist/cjs/src/pro/binance.js +6 -6
- package/dist/cjs/src/pro/bingx.js +7 -2
- package/dist/cjs/src/pro/bitget.js +1 -1
- package/dist/cjs/src/pro/bithumb.js +1 -1
- package/dist/cjs/src/pro/bitmart.js +10 -0
- package/dist/cjs/src/pro/bitmex.js +1 -1
- package/dist/cjs/src/pro/bitstamp.js +1 -1
- package/dist/cjs/src/pro/blockchaincom.js +1 -1
- package/dist/cjs/src/pro/bybit.js +1 -1
- package/dist/cjs/src/pro/cex.js +1 -1
- package/dist/cjs/src/pro/coinex.js +1 -1
- package/dist/cjs/src/pro/coinone.js +1 -1
- package/dist/cjs/src/pro/cryptocom.js +3 -1
- package/dist/cjs/src/pro/dydx.js +1 -1
- package/dist/cjs/src/pro/exmo.js +1 -1
- package/dist/cjs/src/pro/extended.js +865 -0
- package/dist/cjs/src/pro/gate.js +1 -1
- package/dist/cjs/src/pro/grvt.js +8 -0
- package/dist/cjs/src/pro/htx.js +4 -4
- package/dist/cjs/src/pro/independentreserve.js +1 -1
- package/dist/cjs/src/pro/krakenfutures.js +16 -4
- package/dist/cjs/src/pro/kucoin.js +1 -1
- package/dist/cjs/src/pro/luno.js +3 -3
- package/dist/cjs/src/pro/modetrade.js +3 -3
- package/dist/cjs/src/pro/okx.js +4 -4
- package/dist/cjs/src/pro/onetrading.js +1 -1
- package/dist/cjs/src/pro/toobit.js +1 -1
- package/dist/cjs/src/pro/weex.js +1 -1
- package/dist/cjs/src/pro/woo.js +4 -4
- package/dist/cjs/src/pro/woofipro.js +3 -3
- package/dist/cjs/src/pro/xt.js +1 -1
- package/dist/cjs/src/static_dependencies/starknet/utils/hash/classHash.js +7 -7
- package/dist/cjs/src/tokocrypto.js +1 -1
- package/dist/cjs/src/toobit.js +3 -3
- package/dist/cjs/src/upbit.js +3 -3
- package/dist/cjs/src/weex.js +57 -62
- package/dist/cjs/src/whitebit.js +61 -63
- package/dist/cjs/src/woo.js +66 -55
- package/dist/cjs/src/woofipro.js +54 -48
- package/dist/cjs/src/xt.js +3 -2
- package/dist/cjs/src/yobit.js +4 -2
- package/dist/cjs/src/zebpay.js +73 -75
- package/js/ccxt.d.ts +8 -14
- package/js/ccxt.js +6 -10
- package/js/src/abstract/bitvavo.d.ts +15 -7
- package/js/src/abstract/extended.d.ts +58 -0
- package/js/src/abstract/mexc.d.ts +1 -0
- package/js/src/aftermath.js +10 -5
- package/js/src/alpaca.js +2 -2
- package/js/src/apex.d.ts +1 -1
- package/js/src/apex.js +26 -17
- package/js/src/arkham.js +10 -7
- package/js/src/ascendex.js +8 -5
- package/js/src/aster.js +7 -4
- package/js/src/backpack.js +4 -4
- package/js/src/base/Exchange.d.ts +10 -6
- package/js/src/base/Exchange.js +72 -35
- package/js/src/base/functions/io.d.ts +7 -0
- package/js/src/base/functions/io.js +24 -0
- package/js/src/bigone.js +10 -7
- package/js/src/binance.d.ts +2 -0
- package/js/src/binance.js +200 -202
- package/js/src/bingx.js +7 -7
- package/js/src/bitfinex.d.ts +2 -0
- package/js/src/bitfinex.js +71 -58
- package/js/src/bitflyer.js +2 -1
- package/js/src/bitget.js +16 -5
- package/js/src/bitmart.js +18 -10
- package/js/src/bitmex.js +8 -5
- package/js/src/bitopro.js +2 -2
- package/js/src/bitrue.js +4 -3
- package/js/src/bitso.js +7 -4
- package/js/src/bitstamp.js +7 -4
- package/js/src/bitteam.js +1 -1
- package/js/src/bittrade.js +2 -2
- package/js/src/bitvavo.d.ts +114 -21
- package/js/src/bitvavo.js +457 -34
- package/js/src/blofin.d.ts +1 -0
- package/js/src/blofin.js +28 -4
- package/js/src/bullish.js +6 -5
- package/js/src/bybit.d.ts +1 -1
- package/js/src/bybit.js +19 -17
- package/js/src/bybiteu.js +1 -0
- package/js/src/bydfi.js +1 -1
- package/js/src/cex.js +3 -3
- package/js/src/coinbase.d.ts +63 -56
- package/js/src/coinbase.js +75 -65
- package/js/src/coinbaseexchange.js +4 -3
- package/js/src/coinbaseinternational.d.ts +1 -1
- package/js/src/coinbaseinternational.js +17 -10
- package/js/src/coinex.d.ts +2 -1
- package/js/src/coinex.js +79 -77
- package/js/src/coinmetro.d.ts +1 -1
- package/js/src/coinmetro.js +1 -1
- package/js/src/coinsph.js +5 -5
- package/js/src/cryptocom.d.ts +1 -0
- package/js/src/cryptocom.js +52 -54
- package/js/src/cryptomus.d.ts +2 -1
- package/js/src/cryptomus.js +43 -39
- package/js/src/deepcoin.js +9 -5
- package/js/src/delta.d.ts +1 -0
- package/js/src/delta.js +53 -53
- package/js/src/deribit.d.ts +1 -0
- package/js/src/deribit.js +35 -35
- package/js/src/derive.d.ts +1 -0
- package/js/src/derive.js +31 -31
- package/js/src/digifinex.d.ts +1 -0
- package/js/src/digifinex.js +45 -45
- package/js/src/exmo.d.ts +1 -0
- package/js/src/exmo.js +104 -122
- package/js/src/extended.d.ts +554 -0
- package/js/src/extended.js +3490 -0
- package/js/src/foxbit.d.ts +1 -0
- package/js/src/foxbit.js +72 -76
- package/js/src/gate.d.ts +1 -0
- package/js/src/gate.js +53 -53
- package/js/src/gemini.d.ts +2 -1
- package/js/src/gemini.js +45 -45
- package/js/src/grvt.d.ts +1 -1
- package/js/src/grvt.js +17 -11
- package/js/src/hashkey.d.ts +1 -0
- package/js/src/hashkey.js +56 -58
- package/js/src/hibachi.d.ts +1 -1
- package/js/src/hibachi.js +1 -1
- package/js/src/hitbtc.d.ts +0 -1
- package/js/src/hitbtc.js +5 -14
- package/js/src/hollaex.d.ts +1 -0
- package/js/src/hollaex.js +51 -54
- package/js/src/htx.d.ts +1 -0
- package/js/src/htx.js +84 -72
- package/js/src/hyperliquid.d.ts +5 -4
- package/js/src/hyperliquid.js +60 -55
- package/js/src/indodax.js +4 -3
- package/js/src/kraken.d.ts +2 -1
- package/js/src/kraken.js +71 -71
- package/js/src/krakenfutures.js +2 -1
- package/js/src/kucoin.js +3 -2
- package/js/src/latoken.d.ts +1 -0
- package/js/src/latoken.js +30 -32
- package/js/src/lbank.d.ts +1 -0
- package/js/src/lbank.js +64 -60
- package/js/src/lighter.d.ts +2 -1
- package/js/src/lighter.js +36 -38
- package/js/src/luno.d.ts +1 -0
- package/js/src/luno.js +36 -44
- package/js/src/mercado.js +2 -1
- package/js/src/mexc.d.ts +4 -3
- package/js/src/mexc.js +72 -63
- package/js/src/modetrade.d.ts +1 -0
- package/js/src/modetrade.js +51 -53
- package/js/src/ndax.d.ts +1 -0
- package/js/src/ndax.js +35 -37
- package/js/src/okx.js +23 -5
- package/js/src/onetrading.d.ts +2 -1
- package/js/src/onetrading.js +21 -23
- package/js/src/p2b.js +8 -4
- package/js/src/paradex.js +3 -2
- package/js/src/phemex.d.ts +1 -0
- package/js/src/phemex.js +47 -47
- package/js/src/poloniex.js +19 -13
- package/js/src/pro/alpaca.js +1 -1
- package/js/src/pro/apex.js +11 -2
- package/js/src/pro/arkham.js +1 -1
- package/js/src/pro/aster.js +10 -9
- package/js/src/pro/backpack.js +1 -1
- package/js/src/pro/binance.d.ts +1 -1
- package/js/src/pro/binance.js +6 -6
- package/js/src/pro/bingx.js +7 -2
- package/js/src/pro/bitget.js +1 -1
- package/js/src/pro/bithumb.js +1 -1
- package/js/src/pro/bitmart.js +10 -0
- package/js/src/pro/bitmex.js +1 -1
- package/js/src/pro/bitstamp.js +1 -1
- package/js/src/pro/blockchaincom.js +1 -1
- package/js/src/pro/bybit.js +1 -1
- package/js/src/pro/cex.js +1 -1
- package/js/src/pro/coinex.js +1 -1
- package/js/src/pro/coinone.js +1 -1
- package/js/src/pro/cryptocom.js +3 -1
- package/js/src/pro/dydx.js +1 -1
- package/js/src/pro/exmo.js +1 -1
- package/js/src/pro/extended.d.ts +126 -0
- package/js/src/pro/extended.js +858 -0
- package/js/src/pro/gate.js +1 -1
- package/js/src/pro/grvt.js +8 -0
- package/js/src/pro/htx.d.ts +4 -4
- package/js/src/pro/htx.js +4 -4
- package/js/src/pro/independentreserve.js +1 -1
- package/js/src/pro/krakenfutures.d.ts +4 -4
- package/js/src/pro/krakenfutures.js +16 -4
- package/js/src/pro/kucoin.js +1 -1
- package/js/src/pro/luno.d.ts +1 -1
- package/js/src/pro/luno.js +3 -3
- package/js/src/pro/modetrade.d.ts +3 -3
- package/js/src/pro/modetrade.js +3 -3
- package/js/src/pro/okx.d.ts +4 -4
- package/js/src/pro/okx.js +4 -4
- package/js/src/pro/onetrading.js +1 -1
- package/js/src/pro/toobit.js +1 -1
- package/js/src/pro/weex.js +1 -1
- package/js/src/pro/woo.d.ts +4 -4
- package/js/src/pro/woo.js +4 -4
- package/js/src/pro/woofipro.d.ts +3 -3
- package/js/src/pro/woofipro.js +3 -3
- package/js/src/pro/xt.js +1 -1
- package/js/src/tokocrypto.js +1 -1
- package/js/src/toobit.d.ts +1 -1
- package/js/src/toobit.js +3 -3
- package/js/src/upbit.js +3 -3
- package/js/src/weex.d.ts +1 -0
- package/js/src/weex.js +57 -62
- package/js/src/whitebit.d.ts +1 -0
- package/js/src/whitebit.js +61 -63
- package/js/src/woo.d.ts +1 -0
- package/js/src/woo.js +66 -55
- package/js/src/woofipro.d.ts +1 -0
- package/js/src/woofipro.js +54 -48
- package/js/src/xt.js +3 -2
- package/js/src/yobit.js +4 -2
- package/js/src/zebpay.d.ts +2 -1
- package/js/src/zebpay.js +73 -75
- package/package.json +25 -11
- package/dist/cjs/src/gateio.js +0 -18
- package/dist/cjs/src/oxfun.js +0 -2931
- package/dist/cjs/src/pro/gateio.js +0 -18
- package/dist/cjs/src/pro/oxfun.js +0 -1113
- package/js/src/abstract/gateio.d.ts +0 -346
- package/js/src/abstract/gateio.js +0 -5
- package/js/src/abstract/oxfun.d.ts +0 -37
- package/js/src/gateio.d.ts +0 -4
- package/js/src/gateio.js +0 -11
- package/js/src/oxfun.d.ts +0 -442
- package/js/src/oxfun.js +0 -2924
- package/js/src/pro/gateio.d.ts +0 -4
- package/js/src/pro/gateio.js +0 -11
- package/js/src/pro/oxfun.d.ts +0 -234
- package/js/src/pro/oxfun.js +0 -1106
- /package/dist/cjs/src/abstract/{oxfun.js → extended.js} +0 -0
- /package/js/src/abstract/{oxfun.js → extended.js} +0 -0
package/dist/cjs/src/hashkey.js
CHANGED
|
@@ -1170,65 +1170,63 @@ class hashkey extends hashkey$1["default"] {
|
|
|
1170
1170
|
// ]
|
|
1171
1171
|
// }
|
|
1172
1172
|
//
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
'limits': {
|
|
1188
|
-
'withdraw': {
|
|
1189
|
-
'min': this.safeNumber(network, 'minWithdrawQuantity'),
|
|
1190
|
-
'max': this.parseNumber(this.omitZero(this.safeString(network, 'maxWithdrawQuantity'))),
|
|
1191
|
-
},
|
|
1192
|
-
'deposit': {
|
|
1193
|
-
'min': this.safeNumber(network, 'minDepositQuantity'),
|
|
1194
|
-
'max': undefined,
|
|
1195
|
-
},
|
|
1196
|
-
},
|
|
1197
|
-
'active': undefined,
|
|
1198
|
-
'deposit': this.safeBool(network, 'allowDeposit'),
|
|
1199
|
-
'withdraw': this.safeBool(network, 'allowWithdraw'),
|
|
1200
|
-
'fee': this.safeNumber(network, 'withdrawFee'),
|
|
1201
|
-
'precision': undefined,
|
|
1202
|
-
'info': network,
|
|
1203
|
-
};
|
|
1204
|
-
}
|
|
1205
|
-
const rawType = this.safeString(currecy, 'tokenType');
|
|
1206
|
-
const type = (rawType === 'REAL_MONEY') ? 'fiat' : 'crypto';
|
|
1207
|
-
result[code] = this.safeCurrencyStructure({
|
|
1208
|
-
'id': currencyId,
|
|
1209
|
-
'code': code,
|
|
1210
|
-
'precision': undefined,
|
|
1211
|
-
'type': type,
|
|
1212
|
-
'name': this.safeString(currecy, 'coinFullName'),
|
|
1213
|
-
'active': undefined,
|
|
1214
|
-
'deposit': this.safeBool(currecy, 'allowDeposit'),
|
|
1215
|
-
'withdraw': this.safeBool(currecy, 'allowWithdraw'),
|
|
1216
|
-
'fee': undefined,
|
|
1173
|
+
return this.parseCurrencies(coins);
|
|
1174
|
+
}
|
|
1175
|
+
parseCurrency(rawCurrency) {
|
|
1176
|
+
const currencyId = this.safeString(rawCurrency, 'coinId');
|
|
1177
|
+
const code = this.safeCurrencyCode(currencyId);
|
|
1178
|
+
const networks = this.safeList(rawCurrency, 'chainTypes');
|
|
1179
|
+
const parsedNetworks = {};
|
|
1180
|
+
for (let j = 0; j < networks.length; j++) {
|
|
1181
|
+
const network = networks[j];
|
|
1182
|
+
const networkId = this.safeString(network, 'chainType');
|
|
1183
|
+
const networkCode = this.networkCodeToId(networkId, code);
|
|
1184
|
+
parsedNetworks[networkCode] = {
|
|
1185
|
+
'id': networkId,
|
|
1186
|
+
'network': networkCode,
|
|
1217
1187
|
'limits': {
|
|
1218
|
-
'deposit': {
|
|
1219
|
-
'min': undefined,
|
|
1220
|
-
'max': undefined,
|
|
1221
|
-
},
|
|
1222
1188
|
'withdraw': {
|
|
1223
|
-
'min':
|
|
1189
|
+
'min': this.safeNumber(network, 'minWithdrawQuantity'),
|
|
1190
|
+
'max': this.parseNumber(this.omitZero(this.safeString(network, 'maxWithdrawQuantity'))),
|
|
1191
|
+
},
|
|
1192
|
+
'deposit': {
|
|
1193
|
+
'min': this.safeNumber(network, 'minDepositQuantity'),
|
|
1224
1194
|
'max': undefined,
|
|
1225
1195
|
},
|
|
1226
1196
|
},
|
|
1227
|
-
'
|
|
1228
|
-
'
|
|
1229
|
-
|
|
1197
|
+
'active': undefined,
|
|
1198
|
+
'deposit': this.safeBool(network, 'allowDeposit'),
|
|
1199
|
+
'withdraw': this.safeBool(network, 'allowWithdraw'),
|
|
1200
|
+
'fee': this.safeNumber(network, 'withdrawFee'),
|
|
1201
|
+
'precision': undefined,
|
|
1202
|
+
'info': network,
|
|
1203
|
+
};
|
|
1230
1204
|
}
|
|
1231
|
-
|
|
1205
|
+
const rawType = this.safeString(rawCurrency, 'tokenType');
|
|
1206
|
+
const type = (rawType === 'REAL_MONEY') ? 'fiat' : 'crypto';
|
|
1207
|
+
return this.safeCurrencyStructure({
|
|
1208
|
+
'id': currencyId,
|
|
1209
|
+
'code': code,
|
|
1210
|
+
'precision': undefined,
|
|
1211
|
+
'type': type,
|
|
1212
|
+
'name': this.safeString(rawCurrency, 'coinFullName'),
|
|
1213
|
+
'active': undefined,
|
|
1214
|
+
'deposit': this.safeBool(rawCurrency, 'allowDeposit'),
|
|
1215
|
+
'withdraw': this.safeBool(rawCurrency, 'allowWithdraw'),
|
|
1216
|
+
'fee': undefined,
|
|
1217
|
+
'limits': {
|
|
1218
|
+
'deposit': {
|
|
1219
|
+
'min': undefined,
|
|
1220
|
+
'max': undefined,
|
|
1221
|
+
},
|
|
1222
|
+
'withdraw': {
|
|
1223
|
+
'min': undefined,
|
|
1224
|
+
'max': undefined,
|
|
1225
|
+
},
|
|
1226
|
+
},
|
|
1227
|
+
'networks': parsedNetworks,
|
|
1228
|
+
'info': rawCurrency,
|
|
1229
|
+
});
|
|
1232
1230
|
}
|
|
1233
1231
|
/**
|
|
1234
1232
|
* @method
|
|
@@ -2054,7 +2052,7 @@ class hashkey extends hashkey$1["default"] {
|
|
|
2054
2052
|
let networkCode = undefined;
|
|
2055
2053
|
[networkCode, params] = this.handleNetworkCodeAndParams(params);
|
|
2056
2054
|
if (networkCode !== undefined) {
|
|
2057
|
-
request['chainType'] = this.networkCodeToId(networkCode);
|
|
2055
|
+
request['chainType'] = this.networkCodeToId(networkCode, currency['code']);
|
|
2058
2056
|
}
|
|
2059
2057
|
const response = await this.privatePostApiV1AccountWithdraw(this.extend(request, params));
|
|
2060
2058
|
//
|
|
@@ -3048,7 +3046,7 @@ class hashkey extends hashkey$1["default"] {
|
|
|
3048
3046
|
[marketType, params] = this.handleMarketTypeAndParams(methodName, market, params, marketType);
|
|
3049
3047
|
let response = undefined;
|
|
3050
3048
|
if (marketType === 'spot') {
|
|
3051
|
-
response = await this.privateDeleteApiV1SpotCancelOrderByIds(
|
|
3049
|
+
response = await this.privateDeleteApiV1SpotCancelOrderByIds(request);
|
|
3052
3050
|
//
|
|
3053
3051
|
// {
|
|
3054
3052
|
// "code": "0000",
|
|
@@ -3057,7 +3055,7 @@ class hashkey extends hashkey$1["default"] {
|
|
|
3057
3055
|
//
|
|
3058
3056
|
}
|
|
3059
3057
|
else if (marketType === 'swap') {
|
|
3060
|
-
response = this.privateDeleteApiV1FuturesCancelOrderByIds(
|
|
3058
|
+
response = await this.privateDeleteApiV1FuturesCancelOrderByIds(request);
|
|
3061
3059
|
}
|
|
3062
3060
|
else {
|
|
3063
3061
|
throw new errors.NotSupported(this.id + ' ' + methodName + '() is not supported for ' + marketType + ' type of markets');
|
|
@@ -4338,8 +4336,8 @@ class hashkey extends hashkey$1["default"] {
|
|
|
4338
4336
|
return undefined;
|
|
4339
4337
|
}
|
|
4340
4338
|
let errorInArray = false;
|
|
4341
|
-
let responseCodeString = this.safeString(response, 'code'
|
|
4342
|
-
const responseCodeInteger = this.safeInteger(response, 'code'
|
|
4339
|
+
let responseCodeString = this.safeString(response, 'code');
|
|
4340
|
+
const responseCodeInteger = this.safeInteger(response, 'code'); // some codes in response are returned as '0000' others as 0
|
|
4343
4341
|
if (responseCodeInteger === 0) {
|
|
4344
4342
|
const result = this.safeList(response, 'result', []); // for batch methods
|
|
4345
4343
|
for (let i = 0; i < result.length; i++) {
|
package/dist/cjs/src/hibachi.js
CHANGED
|
@@ -750,7 +750,7 @@ class hibachi extends hibachi$1["default"] {
|
|
|
750
750
|
* @method
|
|
751
751
|
* @name hibachi#fetchTradingFees
|
|
752
752
|
* @description fetch the trading fee
|
|
753
|
-
* @param params extra parameters
|
|
753
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
754
754
|
* @returns {object} a map of market symbols to [fee structures]{@link https://docs.ccxt.com/?id=fee-structure}
|
|
755
755
|
*/
|
|
756
756
|
async fetchTradingFees(params = {}) {
|
package/dist/cjs/src/hitbtc.js
CHANGED
|
@@ -973,7 +973,7 @@ class hitbtc extends hitbtc$1["default"] {
|
|
|
973
973
|
for (let j = 0; j < rawNetworks.length; j++) {
|
|
974
974
|
const rawNetwork = rawNetworks[j];
|
|
975
975
|
const networkId = this.safeString2(rawNetwork, 'protocol', 'network');
|
|
976
|
-
let networkCode = this.networkIdToCode(networkId);
|
|
976
|
+
let networkCode = this.networkIdToCode(networkId, code);
|
|
977
977
|
networkCode = (networkCode !== undefined) ? networkCode.toUpperCase() : code; // as hitbtc is white label, ensure we safeguard from possible bugs
|
|
978
978
|
networks[networkCode] = {
|
|
979
979
|
'info': rawNetwork,
|
|
@@ -1012,17 +1012,6 @@ class hitbtc extends hitbtc$1["default"] {
|
|
|
1012
1012
|
'type': undefined, // 'crypto' field emits incorrect values
|
|
1013
1013
|
});
|
|
1014
1014
|
}
|
|
1015
|
-
addKeyInArrayItems(obj, keyName) {
|
|
1016
|
-
const result = [];
|
|
1017
|
-
const keys = Object.keys(obj);
|
|
1018
|
-
for (let i = 0; i < keys.length; i++) {
|
|
1019
|
-
const key = keys[i];
|
|
1020
|
-
const item = obj[key];
|
|
1021
|
-
item[keyName] = key;
|
|
1022
|
-
result.push(item);
|
|
1023
|
-
}
|
|
1024
|
-
return result;
|
|
1025
|
-
}
|
|
1026
1015
|
/**
|
|
1027
1016
|
* @method
|
|
1028
1017
|
* @name hitbtc#createDepositAddress
|
|
@@ -3445,8 +3434,9 @@ class hitbtc extends hitbtc$1["default"] {
|
|
|
3445
3434
|
// "positions": null
|
|
3446
3435
|
// }
|
|
3447
3436
|
//
|
|
3437
|
+
const parsedAmount = this.parseNumber(amount);
|
|
3448
3438
|
return this.extend(this.parseMarginModification(response, market), {
|
|
3449
|
-
'amount':
|
|
3439
|
+
'amount': parsedAmount,
|
|
3450
3440
|
'type': type,
|
|
3451
3441
|
});
|
|
3452
3442
|
}
|
|
@@ -3707,7 +3697,8 @@ class hitbtc extends hitbtc$1["default"] {
|
|
|
3707
3697
|
for (let j = 0; j < networks.length; j++) {
|
|
3708
3698
|
const networkEntry = networks[j];
|
|
3709
3699
|
const networkId = this.safeString(networkEntry, 'network');
|
|
3710
|
-
|
|
3700
|
+
const code = this.safeString(currency, 'code');
|
|
3701
|
+
let networkCode = this.networkIdToCode(networkId, code);
|
|
3711
3702
|
networkCode = (networkCode !== undefined) ? networkCode.toUpperCase() : undefined;
|
|
3712
3703
|
const withdrawFee = this.safeNumber(networkEntry, 'payout_fee');
|
|
3713
3704
|
const isDefault = this.safeValue(networkEntry, 'default');
|
package/dist/cjs/src/hollaex.js
CHANGED
|
@@ -491,66 +491,63 @@ class hollaex extends hollaex$1["default"] {
|
|
|
491
491
|
// }
|
|
492
492
|
//
|
|
493
493
|
const coins = this.safeDict(response, 'coins', {});
|
|
494
|
-
const
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
'precision': undefined,
|
|
519
|
-
'limits': {
|
|
520
|
-
'withdraw': {
|
|
521
|
-
'min': undefined,
|
|
522
|
-
'max': undefined,
|
|
523
|
-
},
|
|
524
|
-
},
|
|
525
|
-
'info': networkEntry,
|
|
526
|
-
};
|
|
527
|
-
}
|
|
528
|
-
result[code] = this.safeCurrencyStructure({
|
|
529
|
-
'id': id,
|
|
530
|
-
'numericId': this.safeInteger(currency, 'id'),
|
|
531
|
-
'code': code,
|
|
532
|
-
'info': currency,
|
|
533
|
-
'name': this.safeString(currency, 'fullname'),
|
|
534
|
-
'active': this.safeBool(currency, 'active'),
|
|
535
|
-
'deposit': this.safeBool(currency, 'allow_deposit'),
|
|
536
|
-
'withdraw': this.safeBool(currency, 'allow_withdrawal'),
|
|
537
|
-
'fee': this.safeNumber(currency, 'withdrawal_fee'),
|
|
538
|
-
'precision': this.safeNumber(currency, 'increment_unit'),
|
|
494
|
+
const values = Object.values(coins);
|
|
495
|
+
return this.parseCurrencies(values);
|
|
496
|
+
}
|
|
497
|
+
parseCurrency(rawCurrency) {
|
|
498
|
+
const id = this.safeString(rawCurrency, 'symbol');
|
|
499
|
+
const code = this.safeCurrencyCode(id);
|
|
500
|
+
const withdrawalLimits = this.safeList(rawCurrency, 'withdrawal_limits', []);
|
|
501
|
+
const rawType = this.safeString(rawCurrency, 'type');
|
|
502
|
+
const type = (rawType === 'blockchain') ? 'crypto' : 'other';
|
|
503
|
+
const rawNetworks = this.safeDict(rawCurrency, 'withdrawal_fees', {});
|
|
504
|
+
const networks = {};
|
|
505
|
+
const networkIds = Object.keys(rawNetworks);
|
|
506
|
+
for (let j = 0; j < networkIds.length; j++) {
|
|
507
|
+
const networkId = networkIds[j];
|
|
508
|
+
const networkEntry = this.safeDict(rawNetworks, networkId);
|
|
509
|
+
const networkCode = this.networkIdToCode(networkId, code);
|
|
510
|
+
networks[networkCode] = {
|
|
511
|
+
'id': networkId,
|
|
512
|
+
'network': networkCode,
|
|
513
|
+
'active': this.safeBool(networkEntry, 'active'),
|
|
514
|
+
'deposit': undefined,
|
|
515
|
+
'withdraw': undefined,
|
|
516
|
+
'fee': this.safeNumber(networkEntry, 'value'),
|
|
517
|
+
'precision': undefined,
|
|
539
518
|
'limits': {
|
|
540
|
-
'amount': {
|
|
541
|
-
'min': this.safeNumber(currency, 'min'),
|
|
542
|
-
'max': this.safeNumber(currency, 'max'),
|
|
543
|
-
},
|
|
544
519
|
'withdraw': {
|
|
545
520
|
'min': undefined,
|
|
546
|
-
'max':
|
|
521
|
+
'max': undefined,
|
|
547
522
|
},
|
|
548
523
|
},
|
|
549
|
-
'
|
|
550
|
-
|
|
551
|
-
});
|
|
524
|
+
'info': networkEntry,
|
|
525
|
+
};
|
|
552
526
|
}
|
|
553
|
-
return
|
|
527
|
+
return this.safeCurrencyStructure({
|
|
528
|
+
'id': id,
|
|
529
|
+
'numericId': this.safeInteger(rawCurrency, 'id'),
|
|
530
|
+
'code': code,
|
|
531
|
+
'info': rawCurrency,
|
|
532
|
+
'name': this.safeString(rawCurrency, 'fullname'),
|
|
533
|
+
'active': this.safeBool(rawCurrency, 'active'),
|
|
534
|
+
'deposit': this.safeBool(rawCurrency, 'allow_deposit'),
|
|
535
|
+
'withdraw': this.safeBool(rawCurrency, 'allow_withdrawal'),
|
|
536
|
+
'fee': this.safeNumber(rawCurrency, 'withdrawal_fee'),
|
|
537
|
+
'precision': this.safeNumber(rawCurrency, 'increment_unit'),
|
|
538
|
+
'limits': {
|
|
539
|
+
'amount': {
|
|
540
|
+
'min': this.safeNumber(rawCurrency, 'min'),
|
|
541
|
+
'max': this.safeNumber(rawCurrency, 'max'),
|
|
542
|
+
},
|
|
543
|
+
'withdraw': {
|
|
544
|
+
'min': undefined,
|
|
545
|
+
'max': this.safeValue(withdrawalLimits, 0),
|
|
546
|
+
},
|
|
547
|
+
},
|
|
548
|
+
'networks': networks,
|
|
549
|
+
'type': type,
|
|
550
|
+
});
|
|
554
551
|
}
|
|
555
552
|
/**
|
|
556
553
|
* @method
|
package/dist/cjs/src/htx.js
CHANGED
|
@@ -189,7 +189,7 @@ class htx extends htx$1["default"] {
|
|
|
189
189
|
},
|
|
190
190
|
'www': 'https://www.huobi.com',
|
|
191
191
|
'referral': {
|
|
192
|
-
'url': 'https://www.htx.com
|
|
192
|
+
'url': 'https://www.htx.com/invite/en-us/1h?invite_code=6rmm2223',
|
|
193
193
|
'discount': 0.15,
|
|
194
194
|
},
|
|
195
195
|
'doc': [
|
|
@@ -1194,6 +1194,9 @@ class htx extends htx$1["default"] {
|
|
|
1194
1194
|
// 'BCC': 'BCC', BCH's somewhat chain
|
|
1195
1195
|
// 'DBC1': 'DBC1',
|
|
1196
1196
|
},
|
|
1197
|
+
'networksById': {
|
|
1198
|
+
'MATIC': 'MATIC',
|
|
1199
|
+
},
|
|
1197
1200
|
// https://github.com/ccxt/ccxt/issues/5376
|
|
1198
1201
|
'fetchOrdersByStatesMethod': 'spot_private_get_v1_order_orders',
|
|
1199
1202
|
'createMarketBuyOrderRequiresPrice': true,
|
|
@@ -3419,7 +3422,7 @@ class htx extends htx$1["default"] {
|
|
|
3419
3422
|
for (let i = 0; i < accounts.length; i++) {
|
|
3420
3423
|
const account = accounts[i];
|
|
3421
3424
|
const info = this.safeValue(account, 'info');
|
|
3422
|
-
const subtype = this.safeString(info, 'subtype'
|
|
3425
|
+
const subtype = this.safeString(info, 'subtype');
|
|
3423
3426
|
const typeFromAccount = this.safeString(account, 'type');
|
|
3424
3427
|
if (type === 'margin') {
|
|
3425
3428
|
if (subtype === marketId) {
|
|
@@ -3480,75 +3483,79 @@ class htx extends htx$1["default"] {
|
|
|
3480
3483
|
// }
|
|
3481
3484
|
//
|
|
3482
3485
|
const data = this.safeList(response, 'data', []);
|
|
3483
|
-
const result = {};
|
|
3484
|
-
this.options['networkChainIdsByNames'] = {};
|
|
3485
3486
|
this.options['networkNamesByChainIds'] = {};
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
},
|
|
3515
|
-
},
|
|
3516
|
-
'active': undefined,
|
|
3517
|
-
'deposit': this.safeString(chainEntry, 'depositStatus') === 'allowed',
|
|
3518
|
-
'withdraw': this.safeString(chainEntry, 'withdrawStatus') === 'allowed',
|
|
3519
|
-
'fee': this.safeNumber(chainEntry, 'transactFeeWithdraw'),
|
|
3520
|
-
'precision': this.parseNumber(this.parsePrecision(this.safeString(chainEntry, 'withdrawPrecision'))),
|
|
3521
|
-
};
|
|
3522
|
-
}
|
|
3523
|
-
result[code] = this.safeCurrencyStructure({
|
|
3524
|
-
'info': entry,
|
|
3525
|
-
'code': code,
|
|
3526
|
-
'id': currencyId,
|
|
3527
|
-
'active': this.safeString(entry, 'instStatus') === 'normal',
|
|
3528
|
-
'deposit': undefined,
|
|
3529
|
-
'withdraw': undefined,
|
|
3530
|
-
'fee': undefined,
|
|
3531
|
-
'name': undefined,
|
|
3532
|
-
'type': type,
|
|
3487
|
+
this.options['networkChainIdsByNames'] = {};
|
|
3488
|
+
return this.parseCurrencies(data);
|
|
3489
|
+
}
|
|
3490
|
+
parseCurrency(rawCurrency) {
|
|
3491
|
+
if (!('networkNamesByChainIds' in this.options)) {
|
|
3492
|
+
this.options['networkNamesByChainIds'] = {};
|
|
3493
|
+
}
|
|
3494
|
+
if (!('networkChainIdsByNames' in this.options)) {
|
|
3495
|
+
this.options['networkChainIdsByNames'] = {};
|
|
3496
|
+
}
|
|
3497
|
+
const currencyId = this.safeString(rawCurrency, 'currency');
|
|
3498
|
+
const code = this.safeCurrencyCode(currencyId);
|
|
3499
|
+
const assetType = this.safeString(rawCurrency, 'assetType');
|
|
3500
|
+
const type = (assetType === '1') ? 'crypto' : 'fiat';
|
|
3501
|
+
this.options['networkChainIdsByNames'][code] = {};
|
|
3502
|
+
const chains = this.safeList(rawCurrency, 'chains', []);
|
|
3503
|
+
const networks = {};
|
|
3504
|
+
for (let j = 0; j < chains.length; j++) {
|
|
3505
|
+
const chainEntry = chains[j];
|
|
3506
|
+
const uniqueChainId = this.safeString(chainEntry, 'chain'); // i.e. usdterc20, trc20usdt ...
|
|
3507
|
+
const title = this.safeString2(chainEntry, 'baseChain', 'displayName'); // baseChain and baseChainProtocol are together existent or inexistent in entries, but baseChain is preferred. when they are both inexistent, then we use generic displayName
|
|
3508
|
+
this.options['networkChainIdsByNames'][code][title] = uniqueChainId;
|
|
3509
|
+
this.options['networkNamesByChainIds'][uniqueChainId] = title;
|
|
3510
|
+
const networkCode = this.networkIdToCode(uniqueChainId, code);
|
|
3511
|
+
networks[networkCode] = {
|
|
3512
|
+
'info': chainEntry,
|
|
3513
|
+
'id': uniqueChainId,
|
|
3514
|
+
'network': networkCode,
|
|
3533
3515
|
'limits': {
|
|
3534
|
-
'
|
|
3535
|
-
'min':
|
|
3516
|
+
'deposit': {
|
|
3517
|
+
'min': this.safeNumber(chainEntry, 'minDepositAmt'),
|
|
3536
3518
|
'max': undefined,
|
|
3537
3519
|
},
|
|
3538
3520
|
'withdraw': {
|
|
3539
|
-
'min':
|
|
3540
|
-
'max':
|
|
3541
|
-
},
|
|
3542
|
-
'deposit': {
|
|
3543
|
-
'min': undefined,
|
|
3544
|
-
'max': undefined,
|
|
3521
|
+
'min': this.safeNumber(chainEntry, 'minWithdrawAmt'),
|
|
3522
|
+
'max': this.safeNumber(chainEntry, 'maxWithdrawAmt'),
|
|
3545
3523
|
},
|
|
3546
3524
|
},
|
|
3547
|
-
'
|
|
3548
|
-
'
|
|
3549
|
-
|
|
3525
|
+
'active': undefined,
|
|
3526
|
+
'deposit': this.safeString(chainEntry, 'depositStatus') === 'allowed',
|
|
3527
|
+
'withdraw': this.safeString(chainEntry, 'withdrawStatus') === 'allowed',
|
|
3528
|
+
'fee': this.safeNumber(chainEntry, 'transactFeeWithdraw'),
|
|
3529
|
+
'precision': this.parseNumber(this.parsePrecision(this.safeString(chainEntry, 'withdrawPrecision'))),
|
|
3530
|
+
};
|
|
3550
3531
|
}
|
|
3551
|
-
return
|
|
3532
|
+
return this.safeCurrencyStructure({
|
|
3533
|
+
'info': rawCurrency,
|
|
3534
|
+
'code': code,
|
|
3535
|
+
'id': currencyId,
|
|
3536
|
+
'active': this.safeString(rawCurrency, 'instStatus') === 'normal',
|
|
3537
|
+
'deposit': undefined,
|
|
3538
|
+
'withdraw': undefined,
|
|
3539
|
+
'fee': undefined,
|
|
3540
|
+
'name': undefined,
|
|
3541
|
+
'type': type,
|
|
3542
|
+
'limits': {
|
|
3543
|
+
'amount': {
|
|
3544
|
+
'min': undefined,
|
|
3545
|
+
'max': undefined,
|
|
3546
|
+
},
|
|
3547
|
+
'withdraw': {
|
|
3548
|
+
'min': undefined,
|
|
3549
|
+
'max': undefined,
|
|
3550
|
+
},
|
|
3551
|
+
'deposit': {
|
|
3552
|
+
'min': undefined,
|
|
3553
|
+
'max': undefined,
|
|
3554
|
+
},
|
|
3555
|
+
},
|
|
3556
|
+
'precision': undefined,
|
|
3557
|
+
'networks': networks,
|
|
3558
|
+
});
|
|
3552
3559
|
}
|
|
3553
3560
|
networkIdToCode(networkId = undefined, currencyCode = undefined) {
|
|
3554
3561
|
// here network-id is provided as a pair of currency & chain (i.e. trc20usdt)
|
|
@@ -3558,7 +3565,7 @@ class htx extends htx$1["default"] {
|
|
|
3558
3565
|
throw new errors.ExchangeError(this.id + ' networkIdToCode() - markets need to be loaded at first');
|
|
3559
3566
|
}
|
|
3560
3567
|
const networkTitle = this.safeValue(this.options['networkNamesByChainIds'], networkId, networkId);
|
|
3561
|
-
return super.networkIdToCode(networkTitle);
|
|
3568
|
+
return super.networkIdToCode(networkTitle, currencyCode);
|
|
3562
3569
|
}
|
|
3563
3570
|
networkCodeToId(networkCode, currencyCode = undefined) {
|
|
3564
3571
|
if (currencyCode === undefined) {
|
|
@@ -3574,7 +3581,7 @@ class htx extends htx$1["default"] {
|
|
|
3574
3581
|
return uniqueNetworkIds[networkCode];
|
|
3575
3582
|
}
|
|
3576
3583
|
else {
|
|
3577
|
-
const networkTitle = super.networkCodeToId(networkCode);
|
|
3584
|
+
const networkTitle = super.networkCodeToId(networkCode, currencyCode);
|
|
3578
3585
|
return this.safeValue(uniqueNetworkIds, networkTitle, networkTitle);
|
|
3579
3586
|
}
|
|
3580
3587
|
}
|
|
@@ -3852,7 +3859,8 @@ class htx extends htx$1["default"] {
|
|
|
3852
3859
|
// "ts": 1770293281344
|
|
3853
3860
|
// }
|
|
3854
3861
|
//
|
|
3855
|
-
|
|
3862
|
+
const finalResponse = response;
|
|
3863
|
+
let result = { 'info': finalResponse };
|
|
3856
3864
|
const data = this.safeValue(response, 'data');
|
|
3857
3865
|
if (isMultiAssetMode) {
|
|
3858
3866
|
const details = this.safeList(data, 'details', []);
|
|
@@ -6598,7 +6606,7 @@ class htx extends htx$1["default"] {
|
|
|
6598
6606
|
'currency': code,
|
|
6599
6607
|
'address': address,
|
|
6600
6608
|
'tag': tag,
|
|
6601
|
-
'network': this.networkIdToCode(networkId),
|
|
6609
|
+
'network': this.networkIdToCode(networkId, code),
|
|
6602
6610
|
'note': note,
|
|
6603
6611
|
'info': depositAddress,
|
|
6604
6612
|
};
|
|
@@ -6879,7 +6887,7 @@ class htx extends htx$1["default"] {
|
|
|
6879
6887
|
'txid': txHash,
|
|
6880
6888
|
'timestamp': timestamp,
|
|
6881
6889
|
'datetime': this.iso8601(timestamp),
|
|
6882
|
-
'network': this.networkIdToCode(networkId),
|
|
6890
|
+
'network': this.networkIdToCode(networkId, code),
|
|
6883
6891
|
'address': this.safeString(transaction, 'address'),
|
|
6884
6892
|
'addressTo': undefined,
|
|
6885
6893
|
'addressFrom': undefined,
|
|
@@ -7587,7 +7595,8 @@ class htx extends htx$1["default"] {
|
|
|
7587
7595
|
const sortedRequest = this.keysort(request);
|
|
7588
7596
|
let auth = this.urlencode(sortedRequest, true); // true is a go only requirment
|
|
7589
7597
|
// unfortunately, PHP demands double quotes for the escaped newline symbol
|
|
7590
|
-
const
|
|
7598
|
+
const content = [method, this.hostname, url, auth];
|
|
7599
|
+
const payload = content.join("\n"); // eslint-disable-line quotes
|
|
7591
7600
|
const signature = this.hmac(this.encode(payload), this.encode(this.secret), sha256.sha256, 'base64');
|
|
7592
7601
|
auth += '&' + this.urlencode({ 'Signature': signature });
|
|
7593
7602
|
url += '?' + auth;
|
|
@@ -7669,7 +7678,8 @@ class htx extends htx$1["default"] {
|
|
|
7669
7678
|
}
|
|
7670
7679
|
let auth = this.urlencode(request, true).replace('%2c', '%2C'); // in c# it manually needs to be uppercased
|
|
7671
7680
|
// unfortunately, PHP demands double quotes for the escaped newline symbol
|
|
7672
|
-
const
|
|
7681
|
+
const content2 = [method, hostname, url, auth];
|
|
7682
|
+
const payload = content2.join("\n"); // eslint-disable-line quotes
|
|
7673
7683
|
const signature = this.hmac(this.encode(payload), this.encode(this.secret), sha256.sha256, 'base64');
|
|
7674
7684
|
auth += '&' + this.urlencode({ 'Signature': signature });
|
|
7675
7685
|
url += '?' + auth;
|
|
@@ -7688,8 +7698,9 @@ class htx extends htx$1["default"] {
|
|
|
7688
7698
|
};
|
|
7689
7699
|
}
|
|
7690
7700
|
}
|
|
7701
|
+
const finalHostname = hostname; // java req
|
|
7691
7702
|
url = this.implodeParams(this.urls['api'][type], {
|
|
7692
|
-
'hostname':
|
|
7703
|
+
'hostname': finalHostname,
|
|
7693
7704
|
}) + url;
|
|
7694
7705
|
}
|
|
7695
7706
|
return { 'url': url, 'method': method, 'body': body, 'headers': headers };
|
|
@@ -9410,12 +9421,13 @@ class htx extends htx$1["default"] {
|
|
|
9410
9421
|
// }
|
|
9411
9422
|
//
|
|
9412
9423
|
const chains = this.safeValue(fee, 'chains', []);
|
|
9424
|
+
const code = this.safeString(currency, 'code');
|
|
9413
9425
|
let result = this.depositWithdrawFee(fee);
|
|
9414
9426
|
for (let j = 0; j < chains.length; j++) {
|
|
9415
9427
|
const chainEntry = chains[j];
|
|
9416
9428
|
const networkId = this.safeString(chainEntry, 'chain');
|
|
9417
9429
|
const withdrawFeeType = this.safeString(chainEntry, 'withdrawFeeType');
|
|
9418
|
-
const networkCode = this.networkIdToCode(networkId);
|
|
9430
|
+
const networkCode = this.networkIdToCode(networkId, code);
|
|
9419
9431
|
let withdrawFee = undefined;
|
|
9420
9432
|
let withdrawResult = undefined;
|
|
9421
9433
|
if (withdrawFeeType === 'fixed') {
|