ccxt 4.1.56 → 4.1.58
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 +3893 -3214
- 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/base/ws/Client.js +1 -1
- 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 +110 -89
- 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 +15 -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/base/ws/Client.js +1 -1
- 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 +110 -89
- 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 +15 -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/dist/cjs/src/bitbns.js
CHANGED
|
@@ -156,7 +156,7 @@ class bitbns extends bitbns$1 {
|
|
|
156
156
|
* @name bitbns#fetchStatus
|
|
157
157
|
* @description the latest known information on the availability of the exchange API
|
|
158
158
|
* @param {object} [params] extra parameters specific to the bitbns api endpoint
|
|
159
|
-
* @returns {object} a [status structure]{@link https://
|
|
159
|
+
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
160
160
|
*/
|
|
161
161
|
const response = await this.v1GetPlatformStatus(params);
|
|
162
162
|
//
|
|
@@ -289,7 +289,7 @@ class bitbns extends bitbns$1 {
|
|
|
289
289
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
290
290
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
291
291
|
* @param {object} [params] extra parameters specific to the bitbns api endpoint
|
|
292
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
292
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
293
293
|
*/
|
|
294
294
|
await this.loadMarkets();
|
|
295
295
|
const market = this.market(symbol);
|
|
@@ -385,7 +385,7 @@ class bitbns extends bitbns$1 {
|
|
|
385
385
|
* @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
|
|
386
386
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
387
387
|
* @param {object} [params] extra parameters specific to the bitbns api endpoint
|
|
388
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
388
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
389
389
|
*/
|
|
390
390
|
await this.loadMarkets();
|
|
391
391
|
const response = await this.wwwGetOrderFetchTickers(params);
|
|
@@ -457,7 +457,7 @@ class bitbns extends bitbns$1 {
|
|
|
457
457
|
* @name bitbns#fetchBalance
|
|
458
458
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
459
459
|
* @param {object} [params] extra parameters specific to the bitbns api endpoint
|
|
460
|
-
* @returns {object} a [balance structure]{@link https://
|
|
460
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
461
461
|
*/
|
|
462
462
|
await this.loadMarkets();
|
|
463
463
|
const response = await this.v1PostCurrentCoinBalanceEVERYTHING(params);
|
|
@@ -593,7 +593,7 @@ class bitbns extends bitbns$1 {
|
|
|
593
593
|
* EXCHANGE SPECIFIC PARAMETERS
|
|
594
594
|
* @param {float} [params.target_rate] *requires params.trail_rate when set, type must be 'limit'* a bracket order is placed when set
|
|
595
595
|
* @param {float} [params.trail_rate] *requires params.target_rate when set, type must be 'limit'* a bracket order is placed when set
|
|
596
|
-
* @returns {object} an [order structure]{@link https://
|
|
596
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
597
597
|
*/
|
|
598
598
|
await this.loadMarkets();
|
|
599
599
|
const market = this.market(symbol);
|
|
@@ -649,9 +649,11 @@ class bitbns extends bitbns$1 {
|
|
|
649
649
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
650
650
|
* @param {object} [params] extra parameters specific to the bitbns api endpoint
|
|
651
651
|
* @param {boolean} [params.trigger] true if cancelling a trigger order
|
|
652
|
-
* @returns {object} An [order structure]{@link https://
|
|
652
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
653
653
|
*/
|
|
654
|
-
|
|
654
|
+
if (symbol === undefined) {
|
|
655
|
+
throw new errors.ArgumentsRequired(this.id + ' cancelOrder() requires a symbol argument');
|
|
656
|
+
}
|
|
655
657
|
await this.loadMarkets();
|
|
656
658
|
const market = this.market(symbol);
|
|
657
659
|
const isTrigger = this.safeValue2(params, 'trigger', 'stop');
|
|
@@ -677,9 +679,11 @@ class bitbns extends bitbns$1 {
|
|
|
677
679
|
* @param {string} id order id
|
|
678
680
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
679
681
|
* @param {object} [params] extra parameters specific to the bitbns api endpoint
|
|
680
|
-
* @returns {object} An [order structure]{@link https://
|
|
682
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
681
683
|
*/
|
|
682
|
-
|
|
684
|
+
if (symbol === undefined) {
|
|
685
|
+
throw new errors.ArgumentsRequired(this.id + ' fetchOrder() requires a symbol argument');
|
|
686
|
+
}
|
|
683
687
|
await this.loadMarkets();
|
|
684
688
|
const market = this.market(symbol);
|
|
685
689
|
const request = {
|
|
@@ -732,9 +736,11 @@ class bitbns extends bitbns$1 {
|
|
|
732
736
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
733
737
|
* @param {object} [params] extra parameters specific to the bitbns api endpoint
|
|
734
738
|
* @param {boolean} [params.trigger] true if fetching trigger orders
|
|
735
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
739
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
736
740
|
*/
|
|
737
|
-
|
|
741
|
+
if (symbol === undefined) {
|
|
742
|
+
throw new errors.ArgumentsRequired(this.id + ' fetchOpenOrders() requires a symbol argument');
|
|
743
|
+
}
|
|
738
744
|
await this.loadMarkets();
|
|
739
745
|
const market = this.market(symbol);
|
|
740
746
|
const isTrigger = this.safeValue2(params, 'trigger', 'stop');
|
|
@@ -860,9 +866,11 @@ class bitbns extends bitbns$1 {
|
|
|
860
866
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
861
867
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
862
868
|
* @param {object} [params] extra parameters specific to the bitbns api endpoint
|
|
863
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
869
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
864
870
|
*/
|
|
865
|
-
|
|
871
|
+
if (symbol === undefined) {
|
|
872
|
+
throw new errors.ArgumentsRequired(this.id + ' fetchMyTrades() requires a symbol argument');
|
|
873
|
+
}
|
|
866
874
|
await this.loadMarkets();
|
|
867
875
|
const market = this.market(symbol);
|
|
868
876
|
const request = {
|
|
@@ -926,9 +934,11 @@ class bitbns extends bitbns$1 {
|
|
|
926
934
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
927
935
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
928
936
|
* @param {object} [params] extra parameters specific to the bitbns api endpoint
|
|
929
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
937
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
930
938
|
*/
|
|
931
|
-
|
|
939
|
+
if (symbol === undefined) {
|
|
940
|
+
throw new errors.ArgumentsRequired(this.id + ' fetchTrades() requires a symbol argument');
|
|
941
|
+
}
|
|
932
942
|
await this.loadMarkets();
|
|
933
943
|
const market = this.market(symbol);
|
|
934
944
|
const request = {
|
|
@@ -954,7 +964,7 @@ class bitbns extends bitbns$1 {
|
|
|
954
964
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
955
965
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
956
966
|
* @param {object} [params] extra parameters specific to the bitbns api endpoint
|
|
957
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
967
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
958
968
|
*/
|
|
959
969
|
if (code === undefined) {
|
|
960
970
|
throw new errors.ArgumentsRequired(this.id + ' fetchDeposits() requires a currency code argument');
|
|
@@ -1001,7 +1011,7 @@ class bitbns extends bitbns$1 {
|
|
|
1001
1011
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
1002
1012
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
1003
1013
|
* @param {object} [params] extra parameters specific to the bitbns api endpoint
|
|
1004
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
1014
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1005
1015
|
*/
|
|
1006
1016
|
if (code === undefined) {
|
|
1007
1017
|
throw new errors.ArgumentsRequired(this.id + ' fetchWithdrawals() requires a currency code argument');
|
|
@@ -1113,7 +1123,7 @@ class bitbns extends bitbns$1 {
|
|
|
1113
1123
|
* @description fetch the deposit address for a currency associated with this account
|
|
1114
1124
|
* @param {string} code unified currency code
|
|
1115
1125
|
* @param {object} [params] extra parameters specific to the bitbns api endpoint
|
|
1116
|
-
* @returns {object} an [address structure]{@link https://
|
|
1126
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
1117
1127
|
*/
|
|
1118
1128
|
await this.loadMarkets();
|
|
1119
1129
|
const currency = this.currency(code);
|
package/dist/cjs/src/bitfinex.js
CHANGED
|
@@ -402,7 +402,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
402
402
|
* @see https://docs.bitfinex.com/v1/reference/rest-auth-fees
|
|
403
403
|
* @param {string[]|undefined} codes list of unified currency codes
|
|
404
404
|
* @param {object} [params] extra parameters specific to the bitfinex api endpoint
|
|
405
|
-
* @returns {object[]} a list of [fees structures]{@link https://
|
|
405
|
+
* @returns {object[]} a list of [fees structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
406
406
|
*/
|
|
407
407
|
await this.loadMarkets();
|
|
408
408
|
const result = {};
|
|
@@ -438,7 +438,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
438
438
|
* @see https://docs.bitfinex.com/v1/reference/rest-auth-fees
|
|
439
439
|
* @param {string[]|undefined} codes list of unified currency codes
|
|
440
440
|
* @param {object} [params] extra parameters specific to the bitfinex api endpoint
|
|
441
|
-
* @returns {object[]} a list of [fees structures]{@link https://
|
|
441
|
+
* @returns {object[]} a list of [fees structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
442
442
|
*/
|
|
443
443
|
await this.loadMarkets();
|
|
444
444
|
const response = await this.privatePostAccountFees(params);
|
|
@@ -476,7 +476,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
476
476
|
* @name bitfinex#fetchTradingFees
|
|
477
477
|
* @description fetch the trading fees for multiple markets
|
|
478
478
|
* @param {object} [params] extra parameters specific to the bitfinex api endpoint
|
|
479
|
-
* @returns {object} a dictionary of [fee structures]{@link https://
|
|
479
|
+
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
480
480
|
*/
|
|
481
481
|
await this.loadMarkets();
|
|
482
482
|
const response = await this.privatePostSummary(params);
|
|
@@ -682,7 +682,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
682
682
|
* @name bitfinex#fetchBalance
|
|
683
683
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
684
684
|
* @param {object} [params] extra parameters specific to the bitfinex api endpoint
|
|
685
|
-
* @returns {object} a [balance structure]{@link https://
|
|
685
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
686
686
|
*/
|
|
687
687
|
await this.loadMarkets();
|
|
688
688
|
const accountsByType = this.safeValue(this.options, 'accountsByType', {});
|
|
@@ -743,7 +743,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
743
743
|
* @param {string} fromAccount account to transfer from
|
|
744
744
|
* @param {string} toAccount account to transfer to
|
|
745
745
|
* @param {object} [params] extra parameters specific to the bitfinex api endpoint
|
|
746
|
-
* @returns {object} a [transfer structure]{@link https://
|
|
746
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
747
747
|
*/
|
|
748
748
|
// transferring between derivatives wallet and regular wallet is not documented in their API
|
|
749
749
|
// however we support it in CCXT (from just looking at web inspector)
|
|
@@ -827,7 +827,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
827
827
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
828
828
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
829
829
|
* @param {object} [params] extra parameters specific to the bitfinex api endpoint
|
|
830
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
830
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
831
831
|
*/
|
|
832
832
|
await this.loadMarkets();
|
|
833
833
|
const market = this.market(symbol);
|
|
@@ -848,7 +848,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
848
848
|
* @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
|
|
849
849
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
850
850
|
* @param {object} [params] extra parameters specific to the bitfinex api endpoint
|
|
851
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
851
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
852
852
|
*/
|
|
853
853
|
await this.loadMarkets();
|
|
854
854
|
symbols = this.marketSymbols(symbols);
|
|
@@ -868,7 +868,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
868
868
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
869
869
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
870
870
|
* @param {object} [params] extra parameters specific to the bitfinex api endpoint
|
|
871
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
871
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
872
872
|
*/
|
|
873
873
|
await this.loadMarkets();
|
|
874
874
|
const market = this.market(symbol);
|
|
@@ -986,7 +986,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
986
986
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
987
987
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
988
988
|
* @param {object} [params] extra parameters specific to the bitfinex api endpoint
|
|
989
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
989
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
990
990
|
*/
|
|
991
991
|
await this.loadMarkets();
|
|
992
992
|
const market = this.market(symbol);
|
|
@@ -1021,9 +1021,11 @@ class bitfinex extends bitfinex$1 {
|
|
|
1021
1021
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1022
1022
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
1023
1023
|
* @param {object} [params] extra parameters specific to the bitfinex api endpoint
|
|
1024
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
1024
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1025
1025
|
*/
|
|
1026
|
-
|
|
1026
|
+
if (symbol === undefined) {
|
|
1027
|
+
throw new errors.ArgumentsRequired(this.id + ' fetchMyTrades() requires a symbol argument');
|
|
1028
|
+
}
|
|
1027
1029
|
await this.loadMarkets();
|
|
1028
1030
|
const market = this.market(symbol);
|
|
1029
1031
|
const request = {
|
|
@@ -1049,7 +1051,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
1049
1051
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1050
1052
|
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1051
1053
|
* @param {object} [params] extra parameters specific to the bitfinex api endpoint
|
|
1052
|
-
* @returns {object} an [order structure]{@link https://
|
|
1054
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1053
1055
|
*/
|
|
1054
1056
|
await this.loadMarkets();
|
|
1055
1057
|
const market = this.market(symbol);
|
|
@@ -1113,7 +1115,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
1113
1115
|
* @param {string} id order id
|
|
1114
1116
|
* @param {string} symbol not used by bitfinex cancelOrder ()
|
|
1115
1117
|
* @param {object} [params] extra parameters specific to the bitfinex api endpoint
|
|
1116
|
-
* @returns {object} An [order structure]{@link https://
|
|
1118
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1117
1119
|
*/
|
|
1118
1120
|
await this.loadMarkets();
|
|
1119
1121
|
const request = {
|
|
@@ -1214,7 +1216,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
1214
1216
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1215
1217
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
1216
1218
|
* @param {object} [params] extra parameters specific to the bitfinex api endpoint
|
|
1217
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1219
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1218
1220
|
*/
|
|
1219
1221
|
await this.loadMarkets();
|
|
1220
1222
|
if (symbol !== undefined) {
|
|
@@ -1238,7 +1240,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
1238
1240
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1239
1241
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
1240
1242
|
* @param {object} [params] extra parameters specific to the bitfinex api endpoint
|
|
1241
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1243
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1242
1244
|
*/
|
|
1243
1245
|
await this.loadMarkets();
|
|
1244
1246
|
symbol = this.symbol(symbol);
|
|
@@ -1261,7 +1263,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
1261
1263
|
* @description fetches information on an order made by the user
|
|
1262
1264
|
* @param {string} symbol not used by bitfinex fetchOrder
|
|
1263
1265
|
* @param {object} [params] extra parameters specific to the bitfinex api endpoint
|
|
1264
|
-
* @returns {object} An [order structure]{@link https://
|
|
1266
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1265
1267
|
*/
|
|
1266
1268
|
await this.loadMarkets();
|
|
1267
1269
|
const request = {
|
|
@@ -1341,7 +1343,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
1341
1343
|
* @description create a currency deposit address
|
|
1342
1344
|
* @param {string} code unified currency code of the currency for the deposit address
|
|
1343
1345
|
* @param {object} [params] extra parameters specific to the bitfinex api endpoint
|
|
1344
|
-
* @returns {object} an [address structure]{@link https://
|
|
1346
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
1345
1347
|
*/
|
|
1346
1348
|
await this.loadMarkets();
|
|
1347
1349
|
const request = {
|
|
@@ -1356,7 +1358,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
1356
1358
|
* @description fetch the deposit address for a currency associated with this account
|
|
1357
1359
|
* @param {string} code unified currency code
|
|
1358
1360
|
* @param {object} [params] extra parameters specific to the bitfinex api endpoint
|
|
1359
|
-
* @returns {object} an [address structure]{@link https://
|
|
1361
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
1360
1362
|
*/
|
|
1361
1363
|
await this.loadMarkets();
|
|
1362
1364
|
// todo rewrite for https://api-pub.bitfinex.com//v2/conf/pub:map:tx:method
|
|
@@ -1391,7 +1393,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
1391
1393
|
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
1392
1394
|
* @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
|
|
1393
1395
|
* @param {object} [params] extra parameters specific to the bitfinex api endpoint
|
|
1394
|
-
* @returns {object} a list of [transaction structure]{@link https://
|
|
1396
|
+
* @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1395
1397
|
*/
|
|
1396
1398
|
await this.loadMarkets();
|
|
1397
1399
|
let currencyId = this.safeString(params, 'currency');
|
|
@@ -1528,7 +1530,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
1528
1530
|
* @param {string} address the address to withdraw to
|
|
1529
1531
|
* @param {string} tag
|
|
1530
1532
|
* @param {object} [params] extra parameters specific to the bitfinex api endpoint
|
|
1531
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
1533
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1532
1534
|
*/
|
|
1533
1535
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
1534
1536
|
this.checkAddress(address);
|
|
@@ -1575,7 +1577,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
1575
1577
|
* @description fetch all open positions
|
|
1576
1578
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
1577
1579
|
* @param {object} [params] extra parameters specific to the bitfinex api endpoint
|
|
1578
|
-
* @returns {object[]} a list of [position structure]{@link https://
|
|
1580
|
+
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
1579
1581
|
*/
|
|
1580
1582
|
await this.loadMarkets();
|
|
1581
1583
|
const response = await this.privatePostPositions(params);
|
|
@@ -434,7 +434,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
434
434
|
* @description the latest known information on the availability of the exchange API
|
|
435
435
|
* @see https://docs.bitfinex.com/reference/rest-public-platform-status
|
|
436
436
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
437
|
-
* @returns {object} a [status structure]{@link https://
|
|
437
|
+
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
438
438
|
*/
|
|
439
439
|
//
|
|
440
440
|
// [1] // operative
|
|
@@ -798,7 +798,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
798
798
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
799
799
|
* @see https://docs.bitfinex.com/reference/rest-auth-wallets
|
|
800
800
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
801
|
-
* @returns {object} a [balance structure]{@link https://
|
|
801
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
802
802
|
*/
|
|
803
803
|
// this api call does not return the 'used' amount - use the v1 version instead (which also returns zero balances)
|
|
804
804
|
// there is a difference between this and the v1 api, namely trading wallet is called margin in v2
|
|
@@ -843,7 +843,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
843
843
|
* @param {string} fromAccount account to transfer from
|
|
844
844
|
* @param {string} toAccount account to transfer to
|
|
845
845
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
846
|
-
* @returns {object} a [transfer structure]{@link https://
|
|
846
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
847
847
|
*/
|
|
848
848
|
// transferring between derivatives wallet and regular wallet is not documented in their API
|
|
849
849
|
// however we support it in CCXT (from just looking at web inspector)
|
|
@@ -987,7 +987,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
987
987
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
988
988
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
989
989
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
990
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
990
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
991
991
|
*/
|
|
992
992
|
await this.loadMarkets();
|
|
993
993
|
const precision = this.safeValue(this.options, 'precision', 'R0');
|
|
@@ -1099,7 +1099,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1099
1099
|
* @see https://docs.bitfinex.com/reference/rest-public-tickers
|
|
1100
1100
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1101
1101
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
1102
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
1102
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1103
1103
|
*/
|
|
1104
1104
|
await this.loadMarkets();
|
|
1105
1105
|
symbols = this.marketSymbols(symbols);
|
|
@@ -1169,7 +1169,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1169
1169
|
* @see https://docs.bitfinex.com/reference/rest-public-ticker
|
|
1170
1170
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1171
1171
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
1172
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
1172
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1173
1173
|
*/
|
|
1174
1174
|
await this.loadMarkets();
|
|
1175
1175
|
const market = this.market(symbol);
|
|
@@ -1274,7 +1274,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1274
1274
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
1275
1275
|
* @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)
|
|
1276
1276
|
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
1277
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
1277
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
1278
1278
|
*/
|
|
1279
1279
|
await this.loadMarkets();
|
|
1280
1280
|
let paginate = false;
|
|
@@ -1502,7 +1502,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1502
1502
|
* @param {string} [params.price_traling] The trailing price for a trailing stop order
|
|
1503
1503
|
* @param {string} [params.price_aux_limit] Order price for stop limit orders
|
|
1504
1504
|
* @param {string} [params.price_oco_stop] OCO stop price
|
|
1505
|
-
* @returns {object} an [order structure]{@link https://
|
|
1505
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1506
1506
|
*/
|
|
1507
1507
|
await this.loadMarkets();
|
|
1508
1508
|
const market = this.market(symbol);
|
|
@@ -1654,7 +1654,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1654
1654
|
* @see https://docs.bitfinex.com/reference/rest-auth-cancel-orders-multiple
|
|
1655
1655
|
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
1656
1656
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
1657
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
1657
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1658
1658
|
*/
|
|
1659
1659
|
const request = {
|
|
1660
1660
|
'all': 1,
|
|
@@ -1672,7 +1672,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1672
1672
|
* @param {string} id order id
|
|
1673
1673
|
* @param {string} symbol Not used by bitfinex2 cancelOrder ()
|
|
1674
1674
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
1675
|
-
* @returns {object} An [order structure]{@link https://
|
|
1675
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1676
1676
|
*/
|
|
1677
1677
|
const cid = this.safeValue2(params, 'cid', 'clientOrderId'); // client order id
|
|
1678
1678
|
let request = undefined;
|
|
@@ -1706,7 +1706,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1706
1706
|
* @param {string} id order id
|
|
1707
1707
|
* @param {string} symbol unified market symbol, default is undefined
|
|
1708
1708
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
1709
|
-
* @returns {object} an [order structure]{@link https://
|
|
1709
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1710
1710
|
*/
|
|
1711
1711
|
const request = {
|
|
1712
1712
|
'id': [parseInt(id)],
|
|
@@ -1728,7 +1728,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1728
1728
|
* @param {string} id order id
|
|
1729
1729
|
* @param {string} symbol unified market symbol, default is undefined
|
|
1730
1730
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
1731
|
-
* @returns {object} an [order structure]{@link https://
|
|
1731
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1732
1732
|
*/
|
|
1733
1733
|
const request = {
|
|
1734
1734
|
'id': [parseInt(id)],
|
|
@@ -1751,7 +1751,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1751
1751
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1752
1752
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
1753
1753
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
1754
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1754
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1755
1755
|
*/
|
|
1756
1756
|
await this.loadMarkets();
|
|
1757
1757
|
const request = {};
|
|
@@ -1818,7 +1818,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1818
1818
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
1819
1819
|
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
1820
1820
|
* @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)
|
|
1821
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1821
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1822
1822
|
*/
|
|
1823
1823
|
// returns the most recent closed or canceled orders up to circa two weeks ago
|
|
1824
1824
|
await this.loadMarkets();
|
|
@@ -1896,9 +1896,11 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1896
1896
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1897
1897
|
* @param {int} [limit] the maximum number of trades to retrieve
|
|
1898
1898
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
1899
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
1899
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1900
1900
|
*/
|
|
1901
|
-
|
|
1901
|
+
if (symbol === undefined) {
|
|
1902
|
+
throw new errors.ArgumentsRequired(this.id + ' fetchOrderTrades() requires a symbol argument');
|
|
1903
|
+
}
|
|
1902
1904
|
await this.loadMarkets();
|
|
1903
1905
|
const market = this.market(symbol);
|
|
1904
1906
|
const orderId = parseInt(id);
|
|
@@ -1921,7 +1923,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1921
1923
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1922
1924
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
1923
1925
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
1924
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
1926
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1925
1927
|
*/
|
|
1926
1928
|
await this.loadMarkets();
|
|
1927
1929
|
let market = undefined;
|
|
@@ -1953,7 +1955,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1953
1955
|
* @see https://docs.bitfinex.com/reference/rest-auth-deposit-address
|
|
1954
1956
|
* @param {string} code unified currency code of the currency for the deposit address
|
|
1955
1957
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
1956
|
-
* @returns {object} an [address structure]{@link https://
|
|
1958
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
1957
1959
|
*/
|
|
1958
1960
|
await this.loadMarkets();
|
|
1959
1961
|
const request = {
|
|
@@ -1969,7 +1971,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1969
1971
|
* @see https://docs.bitfinex.com/reference/rest-auth-deposit-address
|
|
1970
1972
|
* @param {string} code unified currency code
|
|
1971
1973
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
1972
|
-
* @returns {object} an [address structure]{@link https://
|
|
1974
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
1973
1975
|
*/
|
|
1974
1976
|
await this.loadMarkets();
|
|
1975
1977
|
const currency = this.currency(code);
|
|
@@ -2184,7 +2186,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
2184
2186
|
* @description fetch the trading fees for multiple markets
|
|
2185
2187
|
* @see https://docs.bitfinex.com/reference/rest-auth-summary
|
|
2186
2188
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
2187
|
-
* @returns {object} a dictionary of [fee structures]{@link https://
|
|
2189
|
+
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
2188
2190
|
*/
|
|
2189
2191
|
await this.loadMarkets();
|
|
2190
2192
|
const response = await this.privatePostAuthRSummary(params);
|
|
@@ -2302,7 +2304,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
2302
2304
|
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
2303
2305
|
* @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
|
|
2304
2306
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
2305
|
-
* @returns {object} a list of [transaction structure]{@link https://
|
|
2307
|
+
* @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2306
2308
|
*/
|
|
2307
2309
|
await this.loadMarkets();
|
|
2308
2310
|
let currency = undefined;
|
|
@@ -2363,7 +2365,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
2363
2365
|
* @param {string} address the address to withdraw to
|
|
2364
2366
|
* @param {string} tag
|
|
2365
2367
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
2366
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
2368
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2367
2369
|
*/
|
|
2368
2370
|
this.checkAddress(address);
|
|
2369
2371
|
await this.loadMarkets();
|
|
@@ -2450,7 +2452,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
2450
2452
|
* @see https://docs.bitfinex.com/reference/rest-auth-positions
|
|
2451
2453
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
2452
2454
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
2453
|
-
* @returns {object[]} a list of [position structure]{@link https://
|
|
2455
|
+
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
2454
2456
|
*/
|
|
2455
2457
|
await this.loadMarkets();
|
|
2456
2458
|
symbols = this.marketSymbols(symbols);
|
|
@@ -2707,7 +2709,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
2707
2709
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
2708
2710
|
* @param {int} [params.until] timestamp in ms of the latest ledger entry
|
|
2709
2711
|
* @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)
|
|
2710
|
-
* @returns {object} a [ledger structure]{@link https://
|
|
2712
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
2711
2713
|
*/
|
|
2712
2714
|
await this.loadMarkets();
|
|
2713
2715
|
await this.loadMarkets();
|
|
@@ -2759,7 +2761,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
2759
2761
|
* @see https://docs.bitfinex.com/reference/rest-public-derivatives-status
|
|
2760
2762
|
* @param {string} symbol unified market symbol
|
|
2761
2763
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
2762
|
-
* @returns {object} a [funding rate structure]{@link https://
|
|
2764
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
2763
2765
|
*/
|
|
2764
2766
|
return this.fetchFundingRates([symbol], params);
|
|
2765
2767
|
}
|
|
@@ -2771,7 +2773,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
2771
2773
|
* @see https://docs.bitfinex.com/reference/rest-public-derivatives-status
|
|
2772
2774
|
* @param {string[]} symbols list of unified market symbols
|
|
2773
2775
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
2774
|
-
* @returns {object} a [funding rate structure]{@link https://
|
|
2776
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
2775
2777
|
*/
|
|
2776
2778
|
if (symbols === undefined) {
|
|
2777
2779
|
throw new errors.ArgumentsRequired(this.id + ' fetchFundingRates() requires a symbols argument');
|
|
@@ -2824,10 +2826,12 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
2824
2826
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
2825
2827
|
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
2826
2828
|
* @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)
|
|
2827
|
-
* @returns {object} a [funding rate structure]{@link https://
|
|
2829
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
2828
2830
|
*/
|
|
2831
|
+
if (symbol === undefined) {
|
|
2832
|
+
throw new errors.ArgumentsRequired(this.id + ' fetchFundingRateHistory() requires a symbol argument');
|
|
2833
|
+
}
|
|
2829
2834
|
await this.loadMarkets();
|
|
2830
|
-
this.checkRequiredSymbol('fetchFundingRateHistory', symbol);
|
|
2831
2835
|
let paginate = false;
|
|
2832
2836
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchFundingRateHistory', 'paginate');
|
|
2833
2837
|
if (paginate) {
|