ccxt 4.0.74 → 4.0.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/ccxt.browser.js +2047 -1932
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +9 -9
- package/dist/cjs/src/alpaca.js +6 -6
- package/dist/cjs/src/ascendex.js +22 -22
- package/dist/cjs/src/base/Exchange.js +2 -2
- package/dist/cjs/src/bigone.js +17 -17
- package/dist/cjs/src/binance.js +51 -51
- package/dist/cjs/src/bingx.js +21 -21
- package/dist/cjs/src/bit2c.js +10 -10
- package/dist/cjs/src/bitbank.js +11 -11
- package/dist/cjs/src/bitbns.js +12 -12
- package/dist/cjs/src/bitfinex.js +19 -19
- package/dist/cjs/src/bitfinex2.js +25 -25
- package/dist/cjs/src/bitflyer.js +15 -15
- package/dist/cjs/src/bitforex.js +9 -9
- package/dist/cjs/src/bitget.js +34 -34
- package/dist/cjs/src/bithumb.js +9 -9
- package/dist/cjs/src/bitmart.js +42 -29
- package/dist/cjs/src/bitmex.js +19 -19
- package/dist/cjs/src/bitopro.js +18 -18
- package/dist/cjs/src/bitpanda.js +19 -19
- package/dist/cjs/src/bitrue.js +15 -15
- package/dist/cjs/src/bitso.js +19 -19
- package/dist/cjs/src/bitstamp.js +19 -19
- package/dist/cjs/src/bitstamp1.js +6 -6
- package/dist/cjs/src/bittrex.js +24 -24
- package/dist/cjs/src/bitvavo.js +16 -16
- package/dist/cjs/src/bkex.js +17 -17
- package/dist/cjs/src/bl3p.js +6 -6
- package/dist/cjs/src/blockchaincom.js +20 -20
- package/dist/cjs/src/btcalpha.js +13 -13
- package/dist/cjs/src/btcbox.js +8 -8
- package/dist/cjs/src/btcmarkets.js +15 -15
- package/dist/cjs/src/btctradeua.js +6 -6
- package/dist/cjs/src/btcturk.js +9 -9
- package/dist/cjs/src/bybit.js +148 -116
- package/dist/cjs/src/cex.js +12 -12
- package/dist/cjs/src/coinbase.js +20 -20
- package/dist/cjs/src/coinbasepro.js +22 -22
- package/dist/cjs/src/coincheck.js +10 -10
- package/dist/cjs/src/coinex.js +81 -35
- package/dist/cjs/src/coinfalcon.js +14 -14
- package/dist/cjs/src/coinmate.js +12 -12
- package/dist/cjs/src/coinone.js +10 -10
- package/dist/cjs/src/coinsph.js +20 -20
- package/dist/cjs/src/coinspot.js +6 -6
- package/dist/cjs/src/cryptocom.js +24 -24
- package/dist/cjs/src/currencycom.js +18 -18
- package/dist/cjs/src/delta.js +23 -23
- package/dist/cjs/src/deribit.js +27 -27
- package/dist/cjs/src/digifinex.js +27 -27
- package/dist/cjs/src/exmo.js +24 -24
- package/dist/cjs/src/gate.js +34 -34
- package/dist/cjs/src/gemini.js +14 -14
- package/dist/cjs/src/hitbtc.js +30 -30
- package/dist/cjs/src/hollaex.js +20 -20
- package/dist/cjs/src/huobi.js +40 -40
- package/dist/cjs/src/huobijp.js +18 -18
- package/dist/cjs/src/idex.js +17 -17
- package/dist/cjs/src/independentreserve.js +10 -10
- package/dist/cjs/src/indodax.js +12 -12
- package/dist/cjs/src/kraken.js +25 -25
- package/dist/cjs/src/krakenfutures.js +12 -12
- package/dist/cjs/src/kucoin.js +29 -29
- package/dist/cjs/src/kucoinfutures.js +19 -19
- package/dist/cjs/src/kuna.js +10 -10
- package/dist/cjs/src/latoken.js +15 -15
- package/dist/cjs/src/lbank.js +10 -10
- package/dist/cjs/src/lbank2.js +21 -21
- package/dist/cjs/src/luno.js +14 -14
- package/dist/cjs/src/lykke.js +14 -14
- package/dist/cjs/src/mercado.js +10 -10
- package/dist/cjs/src/mexc.js +38 -38
- package/dist/cjs/src/ndax.js +18 -18
- package/dist/cjs/src/novadax.js +18 -18
- package/dist/cjs/src/oceanex.js +14 -14
- package/dist/cjs/src/okcoin.js +19 -19
- package/dist/cjs/src/okx.js +48 -48
- package/dist/cjs/src/paymium.js +9 -9
- package/dist/cjs/src/phemex.js +24 -24
- package/dist/cjs/src/poloniex.js +77 -60
- package/dist/cjs/src/poloniexfutures.js +16 -16
- package/dist/cjs/src/pro/alpaca.js +5 -5
- package/dist/cjs/src/pro/ascendex.js +2 -2
- package/dist/cjs/src/pro/binance.js +10 -10
- package/dist/cjs/src/pro/bitfinex.js +3 -3
- package/dist/cjs/src/pro/bitfinex2.js +4 -4
- package/dist/cjs/src/pro/bitget.js +4 -4
- package/dist/cjs/src/pro/bitmart.js +3 -3
- package/dist/cjs/src/pro/bitmex.js +4 -4
- package/dist/cjs/src/pro/bitopro.js +2 -2
- package/dist/cjs/src/pro/bitrue.js +1 -1
- package/dist/cjs/src/pro/bitstamp.js +2 -2
- package/dist/cjs/src/pro/bittrex.js +4 -4
- package/dist/cjs/src/pro/bitvavo.js +4 -4
- package/dist/cjs/src/pro/bybit.js +5 -5
- package/dist/cjs/src/pro/cex.js +3 -3
- package/dist/cjs/src/pro/coinbasepro.js +5 -5
- package/dist/cjs/src/pro/coinex.js +3 -3
- package/dist/cjs/src/pro/cryptocom.js +7 -7
- package/dist/cjs/src/pro/currencycom.js +2 -2
- package/dist/cjs/src/pro/deribit.js +3 -3
- package/dist/cjs/src/pro/exmo.js +2 -2
- package/dist/cjs/src/pro/gate.js +5 -5
- package/dist/cjs/src/pro/gemini.js +2 -2
- package/dist/cjs/src/pro/hitbtc.js +2 -2
- package/dist/cjs/src/pro/hollaex.js +3 -3
- package/dist/cjs/src/pro/huobi.js +4 -4
- package/dist/cjs/src/pro/huobijp.js +2 -2
- package/dist/cjs/src/pro/idex.js +3 -3
- package/dist/cjs/src/pro/independentreserve.js +1 -1
- package/dist/cjs/src/pro/kraken.js +6 -6
- package/dist/cjs/src/pro/krakenfutures.js +2 -2
- package/dist/cjs/src/pro/kucoin.js +4 -4
- package/dist/cjs/src/pro/kucoinfutures.js +3 -3
- package/dist/cjs/src/pro/luno.js +1 -1
- package/dist/cjs/src/pro/ndax.js +2 -2
- package/dist/cjs/src/pro/okcoin.js +3 -3
- package/dist/cjs/src/pro/okx.js +12 -11
- package/dist/cjs/src/pro/phemex.js +4 -4
- package/dist/cjs/src/pro/poloniex.js +1 -1
- package/dist/cjs/src/pro/upbit.js +2 -2
- package/dist/cjs/src/pro/wazirx.js +3 -3
- package/dist/cjs/src/pro/whitebit.js +4 -4
- package/dist/cjs/src/probit.js +17 -17
- package/dist/cjs/src/tidex.js +11 -11
- package/dist/cjs/src/timex.js +14 -14
- package/dist/cjs/src/tokocrypto.js +16 -16
- package/dist/cjs/src/upbit.js +18 -18
- package/dist/cjs/src/wavesexchange.js +13 -13
- package/dist/cjs/src/wazirx.js +10 -10
- package/dist/cjs/src/whitebit.js +21 -21
- package/dist/cjs/src/woo.js +28 -22
- package/dist/cjs/src/yobit.js +14 -14
- package/dist/cjs/src/zaif.js +8 -8
- package/dist/cjs/src/zonda.js +13 -13
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bitmart.d.ts +13 -0
- package/js/src/abstract/bybit.d.ts +33 -21
- package/js/src/abstract/woo.d.ts +6 -0
- package/js/src/ace.js +9 -9
- package/js/src/alpaca.js +6 -6
- package/js/src/ascendex.js +22 -22
- package/js/src/base/Exchange.js +2 -2
- package/js/src/bigone.js +17 -17
- package/js/src/binance.js +51 -51
- package/js/src/bingx.js +21 -21
- package/js/src/bit2c.js +10 -10
- package/js/src/bitbank.js +11 -11
- package/js/src/bitbns.js +12 -12
- package/js/src/bitfinex.js +19 -19
- package/js/src/bitfinex2.js +25 -25
- package/js/src/bitflyer.js +15 -15
- package/js/src/bitforex.js +9 -9
- package/js/src/bitget.js +34 -34
- package/js/src/bithumb.js +9 -9
- package/js/src/bitmart.js +42 -29
- package/js/src/bitmex.js +19 -19
- package/js/src/bitopro.js +18 -18
- package/js/src/bitpanda.js +19 -19
- package/js/src/bitrue.js +15 -15
- package/js/src/bitso.js +19 -19
- package/js/src/bitstamp.js +19 -19
- package/js/src/bitstamp1.js +6 -6
- package/js/src/bittrex.js +24 -24
- package/js/src/bitvavo.js +16 -16
- package/js/src/bkex.js +17 -17
- package/js/src/bl3p.js +6 -6
- package/js/src/blockchaincom.js +20 -20
- package/js/src/btcalpha.js +13 -13
- package/js/src/btcbox.js +8 -8
- package/js/src/btcmarkets.js +15 -15
- package/js/src/btctradeua.js +6 -6
- package/js/src/btcturk.js +9 -9
- package/js/src/bybit.js +148 -116
- package/js/src/cex.js +12 -12
- package/js/src/coinbase.js +20 -20
- package/js/src/coinbasepro.js +22 -22
- package/js/src/coincheck.js +10 -10
- package/js/src/coinex.d.ts +1 -0
- package/js/src/coinex.js +81 -35
- package/js/src/coinfalcon.js +14 -14
- package/js/src/coinmate.js +12 -12
- package/js/src/coinone.js +10 -10
- package/js/src/coinsph.js +20 -20
- package/js/src/coinspot.js +6 -6
- package/js/src/cryptocom.js +24 -24
- package/js/src/currencycom.js +18 -18
- package/js/src/delta.js +23 -23
- package/js/src/deribit.js +27 -27
- package/js/src/digifinex.js +27 -27
- package/js/src/exmo.js +24 -24
- package/js/src/gate.js +34 -34
- package/js/src/gemini.js +14 -14
- package/js/src/hitbtc.js +30 -30
- package/js/src/hollaex.js +20 -20
- package/js/src/huobi.js +40 -40
- package/js/src/huobijp.js +18 -18
- package/js/src/idex.js +17 -17
- package/js/src/independentreserve.js +10 -10
- package/js/src/indodax.js +12 -12
- package/js/src/kraken.js +25 -25
- package/js/src/krakenfutures.js +12 -12
- package/js/src/kucoin.js +29 -29
- package/js/src/kucoinfutures.js +19 -19
- package/js/src/kuna.js +10 -10
- package/js/src/latoken.js +15 -15
- package/js/src/lbank.js +10 -10
- package/js/src/lbank2.js +21 -21
- package/js/src/luno.js +14 -14
- package/js/src/lykke.js +14 -14
- package/js/src/mercado.js +10 -10
- package/js/src/mexc.js +38 -38
- package/js/src/ndax.js +18 -18
- package/js/src/novadax.js +18 -18
- package/js/src/oceanex.js +14 -14
- package/js/src/okcoin.js +19 -19
- package/js/src/okx.js +48 -48
- package/js/src/paymium.js +9 -9
- package/js/src/phemex.js +24 -24
- package/js/src/poloniex.js +77 -60
- package/js/src/poloniexfutures.js +16 -16
- package/js/src/pro/alpaca.js +5 -5
- package/js/src/pro/ascendex.js +2 -2
- package/js/src/pro/binance.js +10 -10
- package/js/src/pro/bitfinex.js +3 -3
- package/js/src/pro/bitfinex2.js +4 -4
- package/js/src/pro/bitget.js +4 -4
- package/js/src/pro/bitmart.js +3 -3
- package/js/src/pro/bitmex.js +4 -4
- package/js/src/pro/bitopro.js +2 -2
- package/js/src/pro/bitrue.js +1 -1
- package/js/src/pro/bitstamp.js +2 -2
- package/js/src/pro/bittrex.js +4 -4
- package/js/src/pro/bitvavo.js +4 -4
- package/js/src/pro/bybit.js +5 -5
- package/js/src/pro/cex.js +3 -3
- package/js/src/pro/coinbasepro.js +5 -5
- package/js/src/pro/coinex.js +3 -3
- package/js/src/pro/cryptocom.js +7 -7
- package/js/src/pro/currencycom.js +2 -2
- package/js/src/pro/deribit.js +3 -3
- package/js/src/pro/exmo.js +2 -2
- package/js/src/pro/gate.js +5 -5
- package/js/src/pro/gemini.js +2 -2
- package/js/src/pro/hitbtc.js +2 -2
- package/js/src/pro/hollaex.js +3 -3
- package/js/src/pro/huobi.js +4 -4
- package/js/src/pro/huobijp.js +2 -2
- package/js/src/pro/idex.js +3 -3
- package/js/src/pro/independentreserve.js +1 -1
- package/js/src/pro/kraken.js +6 -6
- package/js/src/pro/krakenfutures.js +2 -2
- package/js/src/pro/kucoin.js +4 -4
- package/js/src/pro/kucoinfutures.js +3 -3
- package/js/src/pro/luno.js +1 -1
- package/js/src/pro/ndax.js +2 -2
- package/js/src/pro/okcoin.js +3 -3
- package/js/src/pro/okx.d.ts +1 -1
- package/js/src/pro/okx.js +12 -11
- package/js/src/pro/phemex.js +4 -4
- package/js/src/pro/poloniex.js +1 -1
- package/js/src/pro/upbit.js +2 -2
- package/js/src/pro/wazirx.js +3 -3
- package/js/src/pro/whitebit.js +4 -4
- package/js/src/probit.js +17 -17
- package/js/src/tidex.js +11 -11
- package/js/src/timex.js +14 -14
- package/js/src/tokocrypto.js +16 -16
- package/js/src/upbit.js +18 -18
- package/js/src/wavesexchange.js +13 -13
- package/js/src/wazirx.js +10 -10
- package/js/src/whitebit.js +21 -21
- package/js/src/woo.js +28 -22
- package/js/src/yobit.js +14 -14
- package/js/src/zaif.js +8 -8
- package/js/src/zonda.js +13 -13
- package/package.json +1 -1
package/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);
|
|
@@ -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');
|
|
@@ -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
|
@@ -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);
|
|
@@ -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);
|
|
@@ -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;
|
package/dist/cjs/src/bitopro.js
CHANGED
|
@@ -408,7 +408,7 @@ class bitopro extends bitopro$1 {
|
|
|
408
408
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
409
409
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
410
410
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
411
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
411
|
+
* @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
412
412
|
*/
|
|
413
413
|
await this.loadMarkets();
|
|
414
414
|
const market = this.market(symbol);
|
|
@@ -439,7 +439,7 @@ class bitopro extends bitopro$1 {
|
|
|
439
439
|
* @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
|
|
440
440
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
441
441
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
442
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
442
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
443
443
|
*/
|
|
444
444
|
await this.loadMarkets();
|
|
445
445
|
const response = await this.publicGetTickers();
|
|
@@ -469,7 +469,7 @@ class bitopro extends bitopro$1 {
|
|
|
469
469
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
470
470
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
471
471
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
472
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
472
|
+
* @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
|
|
473
473
|
*/
|
|
474
474
|
await this.loadMarkets();
|
|
475
475
|
const market = this.market(symbol);
|
|
@@ -629,7 +629,7 @@ class bitopro extends bitopro$1 {
|
|
|
629
629
|
* @name bitopro#fetchTradingFees
|
|
630
630
|
* @description fetch the trading fees for multiple markets
|
|
631
631
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
632
|
-
* @returns {object} a dictionary of [fee structures]{@link https://
|
|
632
|
+
* @returns {object} a dictionary of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure} indexed by market symbols
|
|
633
633
|
*/
|
|
634
634
|
await this.loadMarkets();
|
|
635
635
|
const response = await this.publicGetProvisioningLimitationsAndFees(params);
|
|
@@ -980,9 +980,9 @@ class bitopro extends bitopro$1 {
|
|
|
980
980
|
* @param {string} type 'market' or 'limit'
|
|
981
981
|
* @param {string} side 'buy' or 'sell'
|
|
982
982
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
983
|
-
* @param {float} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
983
|
+
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
984
984
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
985
|
-
* @returns {object} an [order structure]{@link https://
|
|
985
|
+
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
986
986
|
*/
|
|
987
987
|
await this.loadMarkets();
|
|
988
988
|
const market = this.market(symbol);
|
|
@@ -1040,7 +1040,7 @@ class bitopro extends bitopro$1 {
|
|
|
1040
1040
|
* @param {string} id order id
|
|
1041
1041
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
1042
1042
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
1043
|
-
* @returns {object} An [order structure]{@link https://
|
|
1043
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1044
1044
|
*/
|
|
1045
1045
|
if (symbol === undefined) {
|
|
1046
1046
|
throw new errors.ArgumentsRequired(this.id + ' cancelOrder() requires the symbol argument');
|
|
@@ -1071,7 +1071,7 @@ class bitopro extends bitopro$1 {
|
|
|
1071
1071
|
* @param {string[]} ids order ids
|
|
1072
1072
|
* @param {string} symbol unified market symbol
|
|
1073
1073
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
1074
|
-
* @returns {object} an list of [order structures]{@link https://
|
|
1074
|
+
* @returns {object} an list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1075
1075
|
*/
|
|
1076
1076
|
if (symbol === undefined) {
|
|
1077
1077
|
throw new errors.ArgumentsRequired(this.id + ' cancelOrders() requires a symbol argument');
|
|
@@ -1101,7 +1101,7 @@ class bitopro extends bitopro$1 {
|
|
|
1101
1101
|
* @description cancel all open orders
|
|
1102
1102
|
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
1103
1103
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
1104
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
1104
|
+
* @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1105
1105
|
*/
|
|
1106
1106
|
await this.loadMarkets();
|
|
1107
1107
|
const request = {
|
|
@@ -1135,7 +1135,7 @@ class bitopro extends bitopro$1 {
|
|
|
1135
1135
|
* @description fetches information on an order made by the user
|
|
1136
1136
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
1137
1137
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
1138
|
-
* @returns {object} An [order structure]{@link https://
|
|
1138
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1139
1139
|
*/
|
|
1140
1140
|
if (symbol === undefined) {
|
|
1141
1141
|
throw new errors.ArgumentsRequired(this.id + ' fetchOrder() requires the symbol argument');
|
|
@@ -1181,7 +1181,7 @@ class bitopro extends bitopro$1 {
|
|
|
1181
1181
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1182
1182
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
1183
1183
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
1184
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1184
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1185
1185
|
*/
|
|
1186
1186
|
if (symbol === undefined) {
|
|
1187
1187
|
throw new errors.ArgumentsRequired(this.id + ' fetchOrders() requires the symbol argument');
|
|
@@ -1249,7 +1249,7 @@ class bitopro extends bitopro$1 {
|
|
|
1249
1249
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1250
1250
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
1251
1251
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
1252
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1252
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1253
1253
|
*/
|
|
1254
1254
|
const request = {
|
|
1255
1255
|
'statusKind': 'DONE',
|
|
@@ -1265,7 +1265,7 @@ class bitopro extends bitopro$1 {
|
|
|
1265
1265
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1266
1266
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
1267
1267
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
1268
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
1268
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
|
|
1269
1269
|
*/
|
|
1270
1270
|
if (symbol === undefined) {
|
|
1271
1271
|
throw new errors.ArgumentsRequired(this.id + ' fetchMyTrades() requires the symbol argument');
|
|
@@ -1402,7 +1402,7 @@ class bitopro extends bitopro$1 {
|
|
|
1402
1402
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
1403
1403
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
1404
1404
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
1405
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
1405
|
+
* @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
1406
1406
|
*/
|
|
1407
1407
|
if (code === undefined) {
|
|
1408
1408
|
throw new errors.ArgumentsRequired(this.id + ' fetchDeposits() requires the code argument');
|
|
@@ -1453,7 +1453,7 @@ class bitopro extends bitopro$1 {
|
|
|
1453
1453
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
1454
1454
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
1455
1455
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
1456
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
1456
|
+
* @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
1457
1457
|
*/
|
|
1458
1458
|
if (code === undefined) {
|
|
1459
1459
|
throw new errors.ArgumentsRequired(this.id + ' fetchWithdrawals() requires the code argument');
|
|
@@ -1502,7 +1502,7 @@ class bitopro extends bitopro$1 {
|
|
|
1502
1502
|
* @param {string} id withdrawal id
|
|
1503
1503
|
* @param {string} code unified currency code of the currency withdrawn, default is undefined
|
|
1504
1504
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
1505
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
1505
|
+
* @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
1506
1506
|
*/
|
|
1507
1507
|
if (code === undefined) {
|
|
1508
1508
|
throw new errors.ArgumentsRequired(this.id + ' fetchWithdrawal() requires the code argument');
|
|
@@ -1543,7 +1543,7 @@ class bitopro extends bitopro$1 {
|
|
|
1543
1543
|
* @param {string} address the address to withdraw to
|
|
1544
1544
|
* @param {string} tag
|
|
1545
1545
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
1546
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
1546
|
+
* @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
1547
1547
|
*/
|
|
1548
1548
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
1549
1549
|
await this.loadMarkets();
|
|
@@ -1666,7 +1666,7 @@ class bitopro extends bitopro$1 {
|
|
|
1666
1666
|
};
|
|
1667
1667
|
const data = this.json(rawData);
|
|
1668
1668
|
const payload = this.stringToBase64(data);
|
|
1669
|
-
const signature = this.hmac(payload, this.encode(this.secret), sha512.sha384);
|
|
1669
|
+
const signature = this.hmac(this.encode(payload), this.encode(this.secret), sha512.sha384);
|
|
1670
1670
|
headers['X-BITOPRO-APIKEY'] = this.apiKey;
|
|
1671
1671
|
headers['X-BITOPRO-PAYLOAD'] = payload;
|
|
1672
1672
|
headers['X-BITOPRO-SIGNATURE'] = signature;
|