ccxt 4.1.55 → 4.1.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/.git-templates/hooks/pre-push +2 -2
- package/CONTRIBUTING.md +1 -1
- package/README.md +6 -6
- package/build.sh +30 -8
- package/dist/ccxt.browser.js +5592 -4907
- package/dist/ccxt.browser.min.js +13 -13
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +17 -13
- package/dist/cjs/src/alpaca.js +6 -6
- package/dist/cjs/src/ascendex.js +35 -29
- package/dist/cjs/src/base/Exchange.js +39 -26
- package/dist/cjs/src/base/Precise.js +1 -3
- package/dist/cjs/src/bigone.js +24 -20
- package/dist/cjs/src/binance.js +97 -76
- package/dist/cjs/src/bingx.js +63 -44
- package/dist/cjs/src/bit2c.js +18 -15
- package/dist/cjs/src/bitbank.js +17 -15
- package/dist/cjs/src/bitbns.js +28 -18
- package/dist/cjs/src/bitfinex.js +23 -21
- package/dist/cjs/src/bitfinex2.js +32 -28
- package/dist/cjs/src/bitflyer.js +28 -20
- package/dist/cjs/src/bitforex.js +25 -18
- package/dist/cjs/src/bitget.js +184 -147
- package/dist/cjs/src/bithumb.js +23 -16
- package/dist/cjs/src/bitmart.js +129 -94
- package/dist/cjs/src/bitmex.js +104 -64
- package/dist/cjs/src/bitopro.js +38 -26
- package/dist/cjs/src/bitpanda.js +24 -23
- package/dist/cjs/src/bitrue.js +33 -24
- package/dist/cjs/src/bitso.js +24 -23
- package/dist/cjs/src/bitstamp.js +24 -23
- package/dist/cjs/src/bittrex.js +30 -29
- package/dist/cjs/src/bitvavo.js +38 -30
- package/dist/cjs/src/bl3p.js +11 -10
- package/dist/cjs/src/blockchaincom.js +20 -20
- package/dist/cjs/src/btcalpha.js +18 -17
- package/dist/cjs/src/btcbox.js +13 -12
- package/dist/cjs/src/btcmarkets.js +20 -19
- package/dist/cjs/src/btcturk.js +14 -13
- package/dist/cjs/src/bybit.js +84 -54
- package/dist/cjs/src/cex.js +16 -14
- package/dist/cjs/src/coinbase.js +29 -27
- package/dist/cjs/src/coinbasepro.js +27 -25
- package/dist/cjs/src/coincheck.js +15 -14
- package/dist/cjs/src/coinex.js +101 -78
- package/dist/cjs/src/coinlist.js +28 -27
- package/dist/cjs/src/coinmate.js +20 -17
- package/dist/cjs/src/coinone.js +21 -16
- package/dist/cjs/src/coinsph.js +37 -28
- package/dist/cjs/src/coinspot.js +12 -11
- package/dist/cjs/src/cryptocom.js +40 -202
- package/dist/cjs/src/currencycom.js +32 -25
- package/dist/cjs/src/delta.js +34 -28
- package/dist/cjs/src/deribit.js +39 -36
- package/dist/cjs/src/digifinex.js +64 -44
- package/dist/cjs/src/exmo.js +29 -27
- package/dist/cjs/src/gate.js +67 -53
- package/dist/cjs/src/gemini.js +23 -20
- package/dist/cjs/src/hitbtc.js +65 -56
- package/dist/cjs/src/hollaex.js +30 -27
- package/dist/cjs/src/htx.js +135 -143
- package/dist/cjs/src/huobijp.js +22 -20
- package/dist/cjs/src/idex.js +22 -21
- package/dist/cjs/src/independentreserve.js +15 -14
- package/dist/cjs/src/indodax.js +30 -26
- package/dist/cjs/src/kraken.js +29 -27
- package/dist/cjs/src/krakenfutures.js +29 -22
- package/dist/cjs/src/kucoin.js +48 -43
- package/dist/cjs/src/kucoinfutures.js +33 -28
- package/dist/cjs/src/kuna.js +25 -24
- package/dist/cjs/src/latoken.js +24 -22
- package/dist/cjs/src/lbank.js +45 -30
- package/dist/cjs/src/luno.js +22 -19
- package/dist/cjs/src/lykke.js +19 -17
- package/dist/cjs/src/mercado.js +30 -19
- package/dist/cjs/src/mexc.js +60 -49
- package/dist/cjs/src/ndax.js +23 -22
- package/dist/cjs/src/novadax.js +23 -22
- package/dist/cjs/src/oceanex.js +22 -19
- package/dist/cjs/src/okcoin.js +29 -23
- package/dist/cjs/src/okx.js +92 -84
- package/dist/cjs/src/p2b.js +80 -83
- package/dist/cjs/src/paymium.js +10 -10
- package/dist/cjs/src/phemex.js +63 -40
- package/dist/cjs/src/poloniex.js +22 -22
- package/dist/cjs/src/poloniexfutures.js +23 -19
- package/dist/cjs/src/pro/alpaca.js +5 -5
- package/dist/cjs/src/pro/ascendex.js +4 -4
- package/dist/cjs/src/pro/binance.js +16 -16
- package/dist/cjs/src/pro/bingx.js +1 -1
- package/dist/cjs/src/pro/bitfinex.js +4 -4
- package/dist/cjs/src/pro/bitfinex2.js +6 -6
- package/dist/cjs/src/pro/bitget.js +7 -7
- package/dist/cjs/src/pro/bitmart.js +7 -5
- package/dist/cjs/src/pro/bitmex.js +6 -6
- package/dist/cjs/src/pro/bitopro.js +4 -4
- package/dist/cjs/src/pro/bitpanda.js +6 -6
- package/dist/cjs/src/pro/bitrue.js +2 -2
- package/dist/cjs/src/pro/bitstamp.js +6 -4
- package/dist/cjs/src/pro/bittrex.js +6 -6
- package/dist/cjs/src/pro/bitvavo.js +11 -7
- package/dist/cjs/src/pro/blockchaincom.js +8 -8
- package/dist/cjs/src/pro/bybit.js +7 -7
- package/dist/cjs/src/pro/cex.js +13 -9
- package/dist/cjs/src/pro/coinbase.js +5 -5
- package/dist/cjs/src/pro/coinbasepro.js +11 -10
- package/dist/cjs/src/pro/coinex.js +7 -9
- package/dist/cjs/src/pro/cryptocom.js +9 -9
- package/dist/cjs/src/pro/currencycom.js +4 -4
- package/dist/cjs/src/pro/deribit.js +6 -6
- package/dist/cjs/src/pro/exmo.js +12 -14
- package/dist/cjs/src/pro/gate.js +7 -7
- package/dist/cjs/src/pro/gemini.js +3 -3
- package/dist/cjs/src/pro/hitbtc.js +263 -4
- package/dist/cjs/src/pro/hollaex.js +5 -5
- package/dist/cjs/src/pro/htx.js +6 -6
- package/dist/cjs/src/pro/huobijp.js +3 -3
- package/dist/cjs/src/pro/idex.js +4 -4
- package/dist/cjs/src/pro/independentreserve.js +2 -2
- package/dist/cjs/src/pro/kraken.js +10 -10
- package/dist/cjs/src/pro/krakenfutures.js +41 -17
- package/dist/cjs/src/pro/kucoin.js +7 -7
- package/dist/cjs/src/pro/kucoinfutures.js +8 -6
- package/dist/cjs/src/pro/luno.js +2 -2
- package/dist/cjs/src/pro/mexc.js +6 -6
- package/dist/cjs/src/pro/ndax.js +3 -3
- package/dist/cjs/src/pro/okcoin.js +5 -5
- package/dist/cjs/src/pro/okx.js +12 -12
- package/dist/cjs/src/pro/phemex.js +6 -6
- package/dist/cjs/src/pro/poloniex.js +7 -7
- package/dist/cjs/src/pro/poloniexfutures.js +5 -5
- package/dist/cjs/src/pro/probit.js +6 -6
- package/dist/cjs/src/pro/upbit.js +3 -3
- package/dist/cjs/src/pro/wazirx.js +8 -8
- package/dist/cjs/src/pro/whitebit.js +12 -8
- package/dist/cjs/src/pro/woo.js +1 -1
- package/dist/cjs/src/probit.js +28 -23
- package/dist/cjs/src/tidex.js +16 -15
- package/dist/cjs/src/timex.js +19 -18
- package/dist/cjs/src/tokocrypto.js +27 -22
- package/dist/cjs/src/upbit.js +19 -19
- package/dist/cjs/src/wavesexchange.js +22 -19
- package/dist/cjs/src/wazirx.js +24 -17
- package/dist/cjs/src/whitebit.js +33 -27
- package/dist/cjs/src/woo.js +44 -34
- package/dist/cjs/src/yobit.js +25 -20
- package/dist/cjs/src/zaif.js +9 -9
- package/dist/cjs/src/zonda.js +18 -17
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bitbank.d.ts +1 -0
- package/js/src/abstract/bybit.d.ts +1 -0
- package/js/src/abstract/cryptocom.d.ts +0 -20
- package/js/src/abstract/htx.d.ts +3 -0
- package/js/src/abstract/huobi.d.ts +3 -0
- package/js/src/abstract/huobipro.d.ts +3 -0
- package/js/src/abstract/okex.d.ts +3 -1
- package/js/src/abstract/okex5.d.ts +3 -1
- package/js/src/abstract/okx.d.ts +3 -1
- package/js/src/ace.js +18 -14
- package/js/src/alpaca.js +6 -6
- package/js/src/ascendex.js +35 -29
- package/js/src/base/Exchange.d.ts +37 -34
- package/js/src/base/Exchange.js +39 -26
- package/js/src/base/Precise.d.ts +4 -4
- package/js/src/base/Precise.js +1 -3
- package/js/src/base/functions/type.d.ts +25 -25
- package/js/src/base/types.d.ts +21 -14
- package/js/src/bigone.js +25 -21
- package/js/src/binance.d.ts +2 -2
- package/js/src/binance.js +97 -76
- package/js/src/bingx.js +63 -44
- package/js/src/bit2c.js +19 -16
- package/js/src/bitbank.js +17 -15
- package/js/src/bitbns.js +28 -18
- package/js/src/bitfinex.js +23 -21
- package/js/src/bitfinex2.js +32 -28
- package/js/src/bitflyer.js +28 -20
- package/js/src/bitforex.js +26 -19
- package/js/src/bitget.d.ts +25 -3
- package/js/src/bitget.js +184 -147
- package/js/src/bithumb.js +23 -16
- package/js/src/bitmart.d.ts +1 -1
- package/js/src/bitmart.js +129 -94
- package/js/src/bitmex.d.ts +2 -2
- package/js/src/bitmex.js +104 -64
- package/js/src/bitopro.js +38 -26
- package/js/src/bitpanda.js +24 -23
- package/js/src/bitrue.js +33 -24
- package/js/src/bitso.js +24 -23
- package/js/src/bitstamp.d.ts +2 -2
- package/js/src/bitstamp.js +24 -23
- package/js/src/bittrex.js +30 -29
- package/js/src/bitvavo.js +38 -30
- package/js/src/bl3p.js +11 -10
- package/js/src/blockchaincom.js +20 -20
- package/js/src/btcalpha.js +18 -17
- package/js/src/btcbox.js +13 -12
- package/js/src/btcmarkets.js +20 -19
- package/js/src/btcturk.js +14 -13
- package/js/src/bybit.d.ts +1 -1
- package/js/src/bybit.js +84 -54
- package/js/src/cex.js +16 -14
- package/js/src/coinbase.js +29 -27
- package/js/src/coinbasepro.js +27 -25
- package/js/src/coincheck.js +15 -14
- package/js/src/coinex.d.ts +1 -1
- package/js/src/coinex.js +101 -78
- package/js/src/coinlist.js +28 -27
- package/js/src/coinmate.js +21 -18
- package/js/src/coinone.js +21 -16
- package/js/src/coinsph.js +37 -28
- package/js/src/coinspot.js +12 -11
- package/js/src/cryptocom.d.ts +0 -23
- package/js/src/cryptocom.js +40 -202
- package/js/src/currencycom.js +32 -25
- package/js/src/delta.js +35 -29
- package/js/src/deribit.js +39 -36
- package/js/src/digifinex.d.ts +2 -2
- package/js/src/digifinex.js +65 -45
- package/js/src/exmo.js +29 -27
- package/js/src/gate.d.ts +1 -1
- package/js/src/gate.js +67 -53
- package/js/src/gemini.js +23 -20
- package/js/src/hitbtc.d.ts +1 -0
- package/js/src/hitbtc.js +65 -56
- package/js/src/hollaex.js +30 -27
- package/js/src/htx.d.ts +11 -3
- package/js/src/htx.js +135 -143
- package/js/src/huobijp.js +23 -21
- package/js/src/idex.js +22 -21
- package/js/src/independentreserve.js +15 -14
- package/js/src/indodax.js +30 -26
- package/js/src/kraken.js +29 -27
- package/js/src/krakenfutures.js +29 -22
- package/js/src/kucoin.d.ts +1 -1
- package/js/src/kucoin.js +48 -43
- package/js/src/kucoinfutures.js +33 -28
- package/js/src/kuna.js +25 -24
- package/js/src/latoken.js +25 -23
- package/js/src/lbank.js +46 -31
- package/js/src/luno.js +22 -19
- package/js/src/lykke.js +19 -17
- package/js/src/mercado.js +30 -19
- package/js/src/mexc.d.ts +1 -1
- package/js/src/mexc.js +60 -49
- package/js/src/ndax.js +23 -22
- package/js/src/novadax.js +23 -22
- package/js/src/oceanex.js +22 -19
- package/js/src/okcoin.js +29 -23
- package/js/src/okx.d.ts +2 -2
- package/js/src/okx.js +92 -84
- package/js/src/p2b.d.ts +8 -7
- package/js/src/p2b.js +80 -82
- package/js/src/paymium.js +10 -10
- package/js/src/phemex.js +63 -40
- package/js/src/poloniex.js +22 -22
- package/js/src/poloniexfutures.js +23 -19
- package/js/src/pro/alpaca.js +5 -5
- package/js/src/pro/ascendex.js +4 -4
- package/js/src/pro/binance.js +16 -16
- package/js/src/pro/bingx.js +1 -1
- package/js/src/pro/bitfinex.js +4 -4
- package/js/src/pro/bitfinex2.d.ts +1 -1
- package/js/src/pro/bitfinex2.js +6 -6
- package/js/src/pro/bitget.js +7 -7
- package/js/src/pro/bitmart.js +7 -5
- package/js/src/pro/bitmex.js +6 -6
- package/js/src/pro/bitopro.js +4 -4
- package/js/src/pro/bitpanda.js +6 -6
- package/js/src/pro/bitrue.js +2 -2
- package/js/src/pro/bitstamp.js +7 -5
- package/js/src/pro/bittrex.js +6 -6
- package/js/src/pro/bitvavo.js +12 -8
- package/js/src/pro/blockchaincom.js +8 -8
- package/js/src/pro/bybit.js +7 -7
- package/js/src/pro/cex.js +14 -10
- package/js/src/pro/coinbase.js +5 -5
- package/js/src/pro/coinbasepro.js +12 -11
- package/js/src/pro/coinex.js +7 -9
- package/js/src/pro/cryptocom.js +9 -9
- package/js/src/pro/currencycom.js +4 -4
- package/js/src/pro/deribit.js +6 -6
- package/js/src/pro/exmo.js +12 -14
- package/js/src/pro/gate.js +7 -7
- package/js/src/pro/gemini.js +3 -3
- package/js/src/pro/hitbtc.d.ts +8 -1
- package/js/src/pro/hitbtc.js +264 -5
- package/js/src/pro/hollaex.js +5 -5
- package/js/src/pro/htx.js +6 -6
- package/js/src/pro/huobijp.js +3 -3
- package/js/src/pro/idex.js +4 -4
- package/js/src/pro/independentreserve.js +2 -2
- package/js/src/pro/kraken.js +10 -10
- package/js/src/pro/krakenfutures.d.ts +1 -0
- package/js/src/pro/krakenfutures.js +42 -18
- package/js/src/pro/kucoin.js +7 -7
- package/js/src/pro/kucoinfutures.js +8 -6
- package/js/src/pro/luno.js +2 -2
- package/js/src/pro/mexc.js +6 -6
- package/js/src/pro/ndax.js +3 -3
- package/js/src/pro/okcoin.js +5 -5
- package/js/src/pro/okx.js +12 -12
- package/js/src/pro/phemex.js +6 -6
- package/js/src/pro/poloniex.js +7 -7
- package/js/src/pro/poloniexfutures.js +5 -5
- package/js/src/pro/probit.js +6 -6
- package/js/src/pro/upbit.js +3 -3
- package/js/src/pro/wazirx.js +8 -8
- package/js/src/pro/whitebit.js +13 -9
- package/js/src/pro/woo.js +1 -1
- package/js/src/probit.js +29 -24
- package/js/src/tidex.js +16 -15
- package/js/src/timex.js +19 -18
- package/js/src/tokocrypto.js +28 -23
- package/js/src/upbit.js +19 -19
- package/js/src/wavesexchange.js +23 -20
- package/js/src/wazirx.js +25 -18
- package/js/src/whitebit.js +33 -27
- package/js/src/woo.js +45 -35
- package/js/src/yobit.js +25 -20
- package/js/src/zaif.js +9 -9
- package/js/src/zonda.js +18 -17
- package/package.json +2 -2
- package/js/src/bitstamp1.d.ts +0 -28
- package/js/src/bitstamp1.js +0 -430
- package/js/src/lbank2.d.ts +0 -90
- package/js/src/lbank2.js +0 -2779
package/dist/cjs/src/bitget.js
CHANGED
|
@@ -41,13 +41,12 @@ class bitget extends bitget$1 {
|
|
|
41
41
|
'fetchAccounts': false,
|
|
42
42
|
'fetchBalance': true,
|
|
43
43
|
'fetchBorrowInterest': true,
|
|
44
|
-
'fetchBorrowRate': true,
|
|
45
44
|
'fetchBorrowRateHistories': false,
|
|
46
45
|
'fetchBorrowRateHistory': false,
|
|
47
|
-
'fetchBorrowRates': false,
|
|
48
|
-
'fetchBorrowRatesPerSymbol': false,
|
|
49
46
|
'fetchCanceledOrders': true,
|
|
50
47
|
'fetchClosedOrders': true,
|
|
48
|
+
'fetchCrossBorrowRate': true,
|
|
49
|
+
'fetchCrossBorrowRates': false,
|
|
51
50
|
'fetchCurrencies': true,
|
|
52
51
|
'fetchDepositAddress': true,
|
|
53
52
|
'fetchDepositAddresses': false,
|
|
@@ -59,6 +58,8 @@ class bitget extends bitget$1 {
|
|
|
59
58
|
'fetchFundingRateHistory': true,
|
|
60
59
|
'fetchFundingRates': false,
|
|
61
60
|
'fetchIndexOHLCV': true,
|
|
61
|
+
'fetchIsolatedBorrowRate': true,
|
|
62
|
+
'fetchIsolatedBorrowRates': false,
|
|
62
63
|
'fetchLedger': true,
|
|
63
64
|
'fetchLeverage': true,
|
|
64
65
|
'fetchLeverageTiers': false,
|
|
@@ -1781,7 +1782,7 @@ class bitget extends bitget$1 {
|
|
|
1781
1782
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
1782
1783
|
* @param {string} [params.marginMode] for spot margin 'cross' or 'isolated', default is 'isolated'
|
|
1783
1784
|
* @param {string} [params.code] required for cross spot margin
|
|
1784
|
-
* @returns {object} a [leverage tiers structure]{@link https://
|
|
1785
|
+
* @returns {object} a [leverage tiers structure]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}
|
|
1785
1786
|
*/
|
|
1786
1787
|
await this.loadMarkets();
|
|
1787
1788
|
const request = {};
|
|
@@ -1805,7 +1806,9 @@ class bitget extends bitget$1 {
|
|
|
1805
1806
|
}
|
|
1806
1807
|
else if (marginMode === 'cross') {
|
|
1807
1808
|
const code = this.safeString(params, 'code');
|
|
1808
|
-
|
|
1809
|
+
if (code === undefined) {
|
|
1810
|
+
throw new errors.ArgumentsRequired(this.id + ' fetchMarketLeverageTiers() requires a code argument');
|
|
1811
|
+
}
|
|
1809
1812
|
params = this.omit(params, 'code');
|
|
1810
1813
|
const currency = this.currency(code);
|
|
1811
1814
|
request['coin'] = currency['code'];
|
|
@@ -1953,7 +1956,7 @@ class bitget extends bitget$1 {
|
|
|
1953
1956
|
* @param {string} [params.pageSize] pageSize default 20. Max 100
|
|
1954
1957
|
* @param {int} [params.until] end tim in ms
|
|
1955
1958
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
1956
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
1959
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1957
1960
|
*/
|
|
1958
1961
|
await this.loadMarkets();
|
|
1959
1962
|
let paginate = false;
|
|
@@ -2014,7 +2017,7 @@ class bitget extends bitget$1 {
|
|
|
2014
2017
|
* @param {string} tag
|
|
2015
2018
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
2016
2019
|
* @param {string} [params.chain] the chain to withdraw to
|
|
2017
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
2020
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2018
2021
|
*/
|
|
2019
2022
|
this.checkAddress(address);
|
|
2020
2023
|
const chain = this.safeString2(params, 'chain', 'network');
|
|
@@ -2109,7 +2112,7 @@ class bitget extends bitget$1 {
|
|
|
2109
2112
|
* @param {string} [params.pageSize] pageSize default 20. Max 100
|
|
2110
2113
|
* @param {int} [params.until] end time in ms
|
|
2111
2114
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
2112
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
2115
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2113
2116
|
*/
|
|
2114
2117
|
await this.loadMarkets();
|
|
2115
2118
|
let paginate = false;
|
|
@@ -2231,7 +2234,7 @@ class bitget extends bitget$1 {
|
|
|
2231
2234
|
* @see https://bitgetlimited.github.io/apidoc/en/spot/#get-coin-address
|
|
2232
2235
|
* @param {string} code unified currency code
|
|
2233
2236
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
2234
|
-
* @returns {object} an [address structure]{@link https://
|
|
2237
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
2235
2238
|
*/
|
|
2236
2239
|
await this.loadMarkets();
|
|
2237
2240
|
const networkCode = this.safeString(params, 'network');
|
|
@@ -2291,7 +2294,7 @@ class bitget extends bitget$1 {
|
|
|
2291
2294
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
2292
2295
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
2293
2296
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
2294
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
2297
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
2295
2298
|
*/
|
|
2296
2299
|
await this.loadMarkets();
|
|
2297
2300
|
const market = this.market(symbol);
|
|
@@ -2450,7 +2453,7 @@ class bitget extends bitget$1 {
|
|
|
2450
2453
|
* @see https://bitgetlimited.github.io/apidoc/en/mix/#get-single-symbol-ticker
|
|
2451
2454
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
2452
2455
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
2453
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
2456
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
2454
2457
|
*/
|
|
2455
2458
|
await this.loadMarkets();
|
|
2456
2459
|
const market = this.market(symbol);
|
|
@@ -2496,7 +2499,7 @@ class bitget extends bitget$1 {
|
|
|
2496
2499
|
* @see https://bitgetlimited.github.io/apidoc/en/mix/#get-all-symbol-ticker
|
|
2497
2500
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
2498
2501
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
2499
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
2502
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
2500
2503
|
*/
|
|
2501
2504
|
const sandboxMode = this.safeValue(this.options, 'sandboxMode', false);
|
|
2502
2505
|
await this.loadMarkets();
|
|
@@ -2694,7 +2697,7 @@ class bitget extends bitget$1 {
|
|
|
2694
2697
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
2695
2698
|
* @param {int} [params.until] the latest time in ms to fetch deposits for
|
|
2696
2699
|
* @param {boolean} [params.paginate] *only applies to publicSpotGetMarketFillsHistory and publicMixGetMarketFillsHistory* default false, when true will automatically paginate by calling this endpoint multiple times
|
|
2697
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
2700
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
2698
2701
|
*/
|
|
2699
2702
|
await this.loadMarkets();
|
|
2700
2703
|
let paginate = false;
|
|
@@ -2805,7 +2808,7 @@ class bitget extends bitget$1 {
|
|
|
2805
2808
|
* @see https://bitgetlimited.github.io/apidoc/en/spot/#get-single-symbol
|
|
2806
2809
|
* @param {string} symbol unified market symbol
|
|
2807
2810
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
2808
|
-
* @returns {object} a [fee structure]{@link https://
|
|
2811
|
+
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
2809
2812
|
*/
|
|
2810
2813
|
await this.loadMarkets();
|
|
2811
2814
|
const market = this.market(symbol);
|
|
@@ -2843,7 +2846,7 @@ class bitget extends bitget$1 {
|
|
|
2843
2846
|
* @description fetch the trading fees for multiple markets
|
|
2844
2847
|
* @see https://bitgetlimited.github.io/apidoc/en/spot/#get-symbols
|
|
2845
2848
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
2846
|
-
* @returns {object} a dictionary of [fee structures]{@link https://
|
|
2849
|
+
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
2847
2850
|
*/
|
|
2848
2851
|
await this.loadMarkets();
|
|
2849
2852
|
const response = await this.publicSpotGetSpotV1PublicProducts(params);
|
|
@@ -3052,7 +3055,7 @@ class bitget extends bitget$1 {
|
|
|
3052
3055
|
* @see https://bitgetlimited.github.io/apidoc/en/margin/#get-cross-assets
|
|
3053
3056
|
* @see https://bitgetlimited.github.io/apidoc/en/margin/#get-isolated-assets
|
|
3054
3057
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
3055
|
-
* @returns {object} a [balance structure]{@link https://
|
|
3058
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
3056
3059
|
*/
|
|
3057
3060
|
const sandboxMode = this.safeValue(this.options, 'sandboxMode', false);
|
|
3058
3061
|
await this.loadMarkets();
|
|
@@ -3474,7 +3477,7 @@ class bitget extends bitget$1 {
|
|
|
3474
3477
|
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
|
|
3475
3478
|
* @param {string} [params.marginMode] 'isolated' or 'cross' for spot margin trading
|
|
3476
3479
|
* @param {string} [params.loanType] *spot margin only* 'normal', 'autoLoan', 'autoRepay', or 'autoLoanAndRepay' default is 'normal'
|
|
3477
|
-
* @returns {object} an [order structure]{@link https://
|
|
3480
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3478
3481
|
*/
|
|
3479
3482
|
await this.loadMarkets();
|
|
3480
3483
|
const market = this.market(symbol);
|
|
@@ -3722,7 +3725,7 @@ class bitget extends bitget$1 {
|
|
|
3722
3725
|
* @see https://bitgetlimited.github.io/apidoc/en/margin/#cross-batch-order
|
|
3723
3726
|
* @param {array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
|
|
3724
3727
|
* @param {object} [params] extra parameters specific to the api endpoint
|
|
3725
|
-
* @returns {object} an [order structure]{@link https://
|
|
3728
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3726
3729
|
*/
|
|
3727
3730
|
await this.loadMarkets();
|
|
3728
3731
|
const ordersRequests = [];
|
|
@@ -3826,7 +3829,7 @@ class bitget extends bitget$1 {
|
|
|
3826
3829
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
3827
3830
|
* @param {float} [price] the price at which the order is to be fullfilled, in units of the base currency, ignored in market orders
|
|
3828
3831
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
3829
|
-
* @returns {object} an [order structure]{@link https://
|
|
3832
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3830
3833
|
*/
|
|
3831
3834
|
await this.loadMarkets();
|
|
3832
3835
|
const market = this.market(symbol);
|
|
@@ -3934,9 +3937,11 @@ class bitget extends bitget$1 {
|
|
|
3934
3937
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
3935
3938
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
3936
3939
|
* @param {string} [params.marginMode] 'isolated' or 'cross' for spot margin trading
|
|
3937
|
-
* @returns {object} An [order structure]{@link https://
|
|
3940
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3938
3941
|
*/
|
|
3939
|
-
|
|
3942
|
+
if (symbol === undefined) {
|
|
3943
|
+
throw new errors.ArgumentsRequired(this.id + ' cancelOrder() requires a symbol argument');
|
|
3944
|
+
}
|
|
3940
3945
|
await this.loadMarkets();
|
|
3941
3946
|
const market = this.market(symbol);
|
|
3942
3947
|
let marketType = undefined;
|
|
@@ -4066,9 +4071,11 @@ class bitget extends bitget$1 {
|
|
|
4066
4071
|
* @param {string} symbol unified market symbol, default is undefined
|
|
4067
4072
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
4068
4073
|
* @param {string} [params.marginMode] 'isolated' or 'cross' for spot margin trading
|
|
4069
|
-
* @returns {object} an list of [order structures]{@link https://
|
|
4074
|
+
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4070
4075
|
*/
|
|
4071
|
-
|
|
4076
|
+
if (symbol === undefined) {
|
|
4077
|
+
throw new errors.ArgumentsRequired(this.id + ' cancelOrders() requires a symbol argument');
|
|
4078
|
+
}
|
|
4072
4079
|
await this.loadMarkets();
|
|
4073
4080
|
const market = this.market(symbol);
|
|
4074
4081
|
let type = undefined;
|
|
@@ -4148,7 +4155,7 @@ class bitget extends bitget$1 {
|
|
|
4148
4155
|
* @param {string} symbol unified market symbol
|
|
4149
4156
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
4150
4157
|
* @param {string} [params.marginMode] 'isolated' or 'cross' for spot margin trading
|
|
4151
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
4158
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4152
4159
|
*/
|
|
4153
4160
|
const sandboxMode = this.safeValue(this.options, 'sandboxMode', false);
|
|
4154
4161
|
await this.loadMarkets();
|
|
@@ -4170,7 +4177,9 @@ class bitget extends bitget$1 {
|
|
|
4170
4177
|
if (marginMode === undefined) {
|
|
4171
4178
|
throw new errors.NotSupported(this.id + ' cancelAllOrders () does not support spot markets, only spot-margin');
|
|
4172
4179
|
}
|
|
4173
|
-
|
|
4180
|
+
if (symbol === undefined) {
|
|
4181
|
+
throw new errors.ArgumentsRequired(this.id + ' cancelAllOrders() requires a symbol argument');
|
|
4182
|
+
}
|
|
4174
4183
|
const spotMarginRequest = {
|
|
4175
4184
|
'symbol': market['info']['symbolName'], // regular id like LTCUSDT_SPBL does not work here
|
|
4176
4185
|
};
|
|
@@ -4227,9 +4236,11 @@ class bitget extends bitget$1 {
|
|
|
4227
4236
|
* @see https://bitgetlimited.github.io/apidoc/en/mix/#get-order-details
|
|
4228
4237
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
4229
4238
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
4230
|
-
* @returns {object} An [order structure]{@link https://
|
|
4239
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4231
4240
|
*/
|
|
4232
|
-
|
|
4241
|
+
if (symbol === undefined) {
|
|
4242
|
+
throw new errors.ArgumentsRequired(this.id + ' fetchOrder() requires a symbol argument');
|
|
4243
|
+
}
|
|
4233
4244
|
await this.loadMarkets();
|
|
4234
4245
|
const market = this.market(symbol);
|
|
4235
4246
|
const [marketType, query] = this.handleMarketTypeAndParams('fetchOrder', market, params);
|
|
@@ -4322,7 +4333,7 @@ class bitget extends bitget$1 {
|
|
|
4322
4333
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
4323
4334
|
* @param {int} [limit] the maximum number of open order structures to retrieve
|
|
4324
4335
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
4325
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
4336
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4326
4337
|
*/
|
|
4327
4338
|
await this.loadMarkets();
|
|
4328
4339
|
const request = {};
|
|
@@ -4340,7 +4351,9 @@ class bitget extends bitget$1 {
|
|
|
4340
4351
|
const stop = this.safeValue2(params, 'stop', 'trigger');
|
|
4341
4352
|
params = this.omit(params, ['stop', 'trigger']);
|
|
4342
4353
|
if (stop) {
|
|
4343
|
-
|
|
4354
|
+
if (symbol === undefined) {
|
|
4355
|
+
throw new errors.ArgumentsRequired(this.id + ' fetchOpenOrders() requires a symbol argument');
|
|
4356
|
+
}
|
|
4344
4357
|
if (marketType === 'spot') {
|
|
4345
4358
|
if (limit !== undefined) {
|
|
4346
4359
|
request['pageSize'] = limit;
|
|
@@ -4393,7 +4406,9 @@ class bitget extends bitget$1 {
|
|
|
4393
4406
|
response = await this.privateMixGetMixV1OrderMarginCoinCurrent(this.extend(request, params));
|
|
4394
4407
|
}
|
|
4395
4408
|
else {
|
|
4396
|
-
|
|
4409
|
+
if (symbol === undefined) {
|
|
4410
|
+
throw new errors.ArgumentsRequired(this.id + ' fetchOpenOrders() requires a symbol argument');
|
|
4411
|
+
}
|
|
4397
4412
|
response = await this.privateMixGetMixV1OrderCurrent(this.extend(request, params));
|
|
4398
4413
|
}
|
|
4399
4414
|
}
|
|
@@ -4562,10 +4577,12 @@ class bitget extends bitget$1 {
|
|
|
4562
4577
|
* @param {int} [limit] the max number of closed orders to return
|
|
4563
4578
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
4564
4579
|
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
4565
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
4580
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4566
4581
|
*/
|
|
4567
4582
|
await this.loadMarkets();
|
|
4568
|
-
|
|
4583
|
+
if (symbol === undefined) {
|
|
4584
|
+
throw new errors.ArgumentsRequired(this.id + ' fetchClosedOrders() requires a symbol argument');
|
|
4585
|
+
}
|
|
4569
4586
|
const market = this.market(symbol);
|
|
4570
4587
|
let paginate = false;
|
|
4571
4588
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchClosedOrders', 'paginate');
|
|
@@ -4602,10 +4619,12 @@ class bitget extends bitget$1 {
|
|
|
4602
4619
|
* @param {int} [limit] the max number of canceled orders to return
|
|
4603
4620
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
4604
4621
|
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
4605
|
-
* @returns {object} a list of [order structures]{@link https://
|
|
4622
|
+
* @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4606
4623
|
*/
|
|
4624
|
+
if (symbol === undefined) {
|
|
4625
|
+
throw new errors.ArgumentsRequired(this.id + ' fetchCanceledOrders() requires a symbol argument');
|
|
4626
|
+
}
|
|
4607
4627
|
await this.loadMarkets();
|
|
4608
|
-
this.checkRequiredSymbol('fetchCanceledOrders', symbol);
|
|
4609
4628
|
const market = this.market(symbol);
|
|
4610
4629
|
let paginate = false;
|
|
4611
4630
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchCanceledOrders', 'paginate');
|
|
@@ -4899,7 +4918,7 @@ class bitget extends bitget$1 {
|
|
|
4899
4918
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
4900
4919
|
* @param {int} [params.until] end tim in ms
|
|
4901
4920
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
4902
|
-
* @returns {object} a [ledger structure]{@link https://
|
|
4921
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
4903
4922
|
*/
|
|
4904
4923
|
await this.loadMarkets();
|
|
4905
4924
|
let paginate = false;
|
|
@@ -5000,11 +5019,13 @@ class bitget extends bitget$1 {
|
|
|
5000
5019
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
5001
5020
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
5002
5021
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
5003
|
-
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
5022
|
+
* @param {int} [params.until] *swap only* the latest time in ms to fetch entries for
|
|
5004
5023
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
5005
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
5024
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
5006
5025
|
*/
|
|
5007
|
-
|
|
5026
|
+
if (symbol === undefined) {
|
|
5027
|
+
throw new errors.ArgumentsRequired(this.id + ' fetchMyTrades() requires a symbol argument');
|
|
5028
|
+
}
|
|
5008
5029
|
await this.loadMarkets();
|
|
5009
5030
|
const market = this.market(symbol);
|
|
5010
5031
|
let paginate = false;
|
|
@@ -5046,9 +5067,6 @@ class bitget extends bitget$1 {
|
|
|
5046
5067
|
}
|
|
5047
5068
|
else {
|
|
5048
5069
|
[request, params] = this.handleUntilOption('before', request, params);
|
|
5049
|
-
if (since !== undefined) {
|
|
5050
|
-
request['after'] = since;
|
|
5051
|
-
}
|
|
5052
5070
|
if (limit !== undefined) {
|
|
5053
5071
|
request['limit'] = limit;
|
|
5054
5072
|
}
|
|
@@ -5166,9 +5184,11 @@ class bitget extends bitget$1 {
|
|
|
5166
5184
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
5167
5185
|
* @param {int} [limit] the maximum number of trades to retrieve
|
|
5168
5186
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
5169
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
5187
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
5170
5188
|
*/
|
|
5171
|
-
|
|
5189
|
+
if (symbol === undefined) {
|
|
5190
|
+
throw new errors.ArgumentsRequired(this.id + ' fetchOrderTrades() requires a symbol argument');
|
|
5191
|
+
}
|
|
5172
5192
|
await this.loadMarkets();
|
|
5173
5193
|
const market = this.market(symbol);
|
|
5174
5194
|
const [marketType, query] = this.handleMarketTypeAndParams('fetchOrderTrades', market, params);
|
|
@@ -5220,7 +5240,7 @@ class bitget extends bitget$1 {
|
|
|
5220
5240
|
* @see https://bitgetlimited.github.io/apidoc/en/mix/#get-symbol-position-v2
|
|
5221
5241
|
* @param {string} symbol unified market symbol of the market the position is held in, default is undefined
|
|
5222
5242
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
5223
|
-
* @returns {object} a [position structure]{@link https://
|
|
5243
|
+
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
5224
5244
|
*/
|
|
5225
5245
|
await this.loadMarkets();
|
|
5226
5246
|
const market = this.market(symbol);
|
|
@@ -5271,7 +5291,7 @@ class bitget extends bitget$1 {
|
|
|
5271
5291
|
* @see https://bitgetlimited.github.io/apidoc/en/mix/#get-history-position
|
|
5272
5292
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
5273
5293
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
5274
|
-
* @returns {object[]} a list of [position structure]{@link https://
|
|
5294
|
+
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
5275
5295
|
*/
|
|
5276
5296
|
const sandboxMode = this.safeValue(this.options, 'sandboxMode', false);
|
|
5277
5297
|
await this.loadMarkets();
|
|
@@ -5531,12 +5551,14 @@ class bitget extends bitget$1 {
|
|
|
5531
5551
|
* @description fetches historical funding rate prices
|
|
5532
5552
|
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
5533
5553
|
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
5534
|
-
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://
|
|
5554
|
+
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
|
|
5535
5555
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
5536
5556
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
5537
|
-
* @returns {object[]} a list of [funding rate structures]{@link https://
|
|
5557
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
5538
5558
|
*/
|
|
5539
|
-
|
|
5559
|
+
if (symbol === undefined) {
|
|
5560
|
+
throw new errors.ArgumentsRequired(this.id + ' fetchFundingRateHistory() requires a symbol argument');
|
|
5561
|
+
}
|
|
5540
5562
|
await this.loadMarkets();
|
|
5541
5563
|
let paginate = false;
|
|
5542
5564
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchFundingRateHistory', 'paginate');
|
|
@@ -5595,7 +5617,7 @@ class bitget extends bitget$1 {
|
|
|
5595
5617
|
* @see https://bitgetlimited.github.io/apidoc/en/mix/#get-current-funding-rate
|
|
5596
5618
|
* @param {string} symbol unified market symbol
|
|
5597
5619
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
5598
|
-
* @returns {object} a [funding rate structure]{@link https://
|
|
5620
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
5599
5621
|
*/
|
|
5600
5622
|
await this.loadMarkets();
|
|
5601
5623
|
const market = this.market(symbol);
|
|
@@ -5659,10 +5681,12 @@ class bitget extends bitget$1 {
|
|
|
5659
5681
|
* @param {int} [since] the starting timestamp in milliseconds
|
|
5660
5682
|
* @param {int} [limit] the number of entries to return
|
|
5661
5683
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
5662
|
-
* @returns {object[]} a list of [funding history structures]{@link https://
|
|
5684
|
+
* @returns {object[]} a list of [funding history structures]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
|
|
5663
5685
|
*/
|
|
5664
5686
|
await this.loadMarkets();
|
|
5665
|
-
|
|
5687
|
+
if (symbol === undefined) {
|
|
5688
|
+
throw new errors.ArgumentsRequired(this.id + ' fetchFundingHistory() requires a symbol argument');
|
|
5689
|
+
}
|
|
5666
5690
|
const market = this.market(symbol);
|
|
5667
5691
|
if (!market['swap']) {
|
|
5668
5692
|
throw new errors.BadSymbol(this.id + ' fetchFundingHistory() supports swap contracts only');
|
|
@@ -5801,7 +5825,7 @@ class bitget extends bitget$1 {
|
|
|
5801
5825
|
* @param {string} symbol unified market symbol
|
|
5802
5826
|
* @param {float} amount the amount of margin to remove
|
|
5803
5827
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
5804
|
-
* @returns {object} a [margin structure]{@link https://
|
|
5828
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
|
|
5805
5829
|
*/
|
|
5806
5830
|
if (amount > 0) {
|
|
5807
5831
|
throw new errors.BadRequest(this.id + ' reduceMargin() amount parameter must be a negative value');
|
|
@@ -5821,7 +5845,7 @@ class bitget extends bitget$1 {
|
|
|
5821
5845
|
* @param {string} symbol unified market symbol
|
|
5822
5846
|
* @param {float} amount amount of margin to add
|
|
5823
5847
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
5824
|
-
* @returns {object} a [margin structure]{@link https://
|
|
5848
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
|
|
5825
5849
|
*/
|
|
5826
5850
|
const holdSide = this.safeString(params, 'holdSide');
|
|
5827
5851
|
if (holdSide === undefined) {
|
|
@@ -5837,7 +5861,7 @@ class bitget extends bitget$1 {
|
|
|
5837
5861
|
* @see https://bitgetlimited.github.io/apidoc/en/mix/#get-single-account
|
|
5838
5862
|
* @param {string} symbol unified market symbol
|
|
5839
5863
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
5840
|
-
* @returns {object} a [leverage structure]{@link https://
|
|
5864
|
+
* @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
|
|
5841
5865
|
*/
|
|
5842
5866
|
await this.loadMarkets();
|
|
5843
5867
|
const market = this.market(symbol);
|
|
@@ -5885,7 +5909,9 @@ class bitget extends bitget$1 {
|
|
|
5885
5909
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
5886
5910
|
* @returns {object} response from the exchange
|
|
5887
5911
|
*/
|
|
5888
|
-
|
|
5912
|
+
if (symbol === undefined) {
|
|
5913
|
+
throw new errors.ArgumentsRequired(this.id + ' setLeverage() requires a symbol argument');
|
|
5914
|
+
}
|
|
5889
5915
|
await this.loadMarkets();
|
|
5890
5916
|
const market = this.market(symbol);
|
|
5891
5917
|
const request = {
|
|
@@ -5907,7 +5933,9 @@ class bitget extends bitget$1 {
|
|
|
5907
5933
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
5908
5934
|
* @returns {object} response from the exchange
|
|
5909
5935
|
*/
|
|
5910
|
-
|
|
5936
|
+
if (symbol === undefined) {
|
|
5937
|
+
throw new errors.ArgumentsRequired(this.id + ' setMarginMode() requires a symbol argument');
|
|
5938
|
+
}
|
|
5911
5939
|
marginMode = marginMode.toLowerCase();
|
|
5912
5940
|
if (marginMode === 'isolated') {
|
|
5913
5941
|
marginMode = 'fixed';
|
|
@@ -5975,7 +6003,7 @@ class bitget extends bitget$1 {
|
|
|
5975
6003
|
* @see https://bitgetlimited.github.io/apidoc/en/mix/#get-open-interest
|
|
5976
6004
|
* @param {string} symbol Unified CCXT market symbol
|
|
5977
6005
|
* @param {object} [params] exchange specific parameters
|
|
5978
|
-
* @returns {object} an open interest structure{@link https://
|
|
6006
|
+
* @returns {object} an open interest structure{@link https://docs.ccxt.com/#/?id=open-interest-structure}
|
|
5979
6007
|
*/
|
|
5980
6008
|
await this.loadMarkets();
|
|
5981
6009
|
const market = this.market(symbol);
|
|
@@ -6013,7 +6041,7 @@ class bitget extends bitget$1 {
|
|
|
6013
6041
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
6014
6042
|
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
6015
6043
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
6016
|
-
* @returns {object[]} a list of [transfer structures]{@link https://
|
|
6044
|
+
* @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
6017
6045
|
*/
|
|
6018
6046
|
await this.loadMarkets();
|
|
6019
6047
|
let paginate = false;
|
|
@@ -6077,7 +6105,7 @@ class bitget extends bitget$1 {
|
|
|
6077
6105
|
*
|
|
6078
6106
|
* EXCHANGE SPECIFIC PARAMS
|
|
6079
6107
|
* @param {string} [params.clientOid] custom id
|
|
6080
|
-
* @returns {object} a [transfer structure]{@link https://
|
|
6108
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
6081
6109
|
*/
|
|
6082
6110
|
await this.loadMarkets();
|
|
6083
6111
|
const currency = this.currency(code);
|
|
@@ -6232,7 +6260,7 @@ class bitget extends bitget$1 {
|
|
|
6232
6260
|
* @see https://bitgetlimited.github.io/apidoc/en/spot/#get-coin-list
|
|
6233
6261
|
* @param {string[]|undefined} codes list of unified currency codes
|
|
6234
6262
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
6235
|
-
* @returns {object} a list of [fee structures]{@link https://
|
|
6263
|
+
* @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
6236
6264
|
*/
|
|
6237
6265
|
await this.loadMarkets();
|
|
6238
6266
|
const response = await this.publicSpotGetSpotV1PublicCurrencies(params);
|
|
@@ -6279,7 +6307,7 @@ class bitget extends bitget$1 {
|
|
|
6279
6307
|
* @param {string} [symbol] unified market symbol
|
|
6280
6308
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
6281
6309
|
* @param {string} [params.marginMode] 'isolated' or 'cross', symbol is required for 'isolated'
|
|
6282
|
-
* @returns {object} a [margin loan structure]{@link https://
|
|
6310
|
+
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
6283
6311
|
*/
|
|
6284
6312
|
await this.loadMarkets();
|
|
6285
6313
|
const currency = this.currency(code);
|
|
@@ -6291,7 +6319,9 @@ class bitget extends bitget$1 {
|
|
|
6291
6319
|
let marginMode = undefined;
|
|
6292
6320
|
[marginMode, params] = this.handleMarginModeAndParams('borrowMargin', params);
|
|
6293
6321
|
if ((symbol !== undefined) || (marginMode === 'isolated')) {
|
|
6294
|
-
|
|
6322
|
+
if (symbol === undefined) {
|
|
6323
|
+
throw new errors.ArgumentsRequired(this.id + ' borrowMargin() requires a symbol argument');
|
|
6324
|
+
}
|
|
6295
6325
|
const market = this.market(symbol);
|
|
6296
6326
|
const marketId = market['id'];
|
|
6297
6327
|
const parts = marketId.split('_');
|
|
@@ -6345,7 +6375,7 @@ class bitget extends bitget$1 {
|
|
|
6345
6375
|
* @param {string} [symbol] unified market symbol
|
|
6346
6376
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
6347
6377
|
* @param {string} [params.marginMode] 'isolated' or 'cross', symbol is required for 'isolated'
|
|
6348
|
-
* @returns {object} a [margin loan structure]{@link https://
|
|
6378
|
+
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
6349
6379
|
*/
|
|
6350
6380
|
await this.loadMarkets();
|
|
6351
6381
|
const currency = this.currency(code);
|
|
@@ -6357,7 +6387,9 @@ class bitget extends bitget$1 {
|
|
|
6357
6387
|
let marginMode = undefined;
|
|
6358
6388
|
[marginMode, params] = this.handleMarginModeAndParams('repayMargin', params);
|
|
6359
6389
|
if ((symbol !== undefined) || (marginMode === 'isolated')) {
|
|
6360
|
-
|
|
6390
|
+
if (symbol === undefined) {
|
|
6391
|
+
throw new errors.ArgumentsRequired(this.id + ' repayMargin() requires a symbol argument');
|
|
6392
|
+
}
|
|
6361
6393
|
const market = this.market(symbol);
|
|
6362
6394
|
const marketId = market['id'];
|
|
6363
6395
|
const parts = marketId.split('_');
|
|
@@ -6468,7 +6500,7 @@ class bitget extends bitget$1 {
|
|
|
6468
6500
|
* @param {object} [params] exchange specific parameters for the bitget api endpoint
|
|
6469
6501
|
* @param {int} [params.until] timestamp in ms of the latest liquidation
|
|
6470
6502
|
* @param {string} [params.marginMode] 'cross' or 'isolated' default value is 'cross'
|
|
6471
|
-
* @returns {object} an array of [liquidation structures]{@link https://
|
|
6503
|
+
* @returns {object} an array of [liquidation structures]{@link https://docs.ccxt.com/#/?id=liquidation-structure}
|
|
6472
6504
|
*/
|
|
6473
6505
|
await this.loadMarkets();
|
|
6474
6506
|
let market = undefined;
|
|
@@ -6495,7 +6527,9 @@ class bitget extends bitget$1 {
|
|
|
6495
6527
|
let marginMode = undefined;
|
|
6496
6528
|
[marginMode, params] = this.handleMarginModeAndParams('fetchMyLiquidations', params, 'cross');
|
|
6497
6529
|
if (marginMode === 'isolated') {
|
|
6498
|
-
|
|
6530
|
+
if (symbol === undefined) {
|
|
6531
|
+
throw new errors.ArgumentsRequired(this.id + ' fetchMyLiquidations() requires a symbol argument');
|
|
6532
|
+
}
|
|
6499
6533
|
request['symbol'] = market['info']['symbolName'];
|
|
6500
6534
|
response = await this.privateMarginGetMarginV1IsolatedLiquidationList(this.extend(request, params));
|
|
6501
6535
|
}
|
|
@@ -6602,41 +6636,23 @@ class bitget extends bitget$1 {
|
|
|
6602
6636
|
'datetime': this.iso8601(timestamp),
|
|
6603
6637
|
});
|
|
6604
6638
|
}
|
|
6605
|
-
async
|
|
6639
|
+
async fetchIsolatedBorrowRate(symbol, params = {}) {
|
|
6606
6640
|
/**
|
|
6607
6641
|
* @method
|
|
6608
|
-
* @name bitget#
|
|
6642
|
+
* @name bitget#fetchIsolatedBorrowRate
|
|
6609
6643
|
* @description fetch the rate of interest to borrow a currency for margin trading
|
|
6610
6644
|
* @see https://bitgetlimited.github.io/apidoc/en/margin/#get-isolated-margin-interest-rate-and-max-borrowable-amount
|
|
6611
|
-
* @
|
|
6612
|
-
* @param {string} code unified currency code
|
|
6645
|
+
* @param {string} symbol unified market symbol
|
|
6613
6646
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
6614
6647
|
* @param {string} [params.symbol] required for isolated margin
|
|
6615
|
-
* @returns {object}
|
|
6648
|
+
* @returns {object} an [isolated borrow rate structure]{@link https://docs.ccxt.com/#/?id=isolated-borrow-rate-structure}
|
|
6616
6649
|
*/
|
|
6617
6650
|
await this.loadMarkets();
|
|
6618
|
-
const
|
|
6619
|
-
|
|
6620
|
-
|
|
6621
|
-
|
|
6622
|
-
|
|
6623
|
-
market = this.market(symbol);
|
|
6624
|
-
}
|
|
6625
|
-
const request = {};
|
|
6626
|
-
let response = undefined;
|
|
6627
|
-
let marginMode = undefined;
|
|
6628
|
-
[marginMode, params] = this.handleMarginModeAndParams('fetchBorrowRate', params, 'cross');
|
|
6629
|
-
if ((symbol !== undefined) || (marginMode === 'isolated')) {
|
|
6630
|
-
this.checkRequiredSymbol('fetchBorrowRate', symbol);
|
|
6631
|
-
request['symbol'] = market['info']['symbolName'];
|
|
6632
|
-
response = await this.publicMarginGetMarginV1IsolatedPublicInterestRateAndLimit(this.extend(request, params));
|
|
6633
|
-
}
|
|
6634
|
-
else if (marginMode === 'cross') {
|
|
6635
|
-
request['coin'] = currency['code'];
|
|
6636
|
-
response = await this.publicMarginGetMarginV1CrossPublicInterestRateAndLimit(this.extend(request, params));
|
|
6637
|
-
}
|
|
6638
|
-
//
|
|
6639
|
-
// isolated
|
|
6651
|
+
const market = this.market(symbol);
|
|
6652
|
+
const request = {
|
|
6653
|
+
'symbol': market['info']['symbolName'],
|
|
6654
|
+
};
|
|
6655
|
+
const response = await this.publicMarginGetMarginV1IsolatedPublicInterestRateAndLimit(this.extend(request, params));
|
|
6640
6656
|
//
|
|
6641
6657
|
// {
|
|
6642
6658
|
// "code": "00000",
|
|
@@ -6678,42 +6694,13 @@ class bitget extends bitget$1 {
|
|
|
6678
6694
|
// ]
|
|
6679
6695
|
// }
|
|
6680
6696
|
//
|
|
6681
|
-
// cross
|
|
6682
|
-
//
|
|
6683
|
-
// {
|
|
6684
|
-
// "code": "00000",
|
|
6685
|
-
// "msg": "success",
|
|
6686
|
-
// "requestTime": 1698208150986,
|
|
6687
|
-
// "data": [
|
|
6688
|
-
// {
|
|
6689
|
-
// "coin": "BTC",
|
|
6690
|
-
// "leverage": "3",
|
|
6691
|
-
// "transferInAble": true,
|
|
6692
|
-
// "borrowAble": true,
|
|
6693
|
-
// "dailyInterestRate": "0.00007",
|
|
6694
|
-
// "yearlyInterestRate": "0.02555",
|
|
6695
|
-
// "maxBorrowableAmount": "26",
|
|
6696
|
-
// "vips": [
|
|
6697
|
-
// {
|
|
6698
|
-
// "level": "0",
|
|
6699
|
-
// "dailyInterestRate": "0.00007",
|
|
6700
|
-
// "yearlyInterestRate": "0.02555",
|
|
6701
|
-
// "discountRate": "1"
|
|
6702
|
-
// },
|
|
6703
|
-
// ]
|
|
6704
|
-
// }
|
|
6705
|
-
// ]
|
|
6706
|
-
// }
|
|
6707
|
-
//
|
|
6708
6697
|
const timestamp = this.safeInteger(response, 'requestTime');
|
|
6709
6698
|
const data = this.safeValue(response, 'data', []);
|
|
6710
6699
|
const first = this.safeValue(data, 0, {});
|
|
6711
6700
|
first['timestamp'] = timestamp;
|
|
6712
|
-
return this.
|
|
6701
|
+
return this.parseIsolatedBorrowRate(first, market);
|
|
6713
6702
|
}
|
|
6714
|
-
|
|
6715
|
-
//
|
|
6716
|
-
// isolated
|
|
6703
|
+
parseIsolatedBorrowRate(info, market = undefined) {
|
|
6717
6704
|
//
|
|
6718
6705
|
// {
|
|
6719
6706
|
// "symbol": "BTCUSDT",
|
|
@@ -6748,7 +6735,73 @@ class bitget extends bitget$1 {
|
|
|
6748
6735
|
// ]
|
|
6749
6736
|
// }
|
|
6750
6737
|
//
|
|
6751
|
-
|
|
6738
|
+
const marketId = this.safeString(info, 'symbol');
|
|
6739
|
+
const symbol = this.safeSymbol(marketId, market);
|
|
6740
|
+
const baseId = this.safeString(info, 'baseCoin');
|
|
6741
|
+
const quoteId = this.safeString(info, 'quoteCoin');
|
|
6742
|
+
const timestamp = this.safeInteger(info, 'timestamp');
|
|
6743
|
+
return {
|
|
6744
|
+
'symbol': symbol,
|
|
6745
|
+
'base': this.safeCurrencyCode(baseId),
|
|
6746
|
+
'baseRate': this.safeNumber(info, 'baseDailyInterestRate'),
|
|
6747
|
+
'quote': this.safeCurrencyCode(quoteId),
|
|
6748
|
+
'quoteRate': this.safeNumber(info, 'quoteDailyInterestRate'),
|
|
6749
|
+
'period': 86400000,
|
|
6750
|
+
'timestamp': timestamp,
|
|
6751
|
+
'datetime': this.iso8601(timestamp),
|
|
6752
|
+
'info': info,
|
|
6753
|
+
};
|
|
6754
|
+
}
|
|
6755
|
+
async fetchCrossBorrowRate(code, params = {}) {
|
|
6756
|
+
/**
|
|
6757
|
+
* @method
|
|
6758
|
+
* @name bitget#fetchCrossBorrowRate
|
|
6759
|
+
* @description fetch the rate of interest to borrow a currency for margin trading
|
|
6760
|
+
* @see https://bitgetlimited.github.io/apidoc/en/margin/#get-cross-margin-interest-rate-and-borrowable
|
|
6761
|
+
* @param {string} code unified currency code
|
|
6762
|
+
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
6763
|
+
* @param {string} [params.symbol] required for isolated margin
|
|
6764
|
+
* @returns {object} a [borrow rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure}
|
|
6765
|
+
*/
|
|
6766
|
+
await this.loadMarkets();
|
|
6767
|
+
const currency = this.currency(code);
|
|
6768
|
+
const request = {
|
|
6769
|
+
'coin': currency['code'],
|
|
6770
|
+
};
|
|
6771
|
+
const response = await this.publicMarginGetMarginV1CrossPublicInterestRateAndLimit(this.extend(request, params));
|
|
6772
|
+
//
|
|
6773
|
+
// {
|
|
6774
|
+
// "code": "00000",
|
|
6775
|
+
// "msg": "success",
|
|
6776
|
+
// "requestTime": 1698208150986,
|
|
6777
|
+
// "data": [
|
|
6778
|
+
// {
|
|
6779
|
+
// "coin": "BTC",
|
|
6780
|
+
// "leverage": "3",
|
|
6781
|
+
// "transferInAble": true,
|
|
6782
|
+
// "borrowAble": true,
|
|
6783
|
+
// "dailyInterestRate": "0.00007",
|
|
6784
|
+
// "yearlyInterestRate": "0.02555",
|
|
6785
|
+
// "maxBorrowableAmount": "26",
|
|
6786
|
+
// "vips": [
|
|
6787
|
+
// {
|
|
6788
|
+
// "level": "0",
|
|
6789
|
+
// "dailyInterestRate": "0.00007",
|
|
6790
|
+
// "yearlyInterestRate": "0.02555",
|
|
6791
|
+
// "discountRate": "1"
|
|
6792
|
+
// },
|
|
6793
|
+
// ]
|
|
6794
|
+
// }
|
|
6795
|
+
// ]
|
|
6796
|
+
// }
|
|
6797
|
+
//
|
|
6798
|
+
const timestamp = this.safeInteger(response, 'requestTime');
|
|
6799
|
+
const data = this.safeValue(response, 'data', []);
|
|
6800
|
+
const first = this.safeValue(data, 0, {});
|
|
6801
|
+
first['timestamp'] = timestamp;
|
|
6802
|
+
return this.parseBorrowRate(first, currency);
|
|
6803
|
+
}
|
|
6804
|
+
parseBorrowRate(info, currency = undefined) {
|
|
6752
6805
|
//
|
|
6753
6806
|
// {
|
|
6754
6807
|
// "coin": "BTC",
|
|
@@ -6768,29 +6821,11 @@ class bitget extends bitget$1 {
|
|
|
6768
6821
|
// ]
|
|
6769
6822
|
// }
|
|
6770
6823
|
//
|
|
6771
|
-
const
|
|
6772
|
-
const baseCoin = this.safeString(info, 'baseCoin');
|
|
6773
|
-
const quoteCoin = this.safeString(info, 'quoteCoin');
|
|
6774
|
-
let currencyId = undefined;
|
|
6775
|
-
let interestRate = undefined;
|
|
6776
|
-
if (baseCoin !== undefined) {
|
|
6777
|
-
if (code === baseCoin) {
|
|
6778
|
-
currencyId = baseCoin;
|
|
6779
|
-
interestRate = this.safeNumber(info, 'baseDailyInterestRate');
|
|
6780
|
-
}
|
|
6781
|
-
else if (code === quoteCoin) {
|
|
6782
|
-
currencyId = quoteCoin;
|
|
6783
|
-
interestRate = this.safeNumber(info, 'quoteDailyInterestRate');
|
|
6784
|
-
}
|
|
6785
|
-
}
|
|
6786
|
-
else {
|
|
6787
|
-
currencyId = this.safeString(info, 'coin');
|
|
6788
|
-
interestRate = this.safeNumber(info, 'dailyInterestRate');
|
|
6789
|
-
}
|
|
6824
|
+
const currencyId = this.safeString(info, 'coin');
|
|
6790
6825
|
const timestamp = this.safeInteger(info, 'timestamp');
|
|
6791
6826
|
return {
|
|
6792
6827
|
'currency': this.safeCurrencyCode(currencyId, currency),
|
|
6793
|
-
'rate':
|
|
6828
|
+
'rate': this.safeNumber(info, 'dailyInterestRate'),
|
|
6794
6829
|
'period': 86400000,
|
|
6795
6830
|
'timestamp': timestamp,
|
|
6796
6831
|
'datetime': this.iso8601(timestamp),
|
|
@@ -6809,7 +6844,7 @@ class bitget extends bitget$1 {
|
|
|
6809
6844
|
* @param {int} [since] the earliest time in ms to fetch borrow interest for
|
|
6810
6845
|
* @param {int} [limit] the maximum number of structures to retrieve
|
|
6811
6846
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
6812
|
-
* @returns {object[]} a list of [borrow interest structures]{@link https://
|
|
6847
|
+
* @returns {object[]} a list of [borrow interest structures]{@link https://docs.ccxt.com/#/?id=borrow-interest-structure}
|
|
6813
6848
|
*/
|
|
6814
6849
|
await this.loadMarkets();
|
|
6815
6850
|
let market = undefined;
|
|
@@ -6835,7 +6870,9 @@ class bitget extends bitget$1 {
|
|
|
6835
6870
|
let marginMode = undefined;
|
|
6836
6871
|
[marginMode, params] = this.handleMarginModeAndParams('fetchBorrowInterest', params, 'cross');
|
|
6837
6872
|
if (marginMode === 'isolated') {
|
|
6838
|
-
|
|
6873
|
+
if (symbol === undefined) {
|
|
6874
|
+
throw new errors.ArgumentsRequired(this.id + ' fetchBorrowInterest() requires a symbol argument');
|
|
6875
|
+
}
|
|
6839
6876
|
request['symbol'] = market['info']['symbolName'];
|
|
6840
6877
|
response = await this.privateMarginGetMarginV1IsolatedInterestList(this.extend(request, params));
|
|
6841
6878
|
}
|