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/js/src/hashkey.js
CHANGED
|
@@ -1165,65 +1165,63 @@ export default class hashkey extends Exchange {
|
|
|
1165
1165
|
// ]
|
|
1166
1166
|
// }
|
|
1167
1167
|
//
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
'limits': {
|
|
1183
|
-
'withdraw': {
|
|
1184
|
-
'min': this.safeNumber(network, 'minWithdrawQuantity'),
|
|
1185
|
-
'max': this.parseNumber(this.omitZero(this.safeString(network, 'maxWithdrawQuantity'))),
|
|
1186
|
-
},
|
|
1187
|
-
'deposit': {
|
|
1188
|
-
'min': this.safeNumber(network, 'minDepositQuantity'),
|
|
1189
|
-
'max': undefined,
|
|
1190
|
-
},
|
|
1191
|
-
},
|
|
1192
|
-
'active': undefined,
|
|
1193
|
-
'deposit': this.safeBool(network, 'allowDeposit'),
|
|
1194
|
-
'withdraw': this.safeBool(network, 'allowWithdraw'),
|
|
1195
|
-
'fee': this.safeNumber(network, 'withdrawFee'),
|
|
1196
|
-
'precision': undefined,
|
|
1197
|
-
'info': network,
|
|
1198
|
-
};
|
|
1199
|
-
}
|
|
1200
|
-
const rawType = this.safeString(currecy, 'tokenType');
|
|
1201
|
-
const type = (rawType === 'REAL_MONEY') ? 'fiat' : 'crypto';
|
|
1202
|
-
result[code] = this.safeCurrencyStructure({
|
|
1203
|
-
'id': currencyId,
|
|
1204
|
-
'code': code,
|
|
1205
|
-
'precision': undefined,
|
|
1206
|
-
'type': type,
|
|
1207
|
-
'name': this.safeString(currecy, 'coinFullName'),
|
|
1208
|
-
'active': undefined,
|
|
1209
|
-
'deposit': this.safeBool(currecy, 'allowDeposit'),
|
|
1210
|
-
'withdraw': this.safeBool(currecy, 'allowWithdraw'),
|
|
1211
|
-
'fee': undefined,
|
|
1168
|
+
return this.parseCurrencies(coins);
|
|
1169
|
+
}
|
|
1170
|
+
parseCurrency(rawCurrency) {
|
|
1171
|
+
const currencyId = this.safeString(rawCurrency, 'coinId');
|
|
1172
|
+
const code = this.safeCurrencyCode(currencyId);
|
|
1173
|
+
const networks = this.safeList(rawCurrency, 'chainTypes');
|
|
1174
|
+
const parsedNetworks = {};
|
|
1175
|
+
for (let j = 0; j < networks.length; j++) {
|
|
1176
|
+
const network = networks[j];
|
|
1177
|
+
const networkId = this.safeString(network, 'chainType');
|
|
1178
|
+
const networkCode = this.networkCodeToId(networkId, code);
|
|
1179
|
+
parsedNetworks[networkCode] = {
|
|
1180
|
+
'id': networkId,
|
|
1181
|
+
'network': networkCode,
|
|
1212
1182
|
'limits': {
|
|
1213
|
-
'deposit': {
|
|
1214
|
-
'min': undefined,
|
|
1215
|
-
'max': undefined,
|
|
1216
|
-
},
|
|
1217
1183
|
'withdraw': {
|
|
1218
|
-
'min':
|
|
1184
|
+
'min': this.safeNumber(network, 'minWithdrawQuantity'),
|
|
1185
|
+
'max': this.parseNumber(this.omitZero(this.safeString(network, 'maxWithdrawQuantity'))),
|
|
1186
|
+
},
|
|
1187
|
+
'deposit': {
|
|
1188
|
+
'min': this.safeNumber(network, 'minDepositQuantity'),
|
|
1219
1189
|
'max': undefined,
|
|
1220
1190
|
},
|
|
1221
1191
|
},
|
|
1222
|
-
'
|
|
1223
|
-
'
|
|
1224
|
-
|
|
1192
|
+
'active': undefined,
|
|
1193
|
+
'deposit': this.safeBool(network, 'allowDeposit'),
|
|
1194
|
+
'withdraw': this.safeBool(network, 'allowWithdraw'),
|
|
1195
|
+
'fee': this.safeNumber(network, 'withdrawFee'),
|
|
1196
|
+
'precision': undefined,
|
|
1197
|
+
'info': network,
|
|
1198
|
+
};
|
|
1225
1199
|
}
|
|
1226
|
-
|
|
1200
|
+
const rawType = this.safeString(rawCurrency, 'tokenType');
|
|
1201
|
+
const type = (rawType === 'REAL_MONEY') ? 'fiat' : 'crypto';
|
|
1202
|
+
return this.safeCurrencyStructure({
|
|
1203
|
+
'id': currencyId,
|
|
1204
|
+
'code': code,
|
|
1205
|
+
'precision': undefined,
|
|
1206
|
+
'type': type,
|
|
1207
|
+
'name': this.safeString(rawCurrency, 'coinFullName'),
|
|
1208
|
+
'active': undefined,
|
|
1209
|
+
'deposit': this.safeBool(rawCurrency, 'allowDeposit'),
|
|
1210
|
+
'withdraw': this.safeBool(rawCurrency, 'allowWithdraw'),
|
|
1211
|
+
'fee': undefined,
|
|
1212
|
+
'limits': {
|
|
1213
|
+
'deposit': {
|
|
1214
|
+
'min': undefined,
|
|
1215
|
+
'max': undefined,
|
|
1216
|
+
},
|
|
1217
|
+
'withdraw': {
|
|
1218
|
+
'min': undefined,
|
|
1219
|
+
'max': undefined,
|
|
1220
|
+
},
|
|
1221
|
+
},
|
|
1222
|
+
'networks': parsedNetworks,
|
|
1223
|
+
'info': rawCurrency,
|
|
1224
|
+
});
|
|
1227
1225
|
}
|
|
1228
1226
|
/**
|
|
1229
1227
|
* @method
|
|
@@ -2049,7 +2047,7 @@ export default class hashkey extends Exchange {
|
|
|
2049
2047
|
let networkCode = undefined;
|
|
2050
2048
|
[networkCode, params] = this.handleNetworkCodeAndParams(params);
|
|
2051
2049
|
if (networkCode !== undefined) {
|
|
2052
|
-
request['chainType'] = this.networkCodeToId(networkCode);
|
|
2050
|
+
request['chainType'] = this.networkCodeToId(networkCode, currency['code']);
|
|
2053
2051
|
}
|
|
2054
2052
|
const response = await this.privatePostApiV1AccountWithdraw(this.extend(request, params));
|
|
2055
2053
|
//
|
|
@@ -3043,7 +3041,7 @@ export default class hashkey extends Exchange {
|
|
|
3043
3041
|
[marketType, params] = this.handleMarketTypeAndParams(methodName, market, params, marketType);
|
|
3044
3042
|
let response = undefined;
|
|
3045
3043
|
if (marketType === 'spot') {
|
|
3046
|
-
response = await this.privateDeleteApiV1SpotCancelOrderByIds(
|
|
3044
|
+
response = await this.privateDeleteApiV1SpotCancelOrderByIds(request);
|
|
3047
3045
|
//
|
|
3048
3046
|
// {
|
|
3049
3047
|
// "code": "0000",
|
|
@@ -3052,7 +3050,7 @@ export default class hashkey extends Exchange {
|
|
|
3052
3050
|
//
|
|
3053
3051
|
}
|
|
3054
3052
|
else if (marketType === 'swap') {
|
|
3055
|
-
response = this.privateDeleteApiV1FuturesCancelOrderByIds(
|
|
3053
|
+
response = await this.privateDeleteApiV1FuturesCancelOrderByIds(request);
|
|
3056
3054
|
}
|
|
3057
3055
|
else {
|
|
3058
3056
|
throw new NotSupported(this.id + ' ' + methodName + '() is not supported for ' + marketType + ' type of markets');
|
|
@@ -4333,8 +4331,8 @@ export default class hashkey extends Exchange {
|
|
|
4333
4331
|
return undefined;
|
|
4334
4332
|
}
|
|
4335
4333
|
let errorInArray = false;
|
|
4336
|
-
let responseCodeString = this.safeString(response, 'code'
|
|
4337
|
-
const responseCodeInteger = this.safeInteger(response, 'code'
|
|
4334
|
+
let responseCodeString = this.safeString(response, 'code');
|
|
4335
|
+
const responseCodeInteger = this.safeInteger(response, 'code'); // some codes in response are returned as '0000' others as 0
|
|
4338
4336
|
if (responseCodeInteger === 0) {
|
|
4339
4337
|
const result = this.safeList(response, 'result', []); // for batch methods
|
|
4340
4338
|
for (let i = 0; i < result.length; i++) {
|
package/js/src/hibachi.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ export default class hibachi extends Exchange {
|
|
|
69
69
|
* @method
|
|
70
70
|
* @name hibachi#fetchTradingFees
|
|
71
71
|
* @description fetch the trading fee
|
|
72
|
-
* @param params extra parameters
|
|
72
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
73
73
|
* @returns {object} a map of market symbols to [fee structures]{@link https://docs.ccxt.com/?id=fee-structure}
|
|
74
74
|
*/
|
|
75
75
|
fetchTradingFees(params?: {}): Promise<TradingFees>;
|
package/js/src/hibachi.js
CHANGED
|
@@ -745,7 +745,7 @@ export default class hibachi extends Exchange {
|
|
|
745
745
|
* @method
|
|
746
746
|
* @name hibachi#fetchTradingFees
|
|
747
747
|
* @description fetch the trading fee
|
|
748
|
-
* @param params extra parameters
|
|
748
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
749
749
|
* @returns {object} a map of market symbols to [fee structures]{@link https://docs.ccxt.com/?id=fee-structure}
|
|
750
750
|
*/
|
|
751
751
|
async fetchTradingFees(params = {}) {
|
package/js/src/hitbtc.d.ts
CHANGED
|
@@ -26,7 +26,6 @@ export default class hitbtc extends Exchange {
|
|
|
26
26
|
*/
|
|
27
27
|
fetchCurrencies(params?: {}): Promise<Currencies>;
|
|
28
28
|
parseCurrency(currency: Dict): Currency;
|
|
29
|
-
addKeyInArrayItems(obj: any, keyName: any): any[];
|
|
30
29
|
/**
|
|
31
30
|
* @method
|
|
32
31
|
* @name hitbtc#createDepositAddress
|
package/js/src/hitbtc.js
CHANGED
|
@@ -968,7 +968,7 @@ export default class hitbtc extends Exchange {
|
|
|
968
968
|
for (let j = 0; j < rawNetworks.length; j++) {
|
|
969
969
|
const rawNetwork = rawNetworks[j];
|
|
970
970
|
const networkId = this.safeString2(rawNetwork, 'protocol', 'network');
|
|
971
|
-
let networkCode = this.networkIdToCode(networkId);
|
|
971
|
+
let networkCode = this.networkIdToCode(networkId, code);
|
|
972
972
|
networkCode = (networkCode !== undefined) ? networkCode.toUpperCase() : code; // as hitbtc is white label, ensure we safeguard from possible bugs
|
|
973
973
|
networks[networkCode] = {
|
|
974
974
|
'info': rawNetwork,
|
|
@@ -1007,17 +1007,6 @@ export default class hitbtc extends Exchange {
|
|
|
1007
1007
|
'type': undefined, // 'crypto' field emits incorrect values
|
|
1008
1008
|
});
|
|
1009
1009
|
}
|
|
1010
|
-
addKeyInArrayItems(obj, keyName) {
|
|
1011
|
-
const result = [];
|
|
1012
|
-
const keys = Object.keys(obj);
|
|
1013
|
-
for (let i = 0; i < keys.length; i++) {
|
|
1014
|
-
const key = keys[i];
|
|
1015
|
-
const item = obj[key];
|
|
1016
|
-
item[keyName] = key;
|
|
1017
|
-
result.push(item);
|
|
1018
|
-
}
|
|
1019
|
-
return result;
|
|
1020
|
-
}
|
|
1021
1010
|
/**
|
|
1022
1011
|
* @method
|
|
1023
1012
|
* @name hitbtc#createDepositAddress
|
|
@@ -3440,8 +3429,9 @@ export default class hitbtc extends Exchange {
|
|
|
3440
3429
|
// "positions": null
|
|
3441
3430
|
// }
|
|
3442
3431
|
//
|
|
3432
|
+
const parsedAmount = this.parseNumber(amount);
|
|
3443
3433
|
return this.extend(this.parseMarginModification(response, market), {
|
|
3444
|
-
'amount':
|
|
3434
|
+
'amount': parsedAmount,
|
|
3445
3435
|
'type': type,
|
|
3446
3436
|
});
|
|
3447
3437
|
}
|
|
@@ -3702,7 +3692,8 @@ export default class hitbtc extends Exchange {
|
|
|
3702
3692
|
for (let j = 0; j < networks.length; j++) {
|
|
3703
3693
|
const networkEntry = networks[j];
|
|
3704
3694
|
const networkId = this.safeString(networkEntry, 'network');
|
|
3705
|
-
|
|
3695
|
+
const code = this.safeString(currency, 'code');
|
|
3696
|
+
let networkCode = this.networkIdToCode(networkId, code);
|
|
3706
3697
|
networkCode = (networkCode !== undefined) ? networkCode.toUpperCase() : undefined;
|
|
3707
3698
|
const withdrawFee = this.safeNumber(networkEntry, 'payout_fee');
|
|
3708
3699
|
const isDefault = this.safeValue(networkEntry, 'default');
|
package/js/src/hollaex.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export default class hollaex extends Exchange {
|
|
|
24
24
|
* @returns {object} an associative dictionary of currencies
|
|
25
25
|
*/
|
|
26
26
|
fetchCurrencies(params?: {}): Promise<Currencies>;
|
|
27
|
+
parseCurrency(rawCurrency: Dict): Currency;
|
|
27
28
|
/**
|
|
28
29
|
* @method
|
|
29
30
|
* @name hollaex#fetchOrderBooks
|
package/js/src/hollaex.js
CHANGED
|
@@ -486,66 +486,63 @@ export default class hollaex extends Exchange {
|
|
|
486
486
|
// }
|
|
487
487
|
//
|
|
488
488
|
const coins = this.safeDict(response, 'coins', {});
|
|
489
|
-
const
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
'precision': undefined,
|
|
514
|
-
'limits': {
|
|
515
|
-
'withdraw': {
|
|
516
|
-
'min': undefined,
|
|
517
|
-
'max': undefined,
|
|
518
|
-
},
|
|
519
|
-
},
|
|
520
|
-
'info': networkEntry,
|
|
521
|
-
};
|
|
522
|
-
}
|
|
523
|
-
result[code] = this.safeCurrencyStructure({
|
|
524
|
-
'id': id,
|
|
525
|
-
'numericId': this.safeInteger(currency, 'id'),
|
|
526
|
-
'code': code,
|
|
527
|
-
'info': currency,
|
|
528
|
-
'name': this.safeString(currency, 'fullname'),
|
|
529
|
-
'active': this.safeBool(currency, 'active'),
|
|
530
|
-
'deposit': this.safeBool(currency, 'allow_deposit'),
|
|
531
|
-
'withdraw': this.safeBool(currency, 'allow_withdrawal'),
|
|
532
|
-
'fee': this.safeNumber(currency, 'withdrawal_fee'),
|
|
533
|
-
'precision': this.safeNumber(currency, 'increment_unit'),
|
|
489
|
+
const values = Object.values(coins);
|
|
490
|
+
return this.parseCurrencies(values);
|
|
491
|
+
}
|
|
492
|
+
parseCurrency(rawCurrency) {
|
|
493
|
+
const id = this.safeString(rawCurrency, 'symbol');
|
|
494
|
+
const code = this.safeCurrencyCode(id);
|
|
495
|
+
const withdrawalLimits = this.safeList(rawCurrency, 'withdrawal_limits', []);
|
|
496
|
+
const rawType = this.safeString(rawCurrency, 'type');
|
|
497
|
+
const type = (rawType === 'blockchain') ? 'crypto' : 'other';
|
|
498
|
+
const rawNetworks = this.safeDict(rawCurrency, 'withdrawal_fees', {});
|
|
499
|
+
const networks = {};
|
|
500
|
+
const networkIds = Object.keys(rawNetworks);
|
|
501
|
+
for (let j = 0; j < networkIds.length; j++) {
|
|
502
|
+
const networkId = networkIds[j];
|
|
503
|
+
const networkEntry = this.safeDict(rawNetworks, networkId);
|
|
504
|
+
const networkCode = this.networkIdToCode(networkId, code);
|
|
505
|
+
networks[networkCode] = {
|
|
506
|
+
'id': networkId,
|
|
507
|
+
'network': networkCode,
|
|
508
|
+
'active': this.safeBool(networkEntry, 'active'),
|
|
509
|
+
'deposit': undefined,
|
|
510
|
+
'withdraw': undefined,
|
|
511
|
+
'fee': this.safeNumber(networkEntry, 'value'),
|
|
512
|
+
'precision': undefined,
|
|
534
513
|
'limits': {
|
|
535
|
-
'amount': {
|
|
536
|
-
'min': this.safeNumber(currency, 'min'),
|
|
537
|
-
'max': this.safeNumber(currency, 'max'),
|
|
538
|
-
},
|
|
539
514
|
'withdraw': {
|
|
540
515
|
'min': undefined,
|
|
541
|
-
'max':
|
|
516
|
+
'max': undefined,
|
|
542
517
|
},
|
|
543
518
|
},
|
|
544
|
-
'
|
|
545
|
-
|
|
546
|
-
});
|
|
519
|
+
'info': networkEntry,
|
|
520
|
+
};
|
|
547
521
|
}
|
|
548
|
-
return
|
|
522
|
+
return this.safeCurrencyStructure({
|
|
523
|
+
'id': id,
|
|
524
|
+
'numericId': this.safeInteger(rawCurrency, 'id'),
|
|
525
|
+
'code': code,
|
|
526
|
+
'info': rawCurrency,
|
|
527
|
+
'name': this.safeString(rawCurrency, 'fullname'),
|
|
528
|
+
'active': this.safeBool(rawCurrency, 'active'),
|
|
529
|
+
'deposit': this.safeBool(rawCurrency, 'allow_deposit'),
|
|
530
|
+
'withdraw': this.safeBool(rawCurrency, 'allow_withdrawal'),
|
|
531
|
+
'fee': this.safeNumber(rawCurrency, 'withdrawal_fee'),
|
|
532
|
+
'precision': this.safeNumber(rawCurrency, 'increment_unit'),
|
|
533
|
+
'limits': {
|
|
534
|
+
'amount': {
|
|
535
|
+
'min': this.safeNumber(rawCurrency, 'min'),
|
|
536
|
+
'max': this.safeNumber(rawCurrency, 'max'),
|
|
537
|
+
},
|
|
538
|
+
'withdraw': {
|
|
539
|
+
'min': undefined,
|
|
540
|
+
'max': this.safeValue(withdrawalLimits, 0),
|
|
541
|
+
},
|
|
542
|
+
},
|
|
543
|
+
'networks': networks,
|
|
544
|
+
'type': type,
|
|
545
|
+
});
|
|
549
546
|
}
|
|
550
547
|
/**
|
|
551
548
|
* @method
|
package/js/src/htx.d.ts
CHANGED
|
@@ -278,6 +278,7 @@ export default class htx extends Exchange {
|
|
|
278
278
|
* @returns {object} an associative dictionary of currencies
|
|
279
279
|
*/
|
|
280
280
|
fetchCurrencies(params?: {}): Promise<Currencies>;
|
|
281
|
+
parseCurrency(rawCurrency: Dict): Currency;
|
|
281
282
|
networkIdToCode(networkId?: Str, currencyCode?: Str): string;
|
|
282
283
|
networkCodeToId(networkCode: string, currencyCode?: Str): any;
|
|
283
284
|
/**
|
package/js/src/htx.js
CHANGED
|
@@ -184,7 +184,7 @@ export default class htx extends Exchange {
|
|
|
184
184
|
},
|
|
185
185
|
'www': 'https://www.huobi.com',
|
|
186
186
|
'referral': {
|
|
187
|
-
'url': 'https://www.htx.com
|
|
187
|
+
'url': 'https://www.htx.com/invite/en-us/1h?invite_code=6rmm2223',
|
|
188
188
|
'discount': 0.15,
|
|
189
189
|
},
|
|
190
190
|
'doc': [
|
|
@@ -1189,6 +1189,9 @@ export default class htx extends Exchange {
|
|
|
1189
1189
|
// 'BCC': 'BCC', BCH's somewhat chain
|
|
1190
1190
|
// 'DBC1': 'DBC1',
|
|
1191
1191
|
},
|
|
1192
|
+
'networksById': {
|
|
1193
|
+
'MATIC': 'MATIC',
|
|
1194
|
+
},
|
|
1192
1195
|
// https://github.com/ccxt/ccxt/issues/5376
|
|
1193
1196
|
'fetchOrdersByStatesMethod': 'spot_private_get_v1_order_orders',
|
|
1194
1197
|
'createMarketBuyOrderRequiresPrice': true,
|
|
@@ -3414,7 +3417,7 @@ export default class htx extends Exchange {
|
|
|
3414
3417
|
for (let i = 0; i < accounts.length; i++) {
|
|
3415
3418
|
const account = accounts[i];
|
|
3416
3419
|
const info = this.safeValue(account, 'info');
|
|
3417
|
-
const subtype = this.safeString(info, 'subtype'
|
|
3420
|
+
const subtype = this.safeString(info, 'subtype');
|
|
3418
3421
|
const typeFromAccount = this.safeString(account, 'type');
|
|
3419
3422
|
if (type === 'margin') {
|
|
3420
3423
|
if (subtype === marketId) {
|
|
@@ -3475,75 +3478,79 @@ export default class htx extends Exchange {
|
|
|
3475
3478
|
// }
|
|
3476
3479
|
//
|
|
3477
3480
|
const data = this.safeList(response, 'data', []);
|
|
3478
|
-
const result = {};
|
|
3479
|
-
this.options['networkChainIdsByNames'] = {};
|
|
3480
3481
|
this.options['networkNamesByChainIds'] = {};
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
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
|
-
'active': undefined,
|
|
3512
|
-
'deposit': this.safeString(chainEntry, 'depositStatus') === 'allowed',
|
|
3513
|
-
'withdraw': this.safeString(chainEntry, 'withdrawStatus') === 'allowed',
|
|
3514
|
-
'fee': this.safeNumber(chainEntry, 'transactFeeWithdraw'),
|
|
3515
|
-
'precision': this.parseNumber(this.parsePrecision(this.safeString(chainEntry, 'withdrawPrecision'))),
|
|
3516
|
-
};
|
|
3517
|
-
}
|
|
3518
|
-
result[code] = this.safeCurrencyStructure({
|
|
3519
|
-
'info': entry,
|
|
3520
|
-
'code': code,
|
|
3521
|
-
'id': currencyId,
|
|
3522
|
-
'active': this.safeString(entry, 'instStatus') === 'normal',
|
|
3523
|
-
'deposit': undefined,
|
|
3524
|
-
'withdraw': undefined,
|
|
3525
|
-
'fee': undefined,
|
|
3526
|
-
'name': undefined,
|
|
3527
|
-
'type': type,
|
|
3482
|
+
this.options['networkChainIdsByNames'] = {};
|
|
3483
|
+
return this.parseCurrencies(data);
|
|
3484
|
+
}
|
|
3485
|
+
parseCurrency(rawCurrency) {
|
|
3486
|
+
if (!('networkNamesByChainIds' in this.options)) {
|
|
3487
|
+
this.options['networkNamesByChainIds'] = {};
|
|
3488
|
+
}
|
|
3489
|
+
if (!('networkChainIdsByNames' in this.options)) {
|
|
3490
|
+
this.options['networkChainIdsByNames'] = {};
|
|
3491
|
+
}
|
|
3492
|
+
const currencyId = this.safeString(rawCurrency, 'currency');
|
|
3493
|
+
const code = this.safeCurrencyCode(currencyId);
|
|
3494
|
+
const assetType = this.safeString(rawCurrency, 'assetType');
|
|
3495
|
+
const type = (assetType === '1') ? 'crypto' : 'fiat';
|
|
3496
|
+
this.options['networkChainIdsByNames'][code] = {};
|
|
3497
|
+
const chains = this.safeList(rawCurrency, 'chains', []);
|
|
3498
|
+
const networks = {};
|
|
3499
|
+
for (let j = 0; j < chains.length; j++) {
|
|
3500
|
+
const chainEntry = chains[j];
|
|
3501
|
+
const uniqueChainId = this.safeString(chainEntry, 'chain'); // i.e. usdterc20, trc20usdt ...
|
|
3502
|
+
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
|
|
3503
|
+
this.options['networkChainIdsByNames'][code][title] = uniqueChainId;
|
|
3504
|
+
this.options['networkNamesByChainIds'][uniqueChainId] = title;
|
|
3505
|
+
const networkCode = this.networkIdToCode(uniqueChainId, code);
|
|
3506
|
+
networks[networkCode] = {
|
|
3507
|
+
'info': chainEntry,
|
|
3508
|
+
'id': uniqueChainId,
|
|
3509
|
+
'network': networkCode,
|
|
3528
3510
|
'limits': {
|
|
3529
|
-
'
|
|
3530
|
-
'min':
|
|
3511
|
+
'deposit': {
|
|
3512
|
+
'min': this.safeNumber(chainEntry, 'minDepositAmt'),
|
|
3531
3513
|
'max': undefined,
|
|
3532
3514
|
},
|
|
3533
3515
|
'withdraw': {
|
|
3534
|
-
'min':
|
|
3535
|
-
'max':
|
|
3536
|
-
},
|
|
3537
|
-
'deposit': {
|
|
3538
|
-
'min': undefined,
|
|
3539
|
-
'max': undefined,
|
|
3516
|
+
'min': this.safeNumber(chainEntry, 'minWithdrawAmt'),
|
|
3517
|
+
'max': this.safeNumber(chainEntry, 'maxWithdrawAmt'),
|
|
3540
3518
|
},
|
|
3541
3519
|
},
|
|
3542
|
-
'
|
|
3543
|
-
'
|
|
3544
|
-
|
|
3520
|
+
'active': undefined,
|
|
3521
|
+
'deposit': this.safeString(chainEntry, 'depositStatus') === 'allowed',
|
|
3522
|
+
'withdraw': this.safeString(chainEntry, 'withdrawStatus') === 'allowed',
|
|
3523
|
+
'fee': this.safeNumber(chainEntry, 'transactFeeWithdraw'),
|
|
3524
|
+
'precision': this.parseNumber(this.parsePrecision(this.safeString(chainEntry, 'withdrawPrecision'))),
|
|
3525
|
+
};
|
|
3545
3526
|
}
|
|
3546
|
-
return
|
|
3527
|
+
return this.safeCurrencyStructure({
|
|
3528
|
+
'info': rawCurrency,
|
|
3529
|
+
'code': code,
|
|
3530
|
+
'id': currencyId,
|
|
3531
|
+
'active': this.safeString(rawCurrency, 'instStatus') === 'normal',
|
|
3532
|
+
'deposit': undefined,
|
|
3533
|
+
'withdraw': undefined,
|
|
3534
|
+
'fee': undefined,
|
|
3535
|
+
'name': undefined,
|
|
3536
|
+
'type': type,
|
|
3537
|
+
'limits': {
|
|
3538
|
+
'amount': {
|
|
3539
|
+
'min': undefined,
|
|
3540
|
+
'max': undefined,
|
|
3541
|
+
},
|
|
3542
|
+
'withdraw': {
|
|
3543
|
+
'min': undefined,
|
|
3544
|
+
'max': undefined,
|
|
3545
|
+
},
|
|
3546
|
+
'deposit': {
|
|
3547
|
+
'min': undefined,
|
|
3548
|
+
'max': undefined,
|
|
3549
|
+
},
|
|
3550
|
+
},
|
|
3551
|
+
'precision': undefined,
|
|
3552
|
+
'networks': networks,
|
|
3553
|
+
});
|
|
3547
3554
|
}
|
|
3548
3555
|
networkIdToCode(networkId = undefined, currencyCode = undefined) {
|
|
3549
3556
|
// here network-id is provided as a pair of currency & chain (i.e. trc20usdt)
|
|
@@ -3553,7 +3560,7 @@ export default class htx extends Exchange {
|
|
|
3553
3560
|
throw new ExchangeError(this.id + ' networkIdToCode() - markets need to be loaded at first');
|
|
3554
3561
|
}
|
|
3555
3562
|
const networkTitle = this.safeValue(this.options['networkNamesByChainIds'], networkId, networkId);
|
|
3556
|
-
return super.networkIdToCode(networkTitle);
|
|
3563
|
+
return super.networkIdToCode(networkTitle, currencyCode);
|
|
3557
3564
|
}
|
|
3558
3565
|
networkCodeToId(networkCode, currencyCode = undefined) {
|
|
3559
3566
|
if (currencyCode === undefined) {
|
|
@@ -3569,7 +3576,7 @@ export default class htx extends Exchange {
|
|
|
3569
3576
|
return uniqueNetworkIds[networkCode];
|
|
3570
3577
|
}
|
|
3571
3578
|
else {
|
|
3572
|
-
const networkTitle = super.networkCodeToId(networkCode);
|
|
3579
|
+
const networkTitle = super.networkCodeToId(networkCode, currencyCode);
|
|
3573
3580
|
return this.safeValue(uniqueNetworkIds, networkTitle, networkTitle);
|
|
3574
3581
|
}
|
|
3575
3582
|
}
|
|
@@ -3847,7 +3854,8 @@ export default class htx extends Exchange {
|
|
|
3847
3854
|
// "ts": 1770293281344
|
|
3848
3855
|
// }
|
|
3849
3856
|
//
|
|
3850
|
-
|
|
3857
|
+
const finalResponse = response;
|
|
3858
|
+
let result = { 'info': finalResponse };
|
|
3851
3859
|
const data = this.safeValue(response, 'data');
|
|
3852
3860
|
if (isMultiAssetMode) {
|
|
3853
3861
|
const details = this.safeList(data, 'details', []);
|
|
@@ -6593,7 +6601,7 @@ export default class htx extends Exchange {
|
|
|
6593
6601
|
'currency': code,
|
|
6594
6602
|
'address': address,
|
|
6595
6603
|
'tag': tag,
|
|
6596
|
-
'network': this.networkIdToCode(networkId),
|
|
6604
|
+
'network': this.networkIdToCode(networkId, code),
|
|
6597
6605
|
'note': note,
|
|
6598
6606
|
'info': depositAddress,
|
|
6599
6607
|
};
|
|
@@ -6874,7 +6882,7 @@ export default class htx extends Exchange {
|
|
|
6874
6882
|
'txid': txHash,
|
|
6875
6883
|
'timestamp': timestamp,
|
|
6876
6884
|
'datetime': this.iso8601(timestamp),
|
|
6877
|
-
'network': this.networkIdToCode(networkId),
|
|
6885
|
+
'network': this.networkIdToCode(networkId, code),
|
|
6878
6886
|
'address': this.safeString(transaction, 'address'),
|
|
6879
6887
|
'addressTo': undefined,
|
|
6880
6888
|
'addressFrom': undefined,
|
|
@@ -7582,7 +7590,8 @@ export default class htx extends Exchange {
|
|
|
7582
7590
|
const sortedRequest = this.keysort(request);
|
|
7583
7591
|
let auth = this.urlencode(sortedRequest, true); // true is a go only requirment
|
|
7584
7592
|
// unfortunately, PHP demands double quotes for the escaped newline symbol
|
|
7585
|
-
const
|
|
7593
|
+
const content = [method, this.hostname, url, auth];
|
|
7594
|
+
const payload = content.join("\n"); // eslint-disable-line quotes
|
|
7586
7595
|
const signature = this.hmac(this.encode(payload), this.encode(this.secret), sha256, 'base64');
|
|
7587
7596
|
auth += '&' + this.urlencode({ 'Signature': signature });
|
|
7588
7597
|
url += '?' + auth;
|
|
@@ -7664,7 +7673,8 @@ export default class htx extends Exchange {
|
|
|
7664
7673
|
}
|
|
7665
7674
|
let auth = this.urlencode(request, true).replace('%2c', '%2C'); // in c# it manually needs to be uppercased
|
|
7666
7675
|
// unfortunately, PHP demands double quotes for the escaped newline symbol
|
|
7667
|
-
const
|
|
7676
|
+
const content2 = [method, hostname, url, auth];
|
|
7677
|
+
const payload = content2.join("\n"); // eslint-disable-line quotes
|
|
7668
7678
|
const signature = this.hmac(this.encode(payload), this.encode(this.secret), sha256, 'base64');
|
|
7669
7679
|
auth += '&' + this.urlencode({ 'Signature': signature });
|
|
7670
7680
|
url += '?' + auth;
|
|
@@ -7683,8 +7693,9 @@ export default class htx extends Exchange {
|
|
|
7683
7693
|
};
|
|
7684
7694
|
}
|
|
7685
7695
|
}
|
|
7696
|
+
const finalHostname = hostname; // java req
|
|
7686
7697
|
url = this.implodeParams(this.urls['api'][type], {
|
|
7687
|
-
'hostname':
|
|
7698
|
+
'hostname': finalHostname,
|
|
7688
7699
|
}) + url;
|
|
7689
7700
|
}
|
|
7690
7701
|
return { 'url': url, 'method': method, 'body': body, 'headers': headers };
|
|
@@ -9405,12 +9416,13 @@ export default class htx extends Exchange {
|
|
|
9405
9416
|
// }
|
|
9406
9417
|
//
|
|
9407
9418
|
const chains = this.safeValue(fee, 'chains', []);
|
|
9419
|
+
const code = this.safeString(currency, 'code');
|
|
9408
9420
|
let result = this.depositWithdrawFee(fee);
|
|
9409
9421
|
for (let j = 0; j < chains.length; j++) {
|
|
9410
9422
|
const chainEntry = chains[j];
|
|
9411
9423
|
const networkId = this.safeString(chainEntry, 'chain');
|
|
9412
9424
|
const withdrawFeeType = this.safeString(chainEntry, 'withdrawFeeType');
|
|
9413
|
-
const networkCode = this.networkIdToCode(networkId);
|
|
9425
|
+
const networkCode = this.networkIdToCode(networkId, code);
|
|
9414
9426
|
let withdrawFee = undefined;
|
|
9415
9427
|
let withdrawResult = undefined;
|
|
9416
9428
|
if (withdrawFeeType === 'fixed') {
|