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/foxbit.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import type { Balances, Currencies, Currency, DepositAddress, Dict, Int, Market,
|
|
|
7
7
|
export default class foxbit extends Exchange {
|
|
8
8
|
describe(): any;
|
|
9
9
|
fetchCurrencies(params?: {}): Promise<Currencies>;
|
|
10
|
+
parseCurrency(rawCurrency: Dict): Currency;
|
|
10
11
|
/**
|
|
11
12
|
* @method
|
|
12
13
|
* @name foxbit#fetchMarkets
|
package/js/src/foxbit.js
CHANGED
|
@@ -362,83 +362,79 @@ export default class foxbit extends Exchange {
|
|
|
362
362
|
// ]
|
|
363
363
|
// }
|
|
364
364
|
const data = this.safeList(response, 'data', []);
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
},
|
|
400
|
-
'deposit': {
|
|
401
|
-
'min': this.safeNumber(depositInfo, 'min_amount'),
|
|
402
|
-
'max': undefined,
|
|
403
|
-
},
|
|
404
|
-
'withdraw': {
|
|
405
|
-
'min': this.safeNumber(withdrawInfo, 'min_amount'),
|
|
406
|
-
'max': undefined,
|
|
407
|
-
},
|
|
365
|
+
return this.parseCurrencies(data);
|
|
366
|
+
}
|
|
367
|
+
parseCurrency(rawCurrency) {
|
|
368
|
+
const precision = this.safeInteger(rawCurrency, 'precision');
|
|
369
|
+
const currencyId = this.safeString(rawCurrency, 'symbol');
|
|
370
|
+
const name = this.safeString(rawCurrency, 'name');
|
|
371
|
+
const code = this.safeCurrencyCode(currencyId);
|
|
372
|
+
const depositInfo = this.safeDict(rawCurrency, 'deposit_info');
|
|
373
|
+
const withdrawInfo = this.safeDict(rawCurrency, 'withdraw_info');
|
|
374
|
+
const networks = this.safeList(rawCurrency, 'networks', []);
|
|
375
|
+
const type = this.safeStringLower(rawCurrency, 'type');
|
|
376
|
+
const parsedNetworks = {};
|
|
377
|
+
for (let j = 0; j < networks.length; j++) {
|
|
378
|
+
const network = networks[j];
|
|
379
|
+
const networkId = this.safeString(network, 'code');
|
|
380
|
+
const networkCode = this.networkIdToCode(networkId, code);
|
|
381
|
+
const networkWithdrawInfo = this.safeDict(network, 'withdraw_info');
|
|
382
|
+
const networkDepositInfo = this.safeDict(network, 'deposit_info');
|
|
383
|
+
const isWithdrawEnabled = this.safeString(networkWithdrawInfo, 'status') === 'ENABLED';
|
|
384
|
+
const isDepositEnabled = this.safeString(networkDepositInfo, 'status') === 'ENABLED';
|
|
385
|
+
parsedNetworks[networkCode] = {
|
|
386
|
+
'info': rawCurrency,
|
|
387
|
+
'id': networkId,
|
|
388
|
+
'network': networkCode,
|
|
389
|
+
'name': this.safeString(network, 'name'),
|
|
390
|
+
'deposit': isDepositEnabled,
|
|
391
|
+
'withdraw': isWithdrawEnabled,
|
|
392
|
+
'active': true,
|
|
393
|
+
'precision': precision,
|
|
394
|
+
'fee': this.safeNumber(networkWithdrawInfo, 'fee'),
|
|
395
|
+
'limits': {
|
|
396
|
+
'amount': {
|
|
397
|
+
'min': undefined,
|
|
398
|
+
'max': undefined,
|
|
408
399
|
},
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
result[code] = this.safeCurrencyStructure({
|
|
413
|
-
'id': currencyId,
|
|
414
|
-
'code': code,
|
|
415
|
-
'info': currency,
|
|
416
|
-
'name': name,
|
|
417
|
-
'active': true,
|
|
418
|
-
'type': type,
|
|
419
|
-
'deposit': this.safeBool(depositInfo, 'enabled', false),
|
|
420
|
-
'withdraw': this.safeBool(withdrawInfo, 'enabled', false),
|
|
421
|
-
'fee': this.safeNumber(withdrawInfo, 'fee'),
|
|
422
|
-
'precision': precision,
|
|
423
|
-
'limits': {
|
|
424
|
-
'amount': {
|
|
425
|
-
'min': undefined,
|
|
426
|
-
'max': undefined,
|
|
427
|
-
},
|
|
428
|
-
'deposit': {
|
|
429
|
-
'min': this.safeNumber(depositInfo, 'min_amount'),
|
|
430
|
-
'max': undefined,
|
|
431
|
-
},
|
|
432
|
-
'withdraw': {
|
|
433
|
-
'min': this.safeNumber(withdrawInfo, 'min_amount'),
|
|
434
|
-
'max': undefined,
|
|
435
|
-
},
|
|
400
|
+
'deposit': {
|
|
401
|
+
'min': this.safeNumber(depositInfo, 'min_amount'),
|
|
402
|
+
'max': undefined,
|
|
436
403
|
},
|
|
437
|
-
'
|
|
438
|
-
|
|
439
|
-
|
|
404
|
+
'withdraw': {
|
|
405
|
+
'min': this.safeNumber(withdrawInfo, 'min_amount'),
|
|
406
|
+
'max': undefined,
|
|
407
|
+
},
|
|
408
|
+
},
|
|
409
|
+
};
|
|
440
410
|
}
|
|
441
|
-
return
|
|
411
|
+
return this.safeCurrencyStructure({
|
|
412
|
+
'id': currencyId,
|
|
413
|
+
'code': code,
|
|
414
|
+
'info': rawCurrency,
|
|
415
|
+
'name': name,
|
|
416
|
+
'active': true,
|
|
417
|
+
'type': type,
|
|
418
|
+
'deposit': this.safeBool(depositInfo, 'enabled', false),
|
|
419
|
+
'withdraw': this.safeBool(withdrawInfo, 'enabled', false),
|
|
420
|
+
'fee': this.safeNumber(withdrawInfo, 'fee'),
|
|
421
|
+
'precision': precision,
|
|
422
|
+
'limits': {
|
|
423
|
+
'amount': {
|
|
424
|
+
'min': undefined,
|
|
425
|
+
'max': undefined,
|
|
426
|
+
},
|
|
427
|
+
'deposit': {
|
|
428
|
+
'min': this.safeNumber(depositInfo, 'min_amount'),
|
|
429
|
+
'max': undefined,
|
|
430
|
+
},
|
|
431
|
+
'withdraw': {
|
|
432
|
+
'min': this.safeNumber(withdrawInfo, 'min_amount'),
|
|
433
|
+
'max': undefined,
|
|
434
|
+
},
|
|
435
|
+
},
|
|
436
|
+
'networks': parsedNetworks,
|
|
437
|
+
});
|
|
442
438
|
}
|
|
443
439
|
/**
|
|
444
440
|
* @method
|
|
@@ -1139,7 +1135,7 @@ export default class foxbit extends Exchange {
|
|
|
1139
1135
|
// "remark": "A remarkable note for the order.",
|
|
1140
1136
|
// "funds_received": "290.0"
|
|
1141
1137
|
// }
|
|
1142
|
-
return this.parseOrder(response
|
|
1138
|
+
return this.parseOrder(response);
|
|
1143
1139
|
}
|
|
1144
1140
|
/**
|
|
1145
1141
|
* @method
|
|
@@ -1533,7 +1529,7 @@ export default class foxbit extends Exchange {
|
|
|
1533
1529
|
let networkCode = undefined;
|
|
1534
1530
|
[networkCode, params] = this.handleNetworkCodeAndParams(params);
|
|
1535
1531
|
if (networkCode !== undefined) {
|
|
1536
|
-
request['network_code'] = this.networkCodeToId(networkCode);
|
|
1532
|
+
request['network_code'] = this.networkCodeToId(networkCode, code);
|
|
1537
1533
|
}
|
|
1538
1534
|
const response = await this.v3PrivatePostWithdrawals(this.extend(request, params));
|
|
1539
1535
|
// {
|
package/js/src/gate.d.ts
CHANGED
|
@@ -111,6 +111,7 @@ export default class gate extends Exchange {
|
|
|
111
111
|
* @returns {object} an associative dictionary of currencies
|
|
112
112
|
*/
|
|
113
113
|
fetchCurrencies(params?: {}): Promise<Currencies>;
|
|
114
|
+
parseCurrency(rawCurrency: Dict): Currency;
|
|
114
115
|
/**
|
|
115
116
|
* @method
|
|
116
117
|
* @name gate#fetchFundingRate
|
package/js/src/gate.js
CHANGED
|
@@ -1987,56 +1987,53 @@ export default class gate extends Exchange {
|
|
|
1987
1987
|
// },
|
|
1988
1988
|
// ]
|
|
1989
1989
|
//
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
'withdraw': !this.safeBool(chain, 'withdraw_disabled'),
|
|
2011
|
-
'fee': undefined,
|
|
2012
|
-
'precision': this.parseNumber('0.0001'),
|
|
2013
|
-
'limits': {
|
|
2014
|
-
'deposit': {
|
|
2015
|
-
'min': undefined,
|
|
2016
|
-
'max': undefined,
|
|
2017
|
-
},
|
|
2018
|
-
'withdraw': {
|
|
2019
|
-
'min': undefined,
|
|
2020
|
-
'max': undefined,
|
|
2021
|
-
},
|
|
2022
|
-
},
|
|
2023
|
-
};
|
|
2024
|
-
}
|
|
2025
|
-
result[code] = this.safeCurrencyStructure({
|
|
2026
|
-
'id': currencyId,
|
|
2027
|
-
'code': code,
|
|
2028
|
-
'name': this.safeString(entry, 'name'),
|
|
2029
|
-
'type': type,
|
|
2030
|
-
'active': !this.safeBool(entry, 'delisted'),
|
|
2031
|
-
'deposit': !this.safeBool(entry, 'deposit_disabled'),
|
|
2032
|
-
'withdraw': !this.safeBool(entry, 'withdraw_disabled'),
|
|
1990
|
+
return this.parseCurrencies(response);
|
|
1991
|
+
}
|
|
1992
|
+
parseCurrency(rawCurrency) {
|
|
1993
|
+
const currencyId = this.safeString(rawCurrency, 'currency');
|
|
1994
|
+
const code = this.safeCurrencyCode(currencyId);
|
|
1995
|
+
// check leveraged tokens (e.g. BTC3S, ETH5L)
|
|
1996
|
+
const type = this.isLeveragedCurrency(currencyId) ? 'leveraged' : 'crypto';
|
|
1997
|
+
const chains = this.safeList(rawCurrency, 'chains', []);
|
|
1998
|
+
const networks = {};
|
|
1999
|
+
for (let j = 0; j < chains.length; j++) {
|
|
2000
|
+
const chain = chains[j];
|
|
2001
|
+
const networkId = this.safeString(chain, 'name');
|
|
2002
|
+
const networkCode = this.networkIdToCode(networkId, code);
|
|
2003
|
+
networks[networkCode] = {
|
|
2004
|
+
'info': chain,
|
|
2005
|
+
'id': networkId,
|
|
2006
|
+
'network': networkCode,
|
|
2007
|
+
'active': undefined,
|
|
2008
|
+
'deposit': !this.safeBool(chain, 'deposit_disabled'),
|
|
2009
|
+
'withdraw': !this.safeBool(chain, 'withdraw_disabled'),
|
|
2033
2010
|
'fee': undefined,
|
|
2034
|
-
'networks': networks,
|
|
2035
2011
|
'precision': this.parseNumber('0.0001'),
|
|
2036
|
-
'
|
|
2037
|
-
|
|
2012
|
+
'limits': {
|
|
2013
|
+
'deposit': {
|
|
2014
|
+
'min': undefined,
|
|
2015
|
+
'max': undefined,
|
|
2016
|
+
},
|
|
2017
|
+
'withdraw': {
|
|
2018
|
+
'min': undefined,
|
|
2019
|
+
'max': undefined,
|
|
2020
|
+
},
|
|
2021
|
+
},
|
|
2022
|
+
};
|
|
2038
2023
|
}
|
|
2039
|
-
return
|
|
2024
|
+
return this.safeCurrencyStructure({
|
|
2025
|
+
'id': currencyId,
|
|
2026
|
+
'code': code,
|
|
2027
|
+
'name': this.safeString(rawCurrency, 'name'),
|
|
2028
|
+
'type': type,
|
|
2029
|
+
'active': !this.safeBool(rawCurrency, 'delisted'),
|
|
2030
|
+
'deposit': !this.safeBool(rawCurrency, 'deposit_disabled'),
|
|
2031
|
+
'withdraw': !this.safeBool(rawCurrency, 'withdraw_disabled'),
|
|
2032
|
+
'fee': undefined,
|
|
2033
|
+
'networks': networks,
|
|
2034
|
+
'precision': this.parseNumber('0.0001'),
|
|
2035
|
+
'info': rawCurrency,
|
|
2036
|
+
});
|
|
2040
2037
|
}
|
|
2041
2038
|
/**
|
|
2042
2039
|
* @method
|
|
@@ -2340,12 +2337,13 @@ export default class gate extends Exchange {
|
|
|
2340
2337
|
//
|
|
2341
2338
|
const address = this.safeString(depositAddress, 'address');
|
|
2342
2339
|
this.checkAddress(address);
|
|
2340
|
+
const code = this.safeString(currency, 'code');
|
|
2343
2341
|
return {
|
|
2344
2342
|
'info': depositAddress,
|
|
2345
|
-
'currency':
|
|
2343
|
+
'currency': code,
|
|
2346
2344
|
'address': address,
|
|
2347
2345
|
'tag': this.safeString(depositAddress, 'payment_id'),
|
|
2348
|
-
'network': this.networkIdToCode(this.safeString(depositAddress, 'chain')),
|
|
2346
|
+
'network': this.networkIdToCode(this.safeString(depositAddress, 'chain'), code),
|
|
2349
2347
|
};
|
|
2350
2348
|
}
|
|
2351
2349
|
/**
|
|
@@ -2494,7 +2492,7 @@ export default class gate extends Exchange {
|
|
|
2494
2492
|
const networkIds = Object.keys(withdrawFixOnChains);
|
|
2495
2493
|
for (let j = 0; j < networkIds.length; j++) {
|
|
2496
2494
|
const networkId = networkIds[j];
|
|
2497
|
-
const networkCode = this.networkIdToCode(networkId);
|
|
2495
|
+
const networkCode = this.networkIdToCode(networkId, code);
|
|
2498
2496
|
withdrawFees[networkCode] = this.parseNumber(withdrawFixOnChains[networkId]);
|
|
2499
2497
|
}
|
|
2500
2498
|
}
|
|
@@ -2574,7 +2572,9 @@ export default class gate extends Exchange {
|
|
|
2574
2572
|
const chainKeys = Object.keys(withdrawFixOnChains);
|
|
2575
2573
|
for (let i = 0; i < chainKeys.length; i++) {
|
|
2576
2574
|
const chainKey = chainKeys[i];
|
|
2577
|
-
const
|
|
2575
|
+
const currencyId = this.safeString(fee, 'currency');
|
|
2576
|
+
const code = this.safeCurrencyCode(currencyId, currency);
|
|
2577
|
+
const networkCode = this.networkIdToCode(chainKey, code);
|
|
2578
2578
|
result['networks'][networkCode] = {
|
|
2579
2579
|
'withdraw': {
|
|
2580
2580
|
'fee': this.parseNumber(withdrawFixOnChains[chainKey]),
|
|
@@ -4095,7 +4095,7 @@ export default class gate extends Exchange {
|
|
|
4095
4095
|
let networkCode = undefined;
|
|
4096
4096
|
[networkCode, params] = this.handleNetworkCodeAndParams(params);
|
|
4097
4097
|
if (networkCode !== undefined) {
|
|
4098
|
-
request['chain'] = this.networkCodeToId(networkCode);
|
|
4098
|
+
request['chain'] = this.networkCodeToId(networkCode, code);
|
|
4099
4099
|
}
|
|
4100
4100
|
const response = await this.privateWithdrawalsPostWithdrawals(this.extend(request, params));
|
|
4101
4101
|
//
|
|
@@ -4227,7 +4227,7 @@ export default class gate extends Exchange {
|
|
|
4227
4227
|
'txid': txid,
|
|
4228
4228
|
'currency': code,
|
|
4229
4229
|
'amount': this.parseNumber(amountString),
|
|
4230
|
-
'network': this.networkIdToCode(networkId),
|
|
4230
|
+
'network': this.networkIdToCode(networkId, code),
|
|
4231
4231
|
'address': address,
|
|
4232
4232
|
'addressTo': undefined,
|
|
4233
4233
|
'addressFrom': undefined,
|
package/js/src/gemini.d.ts
CHANGED
|
@@ -22,7 +22,8 @@ export default class gemini extends Exchange {
|
|
|
22
22
|
* @param {object} [params] extra parameters specific to the endpoint
|
|
23
23
|
* @returns {object} an associative dictionary of currencies
|
|
24
24
|
*/
|
|
25
|
-
fetchCurrenciesFromWeb(params?: {}): Promise<
|
|
25
|
+
fetchCurrenciesFromWeb(params?: {}): Promise<Currencies>;
|
|
26
|
+
parseCurrency(rawCurrency: Dict): Currency;
|
|
26
27
|
/**
|
|
27
28
|
* @method
|
|
28
29
|
* @name gemini#fetchMarkets
|
package/js/src/gemini.js
CHANGED
|
@@ -435,51 +435,28 @@ export default class gemini extends Exchange {
|
|
|
435
435
|
// ]
|
|
436
436
|
// }
|
|
437
437
|
//
|
|
438
|
-
const result = {};
|
|
439
438
|
this.options['tradingPairs'] = this.safeList(data, 'tradingPairs');
|
|
440
439
|
const currenciesArray = this.safeValue(data, 'currencies', []);
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
'deposit': undefined,
|
|
458
|
-
'withdraw': undefined,
|
|
459
|
-
'fee': undefined,
|
|
460
|
-
'precision': precision,
|
|
461
|
-
'limits': {
|
|
462
|
-
'deposit': {
|
|
463
|
-
'min': undefined,
|
|
464
|
-
'max': undefined,
|
|
465
|
-
},
|
|
466
|
-
'withdraw': {
|
|
467
|
-
'min': undefined,
|
|
468
|
-
'max': undefined,
|
|
469
|
-
},
|
|
470
|
-
},
|
|
471
|
-
};
|
|
472
|
-
}
|
|
473
|
-
result[code] = this.safeCurrencyStructure({
|
|
474
|
-
'info': currency,
|
|
475
|
-
'id': id,
|
|
476
|
-
'code': code,
|
|
477
|
-
'name': this.safeString(currency, 1),
|
|
440
|
+
return this.parseCurrencies(currenciesArray);
|
|
441
|
+
}
|
|
442
|
+
parseCurrency(rawCurrency) {
|
|
443
|
+
const id = this.safeString(rawCurrency, 0);
|
|
444
|
+
const code = this.safeCurrencyCode(id);
|
|
445
|
+
const type = this.safeString(rawCurrency, 7) ? 'fiat' : 'crypto';
|
|
446
|
+
const precision = this.parseNumber(this.parsePrecision(this.safeString(rawCurrency, 5)));
|
|
447
|
+
const networks = {};
|
|
448
|
+
const networkId = this.safeString(rawCurrency, 9);
|
|
449
|
+
let networkCode = undefined;
|
|
450
|
+
if (networkId !== undefined) {
|
|
451
|
+
networkCode = this.networkIdToCode(networkId, code);
|
|
452
|
+
networks[networkCode] = {
|
|
453
|
+
'info': rawCurrency,
|
|
454
|
+
'id': networkId,
|
|
455
|
+
'network': networkCode,
|
|
478
456
|
'active': undefined,
|
|
479
457
|
'deposit': undefined,
|
|
480
458
|
'withdraw': undefined,
|
|
481
459
|
'fee': undefined,
|
|
482
|
-
'type': type,
|
|
483
460
|
'precision': precision,
|
|
484
461
|
'limits': {
|
|
485
462
|
'deposit': {
|
|
@@ -491,10 +468,31 @@ export default class gemini extends Exchange {
|
|
|
491
468
|
'max': undefined,
|
|
492
469
|
},
|
|
493
470
|
},
|
|
494
|
-
|
|
495
|
-
});
|
|
471
|
+
};
|
|
496
472
|
}
|
|
497
|
-
return
|
|
473
|
+
return this.safeCurrencyStructure({
|
|
474
|
+
'info': rawCurrency,
|
|
475
|
+
'id': id,
|
|
476
|
+
'code': code,
|
|
477
|
+
'name': this.safeString(rawCurrency, 1),
|
|
478
|
+
'active': undefined,
|
|
479
|
+
'deposit': undefined,
|
|
480
|
+
'withdraw': undefined,
|
|
481
|
+
'fee': undefined,
|
|
482
|
+
'type': type,
|
|
483
|
+
'precision': precision,
|
|
484
|
+
'limits': {
|
|
485
|
+
'deposit': {
|
|
486
|
+
'min': undefined,
|
|
487
|
+
'max': undefined,
|
|
488
|
+
},
|
|
489
|
+
'withdraw': {
|
|
490
|
+
'min': undefined,
|
|
491
|
+
'max': undefined,
|
|
492
|
+
},
|
|
493
|
+
},
|
|
494
|
+
'networks': networks,
|
|
495
|
+
});
|
|
498
496
|
}
|
|
499
497
|
/**
|
|
500
498
|
* @method
|
|
@@ -820,6 +818,7 @@ export default class gemini extends Exchange {
|
|
|
820
818
|
inverse = false;
|
|
821
819
|
}
|
|
822
820
|
const type = swap ? 'swap' : 'spot';
|
|
821
|
+
const isSpot = !swap;
|
|
823
822
|
return {
|
|
824
823
|
'id': marketId,
|
|
825
824
|
'symbol': symbol,
|
|
@@ -830,7 +829,7 @@ export default class gemini extends Exchange {
|
|
|
830
829
|
'quoteId': quoteId,
|
|
831
830
|
'settleId': settleId,
|
|
832
831
|
'type': type,
|
|
833
|
-
'spot':
|
|
832
|
+
'spot': isSpot,
|
|
834
833
|
'margin': false,
|
|
835
834
|
'swap': swap,
|
|
836
835
|
'future': false,
|
|
@@ -1906,7 +1905,7 @@ export default class gemini extends Exchange {
|
|
|
1906
1905
|
if (networkCode === undefined) {
|
|
1907
1906
|
throw new ArgumentsRequired(this.id + ' fetchDepositAddresses() requires a network parameter');
|
|
1908
1907
|
}
|
|
1909
|
-
const networkId = this.networkCodeToId(networkCode);
|
|
1908
|
+
const networkId = this.networkCodeToId(networkCode, currency['code']);
|
|
1910
1909
|
const request = {
|
|
1911
1910
|
'network': networkId,
|
|
1912
1911
|
};
|
|
@@ -1924,8 +1923,9 @@ export default class gemini extends Exchange {
|
|
|
1924
1923
|
throw new AuthenticationError(this.id + ' sign() requires an account-key, master-keys are not-supported');
|
|
1925
1924
|
}
|
|
1926
1925
|
const nonce = this.nonce().toString();
|
|
1926
|
+
const finalUrl = url;
|
|
1927
1927
|
const request = this.extend({
|
|
1928
|
-
'request':
|
|
1928
|
+
'request': finalUrl,
|
|
1929
1929
|
'nonce': nonce,
|
|
1930
1930
|
}, query);
|
|
1931
1931
|
let payload = this.json(request);
|
package/js/src/grvt.d.ts
CHANGED
|
@@ -226,7 +226,7 @@ export default class grvt extends Exchange {
|
|
|
226
226
|
*/
|
|
227
227
|
transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
|
|
228
228
|
parseTransfer(transfer: Dict, currency?: Currency): TransferEntry;
|
|
229
|
-
loadAccountInfos(): Promise<
|
|
229
|
+
loadAccountInfos(): Promise<boolean>;
|
|
230
230
|
/**
|
|
231
231
|
* @method
|
|
232
232
|
* @name grvt#withdraw
|
package/js/src/grvt.js
CHANGED
|
@@ -1588,13 +1588,15 @@ export default class grvt extends Exchange {
|
|
|
1588
1588
|
let networkCode = undefined;
|
|
1589
1589
|
let addressFrom = this.safeString(transaction, 'from_account_id');
|
|
1590
1590
|
let addressTo = this.safeString(transaction, 'to_account_id');
|
|
1591
|
+
const currencyId = this.safeString(transaction, 'currency');
|
|
1592
|
+
const code = this.safeCurrencyCode(currencyId, currency);
|
|
1591
1593
|
if ('transfer_metadata' in transaction) {
|
|
1592
1594
|
const metaData = this.omitZero(this.safeString(transaction, 'transfer_metadata'));
|
|
1593
1595
|
if (metaData !== undefined) {
|
|
1594
1596
|
const parsedMeta = this.parseJson(metaData);
|
|
1595
1597
|
direction = this.safeStringLower(parsedMeta, 'direction');
|
|
1596
1598
|
txId = this.safeString(parsedMeta, 'provider_tx_id');
|
|
1597
|
-
networkCode = this.networkIdToCode(this.safeString(parsedMeta, 'chainid'));
|
|
1599
|
+
networkCode = this.networkIdToCode(this.safeString(parsedMeta, 'chainid'), code);
|
|
1598
1600
|
if (direction === 'withdrawal') {
|
|
1599
1601
|
addressTo = this.safeString(parsedMeta, 'endpoint');
|
|
1600
1602
|
}
|
|
@@ -1604,8 +1606,6 @@ export default class grvt extends Exchange {
|
|
|
1604
1606
|
}
|
|
1605
1607
|
}
|
|
1606
1608
|
const timestamp = this.safeIntegerProduct2(transaction, 'event_time', 'initiated_time', 0.000001);
|
|
1607
|
-
const currencyId = this.safeString(transaction, 'currency');
|
|
1608
|
-
const code = this.safeCurrencyCode(currencyId, currency);
|
|
1609
1609
|
return {
|
|
1610
1610
|
'info': transaction,
|
|
1611
1611
|
'id': undefined,
|
|
@@ -1826,7 +1826,7 @@ export default class grvt extends Exchange {
|
|
|
1826
1826
|
}
|
|
1827
1827
|
async loadAccountInfos() {
|
|
1828
1828
|
if (this.safeString(this.options, 'userMainAccountId') !== undefined) {
|
|
1829
|
-
return;
|
|
1829
|
+
return false;
|
|
1830
1830
|
}
|
|
1831
1831
|
const promises = [];
|
|
1832
1832
|
promises.push(this.privateTradingPostFullV1AggregatedAccountSummary());
|
|
@@ -1879,6 +1879,7 @@ export default class grvt extends Exchange {
|
|
|
1879
1879
|
const subAccountId = this.safeString(subAccountIds, 0);
|
|
1880
1880
|
this.options['accountId'] = subAccountId;
|
|
1881
1881
|
}
|
|
1882
|
+
return true;
|
|
1882
1883
|
}
|
|
1883
1884
|
/**
|
|
1884
1885
|
* @method
|
|
@@ -1906,7 +1907,7 @@ export default class grvt extends Exchange {
|
|
|
1906
1907
|
'signature': this.defaultSignature(),
|
|
1907
1908
|
};
|
|
1908
1909
|
const [networkCode, query] = this.handleNetworkCodeAndParams(params);
|
|
1909
|
-
const networkId = this.networkCodeToId(networkCode);
|
|
1910
|
+
const networkId = this.networkCodeToId(networkCode, code);
|
|
1910
1911
|
if (networkId === undefined) {
|
|
1911
1912
|
throw new BadRequest(this.id + ' withdraw() requires a network parameter');
|
|
1912
1913
|
}
|
|
@@ -1971,8 +1972,10 @@ export default class grvt extends Exchange {
|
|
|
1971
1972
|
}
|
|
1972
1973
|
params = this.omit(params, ['clientOrderId']);
|
|
1973
1974
|
const isMarketOrder = (type === 'market');
|
|
1975
|
+
const subAccountId = this.getSubAccountId(params);
|
|
1976
|
+
const isReduceOnly = this.safeBool(params, 'reduceOnly', false);
|
|
1974
1977
|
const orderRequest = {
|
|
1975
|
-
'sub_account_id':
|
|
1978
|
+
'sub_account_id': subAccountId,
|
|
1976
1979
|
'time_in_force': undefined,
|
|
1977
1980
|
'legs': [orderLeg],
|
|
1978
1981
|
'signature': this.defaultSignature(),
|
|
@@ -1981,7 +1984,7 @@ export default class grvt extends Exchange {
|
|
|
1981
1984
|
},
|
|
1982
1985
|
'is_market': isMarketOrder,
|
|
1983
1986
|
'post_only': false,
|
|
1984
|
-
'reduce_only':
|
|
1987
|
+
'reduce_only': isReduceOnly,
|
|
1985
1988
|
// 'order_id': null,
|
|
1986
1989
|
// 'state': null,
|
|
1987
1990
|
};
|
|
@@ -2614,8 +2617,9 @@ export default class grvt extends Exchange {
|
|
|
2614
2617
|
*/
|
|
2615
2618
|
async fetchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2616
2619
|
await this.loadMarketsAndSignIn();
|
|
2620
|
+
const subAccountId = this.getSubAccountId(params);
|
|
2617
2621
|
let request = {
|
|
2618
|
-
'sub_account_id':
|
|
2622
|
+
'sub_account_id': subAccountId,
|
|
2619
2623
|
};
|
|
2620
2624
|
let market = undefined;
|
|
2621
2625
|
if (symbol !== undefined) {
|
|
@@ -2791,8 +2795,9 @@ export default class grvt extends Exchange {
|
|
|
2791
2795
|
*/
|
|
2792
2796
|
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
2793
2797
|
await this.loadMarketsAndSignIn();
|
|
2798
|
+
const subAccountId = this.getSubAccountId(params);
|
|
2794
2799
|
const request = {
|
|
2795
|
-
'sub_account_id':
|
|
2800
|
+
'sub_account_id': subAccountId,
|
|
2796
2801
|
};
|
|
2797
2802
|
const clientOrderId = this.safeString2(params, 'clientOrderId', 'client_order_id');
|
|
2798
2803
|
if (clientOrderId !== undefined) {
|
|
@@ -3055,7 +3060,7 @@ export default class grvt extends Exchange {
|
|
|
3055
3060
|
// }
|
|
3056
3061
|
//
|
|
3057
3062
|
const result = this.safeDict(response, 'result', {});
|
|
3058
|
-
return this.parseOrders([result]
|
|
3063
|
+
return this.parseOrders([result]);
|
|
3059
3064
|
}
|
|
3060
3065
|
/**
|
|
3061
3066
|
* @method
|
|
@@ -3070,8 +3075,9 @@ export default class grvt extends Exchange {
|
|
|
3070
3075
|
*/
|
|
3071
3076
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
3072
3077
|
await this.loadMarketsAndSignIn();
|
|
3078
|
+
const subAccoubntId = this.getSubAccountId(params);
|
|
3073
3079
|
const request = {
|
|
3074
|
-
'sub_account_id':
|
|
3080
|
+
'sub_account_id': subAccoubntId,
|
|
3075
3081
|
};
|
|
3076
3082
|
const clientOrderId = this.safeString2(params, 'clientOrderId', 'client_order_id');
|
|
3077
3083
|
if (clientOrderId !== undefined) {
|
package/js/src/hashkey.d.ts
CHANGED
|
@@ -50,6 +50,7 @@ export default class hashkey extends Exchange {
|
|
|
50
50
|
* @returns {object} an associative dictionary of currencies
|
|
51
51
|
*/
|
|
52
52
|
fetchCurrencies(params?: {}): Promise<Currencies>;
|
|
53
|
+
parseCurrency(rawCurrency: Dict): Currency;
|
|
53
54
|
/**
|
|
54
55
|
* @method
|
|
55
56
|
* @name hashkey#fetchOrderBook
|