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/bitfinex.js
CHANGED
|
@@ -851,74 +851,87 @@ class bitfinex extends bitfinex$1["default"] {
|
|
|
851
851
|
indexedNetworks[networkName] = networksList;
|
|
852
852
|
}
|
|
853
853
|
const ids = this.safeList(response, 0, []);
|
|
854
|
-
|
|
854
|
+
return this.parseCurrenciesCustom(ids, indexed, indexedNetworks);
|
|
855
|
+
}
|
|
856
|
+
parseCurrenciesCustom(ids, indexed, indexedNetworks) {
|
|
857
|
+
const allowedIds = [];
|
|
855
858
|
for (let i = 0; i < ids.length; i++) {
|
|
856
859
|
const id = ids[i];
|
|
857
860
|
if (id.endsWith('F0')) {
|
|
858
861
|
// we get a lot of F0 currencies, skip those
|
|
859
862
|
continue;
|
|
860
863
|
}
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
const
|
|
867
|
-
const
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
'
|
|
898
|
-
'
|
|
899
|
-
'
|
|
900
|
-
'type': type,
|
|
901
|
-
'name': name,
|
|
902
|
-
'active': true,
|
|
903
|
-
'deposit': undefined,
|
|
904
|
-
'withdraw': undefined,
|
|
905
|
-
'fee': fee,
|
|
906
|
-
'precision': this.parseNumber(precision),
|
|
864
|
+
allowedIds.push(id);
|
|
865
|
+
}
|
|
866
|
+
const result = {};
|
|
867
|
+
const arr = this.toArray(allowedIds);
|
|
868
|
+
for (let i = 0; i < arr.length; i++) {
|
|
869
|
+
const parsed = this.parseCurrencyCustom(arr[i], indexed, indexedNetworks);
|
|
870
|
+
const code = parsed['code'];
|
|
871
|
+
result[code] = parsed;
|
|
872
|
+
}
|
|
873
|
+
return result;
|
|
874
|
+
}
|
|
875
|
+
parseCurrencyCustom(id, indexed, indexedNetworks) {
|
|
876
|
+
const code = this.safeCurrencyCode(id);
|
|
877
|
+
const label = this.safeList(indexed['label'], id, []);
|
|
878
|
+
const name = this.safeString(label, 1);
|
|
879
|
+
const pool = this.safeList(indexed['pool'], id, []);
|
|
880
|
+
const rawType = this.safeString(pool, 1);
|
|
881
|
+
const isCryptoCoin = (rawType !== undefined) || (id in indexed['explorer']); // "hacky" solution
|
|
882
|
+
const type = isCryptoCoin ? 'crypto' : undefined;
|
|
883
|
+
const feeValues = this.safeList(indexed['fees'], id, []);
|
|
884
|
+
const fees = this.safeList(feeValues, 1, []);
|
|
885
|
+
const fee = this.safeNumber(fees, 1);
|
|
886
|
+
const undl = this.safeList(indexed['undl'], id, []);
|
|
887
|
+
const precision = this.safeString(this.options, 'defaultCurrencyPrecision', '8');
|
|
888
|
+
const networks = {};
|
|
889
|
+
const networkIds = this.safeList(indexedNetworks, id, []);
|
|
890
|
+
for (let j = 0; j < networkIds.length; j++) {
|
|
891
|
+
const networkId = networkIds[j];
|
|
892
|
+
const network = this.networkIdToCode(networkId, code);
|
|
893
|
+
const dwStatuses = this.safeList(indexed['statuses'], networkId, []);
|
|
894
|
+
networks[network] = {
|
|
895
|
+
'info': networkId,
|
|
896
|
+
'id': networkId.toLowerCase(),
|
|
897
|
+
'network': networkId,
|
|
898
|
+
'active': undefined,
|
|
899
|
+
'deposit': this.safeInteger(dwStatuses, 1) === 1,
|
|
900
|
+
'withdraw': this.safeInteger(dwStatuses, 2) === 1,
|
|
901
|
+
'fee': undefined,
|
|
902
|
+
'precision': undefined,
|
|
907
903
|
'limits': {
|
|
908
|
-
'amount': {
|
|
909
|
-
'min': undefined,
|
|
910
|
-
'max': undefined,
|
|
911
|
-
},
|
|
912
904
|
'withdraw': {
|
|
913
|
-
'min':
|
|
905
|
+
'min': undefined,
|
|
914
906
|
'max': undefined,
|
|
915
907
|
},
|
|
916
908
|
},
|
|
917
|
-
|
|
918
|
-
'margin': this.inArray(id, indexed['marginables']),
|
|
919
|
-
});
|
|
909
|
+
};
|
|
920
910
|
}
|
|
921
|
-
return
|
|
911
|
+
return this.safeCurrencyStructure({
|
|
912
|
+
'id': id,
|
|
913
|
+
'code': code,
|
|
914
|
+
'info': [id, label, pool, feeValues, undl],
|
|
915
|
+
'type': type,
|
|
916
|
+
'name': name,
|
|
917
|
+
'active': true,
|
|
918
|
+
'deposit': undefined,
|
|
919
|
+
'withdraw': undefined,
|
|
920
|
+
'fee': fee,
|
|
921
|
+
'precision': this.parseNumber(precision),
|
|
922
|
+
'limits': {
|
|
923
|
+
'amount': {
|
|
924
|
+
'min': undefined,
|
|
925
|
+
'max': undefined,
|
|
926
|
+
},
|
|
927
|
+
'withdraw': {
|
|
928
|
+
'min': fee,
|
|
929
|
+
'max': undefined,
|
|
930
|
+
},
|
|
931
|
+
},
|
|
932
|
+
'networks': networks,
|
|
933
|
+
'margin': this.inArray(id, indexed['marginables']),
|
|
934
|
+
});
|
|
922
935
|
}
|
|
923
936
|
/**
|
|
924
937
|
* @method
|
|
@@ -2487,14 +2500,14 @@ class bitfinex extends bitfinex$1["default"] {
|
|
|
2487
2500
|
tag = this.safeString(data, 3);
|
|
2488
2501
|
type = 'withdrawal';
|
|
2489
2502
|
const networkId = this.safeString(data, 2);
|
|
2490
|
-
network = this.networkIdToCode(networkId.toUpperCase()); // withdraw returns in lowercase
|
|
2503
|
+
network = this.networkIdToCode(networkId.toUpperCase(), code); // withdraw returns in lowercase
|
|
2491
2504
|
}
|
|
2492
2505
|
else if (transactionLength === 22) {
|
|
2493
2506
|
id = this.safeString(transaction, 0);
|
|
2494
2507
|
const currencyId = this.safeString(transaction, 1);
|
|
2495
2508
|
code = this.safeCurrencyCode(currencyId, currency);
|
|
2496
2509
|
const networkId = this.safeString(transaction, 2);
|
|
2497
|
-
network = this.networkIdToCode(networkId);
|
|
2510
|
+
network = this.networkIdToCode(networkId, code);
|
|
2498
2511
|
timestamp = this.safeInteger(transaction, 5);
|
|
2499
2512
|
updated = this.safeInteger(transaction, 6);
|
|
2500
2513
|
status = this.parseTransactionStatus(this.safeString(transaction, 9));
|
package/dist/cjs/src/bitflyer.js
CHANGED
|
@@ -1196,7 +1196,8 @@ class bitflyer extends bitflyer$1["default"] {
|
|
|
1196
1196
|
if (api === 'private') {
|
|
1197
1197
|
this.checkRequiredCredentials();
|
|
1198
1198
|
const nonce = this.nonce().toString();
|
|
1199
|
-
|
|
1199
|
+
const content = [nonce, method, request];
|
|
1200
|
+
let auth = content.join('');
|
|
1200
1201
|
if (Object.keys(params).length) {
|
|
1201
1202
|
if (method !== 'GET') {
|
|
1202
1203
|
body = this.json(params);
|
package/dist/cjs/src/bitget.js
CHANGED
|
@@ -1965,9 +1965,7 @@ class bitget extends bitget$1["default"] {
|
|
|
1965
1965
|
if (uta) {
|
|
1966
1966
|
return await this.fetchUtaMarkets(params);
|
|
1967
1967
|
}
|
|
1968
|
-
|
|
1969
|
-
return await this.fetchDefaultMarkets(params);
|
|
1970
|
-
}
|
|
1968
|
+
return await this.fetchDefaultMarkets(params);
|
|
1971
1969
|
}
|
|
1972
1970
|
async fetchDefaultMarkets(params) {
|
|
1973
1971
|
let types = undefined;
|
|
@@ -2898,7 +2896,7 @@ class bitget extends bitget$1["default"] {
|
|
|
2898
2896
|
}
|
|
2899
2897
|
await this.loadMarkets();
|
|
2900
2898
|
const currency = this.currency(code);
|
|
2901
|
-
const networkId = this.networkCodeToId(networkCode);
|
|
2899
|
+
const networkId = this.networkCodeToId(networkCode, code);
|
|
2902
2900
|
const request = {
|
|
2903
2901
|
'coin': currency['id'],
|
|
2904
2902
|
'address': address,
|
|
@@ -3067,7 +3065,7 @@ class bitget extends bitget$1["default"] {
|
|
|
3067
3065
|
'txid': this.safeString(transaction, 'tradeId'),
|
|
3068
3066
|
'timestamp': timestamp,
|
|
3069
3067
|
'datetime': this.iso8601(timestamp),
|
|
3070
|
-
'network': this.networkIdToCode(networkId),
|
|
3068
|
+
'network': this.networkIdToCode(networkId, code),
|
|
3071
3069
|
'addressFrom': this.safeString(transaction, 'fromAddress'),
|
|
3072
3070
|
'address': this.safeString(transaction, 'toAddress'),
|
|
3073
3071
|
'addressTo': this.safeString(transaction, 'toAddress'),
|
|
@@ -5368,6 +5366,13 @@ class bitget extends bitget$1["default"] {
|
|
|
5368
5366
|
const trailingTriggerPrice = this.safeString(params, 'trailingTriggerPrice', this.numberToString(price));
|
|
5369
5367
|
const trailingPercent = this.safeString2(params, 'trailingPercent', 'callbackRatio');
|
|
5370
5368
|
const isTrailingPercentOrder = trailingPercent !== undefined;
|
|
5369
|
+
// const multipleTriggers = (isTriggerOrder && (isStopLossTriggerOrder || isTakeProfitTriggerOrder || isTrailingPercentOrder))
|
|
5370
|
+
// || (isStopLossTriggerOrder && (isTakeProfitTriggerOrder || isTrailingPercentOrder))
|
|
5371
|
+
// || (isTakeProfitTriggerOrder && isTrailingPercentOrder);
|
|
5372
|
+
// if (multipleTriggers) {
|
|
5373
|
+
// throw new ExchangeError (this.id + ' createOrder() params can only contain one of triggerPrice, stopLossPrice, takeProfitPrice, trailingPercent');
|
|
5374
|
+
// }
|
|
5375
|
+
//
|
|
5371
5376
|
if (this.sum(isTriggerOrder, isStopLossTriggerOrder, isTakeProfitTriggerOrder, isTrailingPercentOrder) > 1) {
|
|
5372
5377
|
throw new errors.ExchangeError(this.id + ' createOrder() params can only contain one of triggerPrice, stopLossPrice, takeProfitPrice, trailingPercent');
|
|
5373
5378
|
}
|
|
@@ -5792,6 +5797,12 @@ class bitget extends bitget$1["default"] {
|
|
|
5792
5797
|
const trailingTriggerPrice = this.safeString(params, 'trailingTriggerPrice', this.numberToString(price));
|
|
5793
5798
|
const trailingPercent = this.safeString2(params, 'trailingPercent', 'newCallbackRatio');
|
|
5794
5799
|
const isTrailingPercentOrder = trailingPercent !== undefined;
|
|
5800
|
+
// const multipleTriggers = (isTriggerOrder && (isStopLossOrder || isTakeProfitOrder || isTrailingPercentOrder))
|
|
5801
|
+
// || (isStopLossOrder && (isTakeProfitOrder || isTrailingPercentOrder))
|
|
5802
|
+
// || (isTakeProfitOrder && isTrailingPercentOrder);
|
|
5803
|
+
// if (multipleTriggers) {
|
|
5804
|
+
// throw new ExchangeError (this.id + ' editOrder() params can only contain one of triggerPrice, stopLossPrice, takeProfitPrice, trailingPercent');
|
|
5805
|
+
// }
|
|
5795
5806
|
if (this.sum(isTriggerOrder, isStopLossOrder, isTakeProfitOrder, isTrailingPercentOrder) > 1) {
|
|
5796
5807
|
throw new errors.ExchangeError(this.id + ' editOrder() params can only contain one of triggerPrice, stopLossPrice, takeProfitPrice, trailingPercent');
|
|
5797
5808
|
}
|
package/dist/cjs/src/bitmart.js
CHANGED
|
@@ -1261,7 +1261,7 @@ class bitmart extends bitmart$1["default"] {
|
|
|
1261
1261
|
'type': isNtf ? 'other' : 'crypto',
|
|
1262
1262
|
};
|
|
1263
1263
|
}
|
|
1264
|
-
const networkCode = this.networkIdToCode(networkId);
|
|
1264
|
+
const networkCode = this.networkIdToCode(networkId, currencyCode);
|
|
1265
1265
|
const withdraw = this.safeBool(currency, 'withdraw_enabled');
|
|
1266
1266
|
const deposit = this.safeBool(currency, 'deposit_enabled');
|
|
1267
1267
|
entry['networks'][networkCode] = {
|
|
@@ -2979,8 +2979,10 @@ class bitmart extends bitmart$1["default"] {
|
|
|
2979
2979
|
}
|
|
2980
2980
|
const request = {
|
|
2981
2981
|
'symbol': market['id'],
|
|
2982
|
-
'size': parseInt(this.amountToPrecision(symbol, amount)),
|
|
2983
2982
|
};
|
|
2983
|
+
if (amount !== undefined) {
|
|
2984
|
+
request['size'] = parseInt(this.amountToPrecision(symbol, amount));
|
|
2985
|
+
}
|
|
2984
2986
|
const timeInForce = this.safeString(params, 'timeInForce');
|
|
2985
2987
|
const mode = this.safeInteger(params, 'mode'); // only for swap
|
|
2986
2988
|
const isMarketOrder = type === 'market';
|
|
@@ -3044,7 +3046,11 @@ class bitmart extends bitmart$1["default"] {
|
|
|
3044
3046
|
if (isStopLoss || isTakeProfit) {
|
|
3045
3047
|
reduceOnly = true;
|
|
3046
3048
|
request['price_type'] = this.safeInteger(params, 'price_type', 1);
|
|
3047
|
-
|
|
3049
|
+
if (price !== undefined) {
|
|
3050
|
+
request['executive_price'] = this.priceToPrecision(symbol, price);
|
|
3051
|
+
}
|
|
3052
|
+
const marketOrLimitStr = isLimitOrder ? 'limit' : 'market';
|
|
3053
|
+
request['category'] = this.safeString(params, 'category', marketOrLimitStr);
|
|
3048
3054
|
if (isStopLoss) {
|
|
3049
3055
|
request['trigger_price'] = this.priceToPrecision(symbol, stopLossPrice);
|
|
3050
3056
|
}
|
|
@@ -3301,9 +3307,9 @@ class bitmart extends bitmart$1["default"] {
|
|
|
3301
3307
|
}
|
|
3302
3308
|
const succeeded = this.safeValue(data, 'succeed');
|
|
3303
3309
|
if (succeeded !== undefined) {
|
|
3304
|
-
|
|
3305
|
-
if (
|
|
3306
|
-
throw new errors.InvalidOrder(this.id + ' cancelOrder() failed to cancel ' + symbol + ' order id ' +
|
|
3310
|
+
const id2 = this.safeString(succeeded, 0);
|
|
3311
|
+
if (id2 === undefined) {
|
|
3312
|
+
throw new errors.InvalidOrder(this.id + ' cancelOrder() failed to cancel ' + symbol + ' order id ' + id2);
|
|
3307
3313
|
}
|
|
3308
3314
|
}
|
|
3309
3315
|
else {
|
|
@@ -3926,11 +3932,12 @@ class bitmart extends bitmart$1["default"] {
|
|
|
3926
3932
|
}
|
|
3927
3933
|
const address = this.safeString(depositAddress, 'address');
|
|
3928
3934
|
currency = this.safeCurrency(currencyId, currency);
|
|
3935
|
+
const code = this.safeString(currency, 'code');
|
|
3929
3936
|
this.checkAddress(address);
|
|
3930
3937
|
return {
|
|
3931
3938
|
'info': depositAddress,
|
|
3932
|
-
'currency':
|
|
3933
|
-
'network': this.networkIdToCode(network),
|
|
3939
|
+
'currency': code,
|
|
3940
|
+
'network': this.networkIdToCode(network, code),
|
|
3934
3941
|
'address': address,
|
|
3935
3942
|
'tag': this.safeString2(depositAddress, 'address_memo', 'memo'),
|
|
3936
3943
|
};
|
|
@@ -4222,7 +4229,7 @@ class bitmart extends bitmart$1["default"] {
|
|
|
4222
4229
|
'id': id,
|
|
4223
4230
|
'currency': code,
|
|
4224
4231
|
'amount': amount,
|
|
4225
|
-
'network': this.networkIdToCode(networkId),
|
|
4232
|
+
'network': this.networkIdToCode(networkId, code),
|
|
4226
4233
|
'address': address,
|
|
4227
4234
|
'addressFrom': undefined,
|
|
4228
4235
|
'addressTo': undefined,
|
|
@@ -4641,8 +4648,9 @@ class bitmart extends bitmart$1["default"] {
|
|
|
4641
4648
|
if (limit === undefined) {
|
|
4642
4649
|
limit = 10;
|
|
4643
4650
|
}
|
|
4651
|
+
const pageNumber = this.safeInteger(params, 'page', 1);
|
|
4644
4652
|
const request = {
|
|
4645
|
-
'page':
|
|
4653
|
+
'page': pageNumber,
|
|
4646
4654
|
'limit': limit, // default is 10, max is 100
|
|
4647
4655
|
};
|
|
4648
4656
|
let currency = undefined;
|
package/dist/cjs/src/bitmex.js
CHANGED
|
@@ -482,7 +482,7 @@ class bitmex extends bitmex$1["default"] {
|
|
|
482
482
|
for (let j = 0; j < chains.length; j++) {
|
|
483
483
|
const chain = chains[j];
|
|
484
484
|
const networkId = this.safeString(chain, 'asset');
|
|
485
|
-
const network = this.networkIdToCode(networkId);
|
|
485
|
+
const network = this.networkIdToCode(networkId, code);
|
|
486
486
|
const withdrawalFeeRaw = this.safeString(chain, 'withdrawalFee');
|
|
487
487
|
const withdrawalFee = this.parseNumber(Precise["default"].stringMul(withdrawalFeeRaw, precisionString));
|
|
488
488
|
const isDepositEnabled = this.safeBool(chain, 'depositEnabled', false);
|
|
@@ -1486,13 +1486,14 @@ class bitmex extends bitmex$1["default"] {
|
|
|
1486
1486
|
if (status !== undefined) {
|
|
1487
1487
|
status = this.parseTransactionStatus(status);
|
|
1488
1488
|
}
|
|
1489
|
+
const code = currency['code'];
|
|
1489
1490
|
return {
|
|
1490
1491
|
'info': transaction,
|
|
1491
1492
|
'id': this.safeString(transaction, 'transactID'),
|
|
1492
1493
|
'txid': this.safeString(transaction, 'tx'),
|
|
1493
1494
|
'type': type,
|
|
1494
|
-
'currency':
|
|
1495
|
-
'network': this.networkIdToCode(this.safeString(transaction, 'network'),
|
|
1495
|
+
'currency': code,
|
|
1496
|
+
'network': this.networkIdToCode(this.safeString(transaction, 'network'), code),
|
|
1496
1497
|
'amount': this.parseNumber(amount),
|
|
1497
1498
|
'status': status,
|
|
1498
1499
|
'timestamp': transactTime,
|
|
@@ -2027,6 +2028,7 @@ class bitmex extends bitmex$1["default"] {
|
|
|
2027
2028
|
await this.loadMarkets();
|
|
2028
2029
|
const market = this.market(symbol);
|
|
2029
2030
|
let orderType = this.capitalize(type);
|
|
2031
|
+
const capitalizeOrderType = orderType;
|
|
2030
2032
|
const reduceOnly = this.safeValue(params, 'reduceOnly');
|
|
2031
2033
|
if (reduceOnly !== undefined) {
|
|
2032
2034
|
if ((!market['swap']) && (!market['future'])) {
|
|
@@ -2041,7 +2043,7 @@ class bitmex extends bitmex$1["default"] {
|
|
|
2041
2043
|
'symbol': market['id'],
|
|
2042
2044
|
'side': this.capitalize(side),
|
|
2043
2045
|
'orderQty': qty,
|
|
2044
|
-
'ordType':
|
|
2046
|
+
'ordType': capitalizeOrderType,
|
|
2045
2047
|
'text': brokerId,
|
|
2046
2048
|
};
|
|
2047
2049
|
const execInstructions = [];
|
|
@@ -2862,9 +2864,10 @@ class bitmex extends bitmex$1["default"] {
|
|
|
2862
2864
|
}
|
|
2863
2865
|
const currency = this.currency(code);
|
|
2864
2866
|
params = this.omit(params, 'network');
|
|
2867
|
+
const parsedNetwork = this.networkCodeToId(networkCode, currency['code']);
|
|
2865
2868
|
const request = {
|
|
2866
2869
|
'currency': currency['id'],
|
|
2867
|
-
'network':
|
|
2870
|
+
'network': parsedNetwork,
|
|
2868
2871
|
};
|
|
2869
2872
|
const response = await this.privateGetUserDepositAddress(this.extend(request, params));
|
|
2870
2873
|
//
|
package/dist/cjs/src/bitopro.js
CHANGED
|
@@ -1020,7 +1020,7 @@ class bitopro extends bitopro$1["default"] {
|
|
|
1020
1020
|
'4': 'canceled',
|
|
1021
1021
|
'6': 'canceled',
|
|
1022
1022
|
};
|
|
1023
|
-
return this.safeString(statuses, status
|
|
1023
|
+
return this.safeString(statuses, status);
|
|
1024
1024
|
}
|
|
1025
1025
|
parseOrder(order, market = undefined) {
|
|
1026
1026
|
//
|
|
@@ -1557,7 +1557,7 @@ class bitopro extends bitopro$1["default"] {
|
|
|
1557
1557
|
'txid': this.safeString(transaction, 'txid'),
|
|
1558
1558
|
'type': undefined,
|
|
1559
1559
|
'currency': code,
|
|
1560
|
-
'network': this.networkIdToCode(networkId),
|
|
1560
|
+
'network': this.networkIdToCode(networkId, code),
|
|
1561
1561
|
'amount': this.safeNumber(transaction, 'total'),
|
|
1562
1562
|
'status': this.parseTransactionStatus(status),
|
|
1563
1563
|
'timestamp': timestamp,
|
package/dist/cjs/src/bitrue.js
CHANGED
|
@@ -447,7 +447,6 @@ class bitrue extends bitrue$1["default"] {
|
|
|
447
447
|
'XML': 'Stellar Lumens',
|
|
448
448
|
'XYM': 'Symbol',
|
|
449
449
|
'XTZ': 'Tezos',
|
|
450
|
-
'theta': 'theta',
|
|
451
450
|
'THETA': 'THETA',
|
|
452
451
|
'VECHAIN': 'VeChain',
|
|
453
452
|
'WANCHAIN': 'Wanchain',
|
|
@@ -598,6 +597,7 @@ class bitrue extends bitrue$1["default"] {
|
|
|
598
597
|
"You don't have permission.": errors.PermissionDenied,
|
|
599
598
|
'Market is closed.': errors.ExchangeNotAvailable,
|
|
600
599
|
'Too many requests. Please try again later.': errors.DDoSProtection,
|
|
600
|
+
'quantity less then minQty': errors.InvalidOrder,
|
|
601
601
|
'-1000': errors.ExchangeNotAvailable,
|
|
602
602
|
'-1001': errors.ExchangeNotAvailable,
|
|
603
603
|
'-1002': errors.AuthenticationError,
|
|
@@ -983,6 +983,7 @@ class bitrue extends bitrue$1["default"] {
|
|
|
983
983
|
if (minCost === undefined) {
|
|
984
984
|
minCost = this.safeNumber(market, 'minOrderMoney');
|
|
985
985
|
}
|
|
986
|
+
const isSpot = (type === 'spot');
|
|
986
987
|
return {
|
|
987
988
|
'id': id,
|
|
988
989
|
'lowercaseId': lowercaseId,
|
|
@@ -994,7 +995,7 @@ class bitrue extends bitrue$1["default"] {
|
|
|
994
995
|
'quoteId': quoteId,
|
|
995
996
|
'settleId': settleId,
|
|
996
997
|
'type': type,
|
|
997
|
-
'spot':
|
|
998
|
+
'spot': isSpot,
|
|
998
999
|
'margin': false,
|
|
999
1000
|
'swap': isContract,
|
|
1000
1001
|
'future': false,
|
|
@@ -2906,7 +2907,7 @@ class bitrue extends bitrue$1["default"] {
|
|
|
2906
2907
|
let networkCode = undefined;
|
|
2907
2908
|
[networkCode, params] = this.handleNetworkCodeAndParams(params);
|
|
2908
2909
|
if (networkCode !== undefined) {
|
|
2909
|
-
request['chainName'] = this.networkCodeToId(networkCode);
|
|
2910
|
+
request['chainName'] = this.networkCodeToId(networkCode, currency['code']);
|
|
2910
2911
|
}
|
|
2911
2912
|
if (tag !== undefined) {
|
|
2912
2913
|
request['tag'] = tag;
|
package/dist/cjs/src/bitso.js
CHANGED
|
@@ -1051,8 +1051,9 @@ class bitso extends bitso$1["default"] {
|
|
|
1051
1051
|
}
|
|
1052
1052
|
// convert it to an integer unconditionally
|
|
1053
1053
|
if (markerInParams) {
|
|
1054
|
+
const marker = parseInt(params['marker']);
|
|
1054
1055
|
params = this.extend(params, {
|
|
1055
|
-
'marker':
|
|
1056
|
+
'marker': marker,
|
|
1056
1057
|
});
|
|
1057
1058
|
}
|
|
1058
1059
|
const request = {
|
|
@@ -1271,8 +1272,9 @@ class bitso extends bitso$1["default"] {
|
|
|
1271
1272
|
}
|
|
1272
1273
|
// convert it to an integer unconditionally
|
|
1273
1274
|
if (markerInParams) {
|
|
1275
|
+
const marker = parseInt(params['marker']);
|
|
1274
1276
|
params = this.extend(params, {
|
|
1275
|
-
'marker':
|
|
1277
|
+
'marker': marker,
|
|
1276
1278
|
});
|
|
1277
1279
|
}
|
|
1278
1280
|
const request = {
|
|
@@ -1782,7 +1784,7 @@ class bitso extends bitso$1["default"] {
|
|
|
1782
1784
|
const networkId = this.safeString2(transaction, 'network', 'method');
|
|
1783
1785
|
const status = this.safeString(transaction, 'status');
|
|
1784
1786
|
const withdrawId = this.safeString(transaction, 'wid');
|
|
1785
|
-
const networkCode = this.networkIdToCode(networkId);
|
|
1787
|
+
const networkCode = this.networkIdToCode(networkId, currency['code']);
|
|
1786
1788
|
const networkCodeUpper = (networkCode !== undefined) ? networkCode.toUpperCase() : undefined;
|
|
1787
1789
|
return {
|
|
1788
1790
|
'id': this.safeString2(transaction, 'wid', 'fid'),
|
|
@@ -1832,7 +1834,8 @@ class bitso extends bitso$1["default"] {
|
|
|
1832
1834
|
this.checkRequiredCredentials();
|
|
1833
1835
|
const nonce = this.nonce().toString();
|
|
1834
1836
|
endpoint = '/api' + endpoint;
|
|
1835
|
-
|
|
1837
|
+
const content = [nonce, method, endpoint];
|
|
1838
|
+
let request = content.join('');
|
|
1836
1839
|
if (method !== 'GET' && method !== 'DELETE') {
|
|
1837
1840
|
if (Object.keys(query).length) {
|
|
1838
1841
|
body = this.json(query);
|
package/dist/cjs/src/bitstamp.js
CHANGED
|
@@ -682,12 +682,13 @@ class bitstamp extends bitstamp$1["default"] {
|
|
|
682
682
|
}
|
|
683
683
|
}
|
|
684
684
|
const isSpot = (type === 'spot');
|
|
685
|
+
const settle = settleId ? this.safeCurrencyCode(settleId) : undefined;
|
|
685
686
|
result.push({
|
|
686
687
|
'id': this.safeString(market, 'market_symbol'),
|
|
687
688
|
'symbol': symbol,
|
|
688
689
|
'base': base,
|
|
689
690
|
'quote': quote,
|
|
690
|
-
'settle':
|
|
691
|
+
'settle': settle,
|
|
691
692
|
'baseId': baseId,
|
|
692
693
|
'quoteId': quoteId,
|
|
693
694
|
'settleId': settleId,
|
|
@@ -915,7 +916,7 @@ class bitstamp extends bitstamp$1["default"] {
|
|
|
915
916
|
// }
|
|
916
917
|
//
|
|
917
918
|
const marketId = this.safeString(ticker, 'pair');
|
|
918
|
-
const symbol = this.safeSymbol(marketId, market
|
|
919
|
+
const symbol = this.safeSymbol(marketId, market);
|
|
919
920
|
const timestamp = this.safeTimestamp(ticker, 'timestamp');
|
|
920
921
|
const vwap = this.safeString(ticker, 'vwap');
|
|
921
922
|
const baseVolume = this.safeString(ticker, 'volume');
|
|
@@ -1337,8 +1338,9 @@ class bitstamp extends bitstamp$1["default"] {
|
|
|
1337
1338
|
return this.parseOHLCVs(ohlc, market, timeframe, since, limit);
|
|
1338
1339
|
}
|
|
1339
1340
|
parseBalance(response) {
|
|
1341
|
+
const finalResponse = response; // java req
|
|
1340
1342
|
const result = {
|
|
1341
|
-
'info':
|
|
1343
|
+
'info': finalResponse,
|
|
1342
1344
|
'timestamp': undefined,
|
|
1343
1345
|
'datetime': undefined,
|
|
1344
1346
|
};
|
|
@@ -1534,10 +1536,11 @@ class bitstamp extends bitstamp$1["default"] {
|
|
|
1534
1536
|
}
|
|
1535
1537
|
parseDepositWithdrawFee(fee, currency = undefined) {
|
|
1536
1538
|
const result = this.depositWithdrawFee(fee);
|
|
1539
|
+
const code = this.safeString(currency, 'code');
|
|
1537
1540
|
for (let j = 0; j < fee.length; j++) {
|
|
1538
1541
|
const networkEntry = fee[j];
|
|
1539
1542
|
const networkId = this.safeString(networkEntry, 'network');
|
|
1540
|
-
const networkCode = this.networkIdToCode(networkId);
|
|
1543
|
+
const networkCode = this.networkIdToCode(networkId, code);
|
|
1541
1544
|
const withdrawFee = this.safeNumber(networkEntry, 'fee');
|
|
1542
1545
|
result['withdraw'] = {
|
|
1543
1546
|
'fee': withdrawFee,
|
package/dist/cjs/src/bitteam.js
CHANGED
|
@@ -2335,7 +2335,7 @@ class bitteam extends bitteam$1["default"] {
|
|
|
2335
2335
|
'txid': txid,
|
|
2336
2336
|
'timestamp': timestamp,
|
|
2337
2337
|
'datetime': this.iso8601(timestamp),
|
|
2338
|
-
'network': this.networkIdToCode(networkId),
|
|
2338
|
+
'network': this.networkIdToCode(networkId, code),
|
|
2339
2339
|
'addressFrom': addressFrom,
|
|
2340
2340
|
'address': undefined,
|
|
2341
2341
|
'addressTo': addressTo,
|
package/dist/cjs/src/bittrade.js
CHANGED
|
@@ -378,7 +378,6 @@ class bittrade extends bittrade$1["default"] {
|
|
|
378
378
|
'HECO': 'hrc20',
|
|
379
379
|
'HT': 'hrc20',
|
|
380
380
|
'ALGO': 'algo',
|
|
381
|
-
'OMNI': '',
|
|
382
381
|
},
|
|
383
382
|
// https://github.com/ccxt/ccxt/issues/5376
|
|
384
383
|
'fetchOrdersByStatesMethod': 'private_get_order_orders',
|
|
@@ -1996,8 +1995,9 @@ class bittrade extends bittrade$1["default"] {
|
|
|
1996
1995
|
const requestSorted = this.keysort(request);
|
|
1997
1996
|
let auth = this.urlencode(requestSorted);
|
|
1998
1997
|
// unfortunately, PHP demands double quotes for the escaped newline symbol
|
|
1998
|
+
const content = [method, this.hostname, url, auth];
|
|
1999
1999
|
// eslint-disable-next-line quotes
|
|
2000
|
-
const payload =
|
|
2000
|
+
const payload = content.join("\n");
|
|
2001
2001
|
const signature = this.hmac(this.encode(payload), this.encode(this.secret), sha256.sha256, 'base64');
|
|
2002
2002
|
auth += '&' + this.urlencode({ 'Signature': signature });
|
|
2003
2003
|
url += '?' + auth;
|