ccxt 4.1.56 → 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/README.md +3 -3
- package/build.sh +30 -18
- package/dist/ccxt.browser.js +3872 -3202
- package/dist/ccxt.browser.min.js +10 -10
- 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 +16 -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 +106 -85
- 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 +100 -77
- 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 +132 -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 +87 -82
- package/dist/cjs/src/p2b.js +79 -82
- 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/bybit.d.ts +1 -0
- package/js/src/abstract/cryptocom.d.ts +0 -20
- 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 +16 -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 +106 -85
- 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 +100 -77
- 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 +132 -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 +87 -82
- package/js/src/p2b.d.ts +8 -7
- package/js/src/p2b.js +79 -81
- 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 +1 -1
package/js/src/whitebit.js
CHANGED
|
@@ -41,11 +41,11 @@ export default class whitebit extends Exchange {
|
|
|
41
41
|
'createStopOrder': true,
|
|
42
42
|
'editOrder': false,
|
|
43
43
|
'fetchBalance': true,
|
|
44
|
-
'fetchBorrowRate': false,
|
|
45
44
|
'fetchBorrowRateHistories': false,
|
|
46
45
|
'fetchBorrowRateHistory': false,
|
|
47
|
-
'fetchBorrowRates': false,
|
|
48
46
|
'fetchClosedOrders': true,
|
|
47
|
+
'fetchCrossBorrowRate': false,
|
|
48
|
+
'fetchCrossBorrowRates': false,
|
|
49
49
|
'fetchCurrencies': true,
|
|
50
50
|
'fetchDeposit': true,
|
|
51
51
|
'fetchDepositAddress': true,
|
|
@@ -57,6 +57,8 @@ export default class whitebit extends Exchange {
|
|
|
57
57
|
'fetchFundingRateHistory': false,
|
|
58
58
|
'fetchFundingRates': true,
|
|
59
59
|
'fetchIndexOHLCV': false,
|
|
60
|
+
'fetchIsolatedBorrowRate': false,
|
|
61
|
+
'fetchIsolatedBorrowRates': false,
|
|
60
62
|
'fetchMarginMode': false,
|
|
61
63
|
'fetchMarkets': true,
|
|
62
64
|
'fetchMarkOHLCV': false,
|
|
@@ -457,7 +459,7 @@ export default class whitebit extends Exchange {
|
|
|
457
459
|
* @description please use fetchDepositWithdrawFees instead
|
|
458
460
|
* @param {string[]|undefined} codes not used by fetchTransactionFees ()
|
|
459
461
|
* @param {object} [params] extra parameters specific to the whitebit api endpoint
|
|
460
|
-
* @returns {object} a list of [fee structures]{@link https://
|
|
462
|
+
* @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
461
463
|
*/
|
|
462
464
|
await this.loadMarkets();
|
|
463
465
|
const response = await this.v4PublicGetFee(params);
|
|
@@ -511,7 +513,7 @@ export default class whitebit extends Exchange {
|
|
|
511
513
|
* @description fetch deposit and withdraw fees
|
|
512
514
|
* @param {string[]|undefined} codes not used by fetchDepositWithdrawFees ()
|
|
513
515
|
* @param {object} [params] extra parameters specific to the whitebit api endpoint
|
|
514
|
-
* @returns {object} a list of [fee structures]{@link https://
|
|
516
|
+
* @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
515
517
|
*/
|
|
516
518
|
await this.loadMarkets();
|
|
517
519
|
const response = await this.v4PublicGetFee(params);
|
|
@@ -659,7 +661,7 @@ export default class whitebit extends Exchange {
|
|
|
659
661
|
* @name whitebit#fetchTradingFees
|
|
660
662
|
* @description fetch the trading fees for multiple markets
|
|
661
663
|
* @param {object} [params] extra parameters specific to the whitebit api endpoint
|
|
662
|
-
* @returns {object} a dictionary of [fee structures]{@link https://
|
|
664
|
+
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
663
665
|
*/
|
|
664
666
|
await this.loadMarkets();
|
|
665
667
|
const response = await this.v4PublicGetAssets(params);
|
|
@@ -707,7 +709,7 @@ export default class whitebit extends Exchange {
|
|
|
707
709
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
708
710
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
709
711
|
* @param {object} [params] extra parameters specific to the whitebit api endpoint
|
|
710
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
712
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
711
713
|
*/
|
|
712
714
|
await this.loadMarkets();
|
|
713
715
|
const market = this.market(symbol);
|
|
@@ -795,7 +797,7 @@ export default class whitebit extends Exchange {
|
|
|
795
797
|
* @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
|
|
796
798
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
797
799
|
* @param {object} [params] extra parameters specific to the whitebit api endpoint
|
|
798
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
800
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
799
801
|
*/
|
|
800
802
|
await this.loadMarkets();
|
|
801
803
|
symbols = this.marketSymbols(symbols);
|
|
@@ -831,7 +833,7 @@ export default class whitebit extends Exchange {
|
|
|
831
833
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
832
834
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
833
835
|
* @param {object} [params] extra parameters specific to the whitebit api endpoint
|
|
834
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
836
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
835
837
|
*/
|
|
836
838
|
await this.loadMarkets();
|
|
837
839
|
const market = this.market(symbol);
|
|
@@ -873,7 +875,7 @@ export default class whitebit extends Exchange {
|
|
|
873
875
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
874
876
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
875
877
|
* @param {object} [params] extra parameters specific to the whitebit api endpoint
|
|
876
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
878
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
877
879
|
*/
|
|
878
880
|
await this.loadMarkets();
|
|
879
881
|
const market = this.market(symbol);
|
|
@@ -904,7 +906,7 @@ export default class whitebit extends Exchange {
|
|
|
904
906
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
905
907
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
906
908
|
* @param {object} [params] extra parameters specific to the whitebit api endpoint
|
|
907
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
909
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
908
910
|
*/
|
|
909
911
|
await this.loadMarkets();
|
|
910
912
|
let market = undefined;
|
|
@@ -1120,7 +1122,7 @@ export default class whitebit extends Exchange {
|
|
|
1120
1122
|
* @name whitebit#fetchStatus
|
|
1121
1123
|
* @description the latest known information on the availability of the exchange API
|
|
1122
1124
|
* @param {object} [params] extra parameters specific to the whitebit api endpoint
|
|
1123
|
-
* @returns {object} a [status structure]{@link https://
|
|
1125
|
+
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
1124
1126
|
*/
|
|
1125
1127
|
const response = await this.v4PublicGetPing(params);
|
|
1126
1128
|
//
|
|
@@ -1164,7 +1166,7 @@ export default class whitebit extends Exchange {
|
|
|
1164
1166
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1165
1167
|
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1166
1168
|
* @param {object} [params] extra parameters specific to the whitebit api endpoint
|
|
1167
|
-
* @returns {object} an [order structure]{@link https://
|
|
1169
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1168
1170
|
*/
|
|
1169
1171
|
await this.loadMarkets();
|
|
1170
1172
|
const market = this.market(symbol);
|
|
@@ -1243,9 +1245,11 @@ export default class whitebit extends Exchange {
|
|
|
1243
1245
|
* @param {string} id order id
|
|
1244
1246
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
1245
1247
|
* @param {object} [params] extra parameters specific to the whitebit api endpoint
|
|
1246
|
-
* @returns {object} An [order structure]{@link https://
|
|
1248
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1247
1249
|
*/
|
|
1248
|
-
|
|
1250
|
+
if (symbol === undefined) {
|
|
1251
|
+
throw new ArgumentsRequired(this.id + ' cancelOrder() requires a symbol argument');
|
|
1252
|
+
}
|
|
1249
1253
|
await this.loadMarkets();
|
|
1250
1254
|
const market = this.market(symbol);
|
|
1251
1255
|
const request = {
|
|
@@ -1282,7 +1286,7 @@ export default class whitebit extends Exchange {
|
|
|
1282
1286
|
* @name whitebit#fetchBalance
|
|
1283
1287
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
1284
1288
|
* @param {object} [params] extra parameters specific to the whitebit api endpoint
|
|
1285
|
-
* @returns {object} a [balance structure]{@link https://
|
|
1289
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
1286
1290
|
*/
|
|
1287
1291
|
await this.loadMarkets();
|
|
1288
1292
|
const [marketType, query] = this.handleMarketTypeAndParams('fetchBalance', undefined, params);
|
|
@@ -1336,9 +1340,11 @@ export default class whitebit extends Exchange {
|
|
|
1336
1340
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1337
1341
|
* @param {int} [limit] the maximum number of open order structures to retrieve
|
|
1338
1342
|
* @param {object} [params] extra parameters specific to the whitebit api endpoint
|
|
1339
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1343
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1340
1344
|
*/
|
|
1341
|
-
|
|
1345
|
+
if (symbol === undefined) {
|
|
1346
|
+
throw new ArgumentsRequired(this.id + ' fetchOpenOrders() requires a symbol argument');
|
|
1347
|
+
}
|
|
1342
1348
|
await this.loadMarkets();
|
|
1343
1349
|
const market = this.market(symbol);
|
|
1344
1350
|
const request = {
|
|
@@ -1379,7 +1385,7 @@ export default class whitebit extends Exchange {
|
|
|
1379
1385
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1380
1386
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
1381
1387
|
* @param {object} [params] extra parameters specific to the whitebit api endpoint
|
|
1382
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1388
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1383
1389
|
*/
|
|
1384
1390
|
await this.loadMarkets();
|
|
1385
1391
|
const request = {};
|
|
@@ -1540,7 +1546,7 @@ export default class whitebit extends Exchange {
|
|
|
1540
1546
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1541
1547
|
* @param {int} [limit] the maximum number of trades to retrieve
|
|
1542
1548
|
* @param {object} [params] extra parameters specific to the whitebit api endpoint
|
|
1543
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
1549
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1544
1550
|
*/
|
|
1545
1551
|
await this.loadMarkets();
|
|
1546
1552
|
const request = {
|
|
@@ -1584,7 +1590,7 @@ export default class whitebit extends Exchange {
|
|
|
1584
1590
|
* @description fetch the deposit address for a currency associated with this account
|
|
1585
1591
|
* @param {string} code unified currency code
|
|
1586
1592
|
* @param {object} [params] extra parameters specific to the whitebit api endpoint
|
|
1587
|
-
* @returns {object} an [address structure]{@link https://
|
|
1593
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
1588
1594
|
*/
|
|
1589
1595
|
await this.loadMarkets();
|
|
1590
1596
|
const currency = this.currency(code);
|
|
@@ -1685,7 +1691,7 @@ export default class whitebit extends Exchange {
|
|
|
1685
1691
|
* @param {string} fromAccount account to transfer from - main, spot, collateral
|
|
1686
1692
|
* @param {string} toAccount account to transfer to - main, spot, collateral
|
|
1687
1693
|
* @param {object} [params] extra parameters specific to the whitebit api endpoint
|
|
1688
|
-
* @returns {object} a [transfer structure]{@link https://
|
|
1694
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
1689
1695
|
*/
|
|
1690
1696
|
await this.loadMarkets();
|
|
1691
1697
|
const currency = this.currency(code);
|
|
@@ -1731,7 +1737,7 @@ export default class whitebit extends Exchange {
|
|
|
1731
1737
|
* @param {string} address the address to withdraw to
|
|
1732
1738
|
* @param {string} tag
|
|
1733
1739
|
* @param {object} [params] extra parameters specific to the whitebit api endpoint
|
|
1734
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
1740
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1735
1741
|
*/
|
|
1736
1742
|
await this.loadMarkets();
|
|
1737
1743
|
const currency = this.currency(code); // check if it has canDeposit
|
|
@@ -1855,7 +1861,7 @@ export default class whitebit extends Exchange {
|
|
|
1855
1861
|
* @param {string} id deposit id
|
|
1856
1862
|
* @param {string} code not used by whitebit fetchDeposit ()
|
|
1857
1863
|
* @param {object} [params] extra parameters specific to the whitebit api endpoint
|
|
1858
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
1864
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1859
1865
|
*/
|
|
1860
1866
|
await this.loadMarkets();
|
|
1861
1867
|
let currency = undefined;
|
|
@@ -1920,7 +1926,7 @@ export default class whitebit extends Exchange {
|
|
|
1920
1926
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
1921
1927
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
1922
1928
|
* @param {object} [params] extra parameters specific to the whitebit api endpoint
|
|
1923
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
1929
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1924
1930
|
*/
|
|
1925
1931
|
await this.loadMarkets();
|
|
1926
1932
|
let currency = undefined;
|
|
@@ -1988,7 +1994,7 @@ export default class whitebit extends Exchange {
|
|
|
1988
1994
|
* @param {int} [since] the earliest time in ms to fetch borrrow interest for
|
|
1989
1995
|
* @param {int} [limit] the maximum number of structures to retrieve
|
|
1990
1996
|
* @param {object} [params] extra parameters specific to the whitebit api endpoint
|
|
1991
|
-
* @returns {object[]} a list of [borrow interest structures]{@link https://
|
|
1997
|
+
* @returns {object[]} a list of [borrow interest structures]{@link https://docs.ccxt.com/#/?id=borrow-interest-structure}
|
|
1992
1998
|
*/
|
|
1993
1999
|
await this.loadMarkets();
|
|
1994
2000
|
const request = {};
|
|
@@ -2065,7 +2071,7 @@ export default class whitebit extends Exchange {
|
|
|
2065
2071
|
* @description fetch the current funding rate
|
|
2066
2072
|
* @param {string} symbol unified market symbol
|
|
2067
2073
|
* @param {object} [params] extra parameters specific to the whitebit api endpoint
|
|
2068
|
-
* @returns {object} a [funding rate structure]{@link https://
|
|
2074
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
2069
2075
|
*/
|
|
2070
2076
|
await this.loadMarkets();
|
|
2071
2077
|
symbol = this.symbol(symbol);
|
|
@@ -2080,7 +2086,7 @@ export default class whitebit extends Exchange {
|
|
|
2080
2086
|
* @description fetch the funding rate for multiple markets
|
|
2081
2087
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
2082
2088
|
* @param {object} [params] extra parameters specific to the whitebit api endpoint
|
|
2083
|
-
* @returns {object} a dictionary of [funding rates structures]{@link https://
|
|
2089
|
+
* @returns {object} a dictionary of [funding rates structures]{@link https://docs.ccxt.com/#/?id=funding-rates-structure}, indexe by market symbols
|
|
2084
2090
|
*/
|
|
2085
2091
|
await this.loadMarkets();
|
|
2086
2092
|
symbols = this.marketSymbols(symbols);
|
package/js/src/woo.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
// ---------------------------------------------------------------------------
|
|
8
8
|
import Exchange from './abstract/woo.js';
|
|
9
|
-
import { AuthenticationError, RateLimitExceeded, BadRequest, ExchangeError, InvalidOrder } from './base/errors.js';
|
|
9
|
+
import { AuthenticationError, RateLimitExceeded, BadRequest, ExchangeError, InvalidOrder, ArgumentsRequired } from './base/errors.js';
|
|
10
10
|
import { Precise } from './base/Precise.js';
|
|
11
11
|
import { TICK_SIZE } from './base/functions/number.js';
|
|
12
12
|
import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
|
|
@@ -338,9 +338,18 @@ export default class woo extends Exchange {
|
|
|
338
338
|
parseMarket(market) {
|
|
339
339
|
const marketId = this.safeString(market, 'symbol');
|
|
340
340
|
const parts = marketId.split('_');
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
341
|
+
const first = this.safeString(parts, 0);
|
|
342
|
+
let marketType;
|
|
343
|
+
let spot = false;
|
|
344
|
+
let swap = false;
|
|
345
|
+
if (first === 'SPOT') {
|
|
346
|
+
spot = true;
|
|
347
|
+
marketType = 'spot';
|
|
348
|
+
}
|
|
349
|
+
else if (first === 'PERP') {
|
|
350
|
+
swap = true;
|
|
351
|
+
marketType = 'swap';
|
|
352
|
+
}
|
|
344
353
|
const baseId = this.safeString(parts, 1);
|
|
345
354
|
const quoteId = this.safeString(parts, 2);
|
|
346
355
|
const base = this.safeCurrencyCode(baseId);
|
|
@@ -351,14 +360,13 @@ export default class woo extends Exchange {
|
|
|
351
360
|
let contractSize = undefined;
|
|
352
361
|
let linear = undefined;
|
|
353
362
|
let margin = true;
|
|
354
|
-
const contract =
|
|
363
|
+
const contract = swap;
|
|
355
364
|
if (contract) {
|
|
356
365
|
margin = false;
|
|
357
366
|
settleId = this.safeString(parts, 2);
|
|
358
367
|
settle = this.safeCurrencyCode(settleId);
|
|
359
368
|
symbol = base + '/' + quote + ':' + settle;
|
|
360
369
|
contractSize = this.parseNumber('1');
|
|
361
|
-
marketType = 'swap';
|
|
362
370
|
linear = true;
|
|
363
371
|
}
|
|
364
372
|
return {
|
|
@@ -371,9 +379,9 @@ export default class woo extends Exchange {
|
|
|
371
379
|
'quoteId': quoteId,
|
|
372
380
|
'settleId': settleId,
|
|
373
381
|
'type': marketType,
|
|
374
|
-
'spot':
|
|
382
|
+
'spot': spot,
|
|
375
383
|
'margin': margin,
|
|
376
|
-
'swap':
|
|
384
|
+
'swap': swap,
|
|
377
385
|
'future': false,
|
|
378
386
|
'option': false,
|
|
379
387
|
'active': undefined,
|
|
@@ -420,7 +428,7 @@ export default class woo extends Exchange {
|
|
|
420
428
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
421
429
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
422
430
|
* @param {object} [params] extra parameters specific to the woo api endpoint
|
|
423
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
431
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
424
432
|
*/
|
|
425
433
|
await this.loadMarkets();
|
|
426
434
|
const market = this.market(symbol);
|
|
@@ -544,7 +552,7 @@ export default class woo extends Exchange {
|
|
|
544
552
|
* @description fetch the trading fees for multiple markets
|
|
545
553
|
* @see https://docs.woo.org/#get-account-information-new
|
|
546
554
|
* @param {object} [params] extra parameters specific to the woo api endpoint
|
|
547
|
-
* @returns {object} a dictionary of [fee structures]{@link https://
|
|
555
|
+
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
548
556
|
*/
|
|
549
557
|
await this.loadMarkets();
|
|
550
558
|
const response = await this.v3PrivateGetAccountinfo(params);
|
|
@@ -748,7 +756,7 @@ export default class woo extends Exchange {
|
|
|
748
756
|
* @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered (perpetual swap markets only)
|
|
749
757
|
* @param {float} [params.stopLoss.triggerPrice] stop loss trigger price
|
|
750
758
|
* @param {float} [params.algoType] 'STOP'or 'TRAILING_STOP' or 'OCO' or 'CLOSE_POSITION'
|
|
751
|
-
* @returns {object} an [order structure]{@link https://
|
|
759
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
752
760
|
*/
|
|
753
761
|
const reduceOnly = this.safeValue2(params, 'reduceOnly', 'reduce_only');
|
|
754
762
|
const orderType = type.toUpperCase();
|
|
@@ -925,7 +933,7 @@ export default class woo extends Exchange {
|
|
|
925
933
|
* @param {float} [params.triggerPrice] The price a trigger order is triggered at
|
|
926
934
|
* @param {float} [params.stopLossPrice] price to trigger stop-loss orders
|
|
927
935
|
* @param {float} [params.takeProfitPrice] price to trigger take-profit orders
|
|
928
|
-
* @returns {object} an [order structure]{@link https://
|
|
936
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
929
937
|
*/
|
|
930
938
|
await this.loadMarkets();
|
|
931
939
|
const market = this.market(symbol);
|
|
@@ -994,12 +1002,12 @@ export default class woo extends Exchange {
|
|
|
994
1002
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
995
1003
|
* @param {object} [params] extra parameters specific to the woo api endpoint
|
|
996
1004
|
* @param {boolean} [params.stop] whether the order is a stop/algo order
|
|
997
|
-
* @returns {object} An [order structure]{@link https://
|
|
1005
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
998
1006
|
*/
|
|
999
1007
|
const stop = this.safeValue(params, 'stop', false);
|
|
1000
1008
|
params = this.omit(params, 'stop');
|
|
1001
|
-
if (!stop) {
|
|
1002
|
-
this.
|
|
1009
|
+
if (!stop && (symbol === undefined)) {
|
|
1010
|
+
throw new ArgumentsRequired(this.id + ' cancelOrder() requires a symbol argument');
|
|
1003
1011
|
}
|
|
1004
1012
|
await this.loadMarkets();
|
|
1005
1013
|
let market = undefined;
|
|
@@ -1050,7 +1058,7 @@ export default class woo extends Exchange {
|
|
|
1050
1058
|
* @param {string} symbol unified market symbol
|
|
1051
1059
|
* @param {object} [params] extra parameters specific to the woo api endpoint
|
|
1052
1060
|
* @param {boolean} [params.stop] whether the order is a stop/algo order
|
|
1053
|
-
* @returns {object} an list of [order structures]{@link https://
|
|
1061
|
+
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1054
1062
|
*/
|
|
1055
1063
|
await this.loadMarkets();
|
|
1056
1064
|
const stop = this.safeValue(params, 'stop');
|
|
@@ -1058,7 +1066,9 @@ export default class woo extends Exchange {
|
|
|
1058
1066
|
if (stop) {
|
|
1059
1067
|
return await this.v3PrivateDeleteAlgoOrdersPending(params);
|
|
1060
1068
|
}
|
|
1061
|
-
|
|
1069
|
+
if (symbol === undefined) {
|
|
1070
|
+
throw new ArgumentsRequired(this.id + ' cancelOrders() requires a symbol argument');
|
|
1071
|
+
}
|
|
1062
1072
|
const market = this.market(symbol);
|
|
1063
1073
|
const request = {
|
|
1064
1074
|
'symbol': market['id'],
|
|
@@ -1082,7 +1092,7 @@ export default class woo extends Exchange {
|
|
|
1082
1092
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
1083
1093
|
* @param {object} [params] extra parameters specific to the woo api endpoint
|
|
1084
1094
|
* @param {boolean} [params.stop] whether the order is a stop/algo order
|
|
1085
|
-
* @returns {object} An [order structure]{@link https://
|
|
1095
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1086
1096
|
*/
|
|
1087
1097
|
await this.loadMarkets();
|
|
1088
1098
|
const market = (symbol !== undefined) ? this.market(symbol) : undefined;
|
|
@@ -1155,7 +1165,7 @@ export default class woo extends Exchange {
|
|
|
1155
1165
|
* @param {boolean} [params.stop] whether the order is a stop/algo order
|
|
1156
1166
|
* @param {boolean} [params.isTriggered] whether the order has been triggered (false by default)
|
|
1157
1167
|
* @param {string} [params.side] 'buy' or 'sell'
|
|
1158
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1168
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1159
1169
|
*/
|
|
1160
1170
|
await this.loadMarkets();
|
|
1161
1171
|
const request = {};
|
|
@@ -1363,7 +1373,7 @@ export default class woo extends Exchange {
|
|
|
1363
1373
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1364
1374
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
1365
1375
|
* @param {object} [params] extra parameters specific to the woo api endpoint
|
|
1366
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
1376
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
1367
1377
|
*/
|
|
1368
1378
|
await this.loadMarkets();
|
|
1369
1379
|
const market = this.market(symbol);
|
|
@@ -1471,7 +1481,7 @@ export default class woo extends Exchange {
|
|
|
1471
1481
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1472
1482
|
* @param {int} [limit] the maximum number of trades to retrieve
|
|
1473
1483
|
* @param {object} [params] extra parameters specific to the woo api endpoint
|
|
1474
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
1484
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1475
1485
|
*/
|
|
1476
1486
|
await this.loadMarkets();
|
|
1477
1487
|
let market = undefined;
|
|
@@ -1512,7 +1522,7 @@ export default class woo extends Exchange {
|
|
|
1512
1522
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1513
1523
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
1514
1524
|
* @param {object} [params] extra parameters specific to the woo api endpoint
|
|
1515
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
1525
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1516
1526
|
*/
|
|
1517
1527
|
await this.loadMarkets();
|
|
1518
1528
|
const request = {};
|
|
@@ -1557,7 +1567,7 @@ export default class woo extends Exchange {
|
|
|
1557
1567
|
* @name woo#fetchAccounts
|
|
1558
1568
|
* @description fetch all the accounts associated with a profile
|
|
1559
1569
|
* @param {object} [params] extra parameters specific to the woo api endpoint
|
|
1560
|
-
* @returns {object} a dictionary of [account structures]{@link https://
|
|
1570
|
+
* @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
|
|
1561
1571
|
*/
|
|
1562
1572
|
const response = await this.v1PrivateGetSubAccountAssets(params);
|
|
1563
1573
|
//
|
|
@@ -1603,7 +1613,7 @@ export default class woo extends Exchange {
|
|
|
1603
1613
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
1604
1614
|
* @see https://docs.woo.org/#get-current-holding-get-balance-new
|
|
1605
1615
|
* @param {object} [params] extra parameters specific to the woo api endpoint
|
|
1606
|
-
* @returns {object} a [balance structure]{@link https://
|
|
1616
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
1607
1617
|
*/
|
|
1608
1618
|
await this.loadMarkets();
|
|
1609
1619
|
const response = await this.v3PrivateGetBalances(params);
|
|
@@ -1655,7 +1665,7 @@ export default class woo extends Exchange {
|
|
|
1655
1665
|
* @description fetch the deposit address for a currency associated with this account
|
|
1656
1666
|
* @param {string} code unified currency code
|
|
1657
1667
|
* @param {object} [params] extra parameters specific to the woo api endpoint
|
|
1658
|
-
* @returns {object} an [address structure]{@link https://
|
|
1668
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
1659
1669
|
*/
|
|
1660
1670
|
// this method is TODO because of networks unification
|
|
1661
1671
|
await this.loadMarkets();
|
|
@@ -1749,7 +1759,7 @@ export default class woo extends Exchange {
|
|
|
1749
1759
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
1750
1760
|
* @param {int} [limit] max number of ledger entrys to return, default is undefined
|
|
1751
1761
|
* @param {object} [params] extra parameters specific to the woo api endpoint
|
|
1752
|
-
* @returns {object} a [ledger structure]{@link https://
|
|
1762
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
1753
1763
|
*/
|
|
1754
1764
|
const [currency, rows] = await this.getAssetHistoryRows(code, since, limit, params);
|
|
1755
1765
|
return this.parseLedger(rows, currency, since, limit, params);
|
|
@@ -1813,7 +1823,7 @@ export default class woo extends Exchange {
|
|
|
1813
1823
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
1814
1824
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
1815
1825
|
* @param {object} [params] extra parameters specific to the woo api endpoint
|
|
1816
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
1826
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1817
1827
|
*/
|
|
1818
1828
|
const request = {
|
|
1819
1829
|
'token_side': 'DEPOSIT',
|
|
@@ -1829,7 +1839,7 @@ export default class woo extends Exchange {
|
|
|
1829
1839
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
1830
1840
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
1831
1841
|
* @param {object} [params] extra parameters specific to the woo api endpoint
|
|
1832
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
1842
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1833
1843
|
*/
|
|
1834
1844
|
const request = {
|
|
1835
1845
|
'token_side': 'WITHDRAW',
|
|
@@ -1845,7 +1855,7 @@ export default class woo extends Exchange {
|
|
|
1845
1855
|
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
1846
1856
|
* @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
|
|
1847
1857
|
* @param {object} [params] extra parameters specific to the woo api endpoint
|
|
1848
|
-
* @returns {object} a list of [transaction structure]{@link https://
|
|
1858
|
+
* @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1849
1859
|
*/
|
|
1850
1860
|
const request = {
|
|
1851
1861
|
'type': 'BALANCE',
|
|
@@ -1920,7 +1930,7 @@ export default class woo extends Exchange {
|
|
|
1920
1930
|
* @param {string} fromAccount account to transfer from
|
|
1921
1931
|
* @param {string} toAccount account to transfer to
|
|
1922
1932
|
* @param {object} [params] extra parameters specific to the woo api endpoint
|
|
1923
|
-
* @returns {object} a [transfer structure]{@link https://
|
|
1933
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
1924
1934
|
*/
|
|
1925
1935
|
await this.loadMarkets();
|
|
1926
1936
|
const currency = this.currency(code);
|
|
@@ -1956,7 +1966,7 @@ export default class woo extends Exchange {
|
|
|
1956
1966
|
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
1957
1967
|
* @param {int} [limit] the maximum number of transfers structures to retrieve
|
|
1958
1968
|
* @param {object} [params] extra parameters specific to the woo api endpoint
|
|
1959
|
-
* @returns {object[]} a list of [transfer structures]{@link https://
|
|
1969
|
+
* @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
1960
1970
|
*/
|
|
1961
1971
|
const request = {
|
|
1962
1972
|
'type': 'COLLATERAL',
|
|
@@ -2047,7 +2057,7 @@ export default class woo extends Exchange {
|
|
|
2047
2057
|
* @param {string} address the address to withdraw to
|
|
2048
2058
|
* @param {string} tag
|
|
2049
2059
|
* @param {object} [params] extra parameters specific to the woo api endpoint
|
|
2050
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
2060
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2051
2061
|
*/
|
|
2052
2062
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
2053
2063
|
await this.loadMarkets();
|
|
@@ -2089,7 +2099,7 @@ export default class woo extends Exchange {
|
|
|
2089
2099
|
* @param {float} amount the amount to repay
|
|
2090
2100
|
* @param {string} symbol not used by woo.repayMargin ()
|
|
2091
2101
|
* @param {object} [params] extra parameters specific to the woo api endpoint
|
|
2092
|
-
* @returns {object} a [margin loan structure]{@link https://
|
|
2102
|
+
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
2093
2103
|
*/
|
|
2094
2104
|
await this.loadMarkets();
|
|
2095
2105
|
let market = undefined;
|
|
@@ -2377,11 +2387,11 @@ export default class woo extends Exchange {
|
|
|
2377
2387
|
* @see https://docs.woo.org/#get-funding-rate-history-for-one-market-public
|
|
2378
2388
|
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
2379
2389
|
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
2380
|
-
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://
|
|
2390
|
+
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
|
|
2381
2391
|
* @param {object} [params] extra parameters specific to the woo api endpoint
|
|
2382
2392
|
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
2383
2393
|
* @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)
|
|
2384
|
-
* @returns {object[]} a list of [funding rate structures]{@link https://
|
|
2394
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
2385
2395
|
*/
|
|
2386
2396
|
await this.loadMarkets();
|
|
2387
2397
|
let paginate = false;
|