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/bithumb.js
CHANGED
|
@@ -285,7 +285,7 @@ class bithumb extends bithumb$1 {
|
|
|
285
285
|
* @name bithumb#fetchBalance
|
|
286
286
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
287
287
|
* @param {object} [params] extra parameters specific to the bithumb api endpoint
|
|
288
|
-
* @returns {object} a [balance structure]{@link https://
|
|
288
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
289
289
|
*/
|
|
290
290
|
await this.loadMarkets();
|
|
291
291
|
const request = {
|
|
@@ -302,7 +302,7 @@ class bithumb extends bithumb$1 {
|
|
|
302
302
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
303
303
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
304
304
|
* @param {object} [params] extra parameters specific to the bithumb api endpoint
|
|
305
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
305
|
+
* @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
|
|
306
306
|
*/
|
|
307
307
|
await this.loadMarkets();
|
|
308
308
|
const market = this.market(symbol);
|
|
@@ -392,7 +392,7 @@ class bithumb extends bithumb$1 {
|
|
|
392
392
|
* @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
|
|
393
393
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
394
394
|
* @param {object} [params] extra parameters specific to the bithumb api endpoint
|
|
395
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
395
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
396
396
|
*/
|
|
397
397
|
await this.loadMarkets();
|
|
398
398
|
const result = {};
|
|
@@ -446,7 +446,7 @@ class bithumb extends bithumb$1 {
|
|
|
446
446
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
447
447
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
448
448
|
* @param {object} [params] extra parameters specific to the bithumb api endpoint
|
|
449
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
449
|
+
* @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
450
450
|
*/
|
|
451
451
|
await this.loadMarkets();
|
|
452
452
|
const market = this.market(symbol);
|
|
@@ -628,7 +628,7 @@ class bithumb extends bithumb$1 {
|
|
|
628
628
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
629
629
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
630
630
|
* @param {object} [params] extra parameters specific to the bithumb api endpoint
|
|
631
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
631
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
632
632
|
*/
|
|
633
633
|
await this.loadMarkets();
|
|
634
634
|
const market = this.market(symbol);
|
|
@@ -665,9 +665,9 @@ class bithumb extends bithumb$1 {
|
|
|
665
665
|
* @param {string} type 'market' or 'limit'
|
|
666
666
|
* @param {string} side 'buy' or 'sell'
|
|
667
667
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
668
|
-
* @param {float} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
668
|
+
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
669
669
|
* @param {object} [params] extra parameters specific to the bithumb api endpoint
|
|
670
|
-
* @returns {object} an [order structure]{@link https://
|
|
670
|
+
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
671
671
|
*/
|
|
672
672
|
await this.loadMarkets();
|
|
673
673
|
const market = this.market(symbol);
|
|
@@ -704,7 +704,7 @@ class bithumb extends bithumb$1 {
|
|
|
704
704
|
* @description fetches information on an order made by the user
|
|
705
705
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
706
706
|
* @param {object} [params] extra parameters specific to the bithumb api endpoint
|
|
707
|
-
* @returns {object} An [order structure]{@link https://
|
|
707
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
708
708
|
*/
|
|
709
709
|
if (symbol === undefined) {
|
|
710
710
|
throw new errors.ArgumentsRequired(this.id + ' fetchOrder() requires a symbol argument');
|
|
@@ -864,7 +864,7 @@ class bithumb extends bithumb$1 {
|
|
|
864
864
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
865
865
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
866
866
|
* @param {object} [params] extra parameters specific to the bithumb api endpoint
|
|
867
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
867
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
868
868
|
*/
|
|
869
869
|
if (symbol === undefined) {
|
|
870
870
|
throw new errors.ArgumentsRequired(this.id + ' fetchOpenOrders() requires a symbol argument');
|
|
@@ -911,7 +911,7 @@ class bithumb extends bithumb$1 {
|
|
|
911
911
|
* @param {string} id order id
|
|
912
912
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
913
913
|
* @param {object} [params] extra parameters specific to the bithumb api endpoint
|
|
914
|
-
* @returns {object} An [order structure]{@link https://
|
|
914
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
915
915
|
*/
|
|
916
916
|
const side_in_params = ('side' in params);
|
|
917
917
|
if (!side_in_params) {
|
|
@@ -948,7 +948,7 @@ class bithumb extends bithumb$1 {
|
|
|
948
948
|
* @param {string} address the address to withdraw to
|
|
949
949
|
* @param {string} tag
|
|
950
950
|
* @param {object} [params] extra parameters specific to the bithumb api endpoint
|
|
951
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
951
|
+
* @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
952
952
|
*/
|
|
953
953
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
954
954
|
this.checkAddress(address);
|
package/dist/cjs/src/bitmart.js
CHANGED
|
@@ -116,8 +116,15 @@ class bitmart extends bitmart$1 {
|
|
|
116
116
|
'spot/v1/currencies': 7.5,
|
|
117
117
|
'spot/v1/symbols': 7.5,
|
|
118
118
|
'spot/v1/symbols/details': 5,
|
|
119
|
+
'spot/quotation/v3/tickers': 6,
|
|
120
|
+
'spot/quotation/v3/ticker': 4,
|
|
121
|
+
'spot/quotation/v3/lite-klines': 4,
|
|
122
|
+
'spot/quotation/v3/klines': 6,
|
|
123
|
+
'spot/quotation/v3/books': 4,
|
|
124
|
+
'spot/quotation/v3/trades': 4,
|
|
119
125
|
'spot/v1/ticker': 5,
|
|
120
126
|
'spot/v2/ticker': 5,
|
|
127
|
+
'spot/v1/ticker_detail': 5,
|
|
121
128
|
'spot/v1/steps': 30,
|
|
122
129
|
'spot/v1/symbols/kline': 5,
|
|
123
130
|
'spot/v1/symbols/book': 5,
|
|
@@ -182,6 +189,12 @@ class bitmart extends bitmart$1 {
|
|
|
182
189
|
'spot/v1/batch_orders': 1,
|
|
183
190
|
'spot/v2/cancel_order': 1,
|
|
184
191
|
'spot/v1/cancel_orders': 15,
|
|
192
|
+
'spot/v4/query/order': 1,
|
|
193
|
+
'spot/v4/query/client-order': 1,
|
|
194
|
+
'spot/v4/query/open-orders': 5,
|
|
195
|
+
'spot/v4/query/history-orders': 5,
|
|
196
|
+
'spot/v4/query/trades': 5,
|
|
197
|
+
'spot/v4/query/order-trades': 5,
|
|
185
198
|
// newer endpoint
|
|
186
199
|
'spot/v3/cancel_order': 1,
|
|
187
200
|
'spot/v2/batch_orders': 1,
|
|
@@ -566,7 +579,7 @@ class bitmart extends bitmart$1 {
|
|
|
566
579
|
* @name bitmart#fetchStatus
|
|
567
580
|
* @description the latest known information on the availability of the exchange API
|
|
568
581
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
569
|
-
* @returns {object} a [status structure]{@link https://
|
|
582
|
+
* @returns {object} a [status structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#exchange-status-structure}
|
|
570
583
|
*/
|
|
571
584
|
const options = this.safeValue(this.options, 'fetchStatus', {});
|
|
572
585
|
const defaultType = this.safeString(this.options, 'defaultType');
|
|
@@ -900,7 +913,7 @@ class bitmart extends bitmart$1 {
|
|
|
900
913
|
* @description please use fetchDepositWithdrawFee instead
|
|
901
914
|
* @param {string} code unified currency code
|
|
902
915
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
903
|
-
* @returns {object} a [fee structure]{@link https://
|
|
916
|
+
* @returns {object} a [fee structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
|
904
917
|
*/
|
|
905
918
|
await this.loadMarkets();
|
|
906
919
|
const currency = this.currency(code);
|
|
@@ -959,7 +972,7 @@ class bitmart extends bitmart$1 {
|
|
|
959
972
|
* @description fetch the fee for deposits and withdrawals
|
|
960
973
|
* @param {string} code unified currency code
|
|
961
974
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
962
|
-
* @returns {object} a [fee structure]{@link https://
|
|
975
|
+
* @returns {object} a [fee structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
|
963
976
|
*/
|
|
964
977
|
await this.loadMarkets();
|
|
965
978
|
const currency = this.currency(code);
|
|
@@ -1072,7 +1085,7 @@ class bitmart extends bitmart$1 {
|
|
|
1072
1085
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1073
1086
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1074
1087
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
1075
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
1088
|
+
* @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
1076
1089
|
*/
|
|
1077
1090
|
await this.loadMarkets();
|
|
1078
1091
|
const market = this.market(symbol);
|
|
@@ -1161,7 +1174,7 @@ class bitmart extends bitmart$1 {
|
|
|
1161
1174
|
* @see https://developer-pro.bitmart.com/en/spot/#get-ticker-of-all-pairs-v2
|
|
1162
1175
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1163
1176
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
1164
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
1177
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
1165
1178
|
*/
|
|
1166
1179
|
await this.loadMarkets();
|
|
1167
1180
|
symbols = this.marketSymbols(symbols);
|
|
@@ -1195,7 +1208,7 @@ class bitmart extends bitmart$1 {
|
|
|
1195
1208
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1196
1209
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
1197
1210
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
1198
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
1211
|
+
* @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
|
|
1199
1212
|
*/
|
|
1200
1213
|
await this.loadMarkets();
|
|
1201
1214
|
const market = this.market(symbol);
|
|
@@ -1318,7 +1331,7 @@ class bitmart extends bitmart$1 {
|
|
|
1318
1331
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1319
1332
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
1320
1333
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
1321
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
1334
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
1322
1335
|
*/
|
|
1323
1336
|
await this.loadMarkets();
|
|
1324
1337
|
const market = this.market(symbol);
|
|
@@ -1511,7 +1524,7 @@ class bitmart extends bitmart$1 {
|
|
|
1511
1524
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1512
1525
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
1513
1526
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
1514
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
1527
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
|
|
1515
1528
|
*/
|
|
1516
1529
|
if (symbol === undefined) {
|
|
1517
1530
|
throw new errors.ArgumentsRequired(this.id + ' fetchMyTrades() requires a symbol argument');
|
|
@@ -1572,7 +1585,7 @@ class bitmart extends bitmart$1 {
|
|
|
1572
1585
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1573
1586
|
* @param {int} [limit] the maximum number of trades to retrieve
|
|
1574
1587
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
1575
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
1588
|
+
* @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
|
|
1576
1589
|
*/
|
|
1577
1590
|
if (symbol === undefined) {
|
|
1578
1591
|
throw new errors.ArgumentsRequired(this.id + ' fetchOrderTrades() requires a symbol argument');
|
|
@@ -1687,7 +1700,7 @@ class bitmart extends bitmart$1 {
|
|
|
1687
1700
|
* @see https://developer-pro.bitmart.com/en/spot/#get-account-balance
|
|
1688
1701
|
* @see https://developer-pro.bitmart.com/en/spot/#get-margin-account-details-isolated
|
|
1689
1702
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
1690
|
-
* @returns {object} a [balance structure]{@link https://
|
|
1703
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
1691
1704
|
*/
|
|
1692
1705
|
await this.loadMarkets();
|
|
1693
1706
|
let marketType = undefined;
|
|
@@ -1826,7 +1839,7 @@ class bitmart extends bitmart$1 {
|
|
|
1826
1839
|
* @description fetch the trading fees for a market
|
|
1827
1840
|
* @param {string} symbol unified market symbol
|
|
1828
1841
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
1829
|
-
* @returns {object} a [fee structure]{@link https://
|
|
1842
|
+
* @returns {object} a [fee structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
|
1830
1843
|
*/
|
|
1831
1844
|
await this.loadMarkets();
|
|
1832
1845
|
const market = this.market(symbol);
|
|
@@ -1968,10 +1981,10 @@ class bitmart extends bitmart$1 {
|
|
|
1968
1981
|
* @param {string} type 'market' or 'limit'
|
|
1969
1982
|
* @param {string} side 'buy' or 'sell'
|
|
1970
1983
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1971
|
-
* @param {float} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1984
|
+
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1972
1985
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
1973
1986
|
* @param {string} [params.marginMode] 'cross' or 'isolated'
|
|
1974
|
-
* @returns {object} an [order structure]{@link https://
|
|
1987
|
+
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1975
1988
|
*/
|
|
1976
1989
|
await this.loadMarkets();
|
|
1977
1990
|
const market = this.market(symbol);
|
|
@@ -2068,7 +2081,7 @@ class bitmart extends bitmart$1 {
|
|
|
2068
2081
|
* @param {string} id order id
|
|
2069
2082
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
2070
2083
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2071
|
-
* @returns {object} An [order structure]{@link https://
|
|
2084
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
2072
2085
|
*/
|
|
2073
2086
|
if (symbol === undefined) {
|
|
2074
2087
|
throw new errors.ArgumentsRequired(this.id + ' cancelOrder() requires a symbol argument');
|
|
@@ -2132,7 +2145,7 @@ class bitmart extends bitmart$1 {
|
|
|
2132
2145
|
* @see https://developer-pro.bitmart.com/en/spot/#cancel-all-orders
|
|
2133
2146
|
* @param {string} symbol unified market symbol of the market to cancel orders in
|
|
2134
2147
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2135
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
2148
|
+
* @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
2136
2149
|
*/
|
|
2137
2150
|
await this.loadMarkets();
|
|
2138
2151
|
const request = {};
|
|
@@ -2230,7 +2243,7 @@ class bitmart extends bitmart$1 {
|
|
|
2230
2243
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
2231
2244
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
2232
2245
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2233
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
2246
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
2234
2247
|
*/
|
|
2235
2248
|
return await this.fetchOrdersByStatus('open', symbol, since, limit, params);
|
|
2236
2249
|
}
|
|
@@ -2243,7 +2256,7 @@ class bitmart extends bitmart$1 {
|
|
|
2243
2256
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
2244
2257
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
2245
2258
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2246
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
2259
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
2247
2260
|
*/
|
|
2248
2261
|
return await this.fetchOrdersByStatus('closed', symbol, since, limit, params);
|
|
2249
2262
|
}
|
|
@@ -2256,7 +2269,7 @@ class bitmart extends bitmart$1 {
|
|
|
2256
2269
|
* @param {int} [since] timestamp in ms of the earliest order, default is undefined
|
|
2257
2270
|
* @param {int} [limit] max number of orders to return, default is undefined
|
|
2258
2271
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2259
|
-
* @returns {object} a list of [order structures]{@link https://
|
|
2272
|
+
* @returns {object} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
2260
2273
|
*/
|
|
2261
2274
|
return await this.fetchOrdersByStatus('canceled', symbol, since, limit, params);
|
|
2262
2275
|
}
|
|
@@ -2267,7 +2280,7 @@ class bitmart extends bitmart$1 {
|
|
|
2267
2280
|
* @description fetches information on an order made by the user
|
|
2268
2281
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
2269
2282
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2270
|
-
* @returns {object} An [order structure]{@link https://
|
|
2283
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
2271
2284
|
*/
|
|
2272
2285
|
if (symbol === undefined) {
|
|
2273
2286
|
throw new errors.ArgumentsRequired(this.id + ' fetchOrder() requires a symbol argument');
|
|
@@ -2315,7 +2328,7 @@ class bitmart extends bitmart$1 {
|
|
|
2315
2328
|
* @description fetch the deposit address for a currency associated with this account
|
|
2316
2329
|
* @param {string} code unified currency code
|
|
2317
2330
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2318
|
-
* @returns {object} an [address structure]{@link https://
|
|
2331
|
+
* @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
|
|
2319
2332
|
*/
|
|
2320
2333
|
await this.loadMarkets();
|
|
2321
2334
|
const currency = this.currency(code);
|
|
@@ -2380,7 +2393,7 @@ class bitmart extends bitmart$1 {
|
|
|
2380
2393
|
* @param {string} address the address to withdraw to
|
|
2381
2394
|
* @param {string} tag
|
|
2382
2395
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2383
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
2396
|
+
* @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
2384
2397
|
*/
|
|
2385
2398
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
2386
2399
|
this.checkAddress(address);
|
|
@@ -2489,7 +2502,7 @@ class bitmart extends bitmart$1 {
|
|
|
2489
2502
|
* @param {string} id deposit id
|
|
2490
2503
|
* @param {string} code not used by bitmart fetchDeposit ()
|
|
2491
2504
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2492
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
2505
|
+
* @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
2493
2506
|
*/
|
|
2494
2507
|
await this.loadMarkets();
|
|
2495
2508
|
const request = {
|
|
@@ -2531,7 +2544,7 @@ class bitmart extends bitmart$1 {
|
|
|
2531
2544
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
2532
2545
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
2533
2546
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2534
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
2547
|
+
* @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
2535
2548
|
*/
|
|
2536
2549
|
return await this.fetchTransactionsByType('deposit', code, since, limit, params);
|
|
2537
2550
|
}
|
|
@@ -2543,7 +2556,7 @@ class bitmart extends bitmart$1 {
|
|
|
2543
2556
|
* @param {string} id withdrawal id
|
|
2544
2557
|
* @param {string} code not used by bitmart.fetchWithdrawal
|
|
2545
2558
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2546
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
2559
|
+
* @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
2547
2560
|
*/
|
|
2548
2561
|
await this.loadMarkets();
|
|
2549
2562
|
const request = {
|
|
@@ -2585,7 +2598,7 @@ class bitmart extends bitmart$1 {
|
|
|
2585
2598
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
2586
2599
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
2587
2600
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2588
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
2601
|
+
* @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
2589
2602
|
*/
|
|
2590
2603
|
return await this.fetchTransactionsByType('withdraw', code, since, limit, params);
|
|
2591
2604
|
}
|
|
@@ -2684,7 +2697,7 @@ class bitmart extends bitmart$1 {
|
|
|
2684
2697
|
* @param {string} symbol unified market symbol
|
|
2685
2698
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2686
2699
|
* @param {string} [params.marginMode] 'isolated' is the default and 'cross' is unavailable
|
|
2687
|
-
* @returns {object} a [margin loan structure]{@link https://
|
|
2700
|
+
* @returns {object} a [margin loan structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#margin-loan-structure}
|
|
2688
2701
|
*/
|
|
2689
2702
|
await this.loadMarkets();
|
|
2690
2703
|
if (symbol === undefined) {
|
|
@@ -2727,7 +2740,7 @@ class bitmart extends bitmart$1 {
|
|
|
2727
2740
|
* @param {string} symbol unified market symbol
|
|
2728
2741
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2729
2742
|
* @param {string} [params.marginMode] 'isolated' is the default and 'cross' is unavailable
|
|
2730
|
-
* @returns {object} a [margin loan structure]{@link https://
|
|
2743
|
+
* @returns {object} a [margin loan structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#margin-loan-structure}
|
|
2731
2744
|
*/
|
|
2732
2745
|
await this.loadMarkets();
|
|
2733
2746
|
if (symbol === undefined) {
|
|
@@ -2792,7 +2805,7 @@ class bitmart extends bitmart$1 {
|
|
|
2792
2805
|
* @see https://developer-pro.bitmart.com/en/spot/#get-trading-pair-borrowing-rate-and-amount
|
|
2793
2806
|
* @param {string} code unified currency code
|
|
2794
2807
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2795
|
-
* @returns {object} a [borrow rate structure]{@link https://
|
|
2808
|
+
* @returns {object} a [borrow rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure}
|
|
2796
2809
|
*/
|
|
2797
2810
|
await this.loadMarkets();
|
|
2798
2811
|
let market = undefined;
|
|
@@ -2891,7 +2904,7 @@ class bitmart extends bitmart$1 {
|
|
|
2891
2904
|
* @description fetch the borrow interest rates of all currencies, currently only works for isolated margin
|
|
2892
2905
|
* @see https://developer-pro.bitmart.com/en/spot/#get-trading-pair-borrowing-rate-and-amount
|
|
2893
2906
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2894
|
-
* @returns {object} a list of [borrow rate structures]{@link https://
|
|
2907
|
+
* @returns {object} a list of [borrow rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure}
|
|
2895
2908
|
*/
|
|
2896
2909
|
await this.loadMarkets();
|
|
2897
2910
|
const response = await this.privateGetSpotV1MarginIsolatedPairs(params);
|
|
@@ -2982,7 +2995,7 @@ class bitmart extends bitmart$1 {
|
|
|
2982
2995
|
* @param {string} fromAccount account to transfer from
|
|
2983
2996
|
* @param {string} toAccount account to transfer to
|
|
2984
2997
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2985
|
-
* @returns {object} a [transfer structure]{@link https://
|
|
2998
|
+
* @returns {object} a [transfer structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transfer-structure}
|
|
2986
2999
|
*/
|
|
2987
3000
|
await this.loadMarkets();
|
|
2988
3001
|
const currency = this.currency(code);
|
|
@@ -3062,7 +3075,7 @@ class bitmart extends bitmart$1 {
|
|
|
3062
3075
|
* @param {int} [since] the earliest time in ms to fetch borrrow interest for
|
|
3063
3076
|
* @param {int} [limit] the maximum number of structures to retrieve
|
|
3064
3077
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
3065
|
-
* @returns {object[]} a list of [borrow interest structures]{@link https://
|
|
3078
|
+
* @returns {object[]} a list of [borrow interest structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#borrow-interest-structure}
|
|
3066
3079
|
*/
|
|
3067
3080
|
if (symbol === undefined) {
|
|
3068
3081
|
throw new errors.ArgumentsRequired(this.id + ' fetchBorrowInterest() requires a symbol argument');
|
package/dist/cjs/src/bitmex.js
CHANGED
|
@@ -731,7 +731,7 @@ class bitmex extends bitmex$1 {
|
|
|
731
731
|
* @name bitmex#fetchBalance
|
|
732
732
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
733
733
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
734
|
-
* @returns {object} a [balance structure]{@link https://
|
|
734
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
735
735
|
*/
|
|
736
736
|
await this.loadMarkets();
|
|
737
737
|
const request = {
|
|
@@ -795,7 +795,7 @@ class bitmex extends bitmex$1 {
|
|
|
795
795
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
796
796
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
797
797
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
798
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
798
|
+
* @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
|
|
799
799
|
*/
|
|
800
800
|
await this.loadMarkets();
|
|
801
801
|
const market = this.market(symbol);
|
|
@@ -837,7 +837,7 @@ class bitmex extends bitmex$1 {
|
|
|
837
837
|
* @description fetches information on an order made by the user
|
|
838
838
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
839
839
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
840
|
-
* @returns {object} An [order structure]{@link https://
|
|
840
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
841
841
|
*/
|
|
842
842
|
const filter = {
|
|
843
843
|
'filter': {
|
|
@@ -860,7 +860,7 @@ class bitmex extends bitmex$1 {
|
|
|
860
860
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
861
861
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
862
862
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
863
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
863
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
864
864
|
*/
|
|
865
865
|
await this.loadMarkets();
|
|
866
866
|
let market = undefined;
|
|
@@ -894,7 +894,7 @@ class bitmex extends bitmex$1 {
|
|
|
894
894
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
895
895
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
896
896
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
897
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
897
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
898
898
|
*/
|
|
899
899
|
const request = {
|
|
900
900
|
'filter': {
|
|
@@ -912,7 +912,7 @@ class bitmex extends bitmex$1 {
|
|
|
912
912
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
913
913
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
914
914
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
915
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
915
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
916
916
|
*/
|
|
917
917
|
// Bitmex barfs if you set 'open': false in the filter...
|
|
918
918
|
const orders = await this.fetchOrders(symbol, since, limit, params);
|
|
@@ -927,7 +927,7 @@ class bitmex extends bitmex$1 {
|
|
|
927
927
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
928
928
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
929
929
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
930
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
930
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
|
|
931
931
|
*/
|
|
932
932
|
await this.loadMarkets();
|
|
933
933
|
let market = undefined;
|
|
@@ -1123,7 +1123,7 @@ class bitmex extends bitmex$1 {
|
|
|
1123
1123
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
1124
1124
|
* @param {int} [limit] max number of ledger entrys to return, default is undefined
|
|
1125
1125
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
1126
|
-
* @returns {object} a [ledger structure]{@link https://
|
|
1126
|
+
* @returns {object} a [ledger structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ledger-structure}
|
|
1127
1127
|
*/
|
|
1128
1128
|
await this.loadMarkets();
|
|
1129
1129
|
const request = {
|
|
@@ -1174,7 +1174,7 @@ class bitmex extends bitmex$1 {
|
|
|
1174
1174
|
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
1175
1175
|
* @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
|
|
1176
1176
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
1177
|
-
* @returns {object} a list of [transaction structure]{@link https://
|
|
1177
|
+
* @returns {object} a list of [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
1178
1178
|
*/
|
|
1179
1179
|
await this.loadMarkets();
|
|
1180
1180
|
const request = {
|
|
@@ -1289,7 +1289,7 @@ class bitmex extends bitmex$1 {
|
|
|
1289
1289
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1290
1290
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1291
1291
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
1292
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
1292
|
+
* @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
1293
1293
|
*/
|
|
1294
1294
|
await this.loadMarkets();
|
|
1295
1295
|
const market = this.market(symbol);
|
|
@@ -1310,7 +1310,7 @@ class bitmex extends bitmex$1 {
|
|
|
1310
1310
|
* @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
|
|
1311
1311
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1312
1312
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
1313
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
1313
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
1314
1314
|
*/
|
|
1315
1315
|
await this.loadMarkets();
|
|
1316
1316
|
symbols = this.marketSymbols(symbols);
|
|
@@ -1707,7 +1707,7 @@ class bitmex extends bitmex$1 {
|
|
|
1707
1707
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1708
1708
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
1709
1709
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
1710
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
1710
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
1711
1711
|
*/
|
|
1712
1712
|
await this.loadMarkets();
|
|
1713
1713
|
const market = this.market(symbol);
|
|
@@ -1764,9 +1764,9 @@ class bitmex extends bitmex$1 {
|
|
|
1764
1764
|
* @param {string} type 'market' or 'limit'
|
|
1765
1765
|
* @param {string} side 'buy' or 'sell'
|
|
1766
1766
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1767
|
-
* @param {float} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1767
|
+
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1768
1768
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
1769
|
-
* @returns {object} an [order structure]{@link https://
|
|
1769
|
+
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1770
1770
|
*/
|
|
1771
1771
|
await this.loadMarkets();
|
|
1772
1772
|
const market = this.market(symbol);
|
|
@@ -1842,7 +1842,7 @@ class bitmex extends bitmex$1 {
|
|
|
1842
1842
|
* @param {string} id order id
|
|
1843
1843
|
* @param {string} symbol not used by bitmex cancelOrder ()
|
|
1844
1844
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
1845
|
-
* @returns {object} An [order structure]{@link https://
|
|
1845
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1846
1846
|
*/
|
|
1847
1847
|
await this.loadMarkets();
|
|
1848
1848
|
// https://github.com/ccxt/ccxt/issues/6507
|
|
@@ -1873,7 +1873,7 @@ class bitmex extends bitmex$1 {
|
|
|
1873
1873
|
* @param {string[]} ids order ids
|
|
1874
1874
|
* @param {string} symbol not used by bitmex cancelOrders ()
|
|
1875
1875
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
1876
|
-
* @returns {object} an list of [order structures]{@link https://
|
|
1876
|
+
* @returns {object} an list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1877
1877
|
*/
|
|
1878
1878
|
// return await this.cancelOrder (ids, symbol, params);
|
|
1879
1879
|
await this.loadMarkets();
|
|
@@ -1897,7 +1897,7 @@ class bitmex extends bitmex$1 {
|
|
|
1897
1897
|
* @description cancel all open orders
|
|
1898
1898
|
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
1899
1899
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
1900
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
1900
|
+
* @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1901
1901
|
*/
|
|
1902
1902
|
await this.loadMarkets();
|
|
1903
1903
|
const request = {};
|
|
@@ -1955,7 +1955,7 @@ class bitmex extends bitmex$1 {
|
|
|
1955
1955
|
* @description fetch all open positions
|
|
1956
1956
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
1957
1957
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
1958
|
-
* @returns {object[]} a list of [position structure]{@link https://
|
|
1958
|
+
* @returns {object[]} a list of [position structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#position-structure}
|
|
1959
1959
|
*/
|
|
1960
1960
|
await this.loadMarkets();
|
|
1961
1961
|
const response = await this.privateGetPosition(params);
|
|
@@ -2215,7 +2215,7 @@ class bitmex extends bitmex$1 {
|
|
|
2215
2215
|
* @param {string} address the address to withdraw to
|
|
2216
2216
|
* @param {string} tag
|
|
2217
2217
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
2218
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
2218
|
+
* @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
2219
2219
|
*/
|
|
2220
2220
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
2221
2221
|
this.checkAddress(address);
|
|
@@ -2259,7 +2259,7 @@ class bitmex extends bitmex$1 {
|
|
|
2259
2259
|
* @description fetch the funding rate for multiple markets
|
|
2260
2260
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
2261
2261
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
2262
|
-
* @returns {object} a dictionary of [funding rates structures]{@link https://
|
|
2262
|
+
* @returns {object} a dictionary of [funding rates structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rates-structure}, indexe by market symbols
|
|
2263
2263
|
*/
|
|
2264
2264
|
await this.loadMarkets();
|
|
2265
2265
|
const response = await this.publicGetInstrumentActiveAndIndices(params);
|
|
@@ -2308,14 +2308,14 @@ class bitmex extends bitmex$1 {
|
|
|
2308
2308
|
* @description Fetches the history of funding rates
|
|
2309
2309
|
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
2310
2310
|
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
2311
|
-
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://
|
|
2311
|
+
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure} to fetch
|
|
2312
2312
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
2313
2313
|
* @param {int} [params.until] timestamp in ms for ending date filter
|
|
2314
2314
|
* @param {bool} [params.reverse] if true, will sort results newest first
|
|
2315
2315
|
* @param {int} [params.start] starting point for results
|
|
2316
2316
|
* @param {string} [params.columns] array of column names to fetch in info, if omitted, will return all columns
|
|
2317
2317
|
* @param {string} [params.filter] generic table filter, send json key/value pairs, such as {"key": "value"}, you can key on individual fields, and do more advanced querying on timestamps, see the [timestamp docs]{@link https://www.bitmex.com/app/restAPI#Timestamp-Filters} for more details
|
|
2318
|
-
* @returns {object[]} a list of [funding rate structures]{@link https://
|
|
2318
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure}
|
|
2319
2319
|
*/
|
|
2320
2320
|
await this.loadMarkets();
|
|
2321
2321
|
const request = {};
|
|
@@ -2448,7 +2448,7 @@ class bitmex extends bitmex$1 {
|
|
|
2448
2448
|
* @param {string} code unified currency code
|
|
2449
2449
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
2450
2450
|
* @param {string} [params.network] deposit chain, can view all chains via this.publicGetWalletAssets, default is eth, unless the currency has a default chain within this.options['networks']
|
|
2451
|
-
* @returns {object} an [address structure]{@link https://
|
|
2451
|
+
* @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
|
|
2452
2452
|
*/
|
|
2453
2453
|
await this.loadMarkets();
|
|
2454
2454
|
let networkCode = undefined;
|
|
@@ -2548,7 +2548,7 @@ class bitmex extends bitmex$1 {
|
|
|
2548
2548
|
* @see https://www.bitmex.com/api/explorer/#!/Wallet/Wallet_getAssetsConfig
|
|
2549
2549
|
* @param {string[]|undefined} codes list of unified currency codes
|
|
2550
2550
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
2551
|
-
* @returns {object} a list of [fee structures]{@link https://
|
|
2551
|
+
* @returns {object} a list of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
|
2552
2552
|
*/
|
|
2553
2553
|
await this.loadMarkets();
|
|
2554
2554
|
const assets = await this.publicGetWalletAssets(params);
|