ccxt 4.0.74 → 4.0.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/ccxt.browser.js +2047 -1932
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +9 -9
- package/dist/cjs/src/alpaca.js +6 -6
- package/dist/cjs/src/ascendex.js +22 -22
- package/dist/cjs/src/base/Exchange.js +2 -2
- package/dist/cjs/src/bigone.js +17 -17
- package/dist/cjs/src/binance.js +51 -51
- package/dist/cjs/src/bingx.js +21 -21
- package/dist/cjs/src/bit2c.js +10 -10
- package/dist/cjs/src/bitbank.js +11 -11
- package/dist/cjs/src/bitbns.js +12 -12
- package/dist/cjs/src/bitfinex.js +19 -19
- package/dist/cjs/src/bitfinex2.js +25 -25
- package/dist/cjs/src/bitflyer.js +15 -15
- package/dist/cjs/src/bitforex.js +9 -9
- package/dist/cjs/src/bitget.js +34 -34
- package/dist/cjs/src/bithumb.js +9 -9
- package/dist/cjs/src/bitmart.js +42 -29
- package/dist/cjs/src/bitmex.js +19 -19
- package/dist/cjs/src/bitopro.js +18 -18
- package/dist/cjs/src/bitpanda.js +19 -19
- package/dist/cjs/src/bitrue.js +15 -15
- package/dist/cjs/src/bitso.js +19 -19
- package/dist/cjs/src/bitstamp.js +19 -19
- package/dist/cjs/src/bitstamp1.js +6 -6
- package/dist/cjs/src/bittrex.js +24 -24
- package/dist/cjs/src/bitvavo.js +16 -16
- package/dist/cjs/src/bkex.js +17 -17
- package/dist/cjs/src/bl3p.js +6 -6
- package/dist/cjs/src/blockchaincom.js +20 -20
- package/dist/cjs/src/btcalpha.js +13 -13
- package/dist/cjs/src/btcbox.js +8 -8
- package/dist/cjs/src/btcmarkets.js +15 -15
- package/dist/cjs/src/btctradeua.js +6 -6
- package/dist/cjs/src/btcturk.js +9 -9
- package/dist/cjs/src/bybit.js +148 -116
- package/dist/cjs/src/cex.js +12 -12
- package/dist/cjs/src/coinbase.js +20 -20
- package/dist/cjs/src/coinbasepro.js +22 -22
- package/dist/cjs/src/coincheck.js +10 -10
- package/dist/cjs/src/coinex.js +81 -35
- package/dist/cjs/src/coinfalcon.js +14 -14
- package/dist/cjs/src/coinmate.js +12 -12
- package/dist/cjs/src/coinone.js +10 -10
- package/dist/cjs/src/coinsph.js +20 -20
- package/dist/cjs/src/coinspot.js +6 -6
- package/dist/cjs/src/cryptocom.js +24 -24
- package/dist/cjs/src/currencycom.js +18 -18
- package/dist/cjs/src/delta.js +23 -23
- package/dist/cjs/src/deribit.js +27 -27
- package/dist/cjs/src/digifinex.js +27 -27
- package/dist/cjs/src/exmo.js +24 -24
- package/dist/cjs/src/gate.js +34 -34
- package/dist/cjs/src/gemini.js +14 -14
- package/dist/cjs/src/hitbtc.js +30 -30
- package/dist/cjs/src/hollaex.js +20 -20
- package/dist/cjs/src/huobi.js +40 -40
- package/dist/cjs/src/huobijp.js +18 -18
- package/dist/cjs/src/idex.js +17 -17
- package/dist/cjs/src/independentreserve.js +10 -10
- package/dist/cjs/src/indodax.js +12 -12
- package/dist/cjs/src/kraken.js +25 -25
- package/dist/cjs/src/krakenfutures.js +12 -12
- package/dist/cjs/src/kucoin.js +29 -29
- package/dist/cjs/src/kucoinfutures.js +19 -19
- package/dist/cjs/src/kuna.js +10 -10
- package/dist/cjs/src/latoken.js +15 -15
- package/dist/cjs/src/lbank.js +10 -10
- package/dist/cjs/src/lbank2.js +21 -21
- package/dist/cjs/src/luno.js +14 -14
- package/dist/cjs/src/lykke.js +14 -14
- package/dist/cjs/src/mercado.js +10 -10
- package/dist/cjs/src/mexc.js +38 -38
- package/dist/cjs/src/ndax.js +18 -18
- package/dist/cjs/src/novadax.js +18 -18
- package/dist/cjs/src/oceanex.js +14 -14
- package/dist/cjs/src/okcoin.js +19 -19
- package/dist/cjs/src/okx.js +48 -48
- package/dist/cjs/src/paymium.js +9 -9
- package/dist/cjs/src/phemex.js +24 -24
- package/dist/cjs/src/poloniex.js +77 -60
- package/dist/cjs/src/poloniexfutures.js +16 -16
- package/dist/cjs/src/pro/alpaca.js +5 -5
- package/dist/cjs/src/pro/ascendex.js +2 -2
- package/dist/cjs/src/pro/binance.js +10 -10
- package/dist/cjs/src/pro/bitfinex.js +3 -3
- package/dist/cjs/src/pro/bitfinex2.js +4 -4
- package/dist/cjs/src/pro/bitget.js +4 -4
- package/dist/cjs/src/pro/bitmart.js +3 -3
- package/dist/cjs/src/pro/bitmex.js +4 -4
- package/dist/cjs/src/pro/bitopro.js +2 -2
- package/dist/cjs/src/pro/bitrue.js +1 -1
- package/dist/cjs/src/pro/bitstamp.js +2 -2
- package/dist/cjs/src/pro/bittrex.js +4 -4
- package/dist/cjs/src/pro/bitvavo.js +4 -4
- package/dist/cjs/src/pro/bybit.js +5 -5
- package/dist/cjs/src/pro/cex.js +3 -3
- package/dist/cjs/src/pro/coinbasepro.js +5 -5
- package/dist/cjs/src/pro/coinex.js +3 -3
- package/dist/cjs/src/pro/cryptocom.js +7 -7
- package/dist/cjs/src/pro/currencycom.js +2 -2
- package/dist/cjs/src/pro/deribit.js +3 -3
- package/dist/cjs/src/pro/exmo.js +2 -2
- package/dist/cjs/src/pro/gate.js +5 -5
- package/dist/cjs/src/pro/gemini.js +2 -2
- package/dist/cjs/src/pro/hitbtc.js +2 -2
- package/dist/cjs/src/pro/hollaex.js +3 -3
- package/dist/cjs/src/pro/huobi.js +4 -4
- package/dist/cjs/src/pro/huobijp.js +2 -2
- package/dist/cjs/src/pro/idex.js +3 -3
- package/dist/cjs/src/pro/independentreserve.js +1 -1
- package/dist/cjs/src/pro/kraken.js +6 -6
- package/dist/cjs/src/pro/krakenfutures.js +2 -2
- package/dist/cjs/src/pro/kucoin.js +4 -4
- package/dist/cjs/src/pro/kucoinfutures.js +3 -3
- package/dist/cjs/src/pro/luno.js +1 -1
- package/dist/cjs/src/pro/ndax.js +2 -2
- package/dist/cjs/src/pro/okcoin.js +3 -3
- package/dist/cjs/src/pro/okx.js +12 -11
- package/dist/cjs/src/pro/phemex.js +4 -4
- package/dist/cjs/src/pro/poloniex.js +1 -1
- package/dist/cjs/src/pro/upbit.js +2 -2
- package/dist/cjs/src/pro/wazirx.js +3 -3
- package/dist/cjs/src/pro/whitebit.js +4 -4
- package/dist/cjs/src/probit.js +17 -17
- package/dist/cjs/src/tidex.js +11 -11
- package/dist/cjs/src/timex.js +14 -14
- package/dist/cjs/src/tokocrypto.js +16 -16
- package/dist/cjs/src/upbit.js +18 -18
- package/dist/cjs/src/wavesexchange.js +13 -13
- package/dist/cjs/src/wazirx.js +10 -10
- package/dist/cjs/src/whitebit.js +21 -21
- package/dist/cjs/src/woo.js +28 -22
- package/dist/cjs/src/yobit.js +14 -14
- package/dist/cjs/src/zaif.js +8 -8
- package/dist/cjs/src/zonda.js +13 -13
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bitmart.d.ts +13 -0
- package/js/src/abstract/bybit.d.ts +33 -21
- package/js/src/abstract/woo.d.ts +6 -0
- package/js/src/ace.js +9 -9
- package/js/src/alpaca.js +6 -6
- package/js/src/ascendex.js +22 -22
- package/js/src/base/Exchange.js +2 -2
- package/js/src/bigone.js +17 -17
- package/js/src/binance.js +51 -51
- package/js/src/bingx.js +21 -21
- package/js/src/bit2c.js +10 -10
- package/js/src/bitbank.js +11 -11
- package/js/src/bitbns.js +12 -12
- package/js/src/bitfinex.js +19 -19
- package/js/src/bitfinex2.js +25 -25
- package/js/src/bitflyer.js +15 -15
- package/js/src/bitforex.js +9 -9
- package/js/src/bitget.js +34 -34
- package/js/src/bithumb.js +9 -9
- package/js/src/bitmart.js +42 -29
- package/js/src/bitmex.js +19 -19
- package/js/src/bitopro.js +18 -18
- package/js/src/bitpanda.js +19 -19
- package/js/src/bitrue.js +15 -15
- package/js/src/bitso.js +19 -19
- package/js/src/bitstamp.js +19 -19
- package/js/src/bitstamp1.js +6 -6
- package/js/src/bittrex.js +24 -24
- package/js/src/bitvavo.js +16 -16
- package/js/src/bkex.js +17 -17
- package/js/src/bl3p.js +6 -6
- package/js/src/blockchaincom.js +20 -20
- package/js/src/btcalpha.js +13 -13
- package/js/src/btcbox.js +8 -8
- package/js/src/btcmarkets.js +15 -15
- package/js/src/btctradeua.js +6 -6
- package/js/src/btcturk.js +9 -9
- package/js/src/bybit.js +148 -116
- package/js/src/cex.js +12 -12
- package/js/src/coinbase.js +20 -20
- package/js/src/coinbasepro.js +22 -22
- package/js/src/coincheck.js +10 -10
- package/js/src/coinex.d.ts +1 -0
- package/js/src/coinex.js +81 -35
- package/js/src/coinfalcon.js +14 -14
- package/js/src/coinmate.js +12 -12
- package/js/src/coinone.js +10 -10
- package/js/src/coinsph.js +20 -20
- package/js/src/coinspot.js +6 -6
- package/js/src/cryptocom.js +24 -24
- package/js/src/currencycom.js +18 -18
- package/js/src/delta.js +23 -23
- package/js/src/deribit.js +27 -27
- package/js/src/digifinex.js +27 -27
- package/js/src/exmo.js +24 -24
- package/js/src/gate.js +34 -34
- package/js/src/gemini.js +14 -14
- package/js/src/hitbtc.js +30 -30
- package/js/src/hollaex.js +20 -20
- package/js/src/huobi.js +40 -40
- package/js/src/huobijp.js +18 -18
- package/js/src/idex.js +17 -17
- package/js/src/independentreserve.js +10 -10
- package/js/src/indodax.js +12 -12
- package/js/src/kraken.js +25 -25
- package/js/src/krakenfutures.js +12 -12
- package/js/src/kucoin.js +29 -29
- package/js/src/kucoinfutures.js +19 -19
- package/js/src/kuna.js +10 -10
- package/js/src/latoken.js +15 -15
- package/js/src/lbank.js +10 -10
- package/js/src/lbank2.js +21 -21
- package/js/src/luno.js +14 -14
- package/js/src/lykke.js +14 -14
- package/js/src/mercado.js +10 -10
- package/js/src/mexc.js +38 -38
- package/js/src/ndax.js +18 -18
- package/js/src/novadax.js +18 -18
- package/js/src/oceanex.js +14 -14
- package/js/src/okcoin.js +19 -19
- package/js/src/okx.js +48 -48
- package/js/src/paymium.js +9 -9
- package/js/src/phemex.js +24 -24
- package/js/src/poloniex.js +77 -60
- package/js/src/poloniexfutures.js +16 -16
- package/js/src/pro/alpaca.js +5 -5
- package/js/src/pro/ascendex.js +2 -2
- package/js/src/pro/binance.js +10 -10
- package/js/src/pro/bitfinex.js +3 -3
- package/js/src/pro/bitfinex2.js +4 -4
- package/js/src/pro/bitget.js +4 -4
- package/js/src/pro/bitmart.js +3 -3
- package/js/src/pro/bitmex.js +4 -4
- package/js/src/pro/bitopro.js +2 -2
- package/js/src/pro/bitrue.js +1 -1
- package/js/src/pro/bitstamp.js +2 -2
- package/js/src/pro/bittrex.js +4 -4
- package/js/src/pro/bitvavo.js +4 -4
- package/js/src/pro/bybit.js +5 -5
- package/js/src/pro/cex.js +3 -3
- package/js/src/pro/coinbasepro.js +5 -5
- package/js/src/pro/coinex.js +3 -3
- package/js/src/pro/cryptocom.js +7 -7
- package/js/src/pro/currencycom.js +2 -2
- package/js/src/pro/deribit.js +3 -3
- package/js/src/pro/exmo.js +2 -2
- package/js/src/pro/gate.js +5 -5
- package/js/src/pro/gemini.js +2 -2
- package/js/src/pro/hitbtc.js +2 -2
- package/js/src/pro/hollaex.js +3 -3
- package/js/src/pro/huobi.js +4 -4
- package/js/src/pro/huobijp.js +2 -2
- package/js/src/pro/idex.js +3 -3
- package/js/src/pro/independentreserve.js +1 -1
- package/js/src/pro/kraken.js +6 -6
- package/js/src/pro/krakenfutures.js +2 -2
- package/js/src/pro/kucoin.js +4 -4
- package/js/src/pro/kucoinfutures.js +3 -3
- package/js/src/pro/luno.js +1 -1
- package/js/src/pro/ndax.js +2 -2
- package/js/src/pro/okcoin.js +3 -3
- package/js/src/pro/okx.d.ts +1 -1
- package/js/src/pro/okx.js +12 -11
- package/js/src/pro/phemex.js +4 -4
- package/js/src/pro/poloniex.js +1 -1
- package/js/src/pro/upbit.js +2 -2
- package/js/src/pro/wazirx.js +3 -3
- package/js/src/pro/whitebit.js +4 -4
- package/js/src/probit.js +17 -17
- package/js/src/tidex.js +11 -11
- package/js/src/timex.js +14 -14
- package/js/src/tokocrypto.js +16 -16
- package/js/src/upbit.js +18 -18
- package/js/src/wavesexchange.js +13 -13
- package/js/src/wazirx.js +10 -10
- package/js/src/whitebit.js +21 -21
- package/js/src/woo.js +28 -22
- package/js/src/yobit.js +14 -14
- package/js/src/zaif.js +8 -8
- package/js/src/zonda.js +13 -13
- package/package.json +1 -1
package/js/src/binance.js
CHANGED
|
@@ -2754,7 +2754,7 @@ export default class binance extends Exchange {
|
|
|
2754
2754
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
2755
2755
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
2756
2756
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
2757
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
2757
|
+
* @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
|
|
2758
2758
|
*/
|
|
2759
2759
|
await this.loadMarkets();
|
|
2760
2760
|
const market = this.market(symbol);
|
|
@@ -2972,7 +2972,7 @@ export default class binance extends Exchange {
|
|
|
2972
2972
|
* @description the latest known information on the availability of the exchange API
|
|
2973
2973
|
* @see https://binance-docs.github.io/apidocs/spot/en/#system-status-system
|
|
2974
2974
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
2975
|
-
* @returns {object} a [status structure]{@link https://
|
|
2975
|
+
* @returns {object} a [status structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#exchange-status-structure}
|
|
2976
2976
|
*/
|
|
2977
2977
|
const response = await this.sapiGetSystemStatus(params);
|
|
2978
2978
|
//
|
|
@@ -3001,7 +3001,7 @@ export default class binance extends Exchange {
|
|
|
3001
3001
|
* @see https://binance-docs.github.io/apidocs/voptions/en/#24hr-ticker-price-change-statistics // option
|
|
3002
3002
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
3003
3003
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
3004
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
3004
|
+
* @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
3005
3005
|
*/
|
|
3006
3006
|
await this.loadMarkets();
|
|
3007
3007
|
const market = this.market(symbol);
|
|
@@ -3035,7 +3035,7 @@ export default class binance extends Exchange {
|
|
|
3035
3035
|
* @see https://binance-docs.github.io/apidocs/delivery/en/#symbol-order-book-ticker // future
|
|
3036
3036
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned
|
|
3037
3037
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
3038
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
3038
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
3039
3039
|
*/
|
|
3040
3040
|
await this.loadMarkets();
|
|
3041
3041
|
symbols = this.marketSymbols(symbols);
|
|
@@ -3071,7 +3071,7 @@ export default class binance extends Exchange {
|
|
|
3071
3071
|
* @see https://binance-docs.github.io/apidocs/delivery/en/#symbol-price-ticker // future
|
|
3072
3072
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the last prices
|
|
3073
3073
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
3074
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
3074
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
3075
3075
|
*/
|
|
3076
3076
|
await this.loadMarkets();
|
|
3077
3077
|
symbols = this.marketSymbols(symbols);
|
|
@@ -3177,7 +3177,7 @@ export default class binance extends Exchange {
|
|
|
3177
3177
|
* @see https://binance-docs.github.io/apidocs/voptions/en/#24hr-ticker-price-change-statistics // option
|
|
3178
3178
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
3179
3179
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
3180
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
3180
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
3181
3181
|
*/
|
|
3182
3182
|
await this.loadMarkets();
|
|
3183
3183
|
let type = undefined;
|
|
@@ -3721,7 +3721,7 @@ export default class binance extends Exchange {
|
|
|
3721
3721
|
* @param {float} [price] the price at which the order is to be fullfilled, in units of the base currency, ignored in market orders
|
|
3722
3722
|
* @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
|
|
3723
3723
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
3724
|
-
* @returns {object} an [order structure]{@link https://
|
|
3724
|
+
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
3725
3725
|
*/
|
|
3726
3726
|
await this.loadMarkets();
|
|
3727
3727
|
const market = this.market(symbol);
|
|
@@ -3921,9 +3921,9 @@ export default class binance extends Exchange {
|
|
|
3921
3921
|
* @param {string} type 'market' or 'limit'
|
|
3922
3922
|
* @param {string} side 'buy' or 'sell'
|
|
3923
3923
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
3924
|
-
* @param {float} price the price at which the order is to be fullfilled, in units of the base currency, ignored in market orders
|
|
3924
|
+
* @param {float} [price] the price at which the order is to be fullfilled, in units of the base currency, ignored in market orders
|
|
3925
3925
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
3926
|
-
* @returns {object} an [order structure]{@link https://
|
|
3926
|
+
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
3927
3927
|
*/
|
|
3928
3928
|
await this.loadMarkets();
|
|
3929
3929
|
const market = this.market(symbol);
|
|
@@ -3993,9 +3993,9 @@ export default class binance extends Exchange {
|
|
|
3993
3993
|
* @param {string} type 'market' or 'limit'
|
|
3994
3994
|
* @param {string} side 'buy' or 'sell'
|
|
3995
3995
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
3996
|
-
* @param {float} price the price at which the order is to be fullfilled, in units of the base currency, ignored in market orders
|
|
3996
|
+
* @param {float} [price] the price at which the order is to be fullfilled, in units of the base currency, ignored in market orders
|
|
3997
3997
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
3998
|
-
* @returns {object} an [order structure]{@link https://
|
|
3998
|
+
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
3999
3999
|
*/
|
|
4000
4000
|
await this.loadMarkets();
|
|
4001
4001
|
const market = this.market(symbol);
|
|
@@ -4281,12 +4281,12 @@ export default class binance extends Exchange {
|
|
|
4281
4281
|
* @param {string} type 'market' or 'limit' or 'STOP_LOSS' or 'STOP_LOSS_LIMIT' or 'TAKE_PROFIT' or 'TAKE_PROFIT_LIMIT' or 'STOP'
|
|
4282
4282
|
* @param {string} side 'buy' or 'sell'
|
|
4283
4283
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
4284
|
-
* @param {float} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
4284
|
+
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
4285
4285
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
4286
4286
|
* @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
|
|
4287
4287
|
* @param {boolean} [params.sor] *spot only* whether to use SOR (Smart Order Routing) or not, default is false
|
|
4288
4288
|
* @param {boolean} [params.test] *spot only* whether to use the test endpoint or not, default is false
|
|
4289
|
-
* @returns {object} an [order structure]{@link https://
|
|
4289
|
+
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
4290
4290
|
*/
|
|
4291
4291
|
await this.loadMarkets();
|
|
4292
4292
|
const market = this.market(symbol);
|
|
@@ -4565,7 +4565,7 @@ export default class binance extends Exchange {
|
|
|
4565
4565
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
4566
4566
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
4567
4567
|
* @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
|
|
4568
|
-
* @returns {object} An [order structure]{@link https://
|
|
4568
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
4569
4569
|
*/
|
|
4570
4570
|
this.checkRequiredSymbol('fetchOrder', symbol);
|
|
4571
4571
|
await this.loadMarkets();
|
|
@@ -4618,7 +4618,7 @@ export default class binance extends Exchange {
|
|
|
4618
4618
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
4619
4619
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
4620
4620
|
* @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
|
|
4621
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
4621
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
4622
4622
|
*/
|
|
4623
4623
|
this.checkRequiredSymbol('fetchOrders', symbol);
|
|
4624
4624
|
await this.loadMarkets();
|
|
@@ -4738,7 +4738,7 @@ export default class binance extends Exchange {
|
|
|
4738
4738
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
4739
4739
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
4740
4740
|
* @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
|
|
4741
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
4741
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
4742
4742
|
*/
|
|
4743
4743
|
await this.loadMarkets();
|
|
4744
4744
|
let market = undefined;
|
|
@@ -4804,7 +4804,7 @@ export default class binance extends Exchange {
|
|
|
4804
4804
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
4805
4805
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
4806
4806
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
4807
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
4807
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
4808
4808
|
*/
|
|
4809
4809
|
const orders = await this.fetchOrders(symbol, since, limit, params);
|
|
4810
4810
|
return this.filterBy(orders, 'status', 'closed');
|
|
@@ -4821,7 +4821,7 @@ export default class binance extends Exchange {
|
|
|
4821
4821
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
4822
4822
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
4823
4823
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
4824
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
4824
|
+
* @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
4825
4825
|
*/
|
|
4826
4826
|
this.checkRequiredSymbol('fetchCanceledOrders', symbol);
|
|
4827
4827
|
await this.loadMarkets();
|
|
@@ -4842,7 +4842,7 @@ export default class binance extends Exchange {
|
|
|
4842
4842
|
* @param {string} id order id
|
|
4843
4843
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
4844
4844
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
4845
|
-
* @returns {object} An [order structure]{@link https://
|
|
4845
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
4846
4846
|
*/
|
|
4847
4847
|
this.checkRequiredSymbol('cancelOrder', symbol);
|
|
4848
4848
|
await this.loadMarkets();
|
|
@@ -4900,7 +4900,7 @@ export default class binance extends Exchange {
|
|
|
4900
4900
|
* @param {string} symbol unified market symbol of the market to cancel orders in
|
|
4901
4901
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
4902
4902
|
* @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
|
|
4903
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
4903
|
+
* @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
4904
4904
|
*/
|
|
4905
4905
|
this.checkRequiredSymbol('cancelAllOrders', symbol);
|
|
4906
4906
|
await this.loadMarkets();
|
|
@@ -4945,7 +4945,7 @@ export default class binance extends Exchange {
|
|
|
4945
4945
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
4946
4946
|
* @param {int} [limit] the maximum number of trades to retrieve
|
|
4947
4947
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
4948
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
4948
|
+
* @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
|
|
4949
4949
|
*/
|
|
4950
4950
|
if (symbol === undefined) {
|
|
4951
4951
|
throw new ArgumentsRequired(this.id + ' fetchOrderTrades() requires a symbol argument');
|
|
@@ -4971,7 +4971,7 @@ export default class binance extends Exchange {
|
|
|
4971
4971
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
4972
4972
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
4973
4973
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
4974
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
4974
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
|
|
4975
4975
|
*/
|
|
4976
4976
|
await this.loadMarkets();
|
|
4977
4977
|
const request = {};
|
|
@@ -5110,7 +5110,7 @@ export default class binance extends Exchange {
|
|
|
5110
5110
|
* @param {int} [since] the earliest time in ms to fetch my dust trades for
|
|
5111
5111
|
* @param {int} [limit] the maximum number of dust trades to retrieve
|
|
5112
5112
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
5113
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
5113
|
+
* @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
|
|
5114
5114
|
*/
|
|
5115
5115
|
//
|
|
5116
5116
|
// Binance provides an opportunity to trade insignificant (i.e. non-tradable and non-withdrawable)
|
|
@@ -5250,7 +5250,7 @@ export default class binance extends Exchange {
|
|
|
5250
5250
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
5251
5251
|
* @param {bool} [params.fiat] if true, only fiat deposits will be returned
|
|
5252
5252
|
* @param {int} [params.until] the latest time in ms to fetch deposits for
|
|
5253
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
5253
|
+
* @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
5254
5254
|
*/
|
|
5255
5255
|
await this.loadMarkets();
|
|
5256
5256
|
let currency = undefined;
|
|
@@ -5353,7 +5353,7 @@ export default class binance extends Exchange {
|
|
|
5353
5353
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
5354
5354
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
5355
5355
|
* @param {bool} [params.fiat] if true, only fiat withdrawals will be returned
|
|
5356
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
5356
|
+
* @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
5357
5357
|
*/
|
|
5358
5358
|
await this.loadMarkets();
|
|
5359
5359
|
const legalMoney = this.safeValue(this.options, 'legalMoney', {});
|
|
@@ -5722,7 +5722,7 @@ export default class binance extends Exchange {
|
|
|
5722
5722
|
* @param {string} fromAccount account to transfer from
|
|
5723
5723
|
* @param {string} toAccount account to transfer to
|
|
5724
5724
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
5725
|
-
* @returns {object} a [transfer structure]{@link https://
|
|
5725
|
+
* @returns {object} a [transfer structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transfer-structure}
|
|
5726
5726
|
*/
|
|
5727
5727
|
await this.loadMarkets();
|
|
5728
5728
|
const currency = this.currency(code);
|
|
@@ -5816,7 +5816,7 @@ export default class binance extends Exchange {
|
|
|
5816
5816
|
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
5817
5817
|
* @param {int} [limit] the maximum number of transfers structures to retrieve
|
|
5818
5818
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
5819
|
-
* @returns {object[]} a list of [transfer structures]{@link https://
|
|
5819
|
+
* @returns {object[]} a list of [transfer structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transfer-structure}
|
|
5820
5820
|
*/
|
|
5821
5821
|
await this.loadMarkets();
|
|
5822
5822
|
let currency = undefined;
|
|
@@ -5877,7 +5877,7 @@ export default class binance extends Exchange {
|
|
|
5877
5877
|
* @description fetch the deposit address for a currency associated with this account
|
|
5878
5878
|
* @param {string} code unified currency code
|
|
5879
5879
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
5880
|
-
* @returns {object} an [address structure]{@link https://
|
|
5880
|
+
* @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
|
|
5881
5881
|
*/
|
|
5882
5882
|
await this.loadMarkets();
|
|
5883
5883
|
const currency = this.currency(code);
|
|
@@ -5952,7 +5952,7 @@ export default class binance extends Exchange {
|
|
|
5952
5952
|
* @description please use fetchDepositWithdrawFees instead
|
|
5953
5953
|
* @param {string[]|undefined} codes not used by binance fetchTransactionFees ()
|
|
5954
5954
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
5955
|
-
* @returns {object[]} a list of [fee structures]{@link https://
|
|
5955
|
+
* @returns {object[]} a list of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
|
5956
5956
|
*/
|
|
5957
5957
|
await this.loadMarkets();
|
|
5958
5958
|
const response = await this.sapiGetCapitalConfigGetall(params);
|
|
@@ -6065,7 +6065,7 @@ export default class binance extends Exchange {
|
|
|
6065
6065
|
* @description fetch deposit and withdraw fees
|
|
6066
6066
|
* @param {string[]|undefined} codes not used by binance fetchDepositWithdrawFees ()
|
|
6067
6067
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
6068
|
-
* @returns {object[]} a list of [fee structures]{@link https://
|
|
6068
|
+
* @returns {object[]} a list of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
|
6069
6069
|
*/
|
|
6070
6070
|
await this.loadMarkets();
|
|
6071
6071
|
const response = await this.sapiGetCapitalConfigGetall(params);
|
|
@@ -6191,7 +6191,7 @@ export default class binance extends Exchange {
|
|
|
6191
6191
|
* @param {string} address the address to withdraw to
|
|
6192
6192
|
* @param {string} tag
|
|
6193
6193
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
6194
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
6194
|
+
* @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
6195
6195
|
*/
|
|
6196
6196
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
6197
6197
|
this.checkAddress(address);
|
|
@@ -6243,7 +6243,7 @@ export default class binance extends Exchange {
|
|
|
6243
6243
|
* @description fetch the trading fees for a market
|
|
6244
6244
|
* @param {string} symbol unified market symbol
|
|
6245
6245
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
6246
|
-
* @returns {object} a [fee structure]{@link https://
|
|
6246
|
+
* @returns {object} a [fee structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
|
6247
6247
|
*/
|
|
6248
6248
|
await this.loadMarkets();
|
|
6249
6249
|
const market = this.market(symbol);
|
|
@@ -6269,7 +6269,7 @@ export default class binance extends Exchange {
|
|
|
6269
6269
|
* @name binance#fetchTradingFees
|
|
6270
6270
|
* @description fetch the trading fees for multiple markets
|
|
6271
6271
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
6272
|
-
* @returns {object} a dictionary of [fee structures]{@link https://
|
|
6272
|
+
* @returns {object} a dictionary of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure} indexed by market symbols
|
|
6273
6273
|
*/
|
|
6274
6274
|
await this.loadMarkets();
|
|
6275
6275
|
let method = undefined;
|
|
@@ -6450,7 +6450,7 @@ export default class binance extends Exchange {
|
|
|
6450
6450
|
* @param {string} type 1 - transfer from spot account to USDT-Ⓜ futures account, 2 - transfer from USDT-Ⓜ futures account to spot account, 3 - transfer from spot account to COIN-Ⓜ futures account, 4 - transfer from COIN-Ⓜ futures account to spot account
|
|
6451
6451
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
6452
6452
|
* @param {float} params.recvWindow
|
|
6453
|
-
* @returns {object} a [transfer structure]{@link https://
|
|
6453
|
+
* @returns {object} a [transfer structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#futures-transfer-structure}
|
|
6454
6454
|
*/
|
|
6455
6455
|
if ((type < 1) || (type > 4)) {
|
|
6456
6456
|
throw new ArgumentsRequired(this.id + ' type must be between 1 and 4');
|
|
@@ -6477,7 +6477,7 @@ export default class binance extends Exchange {
|
|
|
6477
6477
|
* @description fetch the current funding rate
|
|
6478
6478
|
* @param {string} symbol unified market symbol
|
|
6479
6479
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
6480
|
-
* @returns {object} a [funding rate structure]{@link https://
|
|
6480
|
+
* @returns {object} a [funding rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-structure}
|
|
6481
6481
|
*/
|
|
6482
6482
|
await this.loadMarkets();
|
|
6483
6483
|
const market = this.market(symbol);
|
|
@@ -6589,7 +6589,7 @@ export default class binance extends Exchange {
|
|
|
6589
6589
|
* @description fetch the funding rate for multiple markets
|
|
6590
6590
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
6591
6591
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
6592
|
-
* @returns {object} a dictionary of [funding rates structures]{@link https://
|
|
6592
|
+
* @returns {object} a dictionary of [funding rates structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rates-structure}, indexe by market symbols
|
|
6593
6593
|
*/
|
|
6594
6594
|
await this.loadMarkets();
|
|
6595
6595
|
symbols = this.marketSymbols(symbols);
|
|
@@ -7117,7 +7117,7 @@ export default class binance extends Exchange {
|
|
|
7117
7117
|
* @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes
|
|
7118
7118
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
7119
7119
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
7120
|
-
* @returns {object} a dictionary of [leverage tiers structures]{@link https://
|
|
7120
|
+
* @returns {object} a dictionary of [leverage tiers structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#leverage-tiers-structure}, indexed by market symbols
|
|
7121
7121
|
*/
|
|
7122
7122
|
await this.loadMarkets();
|
|
7123
7123
|
const [type, query] = this.handleMarketTypeAndParams('fetchLeverageTiers', undefined, params);
|
|
@@ -7267,7 +7267,7 @@ export default class binance extends Exchange {
|
|
|
7267
7267
|
* @description fetch data on open options positions
|
|
7268
7268
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
7269
7269
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
7270
|
-
* @returns {object[]} a list of [position structures]{@link https://
|
|
7270
|
+
* @returns {object[]} a list of [position structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#position-structure}
|
|
7271
7271
|
*/
|
|
7272
7272
|
await this.loadMarkets();
|
|
7273
7273
|
symbols = this.marketSymbols(symbols);
|
|
@@ -7382,7 +7382,7 @@ export default class binance extends Exchange {
|
|
|
7382
7382
|
* @description fetch all open positions
|
|
7383
7383
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
7384
7384
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
7385
|
-
* @returns {object[]} a list of [position structure]{@link https://
|
|
7385
|
+
* @returns {object[]} a list of [position structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#position-structure}
|
|
7386
7386
|
*/
|
|
7387
7387
|
const defaultMethod = this.safeString(this.options, 'fetchPositions', 'positionRisk');
|
|
7388
7388
|
if (defaultMethod === 'positionRisk') {
|
|
@@ -7540,7 +7540,7 @@ export default class binance extends Exchange {
|
|
|
7540
7540
|
* @param {int} [since] the earliest time in ms to fetch funding history for
|
|
7541
7541
|
* @param {int} [limit] the maximum number of funding history structures to retrieve
|
|
7542
7542
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
7543
|
-
* @returns {object} a [funding history structure]{@link https://
|
|
7543
|
+
* @returns {object} a [funding history structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-history-structure}
|
|
7544
7544
|
*/
|
|
7545
7545
|
await this.loadMarkets();
|
|
7546
7546
|
let market = undefined;
|
|
@@ -7915,7 +7915,7 @@ export default class binance extends Exchange {
|
|
|
7915
7915
|
* @param {int} [since] timestamp in ms of the earliest ledger entry
|
|
7916
7916
|
* @param {int} [limit] max number of ledger entrys to return
|
|
7917
7917
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
7918
|
-
* @returns {object} a [ledger structure]{@link https://
|
|
7918
|
+
* @returns {object} a [ledger structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ledger-structure}
|
|
7919
7919
|
*/
|
|
7920
7920
|
await this.loadMarkets();
|
|
7921
7921
|
let type = undefined;
|
|
@@ -8325,7 +8325,7 @@ export default class binance extends Exchange {
|
|
|
8325
8325
|
* @param {string} symbol unified market symbol
|
|
8326
8326
|
* @param {float} amount the amount of margin to remove
|
|
8327
8327
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
8328
|
-
* @returns {object} a [margin structure]{@link https://
|
|
8328
|
+
* @returns {object} a [margin structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#reduce-margin-structure}
|
|
8329
8329
|
*/
|
|
8330
8330
|
return await this.modifyMarginHelper(symbol, amount, 2, params);
|
|
8331
8331
|
}
|
|
@@ -8339,7 +8339,7 @@ export default class binance extends Exchange {
|
|
|
8339
8339
|
* @param {string} symbol unified market symbol
|
|
8340
8340
|
* @param {float} amount amount of margin to add
|
|
8341
8341
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
8342
|
-
* @returns {object} a [margin structure]{@link https://
|
|
8342
|
+
* @returns {object} a [margin structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#add-margin-structure}
|
|
8343
8343
|
*/
|
|
8344
8344
|
return await this.modifyMarginHelper(symbol, amount, 1, params);
|
|
8345
8345
|
}
|
|
@@ -8350,7 +8350,7 @@ export default class binance extends Exchange {
|
|
|
8350
8350
|
* @description fetch the rate of interest to borrow a currency for margin trading
|
|
8351
8351
|
* @param {string} code unified currency code
|
|
8352
8352
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
8353
|
-
* @returns {object} a [borrow rate structure]{@link https://
|
|
8353
|
+
* @returns {object} a [borrow rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure}
|
|
8354
8354
|
*/
|
|
8355
8355
|
await this.loadMarkets();
|
|
8356
8356
|
const currency = this.currency(code);
|
|
@@ -8379,9 +8379,9 @@ export default class binance extends Exchange {
|
|
|
8379
8379
|
* @description retrieves a history of a currencies borrow interest rate at specific time slots
|
|
8380
8380
|
* @param {string} code unified currency code
|
|
8381
8381
|
* @param {int} [since] timestamp for the earliest borrow rate
|
|
8382
|
-
* @param {int} [limit] the maximum number of [borrow rate structures]{@link https://
|
|
8382
|
+
* @param {int} [limit] the maximum number of [borrow rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure} to retrieve
|
|
8383
8383
|
* @param {object} [params] extra parameters specific to the exchange api endpoint
|
|
8384
|
-
* @returns {object[]} an array of [borrow rate structures]{@link https://
|
|
8384
|
+
* @returns {object[]} an array of [borrow rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure}
|
|
8385
8385
|
*/
|
|
8386
8386
|
await this.loadMarkets();
|
|
8387
8387
|
if (limit === undefined) {
|
|
@@ -8541,7 +8541,7 @@ export default class binance extends Exchange {
|
|
|
8541
8541
|
* @param {int} [since] the earliest time in ms to fetch borrrow interest for
|
|
8542
8542
|
* @param {int} [limit] the maximum number of structures to retrieve
|
|
8543
8543
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
8544
|
-
* @returns {object[]} a list of [borrow interest structures]{@link https://
|
|
8544
|
+
* @returns {object[]} a list of [borrow interest structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#borrow-interest-structure}
|
|
8545
8545
|
*/
|
|
8546
8546
|
await this.loadMarkets();
|
|
8547
8547
|
const request = {};
|
|
@@ -8608,7 +8608,7 @@ export default class binance extends Exchange {
|
|
|
8608
8608
|
* @param {float} amount the amount to repay
|
|
8609
8609
|
* @param {string} symbol unified market symbol, required for isolated margin
|
|
8610
8610
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
8611
|
-
* @returns {object} a [margin loan structure]{@link https://
|
|
8611
|
+
* @returns {object} a [margin loan structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#margin-loan-structure}
|
|
8612
8612
|
*/
|
|
8613
8613
|
const [marginMode, query] = this.handleMarginModeAndParams('repayMargin', params); // cross or isolated
|
|
8614
8614
|
this.checkRequiredMarginArgument('repayMargin', symbol, marginMode);
|
|
@@ -8642,7 +8642,7 @@ export default class binance extends Exchange {
|
|
|
8642
8642
|
* @param {float} amount the amount to borrow
|
|
8643
8643
|
* @param {string} symbol unified market symbol, required for isolated margin
|
|
8644
8644
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
8645
|
-
* @returns {object} a [margin loan structure]{@link https://
|
|
8645
|
+
* @returns {object} a [margin loan structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#margin-loan-structure}
|
|
8646
8646
|
*/
|
|
8647
8647
|
const [marginMode, query] = this.handleMarginModeAndParams('borrowMargin', params); // cross or isolated
|
|
8648
8648
|
this.checkRequiredMarginArgument('borrowMargin', symbol, marginMode);
|
|
@@ -8694,7 +8694,7 @@ export default class binance extends Exchange {
|
|
|
8694
8694
|
* @param {int} [limit] default 30, max 500
|
|
8695
8695
|
* @param {object} [params] exchange specific parameters
|
|
8696
8696
|
* @param {int} [params.until] the time(ms) of the latest record to retrieve as a unix timestamp
|
|
8697
|
-
* @returns {object} an array of [open interest history structure]{@link https://
|
|
8697
|
+
* @returns {object} an array of [open interest history structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#interest-history-structure}
|
|
8698
8698
|
*/
|
|
8699
8699
|
if (timeframe === '1m') {
|
|
8700
8700
|
throw new BadRequest(this.id + 'fetchOpenInterestHistory cannot use the 1m timeframe');
|
|
@@ -8756,7 +8756,7 @@ export default class binance extends Exchange {
|
|
|
8756
8756
|
* @see https://binance-docs.github.io/apidocs/voptions/en/#open-interest
|
|
8757
8757
|
* @param {string} symbol unified CCXT market symbol
|
|
8758
8758
|
* @param {object} [params] exchange specific parameters
|
|
8759
|
-
* @returns {object} an open interest structure{@link https://
|
|
8759
|
+
* @returns {object} an open interest structure{@link https://github.com/ccxt/ccxt/wiki/Manual#interest-history-structure}
|
|
8760
8760
|
*/
|
|
8761
8761
|
await this.loadMarkets();
|
|
8762
8762
|
const market = this.market(symbol);
|
package/js/src/bingx.js
CHANGED
|
@@ -825,7 +825,7 @@ export default class bingx extends Exchange {
|
|
|
825
825
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
826
826
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
827
827
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
828
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
828
|
+
* @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
|
|
829
829
|
*/
|
|
830
830
|
await this.loadMarkets();
|
|
831
831
|
const market = this.market(symbol);
|
|
@@ -913,7 +913,7 @@ export default class bingx extends Exchange {
|
|
|
913
913
|
* @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#Current%20Funding%20Rate
|
|
914
914
|
* @param {string} symbol unified market symbol
|
|
915
915
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
916
|
-
* @returns {object} a [funding rate structure]{@link https://
|
|
916
|
+
* @returns {object} a [funding rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-structure}
|
|
917
917
|
*/
|
|
918
918
|
await this.loadMarkets();
|
|
919
919
|
const market = this.market(symbol);
|
|
@@ -1037,7 +1037,7 @@ export default class bingx extends Exchange {
|
|
|
1037
1037
|
* @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#Get%20Swap%20Open%20Positions
|
|
1038
1038
|
* @param {string} symbol Unified CCXT market symbol
|
|
1039
1039
|
* @param {object} [params] exchange specific parameters
|
|
1040
|
-
* @returns {object} an open interest structure{@link https://
|
|
1040
|
+
* @returns {object} an open interest structure{@link https://github.com/ccxt/ccxt/wiki/Manual#interest-history-structure}
|
|
1041
1041
|
*/
|
|
1042
1042
|
await this.loadMarkets();
|
|
1043
1043
|
const market = this.market(symbol);
|
|
@@ -1088,7 +1088,7 @@ export default class bingx extends Exchange {
|
|
|
1088
1088
|
* @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#Get%20Ticker
|
|
1089
1089
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1090
1090
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
1091
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
1091
|
+
* @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
1092
1092
|
*/
|
|
1093
1093
|
await this.loadMarkets();
|
|
1094
1094
|
const market = this.market(symbol);
|
|
@@ -1130,7 +1130,7 @@ export default class bingx extends Exchange {
|
|
|
1130
1130
|
* @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#Get%20Ticker
|
|
1131
1131
|
* @param {[string]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1132
1132
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
1133
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
1133
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
1134
1134
|
*/
|
|
1135
1135
|
await this.loadMarkets();
|
|
1136
1136
|
if (symbols !== undefined) {
|
|
@@ -1346,7 +1346,7 @@ export default class bingx extends Exchange {
|
|
|
1346
1346
|
* @param {[string]|undefined} symbols list of unified market symbols
|
|
1347
1347
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
1348
1348
|
* @param {boolean} [params.standard] whether to fetch standard contract positions
|
|
1349
|
-
* @returns {[object]} a list of [position structure]{@link https://
|
|
1349
|
+
* @returns {[object]} a list of [position structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#position-structure}
|
|
1350
1350
|
*/
|
|
1351
1351
|
await this.loadMarkets();
|
|
1352
1352
|
symbols = this.marketSymbols(symbols);
|
|
@@ -1462,7 +1462,7 @@ export default class bingx extends Exchange {
|
|
|
1462
1462
|
* @param {object} [params.triggerPrice] triggerPrice at which the attached take profit / stop loss order will be triggered (swap markets only)
|
|
1463
1463
|
* @param {float} [params.stopLossPrice] stop loss trigger price (swap markets only)
|
|
1464
1464
|
* @param {float} [params.takeProfitPrice] take profit trigger price (swap markets only)
|
|
1465
|
-
* @returns {object} an [order structure]{@link https://
|
|
1465
|
+
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1466
1466
|
*/
|
|
1467
1467
|
await this.loadMarkets();
|
|
1468
1468
|
const market = this.market(symbol);
|
|
@@ -1754,7 +1754,7 @@ export default class bingx extends Exchange {
|
|
|
1754
1754
|
* @param {string} id order id
|
|
1755
1755
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
1756
1756
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
1757
|
-
* @returns {object} An [order structure]{@link https://
|
|
1757
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1758
1758
|
*/
|
|
1759
1759
|
this.checkRequiredSymbol('cancelOrder', symbol);
|
|
1760
1760
|
await this.loadMarkets();
|
|
@@ -1829,7 +1829,7 @@ export default class bingx extends Exchange {
|
|
|
1829
1829
|
* @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Cancel%20All%20Orders
|
|
1830
1830
|
* @param {string} [symbol] unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
1831
1831
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
1832
|
-
* @returns {[object]} a list of [order structures]{@link https://
|
|
1832
|
+
* @returns {[object]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1833
1833
|
*/
|
|
1834
1834
|
this.checkRequiredSymbol('cancelAllOrders', symbol);
|
|
1835
1835
|
await this.loadMarkets();
|
|
@@ -1881,7 +1881,7 @@ export default class bingx extends Exchange {
|
|
|
1881
1881
|
* @param {[string]} ids order ids
|
|
1882
1882
|
* @param {string} symbol unified market symbol, default is undefined
|
|
1883
1883
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
1884
|
-
* @returns {object} an list of [order structures]{@link https://
|
|
1884
|
+
* @returns {object} an list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1885
1885
|
*/
|
|
1886
1886
|
this.checkRequiredSymbol('cancelOrders', symbol);
|
|
1887
1887
|
await this.loadMarkets();
|
|
@@ -1934,7 +1934,7 @@ export default class bingx extends Exchange {
|
|
|
1934
1934
|
* @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Query%20Order
|
|
1935
1935
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
1936
1936
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
1937
|
-
* @returns {object} An [order structure]{@link https://
|
|
1937
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1938
1938
|
*/
|
|
1939
1939
|
this.checkRequiredSymbol('fetchOrders', symbol);
|
|
1940
1940
|
await this.loadMarkets();
|
|
@@ -2017,7 +2017,7 @@ export default class bingx extends Exchange {
|
|
|
2017
2017
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
2018
2018
|
* @param {int} [limit] the maximum number of open order structures to retrieve
|
|
2019
2019
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
2020
|
-
* @returns {[object]} a list of [order structures]{@link https://
|
|
2020
|
+
* @returns {[object]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
2021
2021
|
*/
|
|
2022
2022
|
this.checkRequiredSymbol('fetchOrders', symbol);
|
|
2023
2023
|
await this.loadMarkets();
|
|
@@ -2106,7 +2106,7 @@ export default class bingx extends Exchange {
|
|
|
2106
2106
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
2107
2107
|
* @param {int} [params.until] the latest time in ms to fetch orders for
|
|
2108
2108
|
* @param {boolean} [params.standard] whether to fetch standard contract orders
|
|
2109
|
-
* @returns {[object]} a list of [order structures]{@link https://
|
|
2109
|
+
* @returns {[object]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
2110
2110
|
*/
|
|
2111
2111
|
this.checkRequiredSymbol('fetchClosedOrders', symbol);
|
|
2112
2112
|
await this.loadMarkets();
|
|
@@ -2197,7 +2197,7 @@ export default class bingx extends Exchange {
|
|
|
2197
2197
|
* @param {string} fromAccount account to transfer from
|
|
2198
2198
|
* @param {string} toAccount account to transfer to
|
|
2199
2199
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
2200
|
-
* @returns {object} a [transfer structure]{@link https://
|
|
2200
|
+
* @returns {object} a [transfer structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transfer-structure}
|
|
2201
2201
|
*/
|
|
2202
2202
|
await this.loadMarkets();
|
|
2203
2203
|
const currency = this.currency(code);
|
|
@@ -2237,7 +2237,7 @@ export default class bingx extends Exchange {
|
|
|
2237
2237
|
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
2238
2238
|
* @param {int} [limit] the maximum number of transfers structures to retrieve
|
|
2239
2239
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
2240
|
-
* @returns {[object]} a list of [transfer structures]{@link https://
|
|
2240
|
+
* @returns {[object]} a list of [transfer structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transfer-structure}
|
|
2241
2241
|
*/
|
|
2242
2242
|
await this.loadMarkets();
|
|
2243
2243
|
let currency = undefined;
|
|
@@ -2314,7 +2314,7 @@ export default class bingx extends Exchange {
|
|
|
2314
2314
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
2315
2315
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
2316
2316
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
2317
|
-
* @returns {[object]} a list of [transaction structures]{@link https://
|
|
2317
|
+
* @returns {[object]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
2318
2318
|
*/
|
|
2319
2319
|
await this.loadMarkets();
|
|
2320
2320
|
const request = {};
|
|
@@ -2359,7 +2359,7 @@ export default class bingx extends Exchange {
|
|
|
2359
2359
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
2360
2360
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
2361
2361
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
2362
|
-
* @returns {[object]} a list of [transaction structures]{@link https://
|
|
2362
|
+
* @returns {[object]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
2363
2363
|
*/
|
|
2364
2364
|
await this.loadMarkets();
|
|
2365
2365
|
const request = {};
|
|
@@ -2531,7 +2531,7 @@ export default class bingx extends Exchange {
|
|
|
2531
2531
|
* @param {string} symbol unified market symbol of the market to set margin in
|
|
2532
2532
|
* @param {float} amount the amount to set the margin to
|
|
2533
2533
|
* @param {object} [params] parameters specific to the bingx api endpoint
|
|
2534
|
-
* @returns {object} A [margin structure]{@link https://
|
|
2534
|
+
* @returns {object} A [margin structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#add-margin-structure}
|
|
2535
2535
|
*/
|
|
2536
2536
|
const type = this.safeInteger(params, 'type'); // 1 increase margin 2 decrease margin
|
|
2537
2537
|
if (type === undefined) {
|
|
@@ -2566,7 +2566,7 @@ export default class bingx extends Exchange {
|
|
|
2566
2566
|
* @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Query%20Leverage
|
|
2567
2567
|
* @param {string} symbol unified market symbol
|
|
2568
2568
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
2569
|
-
* @returns {object} a [leverage structure]{@link https://
|
|
2569
|
+
* @returns {object} a [leverage structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#leverage-structure}
|
|
2570
2570
|
*/
|
|
2571
2571
|
await this.loadMarkets();
|
|
2572
2572
|
const market = this.market(symbol);
|
|
@@ -2630,7 +2630,7 @@ export default class bingx extends Exchange {
|
|
|
2630
2630
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
2631
2631
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
2632
2632
|
* @param {string} params.trandingUnit COIN (directly represent assets such as BTC and ETH) or CONT (represents the number of contract sheets)
|
|
2633
|
-
* @returns {[object]} a list of [trade structures]{@link https://
|
|
2633
|
+
* @returns {[object]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
|
|
2634
2634
|
*/
|
|
2635
2635
|
this.checkRequiredArgument('fetchMyTrades', symbol, 'symbol');
|
|
2636
2636
|
this.checkRequiredArgument('fetchMyTrades', since, 'since');
|
|
@@ -2761,7 +2761,7 @@ export default class bingx extends Exchange {
|
|
|
2761
2761
|
* @param {string} [tag]
|
|
2762
2762
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
2763
2763
|
* @param {int} [params.walletType] 1 fund account, 2 standard account, 3 perpetual account
|
|
2764
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
2764
|
+
* @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
2765
2765
|
*/
|
|
2766
2766
|
await this.loadMarkets();
|
|
2767
2767
|
const currency = this.currency(code);
|