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/bitfinex.js
CHANGED
|
@@ -846,74 +846,87 @@ export default class bitfinex extends Exchange {
|
|
|
846
846
|
indexedNetworks[networkName] = networksList;
|
|
847
847
|
}
|
|
848
848
|
const ids = this.safeList(response, 0, []);
|
|
849
|
-
|
|
849
|
+
return this.parseCurrenciesCustom(ids, indexed, indexedNetworks);
|
|
850
|
+
}
|
|
851
|
+
parseCurrenciesCustom(ids, indexed, indexedNetworks) {
|
|
852
|
+
const allowedIds = [];
|
|
850
853
|
for (let i = 0; i < ids.length; i++) {
|
|
851
854
|
const id = ids[i];
|
|
852
855
|
if (id.endsWith('F0')) {
|
|
853
856
|
// we get a lot of F0 currencies, skip those
|
|
854
857
|
continue;
|
|
855
858
|
}
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
const
|
|
862
|
-
const
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
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
|
-
'type': type,
|
|
896
|
-
'name': name,
|
|
897
|
-
'active': true,
|
|
898
|
-
'deposit': undefined,
|
|
899
|
-
'withdraw': undefined,
|
|
900
|
-
'fee': fee,
|
|
901
|
-
'precision': this.parseNumber(precision),
|
|
859
|
+
allowedIds.push(id);
|
|
860
|
+
}
|
|
861
|
+
const result = {};
|
|
862
|
+
const arr = this.toArray(allowedIds);
|
|
863
|
+
for (let i = 0; i < arr.length; i++) {
|
|
864
|
+
const parsed = this.parseCurrencyCustom(arr[i], indexed, indexedNetworks);
|
|
865
|
+
const code = parsed['code'];
|
|
866
|
+
result[code] = parsed;
|
|
867
|
+
}
|
|
868
|
+
return result;
|
|
869
|
+
}
|
|
870
|
+
parseCurrencyCustom(id, indexed, indexedNetworks) {
|
|
871
|
+
const code = this.safeCurrencyCode(id);
|
|
872
|
+
const label = this.safeList(indexed['label'], id, []);
|
|
873
|
+
const name = this.safeString(label, 1);
|
|
874
|
+
const pool = this.safeList(indexed['pool'], id, []);
|
|
875
|
+
const rawType = this.safeString(pool, 1);
|
|
876
|
+
const isCryptoCoin = (rawType !== undefined) || (id in indexed['explorer']); // "hacky" solution
|
|
877
|
+
const type = isCryptoCoin ? 'crypto' : undefined;
|
|
878
|
+
const feeValues = this.safeList(indexed['fees'], id, []);
|
|
879
|
+
const fees = this.safeList(feeValues, 1, []);
|
|
880
|
+
const fee = this.safeNumber(fees, 1);
|
|
881
|
+
const undl = this.safeList(indexed['undl'], id, []);
|
|
882
|
+
const precision = this.safeString(this.options, 'defaultCurrencyPrecision', '8');
|
|
883
|
+
const networks = {};
|
|
884
|
+
const networkIds = this.safeList(indexedNetworks, id, []);
|
|
885
|
+
for (let j = 0; j < networkIds.length; j++) {
|
|
886
|
+
const networkId = networkIds[j];
|
|
887
|
+
const network = this.networkIdToCode(networkId, code);
|
|
888
|
+
const dwStatuses = this.safeList(indexed['statuses'], networkId, []);
|
|
889
|
+
networks[network] = {
|
|
890
|
+
'info': networkId,
|
|
891
|
+
'id': networkId.toLowerCase(),
|
|
892
|
+
'network': networkId,
|
|
893
|
+
'active': undefined,
|
|
894
|
+
'deposit': this.safeInteger(dwStatuses, 1) === 1,
|
|
895
|
+
'withdraw': this.safeInteger(dwStatuses, 2) === 1,
|
|
896
|
+
'fee': undefined,
|
|
897
|
+
'precision': undefined,
|
|
902
898
|
'limits': {
|
|
903
|
-
'amount': {
|
|
904
|
-
'min': undefined,
|
|
905
|
-
'max': undefined,
|
|
906
|
-
},
|
|
907
899
|
'withdraw': {
|
|
908
|
-
'min':
|
|
900
|
+
'min': undefined,
|
|
909
901
|
'max': undefined,
|
|
910
902
|
},
|
|
911
903
|
},
|
|
912
|
-
|
|
913
|
-
'margin': this.inArray(id, indexed['marginables']),
|
|
914
|
-
});
|
|
904
|
+
};
|
|
915
905
|
}
|
|
916
|
-
return
|
|
906
|
+
return this.safeCurrencyStructure({
|
|
907
|
+
'id': id,
|
|
908
|
+
'code': code,
|
|
909
|
+
'info': [id, label, pool, feeValues, undl],
|
|
910
|
+
'type': type,
|
|
911
|
+
'name': name,
|
|
912
|
+
'active': true,
|
|
913
|
+
'deposit': undefined,
|
|
914
|
+
'withdraw': undefined,
|
|
915
|
+
'fee': fee,
|
|
916
|
+
'precision': this.parseNumber(precision),
|
|
917
|
+
'limits': {
|
|
918
|
+
'amount': {
|
|
919
|
+
'min': undefined,
|
|
920
|
+
'max': undefined,
|
|
921
|
+
},
|
|
922
|
+
'withdraw': {
|
|
923
|
+
'min': fee,
|
|
924
|
+
'max': undefined,
|
|
925
|
+
},
|
|
926
|
+
},
|
|
927
|
+
'networks': networks,
|
|
928
|
+
'margin': this.inArray(id, indexed['marginables']),
|
|
929
|
+
});
|
|
917
930
|
}
|
|
918
931
|
/**
|
|
919
932
|
* @method
|
|
@@ -2482,14 +2495,14 @@ export default class bitfinex extends Exchange {
|
|
|
2482
2495
|
tag = this.safeString(data, 3);
|
|
2483
2496
|
type = 'withdrawal';
|
|
2484
2497
|
const networkId = this.safeString(data, 2);
|
|
2485
|
-
network = this.networkIdToCode(networkId.toUpperCase()); // withdraw returns in lowercase
|
|
2498
|
+
network = this.networkIdToCode(networkId.toUpperCase(), code); // withdraw returns in lowercase
|
|
2486
2499
|
}
|
|
2487
2500
|
else if (transactionLength === 22) {
|
|
2488
2501
|
id = this.safeString(transaction, 0);
|
|
2489
2502
|
const currencyId = this.safeString(transaction, 1);
|
|
2490
2503
|
code = this.safeCurrencyCode(currencyId, currency);
|
|
2491
2504
|
const networkId = this.safeString(transaction, 2);
|
|
2492
|
-
network = this.networkIdToCode(networkId);
|
|
2505
|
+
network = this.networkIdToCode(networkId, code);
|
|
2493
2506
|
timestamp = this.safeInteger(transaction, 5);
|
|
2494
2507
|
updated = this.safeInteger(transaction, 6);
|
|
2495
2508
|
status = this.parseTransactionStatus(this.safeString(transaction, 9));
|
package/js/src/bitflyer.js
CHANGED
|
@@ -1191,7 +1191,8 @@ export default class bitflyer extends Exchange {
|
|
|
1191
1191
|
if (api === 'private') {
|
|
1192
1192
|
this.checkRequiredCredentials();
|
|
1193
1193
|
const nonce = this.nonce().toString();
|
|
1194
|
-
|
|
1194
|
+
const content = [nonce, method, request];
|
|
1195
|
+
let auth = content.join('');
|
|
1195
1196
|
if (Object.keys(params).length) {
|
|
1196
1197
|
if (method !== 'GET') {
|
|
1197
1198
|
body = this.json(params);
|
package/js/src/bitget.js
CHANGED
|
@@ -1960,9 +1960,7 @@ export default class bitget extends Exchange {
|
|
|
1960
1960
|
if (uta) {
|
|
1961
1961
|
return await this.fetchUtaMarkets(params);
|
|
1962
1962
|
}
|
|
1963
|
-
|
|
1964
|
-
return await this.fetchDefaultMarkets(params);
|
|
1965
|
-
}
|
|
1963
|
+
return await this.fetchDefaultMarkets(params);
|
|
1966
1964
|
}
|
|
1967
1965
|
async fetchDefaultMarkets(params) {
|
|
1968
1966
|
let types = undefined;
|
|
@@ -2893,7 +2891,7 @@ export default class bitget extends Exchange {
|
|
|
2893
2891
|
}
|
|
2894
2892
|
await this.loadMarkets();
|
|
2895
2893
|
const currency = this.currency(code);
|
|
2896
|
-
const networkId = this.networkCodeToId(networkCode);
|
|
2894
|
+
const networkId = this.networkCodeToId(networkCode, code);
|
|
2897
2895
|
const request = {
|
|
2898
2896
|
'coin': currency['id'],
|
|
2899
2897
|
'address': address,
|
|
@@ -3062,7 +3060,7 @@ export default class bitget extends Exchange {
|
|
|
3062
3060
|
'txid': this.safeString(transaction, 'tradeId'),
|
|
3063
3061
|
'timestamp': timestamp,
|
|
3064
3062
|
'datetime': this.iso8601(timestamp),
|
|
3065
|
-
'network': this.networkIdToCode(networkId),
|
|
3063
|
+
'network': this.networkIdToCode(networkId, code),
|
|
3066
3064
|
'addressFrom': this.safeString(transaction, 'fromAddress'),
|
|
3067
3065
|
'address': this.safeString(transaction, 'toAddress'),
|
|
3068
3066
|
'addressTo': this.safeString(transaction, 'toAddress'),
|
|
@@ -5363,6 +5361,13 @@ export default class bitget extends Exchange {
|
|
|
5363
5361
|
const trailingTriggerPrice = this.safeString(params, 'trailingTriggerPrice', this.numberToString(price));
|
|
5364
5362
|
const trailingPercent = this.safeString2(params, 'trailingPercent', 'callbackRatio');
|
|
5365
5363
|
const isTrailingPercentOrder = trailingPercent !== undefined;
|
|
5364
|
+
// const multipleTriggers = (isTriggerOrder && (isStopLossTriggerOrder || isTakeProfitTriggerOrder || isTrailingPercentOrder))
|
|
5365
|
+
// || (isStopLossTriggerOrder && (isTakeProfitTriggerOrder || isTrailingPercentOrder))
|
|
5366
|
+
// || (isTakeProfitTriggerOrder && isTrailingPercentOrder);
|
|
5367
|
+
// if (multipleTriggers) {
|
|
5368
|
+
// throw new ExchangeError (this.id + ' createOrder() params can only contain one of triggerPrice, stopLossPrice, takeProfitPrice, trailingPercent');
|
|
5369
|
+
// }
|
|
5370
|
+
//
|
|
5366
5371
|
if (this.sum(isTriggerOrder, isStopLossTriggerOrder, isTakeProfitTriggerOrder, isTrailingPercentOrder) > 1) {
|
|
5367
5372
|
throw new ExchangeError(this.id + ' createOrder() params can only contain one of triggerPrice, stopLossPrice, takeProfitPrice, trailingPercent');
|
|
5368
5373
|
}
|
|
@@ -5787,6 +5792,12 @@ export default class bitget extends Exchange {
|
|
|
5787
5792
|
const trailingTriggerPrice = this.safeString(params, 'trailingTriggerPrice', this.numberToString(price));
|
|
5788
5793
|
const trailingPercent = this.safeString2(params, 'trailingPercent', 'newCallbackRatio');
|
|
5789
5794
|
const isTrailingPercentOrder = trailingPercent !== undefined;
|
|
5795
|
+
// const multipleTriggers = (isTriggerOrder && (isStopLossOrder || isTakeProfitOrder || isTrailingPercentOrder))
|
|
5796
|
+
// || (isStopLossOrder && (isTakeProfitOrder || isTrailingPercentOrder))
|
|
5797
|
+
// || (isTakeProfitOrder && isTrailingPercentOrder);
|
|
5798
|
+
// if (multipleTriggers) {
|
|
5799
|
+
// throw new ExchangeError (this.id + ' editOrder() params can only contain one of triggerPrice, stopLossPrice, takeProfitPrice, trailingPercent');
|
|
5800
|
+
// }
|
|
5790
5801
|
if (this.sum(isTriggerOrder, isStopLossOrder, isTakeProfitOrder, isTrailingPercentOrder) > 1) {
|
|
5791
5802
|
throw new ExchangeError(this.id + ' editOrder() params can only contain one of triggerPrice, stopLossPrice, takeProfitPrice, trailingPercent');
|
|
5792
5803
|
}
|
package/js/src/bitmart.js
CHANGED
|
@@ -1256,7 +1256,7 @@ export default class bitmart extends Exchange {
|
|
|
1256
1256
|
'type': isNtf ? 'other' : 'crypto',
|
|
1257
1257
|
};
|
|
1258
1258
|
}
|
|
1259
|
-
const networkCode = this.networkIdToCode(networkId);
|
|
1259
|
+
const networkCode = this.networkIdToCode(networkId, currencyCode);
|
|
1260
1260
|
const withdraw = this.safeBool(currency, 'withdraw_enabled');
|
|
1261
1261
|
const deposit = this.safeBool(currency, 'deposit_enabled');
|
|
1262
1262
|
entry['networks'][networkCode] = {
|
|
@@ -2974,8 +2974,10 @@ export default class bitmart extends Exchange {
|
|
|
2974
2974
|
}
|
|
2975
2975
|
const request = {
|
|
2976
2976
|
'symbol': market['id'],
|
|
2977
|
-
'size': parseInt(this.amountToPrecision(symbol, amount)),
|
|
2978
2977
|
};
|
|
2978
|
+
if (amount !== undefined) {
|
|
2979
|
+
request['size'] = parseInt(this.amountToPrecision(symbol, amount));
|
|
2980
|
+
}
|
|
2979
2981
|
const timeInForce = this.safeString(params, 'timeInForce');
|
|
2980
2982
|
const mode = this.safeInteger(params, 'mode'); // only for swap
|
|
2981
2983
|
const isMarketOrder = type === 'market';
|
|
@@ -3039,7 +3041,11 @@ export default class bitmart extends Exchange {
|
|
|
3039
3041
|
if (isStopLoss || isTakeProfit) {
|
|
3040
3042
|
reduceOnly = true;
|
|
3041
3043
|
request['price_type'] = this.safeInteger(params, 'price_type', 1);
|
|
3042
|
-
|
|
3044
|
+
if (price !== undefined) {
|
|
3045
|
+
request['executive_price'] = this.priceToPrecision(symbol, price);
|
|
3046
|
+
}
|
|
3047
|
+
const marketOrLimitStr = isLimitOrder ? 'limit' : 'market';
|
|
3048
|
+
request['category'] = this.safeString(params, 'category', marketOrLimitStr);
|
|
3043
3049
|
if (isStopLoss) {
|
|
3044
3050
|
request['trigger_price'] = this.priceToPrecision(symbol, stopLossPrice);
|
|
3045
3051
|
}
|
|
@@ -3296,9 +3302,9 @@ export default class bitmart extends Exchange {
|
|
|
3296
3302
|
}
|
|
3297
3303
|
const succeeded = this.safeValue(data, 'succeed');
|
|
3298
3304
|
if (succeeded !== undefined) {
|
|
3299
|
-
|
|
3300
|
-
if (
|
|
3301
|
-
throw new InvalidOrder(this.id + ' cancelOrder() failed to cancel ' + symbol + ' order id ' +
|
|
3305
|
+
const id2 = this.safeString(succeeded, 0);
|
|
3306
|
+
if (id2 === undefined) {
|
|
3307
|
+
throw new InvalidOrder(this.id + ' cancelOrder() failed to cancel ' + symbol + ' order id ' + id2);
|
|
3302
3308
|
}
|
|
3303
3309
|
}
|
|
3304
3310
|
else {
|
|
@@ -3921,11 +3927,12 @@ export default class bitmart extends Exchange {
|
|
|
3921
3927
|
}
|
|
3922
3928
|
const address = this.safeString(depositAddress, 'address');
|
|
3923
3929
|
currency = this.safeCurrency(currencyId, currency);
|
|
3930
|
+
const code = this.safeString(currency, 'code');
|
|
3924
3931
|
this.checkAddress(address);
|
|
3925
3932
|
return {
|
|
3926
3933
|
'info': depositAddress,
|
|
3927
|
-
'currency':
|
|
3928
|
-
'network': this.networkIdToCode(network),
|
|
3934
|
+
'currency': code,
|
|
3935
|
+
'network': this.networkIdToCode(network, code),
|
|
3929
3936
|
'address': address,
|
|
3930
3937
|
'tag': this.safeString2(depositAddress, 'address_memo', 'memo'),
|
|
3931
3938
|
};
|
|
@@ -4217,7 +4224,7 @@ export default class bitmart extends Exchange {
|
|
|
4217
4224
|
'id': id,
|
|
4218
4225
|
'currency': code,
|
|
4219
4226
|
'amount': amount,
|
|
4220
|
-
'network': this.networkIdToCode(networkId),
|
|
4227
|
+
'network': this.networkIdToCode(networkId, code),
|
|
4221
4228
|
'address': address,
|
|
4222
4229
|
'addressFrom': undefined,
|
|
4223
4230
|
'addressTo': undefined,
|
|
@@ -4636,8 +4643,9 @@ export default class bitmart extends Exchange {
|
|
|
4636
4643
|
if (limit === undefined) {
|
|
4637
4644
|
limit = 10;
|
|
4638
4645
|
}
|
|
4646
|
+
const pageNumber = this.safeInteger(params, 'page', 1);
|
|
4639
4647
|
const request = {
|
|
4640
|
-
'page':
|
|
4648
|
+
'page': pageNumber,
|
|
4641
4649
|
'limit': limit, // default is 10, max is 100
|
|
4642
4650
|
};
|
|
4643
4651
|
let currency = undefined;
|
package/js/src/bitmex.js
CHANGED
|
@@ -477,7 +477,7 @@ export default class bitmex extends Exchange {
|
|
|
477
477
|
for (let j = 0; j < chains.length; j++) {
|
|
478
478
|
const chain = chains[j];
|
|
479
479
|
const networkId = this.safeString(chain, 'asset');
|
|
480
|
-
const network = this.networkIdToCode(networkId);
|
|
480
|
+
const network = this.networkIdToCode(networkId, code);
|
|
481
481
|
const withdrawalFeeRaw = this.safeString(chain, 'withdrawalFee');
|
|
482
482
|
const withdrawalFee = this.parseNumber(Precise.stringMul(withdrawalFeeRaw, precisionString));
|
|
483
483
|
const isDepositEnabled = this.safeBool(chain, 'depositEnabled', false);
|
|
@@ -1481,13 +1481,14 @@ export default class bitmex extends Exchange {
|
|
|
1481
1481
|
if (status !== undefined) {
|
|
1482
1482
|
status = this.parseTransactionStatus(status);
|
|
1483
1483
|
}
|
|
1484
|
+
const code = currency['code'];
|
|
1484
1485
|
return {
|
|
1485
1486
|
'info': transaction,
|
|
1486
1487
|
'id': this.safeString(transaction, 'transactID'),
|
|
1487
1488
|
'txid': this.safeString(transaction, 'tx'),
|
|
1488
1489
|
'type': type,
|
|
1489
|
-
'currency':
|
|
1490
|
-
'network': this.networkIdToCode(this.safeString(transaction, 'network'),
|
|
1490
|
+
'currency': code,
|
|
1491
|
+
'network': this.networkIdToCode(this.safeString(transaction, 'network'), code),
|
|
1491
1492
|
'amount': this.parseNumber(amount),
|
|
1492
1493
|
'status': status,
|
|
1493
1494
|
'timestamp': transactTime,
|
|
@@ -2022,6 +2023,7 @@ export default class bitmex extends Exchange {
|
|
|
2022
2023
|
await this.loadMarkets();
|
|
2023
2024
|
const market = this.market(symbol);
|
|
2024
2025
|
let orderType = this.capitalize(type);
|
|
2026
|
+
const capitalizeOrderType = orderType;
|
|
2025
2027
|
const reduceOnly = this.safeValue(params, 'reduceOnly');
|
|
2026
2028
|
if (reduceOnly !== undefined) {
|
|
2027
2029
|
if ((!market['swap']) && (!market['future'])) {
|
|
@@ -2036,7 +2038,7 @@ export default class bitmex extends Exchange {
|
|
|
2036
2038
|
'symbol': market['id'],
|
|
2037
2039
|
'side': this.capitalize(side),
|
|
2038
2040
|
'orderQty': qty,
|
|
2039
|
-
'ordType':
|
|
2041
|
+
'ordType': capitalizeOrderType,
|
|
2040
2042
|
'text': brokerId,
|
|
2041
2043
|
};
|
|
2042
2044
|
const execInstructions = [];
|
|
@@ -2857,9 +2859,10 @@ export default class bitmex extends Exchange {
|
|
|
2857
2859
|
}
|
|
2858
2860
|
const currency = this.currency(code);
|
|
2859
2861
|
params = this.omit(params, 'network');
|
|
2862
|
+
const parsedNetwork = this.networkCodeToId(networkCode, currency['code']);
|
|
2860
2863
|
const request = {
|
|
2861
2864
|
'currency': currency['id'],
|
|
2862
|
-
'network':
|
|
2865
|
+
'network': parsedNetwork,
|
|
2863
2866
|
};
|
|
2864
2867
|
const response = await this.privateGetUserDepositAddress(this.extend(request, params));
|
|
2865
2868
|
//
|
package/js/src/bitopro.js
CHANGED
|
@@ -1015,7 +1015,7 @@ export default class bitopro extends Exchange {
|
|
|
1015
1015
|
'4': 'canceled',
|
|
1016
1016
|
'6': 'canceled',
|
|
1017
1017
|
};
|
|
1018
|
-
return this.safeString(statuses, status
|
|
1018
|
+
return this.safeString(statuses, status);
|
|
1019
1019
|
}
|
|
1020
1020
|
parseOrder(order, market = undefined) {
|
|
1021
1021
|
//
|
|
@@ -1552,7 +1552,7 @@ export default class bitopro extends Exchange {
|
|
|
1552
1552
|
'txid': this.safeString(transaction, 'txid'),
|
|
1553
1553
|
'type': undefined,
|
|
1554
1554
|
'currency': code,
|
|
1555
|
-
'network': this.networkIdToCode(networkId),
|
|
1555
|
+
'network': this.networkIdToCode(networkId, code),
|
|
1556
1556
|
'amount': this.safeNumber(transaction, 'total'),
|
|
1557
1557
|
'status': this.parseTransactionStatus(status),
|
|
1558
1558
|
'timestamp': timestamp,
|
package/js/src/bitrue.js
CHANGED
|
@@ -442,7 +442,6 @@ export default class bitrue extends Exchange {
|
|
|
442
442
|
'XML': 'Stellar Lumens',
|
|
443
443
|
'XYM': 'Symbol',
|
|
444
444
|
'XTZ': 'Tezos',
|
|
445
|
-
'theta': 'theta',
|
|
446
445
|
'THETA': 'THETA',
|
|
447
446
|
'VECHAIN': 'VeChain',
|
|
448
447
|
'WANCHAIN': 'Wanchain',
|
|
@@ -593,6 +592,7 @@ export default class bitrue extends Exchange {
|
|
|
593
592
|
"You don't have permission.": PermissionDenied,
|
|
594
593
|
'Market is closed.': ExchangeNotAvailable,
|
|
595
594
|
'Too many requests. Please try again later.': DDoSProtection,
|
|
595
|
+
'quantity less then minQty': InvalidOrder,
|
|
596
596
|
'-1000': ExchangeNotAvailable,
|
|
597
597
|
'-1001': ExchangeNotAvailable,
|
|
598
598
|
'-1002': AuthenticationError,
|
|
@@ -978,6 +978,7 @@ export default class bitrue extends Exchange {
|
|
|
978
978
|
if (minCost === undefined) {
|
|
979
979
|
minCost = this.safeNumber(market, 'minOrderMoney');
|
|
980
980
|
}
|
|
981
|
+
const isSpot = (type === 'spot');
|
|
981
982
|
return {
|
|
982
983
|
'id': id,
|
|
983
984
|
'lowercaseId': lowercaseId,
|
|
@@ -989,7 +990,7 @@ export default class bitrue extends Exchange {
|
|
|
989
990
|
'quoteId': quoteId,
|
|
990
991
|
'settleId': settleId,
|
|
991
992
|
'type': type,
|
|
992
|
-
'spot':
|
|
993
|
+
'spot': isSpot,
|
|
993
994
|
'margin': false,
|
|
994
995
|
'swap': isContract,
|
|
995
996
|
'future': false,
|
|
@@ -2901,7 +2902,7 @@ export default class bitrue extends Exchange {
|
|
|
2901
2902
|
let networkCode = undefined;
|
|
2902
2903
|
[networkCode, params] = this.handleNetworkCodeAndParams(params);
|
|
2903
2904
|
if (networkCode !== undefined) {
|
|
2904
|
-
request['chainName'] = this.networkCodeToId(networkCode);
|
|
2905
|
+
request['chainName'] = this.networkCodeToId(networkCode, currency['code']);
|
|
2905
2906
|
}
|
|
2906
2907
|
if (tag !== undefined) {
|
|
2907
2908
|
request['tag'] = tag;
|
package/js/src/bitso.js
CHANGED
|
@@ -1046,8 +1046,9 @@ export default class bitso extends Exchange {
|
|
|
1046
1046
|
}
|
|
1047
1047
|
// convert it to an integer unconditionally
|
|
1048
1048
|
if (markerInParams) {
|
|
1049
|
+
const marker = parseInt(params['marker']);
|
|
1049
1050
|
params = this.extend(params, {
|
|
1050
|
-
'marker':
|
|
1051
|
+
'marker': marker,
|
|
1051
1052
|
});
|
|
1052
1053
|
}
|
|
1053
1054
|
const request = {
|
|
@@ -1266,8 +1267,9 @@ export default class bitso extends Exchange {
|
|
|
1266
1267
|
}
|
|
1267
1268
|
// convert it to an integer unconditionally
|
|
1268
1269
|
if (markerInParams) {
|
|
1270
|
+
const marker = parseInt(params['marker']);
|
|
1269
1271
|
params = this.extend(params, {
|
|
1270
|
-
'marker':
|
|
1272
|
+
'marker': marker,
|
|
1271
1273
|
});
|
|
1272
1274
|
}
|
|
1273
1275
|
const request = {
|
|
@@ -1777,7 +1779,7 @@ export default class bitso extends Exchange {
|
|
|
1777
1779
|
const networkId = this.safeString2(transaction, 'network', 'method');
|
|
1778
1780
|
const status = this.safeString(transaction, 'status');
|
|
1779
1781
|
const withdrawId = this.safeString(transaction, 'wid');
|
|
1780
|
-
const networkCode = this.networkIdToCode(networkId);
|
|
1782
|
+
const networkCode = this.networkIdToCode(networkId, currency['code']);
|
|
1781
1783
|
const networkCodeUpper = (networkCode !== undefined) ? networkCode.toUpperCase() : undefined;
|
|
1782
1784
|
return {
|
|
1783
1785
|
'id': this.safeString2(transaction, 'wid', 'fid'),
|
|
@@ -1827,7 +1829,8 @@ export default class bitso extends Exchange {
|
|
|
1827
1829
|
this.checkRequiredCredentials();
|
|
1828
1830
|
const nonce = this.nonce().toString();
|
|
1829
1831
|
endpoint = '/api' + endpoint;
|
|
1830
|
-
|
|
1832
|
+
const content = [nonce, method, endpoint];
|
|
1833
|
+
let request = content.join('');
|
|
1831
1834
|
if (method !== 'GET' && method !== 'DELETE') {
|
|
1832
1835
|
if (Object.keys(query).length) {
|
|
1833
1836
|
body = this.json(query);
|
package/js/src/bitstamp.js
CHANGED
|
@@ -677,12 +677,13 @@ export default class bitstamp extends Exchange {
|
|
|
677
677
|
}
|
|
678
678
|
}
|
|
679
679
|
const isSpot = (type === 'spot');
|
|
680
|
+
const settle = settleId ? this.safeCurrencyCode(settleId) : undefined;
|
|
680
681
|
result.push({
|
|
681
682
|
'id': this.safeString(market, 'market_symbol'),
|
|
682
683
|
'symbol': symbol,
|
|
683
684
|
'base': base,
|
|
684
685
|
'quote': quote,
|
|
685
|
-
'settle':
|
|
686
|
+
'settle': settle,
|
|
686
687
|
'baseId': baseId,
|
|
687
688
|
'quoteId': quoteId,
|
|
688
689
|
'settleId': settleId,
|
|
@@ -910,7 +911,7 @@ export default class bitstamp extends Exchange {
|
|
|
910
911
|
// }
|
|
911
912
|
//
|
|
912
913
|
const marketId = this.safeString(ticker, 'pair');
|
|
913
|
-
const symbol = this.safeSymbol(marketId, market
|
|
914
|
+
const symbol = this.safeSymbol(marketId, market);
|
|
914
915
|
const timestamp = this.safeTimestamp(ticker, 'timestamp');
|
|
915
916
|
const vwap = this.safeString(ticker, 'vwap');
|
|
916
917
|
const baseVolume = this.safeString(ticker, 'volume');
|
|
@@ -1332,8 +1333,9 @@ export default class bitstamp extends Exchange {
|
|
|
1332
1333
|
return this.parseOHLCVs(ohlc, market, timeframe, since, limit);
|
|
1333
1334
|
}
|
|
1334
1335
|
parseBalance(response) {
|
|
1336
|
+
const finalResponse = response; // java req
|
|
1335
1337
|
const result = {
|
|
1336
|
-
'info':
|
|
1338
|
+
'info': finalResponse,
|
|
1337
1339
|
'timestamp': undefined,
|
|
1338
1340
|
'datetime': undefined,
|
|
1339
1341
|
};
|
|
@@ -1529,10 +1531,11 @@ export default class bitstamp extends Exchange {
|
|
|
1529
1531
|
}
|
|
1530
1532
|
parseDepositWithdrawFee(fee, currency = undefined) {
|
|
1531
1533
|
const result = this.depositWithdrawFee(fee);
|
|
1534
|
+
const code = this.safeString(currency, 'code');
|
|
1532
1535
|
for (let j = 0; j < fee.length; j++) {
|
|
1533
1536
|
const networkEntry = fee[j];
|
|
1534
1537
|
const networkId = this.safeString(networkEntry, 'network');
|
|
1535
|
-
const networkCode = this.networkIdToCode(networkId);
|
|
1538
|
+
const networkCode = this.networkIdToCode(networkId, code);
|
|
1536
1539
|
const withdrawFee = this.safeNumber(networkEntry, 'fee');
|
|
1537
1540
|
result['withdraw'] = {
|
|
1538
1541
|
'fee': withdrawFee,
|
package/js/src/bitteam.js
CHANGED
|
@@ -2330,7 +2330,7 @@ export default class bitteam extends Exchange {
|
|
|
2330
2330
|
'txid': txid,
|
|
2331
2331
|
'timestamp': timestamp,
|
|
2332
2332
|
'datetime': this.iso8601(timestamp),
|
|
2333
|
-
'network': this.networkIdToCode(networkId),
|
|
2333
|
+
'network': this.networkIdToCode(networkId, code),
|
|
2334
2334
|
'addressFrom': addressFrom,
|
|
2335
2335
|
'address': undefined,
|
|
2336
2336
|
'addressTo': addressTo,
|
package/js/src/bittrade.js
CHANGED
|
@@ -373,7 +373,6 @@ export default class bittrade extends Exchange {
|
|
|
373
373
|
'HECO': 'hrc20',
|
|
374
374
|
'HT': 'hrc20',
|
|
375
375
|
'ALGO': 'algo',
|
|
376
|
-
'OMNI': '',
|
|
377
376
|
},
|
|
378
377
|
// https://github.com/ccxt/ccxt/issues/5376
|
|
379
378
|
'fetchOrdersByStatesMethod': 'private_get_order_orders',
|
|
@@ -1991,8 +1990,9 @@ export default class bittrade extends Exchange {
|
|
|
1991
1990
|
const requestSorted = this.keysort(request);
|
|
1992
1991
|
let auth = this.urlencode(requestSorted);
|
|
1993
1992
|
// unfortunately, PHP demands double quotes for the escaped newline symbol
|
|
1993
|
+
const content = [method, this.hostname, url, auth];
|
|
1994
1994
|
// eslint-disable-next-line quotes
|
|
1995
|
-
const payload =
|
|
1995
|
+
const payload = content.join("\n");
|
|
1996
1996
|
const signature = this.hmac(this.encode(payload), this.encode(this.secret), sha256, 'base64');
|
|
1997
1997
|
auth += '&' + this.urlencode({ 'Signature': signature });
|
|
1998
1998
|
url += '?' + auth;
|