ccxt 4.0.74 → 4.0.76
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 +2635 -2383
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +11 -11
- package/dist/cjs/src/alpaca.js +7 -7
- package/dist/cjs/src/ascendex.js +25 -25
- package/dist/cjs/src/base/Exchange.js +4 -4
- package/dist/cjs/src/bigone.js +19 -19
- package/dist/cjs/src/binance.js +56 -56
- package/dist/cjs/src/bingx.js +85 -40
- package/dist/cjs/src/bit2c.js +12 -12
- package/dist/cjs/src/bitbank.js +13 -13
- package/dist/cjs/src/bitbns.js +14 -14
- package/dist/cjs/src/bitfinex.js +21 -21
- package/dist/cjs/src/bitfinex2.js +29 -29
- package/dist/cjs/src/bitflyer.js +17 -17
- package/dist/cjs/src/bitforex.js +11 -11
- package/dist/cjs/src/bitget.js +39 -39
- package/dist/cjs/src/bithumb.js +11 -11
- package/dist/cjs/src/bitmart.js +44 -31
- package/dist/cjs/src/bitmex.js +24 -24
- package/dist/cjs/src/bitopro.js +21 -21
- package/dist/cjs/src/bitpanda.js +21 -21
- package/dist/cjs/src/bitrue.js +18 -18
- package/dist/cjs/src/bitso.js +21 -21
- package/dist/cjs/src/bitstamp.js +21 -21
- package/dist/cjs/src/bitstamp1.js +8 -8
- package/dist/cjs/src/bittrex.js +27 -27
- package/dist/cjs/src/bitvavo.js +19 -19
- package/dist/cjs/src/bkex.js +21 -21
- package/dist/cjs/src/bl3p.js +8 -8
- package/dist/cjs/src/blockchaincom.js +21 -21
- package/dist/cjs/src/btcalpha.js +15 -15
- package/dist/cjs/src/btcbox.js +10 -10
- package/dist/cjs/src/btcmarkets.js +17 -17
- package/dist/cjs/src/btctradeua.js +8 -8
- package/dist/cjs/src/btcturk.js +11 -11
- package/dist/cjs/src/bybit.js +153 -121
- package/dist/cjs/src/cex.js +14 -14
- package/dist/cjs/src/coinbase.js +23 -23
- package/dist/cjs/src/coinbasepro.js +24 -24
- package/dist/cjs/src/coincheck.js +12 -12
- package/dist/cjs/src/coinex.js +87 -41
- package/dist/cjs/src/coinfalcon.js +16 -16
- package/dist/cjs/src/coinmate.js +14 -14
- package/dist/cjs/src/coinone.js +12 -12
- package/dist/cjs/src/coinsph.js +27 -22
- package/dist/cjs/src/coinspot.js +8 -8
- package/dist/cjs/src/cryptocom.js +29 -29
- package/dist/cjs/src/currencycom.js +20 -20
- package/dist/cjs/src/delta.js +25 -25
- package/dist/cjs/src/deribit.js +30 -30
- package/dist/cjs/src/digifinex.js +31 -31
- package/dist/cjs/src/exmo.js +26 -26
- package/dist/cjs/src/gate.js +38 -38
- package/dist/cjs/src/gemini.js +17 -17
- package/dist/cjs/src/hitbtc.js +34 -34
- package/dist/cjs/src/hollaex.js +23 -23
- package/dist/cjs/src/huobi.js +45 -45
- package/dist/cjs/src/huobijp.js +20 -20
- package/dist/cjs/src/idex.js +19 -19
- package/dist/cjs/src/independentreserve.js +12 -12
- package/dist/cjs/src/indodax.js +14 -14
- package/dist/cjs/src/kraken.js +27 -27
- package/dist/cjs/src/krakenfutures.js +12 -12
- package/dist/cjs/src/kucoin.js +33 -33
- package/dist/cjs/src/kucoinfutures.js +24 -24
- package/dist/cjs/src/kuna.js +12 -12
- package/dist/cjs/src/latoken.js +17 -17
- package/dist/cjs/src/lbank.js +12 -12
- package/dist/cjs/src/lbank2.js +23 -23
- package/dist/cjs/src/luno.js +16 -16
- package/dist/cjs/src/lykke.js +16 -16
- package/dist/cjs/src/mercado.js +12 -12
- package/dist/cjs/src/mexc.js +44 -42
- package/dist/cjs/src/ndax.js +20 -20
- package/dist/cjs/src/novadax.js +20 -20
- package/dist/cjs/src/oceanex.js +16 -16
- package/dist/cjs/src/okcoin.js +21 -21
- package/dist/cjs/src/okx.js +52 -52
- package/dist/cjs/src/paymium.js +11 -11
- package/dist/cjs/src/phemex.js +26 -26
- package/dist/cjs/src/poloniex.js +237 -136
- package/dist/cjs/src/poloniexfutures.js +18 -18
- 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/bitfinex.js +4 -4
- package/dist/cjs/src/pro/bitfinex2.js +6 -6
- package/dist/cjs/src/pro/bitget.js +6 -6
- package/dist/cjs/src/pro/bitmart.js +4 -4
- 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 +3 -3
- package/dist/cjs/src/pro/bittrex.js +6 -6
- package/dist/cjs/src/pro/bitvavo.js +5 -5
- package/dist/cjs/src/pro/blockchaincom.js +5 -5
- package/dist/cjs/src/pro/bybit.js +6 -6
- package/dist/cjs/src/pro/cex.js +7 -7
- package/dist/cjs/src/pro/coinbase.js +5 -5
- package/dist/cjs/src/pro/coinbasepro.js +6 -6
- package/dist/cjs/src/pro/coinex.js +5 -5
- package/dist/cjs/src/pro/cryptocom.js +10 -10
- 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 +5 -5
- 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 +3 -3
- package/dist/cjs/src/pro/hollaex.js +5 -5
- package/dist/cjs/src/pro/huobi.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 +12 -12
- package/dist/cjs/src/pro/krakenfutures.js +7 -7
- package/dist/cjs/src/pro/kucoin.js +6 -6
- package/dist/cjs/src/pro/kucoinfutures.js +6 -5
- 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 +19 -18
- 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 +6 -6
- package/dist/cjs/src/pro/whitebit.js +6 -6
- package/dist/cjs/src/probit.js +19 -19
- package/dist/cjs/src/tidex.js +13 -13
- package/dist/cjs/src/timex.js +16 -16
- package/dist/cjs/src/tokocrypto.js +18 -18
- package/dist/cjs/src/upbit.js +20 -20
- package/dist/cjs/src/wavesexchange.js +16 -16
- package/dist/cjs/src/wazirx.js +12 -12
- package/dist/cjs/src/whitebit.js +24 -24
- package/dist/cjs/src/woo.js +30 -24
- package/dist/cjs/src/yobit.js +16 -16
- package/dist/cjs/src/zaif.js +10 -10
- package/dist/cjs/src/zonda.js +15 -15
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bingx.d.ts +2 -0
- package/js/src/abstract/bitmart.d.ts +13 -0
- package/js/src/abstract/bybit.d.ts +33 -21
- package/js/src/abstract/coinsph.d.ts +5 -0
- package/js/src/abstract/woo.d.ts +6 -0
- package/js/src/ace.js +11 -11
- package/js/src/alpaca.js +7 -7
- package/js/src/ascendex.js +25 -25
- package/js/src/base/Exchange.js +4 -4
- package/js/src/bigone.js +19 -19
- package/js/src/binance.js +56 -56
- package/js/src/bingx.d.ts +1 -0
- package/js/src/bingx.js +85 -40
- package/js/src/bit2c.js +12 -12
- package/js/src/bitbank.js +13 -13
- package/js/src/bitbns.js +14 -14
- package/js/src/bitfinex.js +21 -21
- package/js/src/bitfinex2.js +29 -29
- package/js/src/bitflyer.js +17 -17
- package/js/src/bitforex.js +11 -11
- package/js/src/bitget.js +39 -39
- package/js/src/bithumb.js +11 -11
- package/js/src/bitmart.js +44 -31
- package/js/src/bitmex.js +24 -24
- package/js/src/bitopro.js +21 -21
- package/js/src/bitpanda.js +21 -21
- package/js/src/bitrue.js +18 -18
- package/js/src/bitso.js +21 -21
- package/js/src/bitstamp.js +21 -21
- package/js/src/bitstamp1.js +8 -8
- package/js/src/bittrex.js +27 -27
- package/js/src/bitvavo.js +19 -19
- package/js/src/bkex.js +21 -21
- package/js/src/bl3p.js +8 -8
- package/js/src/blockchaincom.js +21 -21
- package/js/src/btcalpha.js +15 -15
- package/js/src/btcbox.js +10 -10
- package/js/src/btcmarkets.js +17 -17
- package/js/src/btctradeua.js +8 -8
- package/js/src/btcturk.js +11 -11
- package/js/src/bybit.js +153 -121
- package/js/src/cex.js +14 -14
- package/js/src/coinbase.js +23 -23
- package/js/src/coinbasepro.js +24 -24
- package/js/src/coincheck.js +12 -12
- package/js/src/coinex.d.ts +1 -0
- package/js/src/coinex.js +87 -41
- package/js/src/coinfalcon.js +16 -16
- package/js/src/coinmate.js +14 -14
- package/js/src/coinone.js +12 -12
- package/js/src/coinsph.js +27 -22
- package/js/src/coinspot.js +8 -8
- package/js/src/cryptocom.js +29 -29
- package/js/src/currencycom.js +20 -20
- package/js/src/delta.js +25 -25
- package/js/src/deribit.js +30 -30
- package/js/src/digifinex.js +31 -31
- package/js/src/exmo.js +26 -26
- package/js/src/gate.js +38 -38
- package/js/src/gemini.js +17 -17
- package/js/src/hitbtc.js +34 -34
- package/js/src/hollaex.js +23 -23
- package/js/src/huobi.js +45 -45
- package/js/src/huobijp.js +20 -20
- package/js/src/idex.js +19 -19
- package/js/src/independentreserve.js +12 -12
- package/js/src/indodax.js +14 -14
- package/js/src/kraken.js +27 -27
- package/js/src/krakenfutures.js +12 -12
- package/js/src/kucoin.js +33 -33
- package/js/src/kucoinfutures.js +24 -24
- package/js/src/kuna.js +12 -12
- package/js/src/latoken.js +17 -17
- package/js/src/lbank.js +12 -12
- package/js/src/lbank2.js +23 -23
- package/js/src/luno.js +16 -16
- package/js/src/lykke.js +16 -16
- package/js/src/mercado.js +12 -12
- package/js/src/mexc.js +45 -43
- package/js/src/ndax.js +20 -20
- package/js/src/novadax.js +20 -20
- package/js/src/oceanex.js +16 -16
- package/js/src/okcoin.js +21 -21
- package/js/src/okx.js +52 -52
- package/js/src/paymium.js +11 -11
- package/js/src/phemex.js +26 -26
- package/js/src/poloniex.d.ts +1 -1
- package/js/src/poloniex.js +237 -136
- package/js/src/poloniexfutures.js +18 -18
- 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/bitfinex.js +4 -4
- package/js/src/pro/bitfinex2.js +6 -6
- package/js/src/pro/bitget.js +6 -6
- package/js/src/pro/bitmart.js +4 -4
- 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 +3 -3
- package/js/src/pro/bittrex.js +6 -6
- package/js/src/pro/bitvavo.js +5 -5
- package/js/src/pro/blockchaincom.js +5 -5
- package/js/src/pro/bybit.js +6 -6
- package/js/src/pro/cex.js +7 -7
- package/js/src/pro/coinbase.js +5 -5
- package/js/src/pro/coinbasepro.js +6 -6
- package/js/src/pro/coinex.js +5 -5
- package/js/src/pro/cryptocom.js +10 -10
- package/js/src/pro/currencycom.js +4 -4
- package/js/src/pro/deribit.js +6 -6
- package/js/src/pro/exmo.js +5 -5
- package/js/src/pro/gate.js +7 -7
- package/js/src/pro/gemini.js +3 -3
- package/js/src/pro/hitbtc.js +3 -3
- package/js/src/pro/hollaex.js +5 -5
- package/js/src/pro/huobi.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 +12 -12
- package/js/src/pro/krakenfutures.js +7 -7
- package/js/src/pro/kucoin.js +6 -6
- package/js/src/pro/kucoinfutures.js +6 -5
- 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.d.ts +1 -1
- package/js/src/pro/okx.js +19 -18
- 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 +6 -6
- package/js/src/pro/whitebit.js +6 -6
- package/js/src/probit.js +19 -19
- package/js/src/tidex.js +13 -13
- package/js/src/timex.js +16 -16
- package/js/src/tokocrypto.js +18 -18
- package/js/src/upbit.js +20 -20
- package/js/src/wavesexchange.js +16 -16
- package/js/src/wazirx.js +12 -12
- package/js/src/whitebit.js +24 -24
- package/js/src/woo.js +30 -24
- package/js/src/yobit.js +16 -16
- package/js/src/zaif.js +10 -10
- package/js/src/zonda.js +15 -15
- package/package.json +1 -1
- package/skip-tests.json +2 -0
package/dist/cjs/src/bingx.js
CHANGED
|
@@ -98,11 +98,13 @@ class bingx extends bingx$1 {
|
|
|
98
98
|
'trade/openOrders': 3,
|
|
99
99
|
'trade/historyOrders': 3,
|
|
100
100
|
'account/balance': 3,
|
|
101
|
+
'ticker/24hr': 1,
|
|
101
102
|
},
|
|
102
103
|
'post': {
|
|
103
104
|
'trade/order': 3,
|
|
104
105
|
'trade/cancel': 3,
|
|
105
106
|
'trade/batchOrders': 3,
|
|
107
|
+
'trade/cancelOrders': 3,
|
|
106
108
|
},
|
|
107
109
|
},
|
|
108
110
|
},
|
|
@@ -682,7 +684,7 @@ class bingx extends bingx$1 {
|
|
|
682
684
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
683
685
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
684
686
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
685
|
-
* @returns {[object]} a list of [trade structures]{@link https://
|
|
687
|
+
* @returns {[object]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
686
688
|
*/
|
|
687
689
|
await this.loadMarkets();
|
|
688
690
|
const market = this.market(symbol);
|
|
@@ -822,7 +824,7 @@ class bingx extends bingx$1 {
|
|
|
822
824
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
823
825
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
824
826
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
825
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
827
|
+
* @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
|
|
826
828
|
*/
|
|
827
829
|
await this.loadMarkets();
|
|
828
830
|
const market = this.market(symbol);
|
|
@@ -910,7 +912,7 @@ class bingx extends bingx$1 {
|
|
|
910
912
|
* @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#Current%20Funding%20Rate
|
|
911
913
|
* @param {string} symbol unified market symbol
|
|
912
914
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
913
|
-
* @returns {object} a [funding rate structure]{@link https://
|
|
915
|
+
* @returns {object} a [funding rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-structure}
|
|
914
916
|
*/
|
|
915
917
|
await this.loadMarkets();
|
|
916
918
|
const market = this.market(symbol);
|
|
@@ -977,9 +979,9 @@ class bingx extends bingx$1 {
|
|
|
977
979
|
* @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#Funding%20Rate%20History
|
|
978
980
|
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
979
981
|
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
980
|
-
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://
|
|
982
|
+
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure} to fetch
|
|
981
983
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
982
|
-
* @returns {[object]} a list of [funding rate structures]{@link https://
|
|
984
|
+
* @returns {[object]} a list of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure}
|
|
983
985
|
*/
|
|
984
986
|
this.checkRequiredSymbol('fetchFundingRateHistory', symbol);
|
|
985
987
|
await this.loadMarkets();
|
|
@@ -1034,7 +1036,7 @@ class bingx extends bingx$1 {
|
|
|
1034
1036
|
* @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#Get%20Swap%20Open%20Positions
|
|
1035
1037
|
* @param {string} symbol Unified CCXT market symbol
|
|
1036
1038
|
* @param {object} [params] exchange specific parameters
|
|
1037
|
-
* @returns {object} an open interest structure{@link https://
|
|
1039
|
+
* @returns {object} an open interest structure{@link https://github.com/ccxt/ccxt/wiki/Manual#interest-history-structure}
|
|
1038
1040
|
*/
|
|
1039
1041
|
await this.loadMarkets();
|
|
1040
1042
|
const market = this.market(symbol);
|
|
@@ -1083,19 +1085,23 @@ class bingx extends bingx$1 {
|
|
|
1083
1085
|
* @name bingx#fetchTicker
|
|
1084
1086
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1085
1087
|
* @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#Get%20Ticker
|
|
1088
|
+
* @see https://bingx-api.github.io/docs/#/spot/market-api.html#24%E5%B0%8F%E6%97%B6%E4%BB%B7%E6%A0%BC%E5%8F%98%E5%8A%A8%E6%83%85%E5%86%B5
|
|
1086
1089
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1087
1090
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
1088
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
1091
|
+
* @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
1089
1092
|
*/
|
|
1090
1093
|
await this.loadMarkets();
|
|
1091
1094
|
const market = this.market(symbol);
|
|
1092
|
-
if (!market['swap']) {
|
|
1093
|
-
throw new errors.BadRequest(this.id + ' fetchTicker is only supported for swap markets.');
|
|
1094
|
-
}
|
|
1095
1095
|
const request = {
|
|
1096
1096
|
'symbol': market['id'],
|
|
1097
1097
|
};
|
|
1098
|
-
|
|
1098
|
+
let response = undefined;
|
|
1099
|
+
if (market['spot']) {
|
|
1100
|
+
response = await this.swapV2PublicGetQuoteTicker(this.extend(request, params));
|
|
1101
|
+
}
|
|
1102
|
+
else {
|
|
1103
|
+
response = await this.spotV1PublicGetCommonSymbols(this.extend(request, params));
|
|
1104
|
+
}
|
|
1099
1105
|
//
|
|
1100
1106
|
// {
|
|
1101
1107
|
// "code": 0,
|
|
@@ -1127,7 +1133,7 @@ class bingx extends bingx$1 {
|
|
|
1127
1133
|
* @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#Get%20Ticker
|
|
1128
1134
|
* @param {[string]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1129
1135
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
1130
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
1136
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
1131
1137
|
*/
|
|
1132
1138
|
await this.loadMarkets();
|
|
1133
1139
|
if (symbols !== undefined) {
|
|
@@ -1192,10 +1198,12 @@ class bingx extends bingx$1 {
|
|
|
1192
1198
|
const baseVolume = this.safeString(ticker, 'volume');
|
|
1193
1199
|
const change = this.safeString(ticker, 'chapriceChangenge');
|
|
1194
1200
|
const percentage = this.safeString(ticker, 'priceChangePercent');
|
|
1201
|
+
const ts = this.safeInteger(ticker, 'closeTime');
|
|
1202
|
+
const datetime = this.iso8601(ts);
|
|
1195
1203
|
return this.safeTicker({
|
|
1196
1204
|
'symbol': symbol,
|
|
1197
|
-
'timestamp':
|
|
1198
|
-
'datetime':
|
|
1205
|
+
'timestamp': ts,
|
|
1206
|
+
'datetime': datetime,
|
|
1199
1207
|
'high': high,
|
|
1200
1208
|
'low': low,
|
|
1201
1209
|
'bid': undefined,
|
|
@@ -1225,7 +1233,7 @@ class bingx extends bingx$1 {
|
|
|
1225
1233
|
* @see https://bingx-api.github.io/docs/#/standard/contract-interface.html#Query%20standard%20contract%20balance
|
|
1226
1234
|
* @param {object} [params] extra parameters specific to the cryptocom api endpoint
|
|
1227
1235
|
* @param {boolean} [params.standard] whether to fetch standard contract balances
|
|
1228
|
-
* @returns {object} a [balance structure]{@link https://
|
|
1236
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
1229
1237
|
*/
|
|
1230
1238
|
await this.loadMarkets();
|
|
1231
1239
|
let response = undefined;
|
|
@@ -1343,7 +1351,7 @@ class bingx extends bingx$1 {
|
|
|
1343
1351
|
* @param {[string]|undefined} symbols list of unified market symbols
|
|
1344
1352
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
1345
1353
|
* @param {boolean} [params.standard] whether to fetch standard contract positions
|
|
1346
|
-
* @returns {[object]} a list of [position structure]{@link https://
|
|
1354
|
+
* @returns {[object]} a list of [position structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#position-structure}
|
|
1347
1355
|
*/
|
|
1348
1356
|
await this.loadMarkets();
|
|
1349
1357
|
symbols = this.marketSymbols(symbols);
|
|
@@ -1459,7 +1467,7 @@ class bingx extends bingx$1 {
|
|
|
1459
1467
|
* @param {object} [params.triggerPrice] triggerPrice at which the attached take profit / stop loss order will be triggered (swap markets only)
|
|
1460
1468
|
* @param {float} [params.stopLossPrice] stop loss trigger price (swap markets only)
|
|
1461
1469
|
* @param {float} [params.takeProfitPrice] take profit trigger price (swap markets only)
|
|
1462
|
-
* @returns {object} an [order structure]{@link https://
|
|
1470
|
+
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1463
1471
|
*/
|
|
1464
1472
|
await this.loadMarkets();
|
|
1465
1473
|
const market = this.market(symbol);
|
|
@@ -1751,7 +1759,7 @@ class bingx extends bingx$1 {
|
|
|
1751
1759
|
* @param {string} id order id
|
|
1752
1760
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
1753
1761
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
1754
|
-
* @returns {object} An [order structure]{@link https://
|
|
1762
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1755
1763
|
*/
|
|
1756
1764
|
this.checkRequiredSymbol('cancelOrder', symbol);
|
|
1757
1765
|
await this.loadMarkets();
|
|
@@ -1826,7 +1834,7 @@ class bingx extends bingx$1 {
|
|
|
1826
1834
|
* @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Cancel%20All%20Orders
|
|
1827
1835
|
* @param {string} [symbol] unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
1828
1836
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
1829
|
-
* @returns {[object]} a list of [order structures]{@link https://
|
|
1837
|
+
* @returns {[object]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1830
1838
|
*/
|
|
1831
1839
|
this.checkRequiredSymbol('cancelAllOrders', symbol);
|
|
1832
1840
|
await this.loadMarkets();
|
|
@@ -1875,22 +1883,33 @@ class bingx extends bingx$1 {
|
|
|
1875
1883
|
* @name bingx#cancelOrders
|
|
1876
1884
|
* @description cancel multiple orders
|
|
1877
1885
|
* @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Cancel%20a%20Batch%20of%20Orders
|
|
1886
|
+
* @see https://bingx-api.github.io/docs/#/spot/trade-api.html#Cancel%20a%20Batch%20of%20Orders
|
|
1878
1887
|
* @param {[string]} ids order ids
|
|
1879
1888
|
* @param {string} symbol unified market symbol, default is undefined
|
|
1880
1889
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
1881
|
-
* @returns {object} an list of [order structures]{@link https://
|
|
1890
|
+
* @returns {object} an list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1882
1891
|
*/
|
|
1883
1892
|
this.checkRequiredSymbol('cancelOrders', symbol);
|
|
1884
1893
|
await this.loadMarkets();
|
|
1885
1894
|
const market = this.market(symbol);
|
|
1886
|
-
if (market['type'] !== 'swap') {
|
|
1887
|
-
throw new errors.BadRequest(this.id + ' cancelOrders is only supported for swap markets.');
|
|
1888
|
-
}
|
|
1889
1895
|
const request = {
|
|
1890
1896
|
'symbol': market['id'],
|
|
1891
|
-
'ids': ids,
|
|
1892
1897
|
};
|
|
1893
|
-
const
|
|
1898
|
+
const parsedIds = [];
|
|
1899
|
+
for (let i = 0; i < ids.length; i++) {
|
|
1900
|
+
const id = ids[i];
|
|
1901
|
+
const stringId = id.toString();
|
|
1902
|
+
parsedIds.push(stringId);
|
|
1903
|
+
}
|
|
1904
|
+
let response = undefined;
|
|
1905
|
+
if (market['spot']) {
|
|
1906
|
+
request['orderIds'] = parsedIds.join(',');
|
|
1907
|
+
response = await this.spotV1PrivatePostTradeCancelOrders(this.extend(request, params));
|
|
1908
|
+
}
|
|
1909
|
+
else {
|
|
1910
|
+
request['orderIdList'] = parsedIds;
|
|
1911
|
+
response = await this.swapV2PrivateDeleteTradeBatchOrders(this.extend(request, params));
|
|
1912
|
+
}
|
|
1894
1913
|
//
|
|
1895
1914
|
// {
|
|
1896
1915
|
// "code": 0,
|
|
@@ -1931,7 +1950,7 @@ class bingx extends bingx$1 {
|
|
|
1931
1950
|
* @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Query%20Order
|
|
1932
1951
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
1933
1952
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
1934
|
-
* @returns {object} An [order structure]{@link https://
|
|
1953
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1935
1954
|
*/
|
|
1936
1955
|
this.checkRequiredSymbol('fetchOrders', symbol);
|
|
1937
1956
|
await this.loadMarkets();
|
|
@@ -2014,7 +2033,7 @@ class bingx extends bingx$1 {
|
|
|
2014
2033
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
2015
2034
|
* @param {int} [limit] the maximum number of open order structures to retrieve
|
|
2016
2035
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
2017
|
-
* @returns {[object]} a list of [order structures]{@link https://
|
|
2036
|
+
* @returns {[object]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
2018
2037
|
*/
|
|
2019
2038
|
this.checkRequiredSymbol('fetchOrders', symbol);
|
|
2020
2039
|
await this.loadMarkets();
|
|
@@ -2103,7 +2122,7 @@ class bingx extends bingx$1 {
|
|
|
2103
2122
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
2104
2123
|
* @param {int} [params.until] the latest time in ms to fetch orders for
|
|
2105
2124
|
* @param {boolean} [params.standard] whether to fetch standard contract orders
|
|
2106
|
-
* @returns {[object]} a list of [order structures]{@link https://
|
|
2125
|
+
* @returns {[object]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
2107
2126
|
*/
|
|
2108
2127
|
this.checkRequiredSymbol('fetchClosedOrders', symbol);
|
|
2109
2128
|
await this.loadMarkets();
|
|
@@ -2194,7 +2213,7 @@ class bingx extends bingx$1 {
|
|
|
2194
2213
|
* @param {string} fromAccount account to transfer from
|
|
2195
2214
|
* @param {string} toAccount account to transfer to
|
|
2196
2215
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
2197
|
-
* @returns {object} a [transfer structure]{@link https://
|
|
2216
|
+
* @returns {object} a [transfer structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transfer-structure}
|
|
2198
2217
|
*/
|
|
2199
2218
|
await this.loadMarkets();
|
|
2200
2219
|
const currency = this.currency(code);
|
|
@@ -2234,7 +2253,7 @@ class bingx extends bingx$1 {
|
|
|
2234
2253
|
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
2235
2254
|
* @param {int} [limit] the maximum number of transfers structures to retrieve
|
|
2236
2255
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
2237
|
-
* @returns {[object]} a list of [transfer structures]{@link https://
|
|
2256
|
+
* @returns {[object]} a list of [transfer structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transfer-structure}
|
|
2238
2257
|
*/
|
|
2239
2258
|
await this.loadMarkets();
|
|
2240
2259
|
let currency = undefined;
|
|
@@ -2311,7 +2330,7 @@ class bingx extends bingx$1 {
|
|
|
2311
2330
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
2312
2331
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
2313
2332
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
2314
|
-
* @returns {[object]} a list of [transaction structures]{@link https://
|
|
2333
|
+
* @returns {[object]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
2315
2334
|
*/
|
|
2316
2335
|
await this.loadMarkets();
|
|
2317
2336
|
const request = {};
|
|
@@ -2356,7 +2375,7 @@ class bingx extends bingx$1 {
|
|
|
2356
2375
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
2357
2376
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
2358
2377
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
2359
|
-
* @returns {[object]} a list of [transaction structures]{@link https://
|
|
2378
|
+
* @returns {[object]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
2360
2379
|
*/
|
|
2361
2380
|
await this.loadMarkets();
|
|
2362
2381
|
const request = {};
|
|
@@ -2528,7 +2547,7 @@ class bingx extends bingx$1 {
|
|
|
2528
2547
|
* @param {string} symbol unified market symbol of the market to set margin in
|
|
2529
2548
|
* @param {float} amount the amount to set the margin to
|
|
2530
2549
|
* @param {object} [params] parameters specific to the bingx api endpoint
|
|
2531
|
-
* @returns {object} A [margin structure]{@link https://
|
|
2550
|
+
* @returns {object} A [margin structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#add-margin-structure}
|
|
2532
2551
|
*/
|
|
2533
2552
|
const type = this.safeInteger(params, 'type'); // 1 increase margin 2 decrease margin
|
|
2534
2553
|
if (type === undefined) {
|
|
@@ -2563,7 +2582,7 @@ class bingx extends bingx$1 {
|
|
|
2563
2582
|
* @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Query%20Leverage
|
|
2564
2583
|
* @param {string} symbol unified market symbol
|
|
2565
2584
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
2566
|
-
* @returns {object} a [leverage structure]{@link https://
|
|
2585
|
+
* @returns {object} a [leverage structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#leverage-structure}
|
|
2567
2586
|
*/
|
|
2568
2587
|
await this.loadMarkets();
|
|
2569
2588
|
const market = this.market(symbol);
|
|
@@ -2627,7 +2646,7 @@ class bingx extends bingx$1 {
|
|
|
2627
2646
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
2628
2647
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
2629
2648
|
* @param {string} params.trandingUnit COIN (directly represent assets such as BTC and ETH) or CONT (represents the number of contract sheets)
|
|
2630
|
-
* @returns {[object]} a list of [trade structures]{@link https://
|
|
2649
|
+
* @returns {[object]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
|
|
2631
2650
|
*/
|
|
2632
2651
|
this.checkRequiredArgument('fetchMyTrades', symbol, 'symbol');
|
|
2633
2652
|
this.checkRequiredArgument('fetchMyTrades', since, 'since');
|
|
@@ -2739,7 +2758,7 @@ class bingx extends bingx$1 {
|
|
|
2739
2758
|
* @see https://bingx-api.github.io/docs/#/common/account-api.html#All%20Coins'%20Information
|
|
2740
2759
|
* @param {[string]|undefined} codes list of unified currency codes
|
|
2741
2760
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
2742
|
-
* @returns {object} a list of [fee structures]{@link https://
|
|
2761
|
+
* @returns {object} a list of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
|
2743
2762
|
*/
|
|
2744
2763
|
await this.loadMarkets();
|
|
2745
2764
|
const response = await this.walletsV1PrivateGetCapitalConfigGetall(params);
|
|
@@ -2758,7 +2777,7 @@ class bingx extends bingx$1 {
|
|
|
2758
2777
|
* @param {string} [tag]
|
|
2759
2778
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
2760
2779
|
* @param {int} [params.walletType] 1 fund account, 2 standard account, 3 perpetual account
|
|
2761
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
2780
|
+
* @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
2762
2781
|
*/
|
|
2763
2782
|
await this.loadMarkets();
|
|
2764
2783
|
const currency = this.currency(code);
|
|
@@ -2791,6 +2810,33 @@ class bingx extends bingx$1 {
|
|
|
2791
2810
|
// }
|
|
2792
2811
|
this.parseTransaction(data);
|
|
2793
2812
|
}
|
|
2813
|
+
parseParams(params) {
|
|
2814
|
+
let result = '';
|
|
2815
|
+
const sortedParams = this.keysort(params);
|
|
2816
|
+
const keys = Object.keys(sortedParams);
|
|
2817
|
+
for (let i = 0; i < keys.length; i++) {
|
|
2818
|
+
const key = keys[i];
|
|
2819
|
+
if (i > 0) {
|
|
2820
|
+
result += '&';
|
|
2821
|
+
}
|
|
2822
|
+
const value = sortedParams[key];
|
|
2823
|
+
if (Array.isArray(value)) {
|
|
2824
|
+
result += key + '=[';
|
|
2825
|
+
for (let j = 0; j < value.length; j++) {
|
|
2826
|
+
const arrayElement = value[j];
|
|
2827
|
+
if (j > 0) {
|
|
2828
|
+
result += ',';
|
|
2829
|
+
}
|
|
2830
|
+
result += arrayElement.toString();
|
|
2831
|
+
}
|
|
2832
|
+
result += ']';
|
|
2833
|
+
}
|
|
2834
|
+
else {
|
|
2835
|
+
result += key + '=' + value.toString();
|
|
2836
|
+
}
|
|
2837
|
+
}
|
|
2838
|
+
return result;
|
|
2839
|
+
}
|
|
2794
2840
|
sign(path, section = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
|
|
2795
2841
|
const type = section[0];
|
|
2796
2842
|
const version = section[1];
|
|
@@ -2815,9 +2861,8 @@ class bingx extends bingx$1 {
|
|
|
2815
2861
|
else if (access === 'private') {
|
|
2816
2862
|
this.checkRequiredCredentials();
|
|
2817
2863
|
params['timestamp'] = this.nonce();
|
|
2818
|
-
let query = this.
|
|
2819
|
-
const
|
|
2820
|
-
const signature = this.hmac(this.encode(rawQuery), this.encode(this.secret), sha256.sha256);
|
|
2864
|
+
let query = this.parseParams(params);
|
|
2865
|
+
const signature = this.hmac(this.encode(query), this.encode(this.secret), sha256.sha256);
|
|
2821
2866
|
if (Object.keys(params).length) {
|
|
2822
2867
|
query = '?' + query + '&';
|
|
2823
2868
|
}
|
package/dist/cjs/src/bit2c.js
CHANGED
|
@@ -205,7 +205,7 @@ class bit2c extends bit2c$1 {
|
|
|
205
205
|
* @name bit2c#fetchBalance
|
|
206
206
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
207
207
|
* @param {object} [params] extra parameters specific to the bit2c api endpoint
|
|
208
|
-
* @returns {object} a [balance structure]{@link https://
|
|
208
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
209
209
|
*/
|
|
210
210
|
await this.loadMarkets();
|
|
211
211
|
const response = await this.privateGetAccountBalanceV2(params);
|
|
@@ -261,7 +261,7 @@ class bit2c extends bit2c$1 {
|
|
|
261
261
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
262
262
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
263
263
|
* @param {object} [params] extra parameters specific to the bit2c api endpoint
|
|
264
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
264
|
+
* @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
|
|
265
265
|
*/
|
|
266
266
|
await this.loadMarkets();
|
|
267
267
|
const market = this.market(symbol);
|
|
@@ -307,7 +307,7 @@ class bit2c extends bit2c$1 {
|
|
|
307
307
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
308
308
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
309
309
|
* @param {object} [params] extra parameters specific to the bit2c api endpoint
|
|
310
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
310
|
+
* @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
311
311
|
*/
|
|
312
312
|
await this.loadMarkets();
|
|
313
313
|
const market = this.market(symbol);
|
|
@@ -326,7 +326,7 @@ class bit2c extends bit2c$1 {
|
|
|
326
326
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
327
327
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
328
328
|
* @param {object} [params] extra parameters specific to the bit2c api endpoint
|
|
329
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
329
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
330
330
|
*/
|
|
331
331
|
await this.loadMarkets();
|
|
332
332
|
const market = this.market(symbol);
|
|
@@ -359,7 +359,7 @@ class bit2c extends bit2c$1 {
|
|
|
359
359
|
* @name bit2c#fetchTradingFees
|
|
360
360
|
* @description fetch the trading fees for multiple markets
|
|
361
361
|
* @param {object} [params] extra parameters specific to the bit2c api endpoint
|
|
362
|
-
* @returns {object} a dictionary of [fee structures]{@link https://
|
|
362
|
+
* @returns {object} a dictionary of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure} indexed by market symbols
|
|
363
363
|
*/
|
|
364
364
|
await this.loadMarkets();
|
|
365
365
|
const response = await this.privateGetAccountBalance(params);
|
|
@@ -410,9 +410,9 @@ class bit2c extends bit2c$1 {
|
|
|
410
410
|
* @param {string} type 'market' or 'limit'
|
|
411
411
|
* @param {string} side 'buy' or 'sell'
|
|
412
412
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
413
|
-
* @param {float} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
413
|
+
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
414
414
|
* @param {object} [params] extra parameters specific to the bit2c api endpoint
|
|
415
|
-
* @returns {object} an [order structure]{@link https://
|
|
415
|
+
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
416
416
|
*/
|
|
417
417
|
await this.loadMarkets();
|
|
418
418
|
let method = 'privatePostOrderAddOrder';
|
|
@@ -442,7 +442,7 @@ class bit2c extends bit2c$1 {
|
|
|
442
442
|
* @param {string} id order id
|
|
443
443
|
* @param {string} symbol Not used by bit2c cancelOrder ()
|
|
444
444
|
* @param {object} [params] extra parameters specific to the bit2c api endpoint
|
|
445
|
-
* @returns {object} An [order structure]{@link https://
|
|
445
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
446
446
|
*/
|
|
447
447
|
const request = {
|
|
448
448
|
'id': id,
|
|
@@ -458,7 +458,7 @@ class bit2c extends bit2c$1 {
|
|
|
458
458
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
459
459
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
460
460
|
* @param {object} [params] extra parameters specific to the bit2c api endpoint
|
|
461
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
461
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
462
462
|
*/
|
|
463
463
|
if (symbol === undefined) {
|
|
464
464
|
throw new errors.ArgumentsRequired(this.id + ' fetchOpenOrders() requires a symbol argument');
|
|
@@ -481,7 +481,7 @@ class bit2c extends bit2c$1 {
|
|
|
481
481
|
* @description fetches information on an order made by the user
|
|
482
482
|
* @param {string} symbol unified market symbol
|
|
483
483
|
* @param {object} [params] extra parameters specific to the bit2c api endpoint
|
|
484
|
-
* @returns {object} An [order structure]{@link https://
|
|
484
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
485
485
|
*/
|
|
486
486
|
await this.loadMarkets();
|
|
487
487
|
const market = this.market(symbol);
|
|
@@ -635,7 +635,7 @@ class bit2c extends bit2c$1 {
|
|
|
635
635
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
636
636
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
637
637
|
* @param {object} [params] extra parameters specific to the bit2c api endpoint
|
|
638
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
638
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
|
|
639
639
|
*/
|
|
640
640
|
await this.loadMarkets();
|
|
641
641
|
let market = undefined;
|
|
@@ -813,7 +813,7 @@ class bit2c extends bit2c$1 {
|
|
|
813
813
|
* @description fetch the deposit address for a currency associated with this account
|
|
814
814
|
* @param {string} code unified currency code
|
|
815
815
|
* @param {object} [params] extra parameters specific to the bit2c api endpoint
|
|
816
|
-
* @returns {object} an [address structure]{@link https://
|
|
816
|
+
* @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
|
|
817
817
|
*/
|
|
818
818
|
await this.loadMarkets();
|
|
819
819
|
const currency = this.currency(code);
|
package/dist/cjs/src/bitbank.js
CHANGED
|
@@ -284,7 +284,7 @@ class bitbank extends bitbank$1 {
|
|
|
284
284
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
285
285
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
286
286
|
* @param {object} [params] extra parameters specific to the bitbank api endpoint
|
|
287
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
287
|
+
* @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
288
288
|
*/
|
|
289
289
|
await this.loadMarkets();
|
|
290
290
|
const market = this.market(symbol);
|
|
@@ -303,7 +303,7 @@ class bitbank extends bitbank$1 {
|
|
|
303
303
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
304
304
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
305
305
|
* @param {object} [params] extra parameters specific to the bitbank api endpoint
|
|
306
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
306
|
+
* @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
|
|
307
307
|
*/
|
|
308
308
|
await this.loadMarkets();
|
|
309
309
|
const market = this.market(symbol);
|
|
@@ -358,7 +358,7 @@ class bitbank extends bitbank$1 {
|
|
|
358
358
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
359
359
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
360
360
|
* @param {object} [params] extra parameters specific to the bitbank api endpoint
|
|
361
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
361
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
362
362
|
*/
|
|
363
363
|
await this.loadMarkets();
|
|
364
364
|
const market = this.market(symbol);
|
|
@@ -376,7 +376,7 @@ class bitbank extends bitbank$1 {
|
|
|
376
376
|
* @name bitbank#fetchTradingFees
|
|
377
377
|
* @description fetch the trading fees for multiple markets
|
|
378
378
|
* @param {object} [params] extra parameters specific to the bitbank api endpoint
|
|
379
|
-
* @returns {object} a dictionary of [fee structures]{@link https://
|
|
379
|
+
* @returns {object} a dictionary of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure} indexed by market symbols
|
|
380
380
|
*/
|
|
381
381
|
await this.loadMarkets();
|
|
382
382
|
const response = await this.marketsGetSpotPairs(params);
|
|
@@ -524,7 +524,7 @@ class bitbank extends bitbank$1 {
|
|
|
524
524
|
* @name bitbank#fetchBalance
|
|
525
525
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
526
526
|
* @param {object} [params] extra parameters specific to the bitbank api endpoint
|
|
527
|
-
* @returns {object} a [balance structure]{@link https://
|
|
527
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
528
528
|
*/
|
|
529
529
|
await this.loadMarkets();
|
|
530
530
|
const response = await this.privateGetUserAssets(params);
|
|
@@ -620,9 +620,9 @@ class bitbank extends bitbank$1 {
|
|
|
620
620
|
* @param {string} type 'market' or 'limit'
|
|
621
621
|
* @param {string} side 'buy' or 'sell'
|
|
622
622
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
623
|
-
* @param {float} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
623
|
+
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
624
624
|
* @param {object} [params] extra parameters specific to the bitbank api endpoint
|
|
625
|
-
* @returns {object} an [order structure]{@link https://
|
|
625
|
+
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
626
626
|
*/
|
|
627
627
|
await this.loadMarkets();
|
|
628
628
|
const market = this.market(symbol);
|
|
@@ -647,7 +647,7 @@ class bitbank extends bitbank$1 {
|
|
|
647
647
|
* @param {string} id order id
|
|
648
648
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
649
649
|
* @param {object} [params] extra parameters specific to the bitbank api endpoint
|
|
650
|
-
* @returns {object} An [order structure]{@link https://
|
|
650
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
651
651
|
*/
|
|
652
652
|
await this.loadMarkets();
|
|
653
653
|
const market = this.market(symbol);
|
|
@@ -666,7 +666,7 @@ class bitbank extends bitbank$1 {
|
|
|
666
666
|
* @description fetches information on an order made by the user
|
|
667
667
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
668
668
|
* @param {object} [params] extra parameters specific to the bitbank api endpoint
|
|
669
|
-
* @returns {object} An [order structure]{@link https://
|
|
669
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
670
670
|
*/
|
|
671
671
|
await this.loadMarkets();
|
|
672
672
|
const market = this.market(symbol);
|
|
@@ -687,7 +687,7 @@ class bitbank extends bitbank$1 {
|
|
|
687
687
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
688
688
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
689
689
|
* @param {object} [params] extra parameters specific to the bitbank api endpoint
|
|
690
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
690
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
691
691
|
*/
|
|
692
692
|
await this.loadMarkets();
|
|
693
693
|
const market = this.market(symbol);
|
|
@@ -714,7 +714,7 @@ class bitbank extends bitbank$1 {
|
|
|
714
714
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
715
715
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
716
716
|
* @param {object} [params] extra parameters specific to the bitbank api endpoint
|
|
717
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
717
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
|
|
718
718
|
*/
|
|
719
719
|
await this.loadMarkets();
|
|
720
720
|
const request = {};
|
|
@@ -741,7 +741,7 @@ class bitbank extends bitbank$1 {
|
|
|
741
741
|
* @description fetch the deposit address for a currency associated with this account
|
|
742
742
|
* @param {string} code unified currency code
|
|
743
743
|
* @param {object} [params] extra parameters specific to the bitbank api endpoint
|
|
744
|
-
* @returns {object} an [address structure]{@link https://
|
|
744
|
+
* @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
|
|
745
745
|
*/
|
|
746
746
|
await this.loadMarkets();
|
|
747
747
|
const currency = this.currency(code);
|
|
@@ -772,7 +772,7 @@ class bitbank extends bitbank$1 {
|
|
|
772
772
|
* @param {string} address the address to withdraw to
|
|
773
773
|
* @param {string} tag
|
|
774
774
|
* @param {object} [params] extra parameters specific to the bitbank api endpoint
|
|
775
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
775
|
+
* @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
776
776
|
*/
|
|
777
777
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
778
778
|
if (!('uuid' in params)) {
|