ccxt 4.0.74 → 4.0.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/ccxt.browser.js +2047 -1932
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +9 -9
- package/dist/cjs/src/alpaca.js +6 -6
- package/dist/cjs/src/ascendex.js +22 -22
- package/dist/cjs/src/base/Exchange.js +2 -2
- package/dist/cjs/src/bigone.js +17 -17
- package/dist/cjs/src/binance.js +51 -51
- package/dist/cjs/src/bingx.js +21 -21
- package/dist/cjs/src/bit2c.js +10 -10
- package/dist/cjs/src/bitbank.js +11 -11
- package/dist/cjs/src/bitbns.js +12 -12
- package/dist/cjs/src/bitfinex.js +19 -19
- package/dist/cjs/src/bitfinex2.js +25 -25
- package/dist/cjs/src/bitflyer.js +15 -15
- package/dist/cjs/src/bitforex.js +9 -9
- package/dist/cjs/src/bitget.js +34 -34
- package/dist/cjs/src/bithumb.js +9 -9
- package/dist/cjs/src/bitmart.js +42 -29
- package/dist/cjs/src/bitmex.js +19 -19
- package/dist/cjs/src/bitopro.js +18 -18
- package/dist/cjs/src/bitpanda.js +19 -19
- package/dist/cjs/src/bitrue.js +15 -15
- package/dist/cjs/src/bitso.js +19 -19
- package/dist/cjs/src/bitstamp.js +19 -19
- package/dist/cjs/src/bitstamp1.js +6 -6
- package/dist/cjs/src/bittrex.js +24 -24
- package/dist/cjs/src/bitvavo.js +16 -16
- package/dist/cjs/src/bkex.js +17 -17
- package/dist/cjs/src/bl3p.js +6 -6
- package/dist/cjs/src/blockchaincom.js +20 -20
- package/dist/cjs/src/btcalpha.js +13 -13
- package/dist/cjs/src/btcbox.js +8 -8
- package/dist/cjs/src/btcmarkets.js +15 -15
- package/dist/cjs/src/btctradeua.js +6 -6
- package/dist/cjs/src/btcturk.js +9 -9
- package/dist/cjs/src/bybit.js +148 -116
- package/dist/cjs/src/cex.js +12 -12
- package/dist/cjs/src/coinbase.js +20 -20
- package/dist/cjs/src/coinbasepro.js +22 -22
- package/dist/cjs/src/coincheck.js +10 -10
- package/dist/cjs/src/coinex.js +81 -35
- package/dist/cjs/src/coinfalcon.js +14 -14
- package/dist/cjs/src/coinmate.js +12 -12
- package/dist/cjs/src/coinone.js +10 -10
- package/dist/cjs/src/coinsph.js +20 -20
- package/dist/cjs/src/coinspot.js +6 -6
- package/dist/cjs/src/cryptocom.js +24 -24
- package/dist/cjs/src/currencycom.js +18 -18
- package/dist/cjs/src/delta.js +23 -23
- package/dist/cjs/src/deribit.js +27 -27
- package/dist/cjs/src/digifinex.js +27 -27
- package/dist/cjs/src/exmo.js +24 -24
- package/dist/cjs/src/gate.js +34 -34
- package/dist/cjs/src/gemini.js +14 -14
- package/dist/cjs/src/hitbtc.js +30 -30
- package/dist/cjs/src/hollaex.js +20 -20
- package/dist/cjs/src/huobi.js +40 -40
- package/dist/cjs/src/huobijp.js +18 -18
- package/dist/cjs/src/idex.js +17 -17
- package/dist/cjs/src/independentreserve.js +10 -10
- package/dist/cjs/src/indodax.js +12 -12
- package/dist/cjs/src/kraken.js +25 -25
- package/dist/cjs/src/krakenfutures.js +12 -12
- package/dist/cjs/src/kucoin.js +29 -29
- package/dist/cjs/src/kucoinfutures.js +19 -19
- package/dist/cjs/src/kuna.js +10 -10
- package/dist/cjs/src/latoken.js +15 -15
- package/dist/cjs/src/lbank.js +10 -10
- package/dist/cjs/src/lbank2.js +21 -21
- package/dist/cjs/src/luno.js +14 -14
- package/dist/cjs/src/lykke.js +14 -14
- package/dist/cjs/src/mercado.js +10 -10
- package/dist/cjs/src/mexc.js +38 -38
- package/dist/cjs/src/ndax.js +18 -18
- package/dist/cjs/src/novadax.js +18 -18
- package/dist/cjs/src/oceanex.js +14 -14
- package/dist/cjs/src/okcoin.js +19 -19
- package/dist/cjs/src/okx.js +48 -48
- package/dist/cjs/src/paymium.js +9 -9
- package/dist/cjs/src/phemex.js +24 -24
- package/dist/cjs/src/poloniex.js +77 -60
- package/dist/cjs/src/poloniexfutures.js +16 -16
- package/dist/cjs/src/pro/alpaca.js +5 -5
- package/dist/cjs/src/pro/ascendex.js +2 -2
- package/dist/cjs/src/pro/binance.js +10 -10
- package/dist/cjs/src/pro/bitfinex.js +3 -3
- package/dist/cjs/src/pro/bitfinex2.js +4 -4
- package/dist/cjs/src/pro/bitget.js +4 -4
- package/dist/cjs/src/pro/bitmart.js +3 -3
- package/dist/cjs/src/pro/bitmex.js +4 -4
- package/dist/cjs/src/pro/bitopro.js +2 -2
- package/dist/cjs/src/pro/bitrue.js +1 -1
- package/dist/cjs/src/pro/bitstamp.js +2 -2
- package/dist/cjs/src/pro/bittrex.js +4 -4
- package/dist/cjs/src/pro/bitvavo.js +4 -4
- package/dist/cjs/src/pro/bybit.js +5 -5
- package/dist/cjs/src/pro/cex.js +3 -3
- package/dist/cjs/src/pro/coinbasepro.js +5 -5
- package/dist/cjs/src/pro/coinex.js +3 -3
- package/dist/cjs/src/pro/cryptocom.js +7 -7
- package/dist/cjs/src/pro/currencycom.js +2 -2
- package/dist/cjs/src/pro/deribit.js +3 -3
- package/dist/cjs/src/pro/exmo.js +2 -2
- package/dist/cjs/src/pro/gate.js +5 -5
- package/dist/cjs/src/pro/gemini.js +2 -2
- package/dist/cjs/src/pro/hitbtc.js +2 -2
- package/dist/cjs/src/pro/hollaex.js +3 -3
- package/dist/cjs/src/pro/huobi.js +4 -4
- package/dist/cjs/src/pro/huobijp.js +2 -2
- package/dist/cjs/src/pro/idex.js +3 -3
- package/dist/cjs/src/pro/independentreserve.js +1 -1
- package/dist/cjs/src/pro/kraken.js +6 -6
- package/dist/cjs/src/pro/krakenfutures.js +2 -2
- package/dist/cjs/src/pro/kucoin.js +4 -4
- package/dist/cjs/src/pro/kucoinfutures.js +3 -3
- package/dist/cjs/src/pro/luno.js +1 -1
- package/dist/cjs/src/pro/ndax.js +2 -2
- package/dist/cjs/src/pro/okcoin.js +3 -3
- package/dist/cjs/src/pro/okx.js +12 -11
- package/dist/cjs/src/pro/phemex.js +4 -4
- package/dist/cjs/src/pro/poloniex.js +1 -1
- package/dist/cjs/src/pro/upbit.js +2 -2
- package/dist/cjs/src/pro/wazirx.js +3 -3
- package/dist/cjs/src/pro/whitebit.js +4 -4
- package/dist/cjs/src/probit.js +17 -17
- package/dist/cjs/src/tidex.js +11 -11
- package/dist/cjs/src/timex.js +14 -14
- package/dist/cjs/src/tokocrypto.js +16 -16
- package/dist/cjs/src/upbit.js +18 -18
- package/dist/cjs/src/wavesexchange.js +13 -13
- package/dist/cjs/src/wazirx.js +10 -10
- package/dist/cjs/src/whitebit.js +21 -21
- package/dist/cjs/src/woo.js +28 -22
- package/dist/cjs/src/yobit.js +14 -14
- package/dist/cjs/src/zaif.js +8 -8
- package/dist/cjs/src/zonda.js +13 -13
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bitmart.d.ts +13 -0
- package/js/src/abstract/bybit.d.ts +33 -21
- package/js/src/abstract/woo.d.ts +6 -0
- package/js/src/ace.js +9 -9
- package/js/src/alpaca.js +6 -6
- package/js/src/ascendex.js +22 -22
- package/js/src/base/Exchange.js +2 -2
- package/js/src/bigone.js +17 -17
- package/js/src/binance.js +51 -51
- package/js/src/bingx.js +21 -21
- package/js/src/bit2c.js +10 -10
- package/js/src/bitbank.js +11 -11
- package/js/src/bitbns.js +12 -12
- package/js/src/bitfinex.js +19 -19
- package/js/src/bitfinex2.js +25 -25
- package/js/src/bitflyer.js +15 -15
- package/js/src/bitforex.js +9 -9
- package/js/src/bitget.js +34 -34
- package/js/src/bithumb.js +9 -9
- package/js/src/bitmart.js +42 -29
- package/js/src/bitmex.js +19 -19
- package/js/src/bitopro.js +18 -18
- package/js/src/bitpanda.js +19 -19
- package/js/src/bitrue.js +15 -15
- package/js/src/bitso.js +19 -19
- package/js/src/bitstamp.js +19 -19
- package/js/src/bitstamp1.js +6 -6
- package/js/src/bittrex.js +24 -24
- package/js/src/bitvavo.js +16 -16
- package/js/src/bkex.js +17 -17
- package/js/src/bl3p.js +6 -6
- package/js/src/blockchaincom.js +20 -20
- package/js/src/btcalpha.js +13 -13
- package/js/src/btcbox.js +8 -8
- package/js/src/btcmarkets.js +15 -15
- package/js/src/btctradeua.js +6 -6
- package/js/src/btcturk.js +9 -9
- package/js/src/bybit.js +148 -116
- package/js/src/cex.js +12 -12
- package/js/src/coinbase.js +20 -20
- package/js/src/coinbasepro.js +22 -22
- package/js/src/coincheck.js +10 -10
- package/js/src/coinex.d.ts +1 -0
- package/js/src/coinex.js +81 -35
- package/js/src/coinfalcon.js +14 -14
- package/js/src/coinmate.js +12 -12
- package/js/src/coinone.js +10 -10
- package/js/src/coinsph.js +20 -20
- package/js/src/coinspot.js +6 -6
- package/js/src/cryptocom.js +24 -24
- package/js/src/currencycom.js +18 -18
- package/js/src/delta.js +23 -23
- package/js/src/deribit.js +27 -27
- package/js/src/digifinex.js +27 -27
- package/js/src/exmo.js +24 -24
- package/js/src/gate.js +34 -34
- package/js/src/gemini.js +14 -14
- package/js/src/hitbtc.js +30 -30
- package/js/src/hollaex.js +20 -20
- package/js/src/huobi.js +40 -40
- package/js/src/huobijp.js +18 -18
- package/js/src/idex.js +17 -17
- package/js/src/independentreserve.js +10 -10
- package/js/src/indodax.js +12 -12
- package/js/src/kraken.js +25 -25
- package/js/src/krakenfutures.js +12 -12
- package/js/src/kucoin.js +29 -29
- package/js/src/kucoinfutures.js +19 -19
- package/js/src/kuna.js +10 -10
- package/js/src/latoken.js +15 -15
- package/js/src/lbank.js +10 -10
- package/js/src/lbank2.js +21 -21
- package/js/src/luno.js +14 -14
- package/js/src/lykke.js +14 -14
- package/js/src/mercado.js +10 -10
- package/js/src/mexc.js +38 -38
- package/js/src/ndax.js +18 -18
- package/js/src/novadax.js +18 -18
- package/js/src/oceanex.js +14 -14
- package/js/src/okcoin.js +19 -19
- package/js/src/okx.js +48 -48
- package/js/src/paymium.js +9 -9
- package/js/src/phemex.js +24 -24
- package/js/src/poloniex.js +77 -60
- package/js/src/poloniexfutures.js +16 -16
- package/js/src/pro/alpaca.js +5 -5
- package/js/src/pro/ascendex.js +2 -2
- package/js/src/pro/binance.js +10 -10
- package/js/src/pro/bitfinex.js +3 -3
- package/js/src/pro/bitfinex2.js +4 -4
- package/js/src/pro/bitget.js +4 -4
- package/js/src/pro/bitmart.js +3 -3
- package/js/src/pro/bitmex.js +4 -4
- package/js/src/pro/bitopro.js +2 -2
- package/js/src/pro/bitrue.js +1 -1
- package/js/src/pro/bitstamp.js +2 -2
- package/js/src/pro/bittrex.js +4 -4
- package/js/src/pro/bitvavo.js +4 -4
- package/js/src/pro/bybit.js +5 -5
- package/js/src/pro/cex.js +3 -3
- package/js/src/pro/coinbasepro.js +5 -5
- package/js/src/pro/coinex.js +3 -3
- package/js/src/pro/cryptocom.js +7 -7
- package/js/src/pro/currencycom.js +2 -2
- package/js/src/pro/deribit.js +3 -3
- package/js/src/pro/exmo.js +2 -2
- package/js/src/pro/gate.js +5 -5
- package/js/src/pro/gemini.js +2 -2
- package/js/src/pro/hitbtc.js +2 -2
- package/js/src/pro/hollaex.js +3 -3
- package/js/src/pro/huobi.js +4 -4
- package/js/src/pro/huobijp.js +2 -2
- package/js/src/pro/idex.js +3 -3
- package/js/src/pro/independentreserve.js +1 -1
- package/js/src/pro/kraken.js +6 -6
- package/js/src/pro/krakenfutures.js +2 -2
- package/js/src/pro/kucoin.js +4 -4
- package/js/src/pro/kucoinfutures.js +3 -3
- package/js/src/pro/luno.js +1 -1
- package/js/src/pro/ndax.js +2 -2
- package/js/src/pro/okcoin.js +3 -3
- package/js/src/pro/okx.d.ts +1 -1
- package/js/src/pro/okx.js +12 -11
- package/js/src/pro/phemex.js +4 -4
- package/js/src/pro/poloniex.js +1 -1
- package/js/src/pro/upbit.js +2 -2
- package/js/src/pro/wazirx.js +3 -3
- package/js/src/pro/whitebit.js +4 -4
- package/js/src/probit.js +17 -17
- package/js/src/tidex.js +11 -11
- package/js/src/timex.js +14 -14
- package/js/src/tokocrypto.js +16 -16
- package/js/src/upbit.js +18 -18
- package/js/src/wavesexchange.js +13 -13
- package/js/src/wazirx.js +10 -10
- package/js/src/whitebit.js +21 -21
- package/js/src/woo.js +28 -22
- package/js/src/yobit.js +14 -14
- package/js/src/zaif.js +8 -8
- package/js/src/zonda.js +13 -13
- package/package.json +1 -1
package/js/src/bitmart.js
CHANGED
|
@@ -119,8 +119,15 @@ export default class bitmart extends Exchange {
|
|
|
119
119
|
'spot/v1/currencies': 7.5,
|
|
120
120
|
'spot/v1/symbols': 7.5,
|
|
121
121
|
'spot/v1/symbols/details': 5,
|
|
122
|
+
'spot/quotation/v3/tickers': 6,
|
|
123
|
+
'spot/quotation/v3/ticker': 4,
|
|
124
|
+
'spot/quotation/v3/lite-klines': 4,
|
|
125
|
+
'spot/quotation/v3/klines': 6,
|
|
126
|
+
'spot/quotation/v3/books': 4,
|
|
127
|
+
'spot/quotation/v3/trades': 4,
|
|
122
128
|
'spot/v1/ticker': 5,
|
|
123
129
|
'spot/v2/ticker': 5,
|
|
130
|
+
'spot/v1/ticker_detail': 5,
|
|
124
131
|
'spot/v1/steps': 30,
|
|
125
132
|
'spot/v1/symbols/kline': 5,
|
|
126
133
|
'spot/v1/symbols/book': 5,
|
|
@@ -185,6 +192,12 @@ export default class bitmart extends Exchange {
|
|
|
185
192
|
'spot/v1/batch_orders': 1,
|
|
186
193
|
'spot/v2/cancel_order': 1,
|
|
187
194
|
'spot/v1/cancel_orders': 15,
|
|
195
|
+
'spot/v4/query/order': 1,
|
|
196
|
+
'spot/v4/query/client-order': 1,
|
|
197
|
+
'spot/v4/query/open-orders': 5,
|
|
198
|
+
'spot/v4/query/history-orders': 5,
|
|
199
|
+
'spot/v4/query/trades': 5,
|
|
200
|
+
'spot/v4/query/order-trades': 5,
|
|
188
201
|
// newer endpoint
|
|
189
202
|
'spot/v3/cancel_order': 1,
|
|
190
203
|
'spot/v2/batch_orders': 1,
|
|
@@ -569,7 +582,7 @@ export default class bitmart extends Exchange {
|
|
|
569
582
|
* @name bitmart#fetchStatus
|
|
570
583
|
* @description the latest known information on the availability of the exchange API
|
|
571
584
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
572
|
-
* @returns {object} a [status structure]{@link https://
|
|
585
|
+
* @returns {object} a [status structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#exchange-status-structure}
|
|
573
586
|
*/
|
|
574
587
|
const options = this.safeValue(this.options, 'fetchStatus', {});
|
|
575
588
|
const defaultType = this.safeString(this.options, 'defaultType');
|
|
@@ -903,7 +916,7 @@ export default class bitmart extends Exchange {
|
|
|
903
916
|
* @description please use fetchDepositWithdrawFee instead
|
|
904
917
|
* @param {string} code unified currency code
|
|
905
918
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
906
|
-
* @returns {object} a [fee structure]{@link https://
|
|
919
|
+
* @returns {object} a [fee structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
|
907
920
|
*/
|
|
908
921
|
await this.loadMarkets();
|
|
909
922
|
const currency = this.currency(code);
|
|
@@ -962,7 +975,7 @@ export default class bitmart extends Exchange {
|
|
|
962
975
|
* @description fetch the fee for deposits and withdrawals
|
|
963
976
|
* @param {string} code unified currency code
|
|
964
977
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
965
|
-
* @returns {object} a [fee structure]{@link https://
|
|
978
|
+
* @returns {object} a [fee structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
|
966
979
|
*/
|
|
967
980
|
await this.loadMarkets();
|
|
968
981
|
const currency = this.currency(code);
|
|
@@ -1075,7 +1088,7 @@ export default class bitmart extends Exchange {
|
|
|
1075
1088
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1076
1089
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1077
1090
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
1078
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
1091
|
+
* @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
1079
1092
|
*/
|
|
1080
1093
|
await this.loadMarkets();
|
|
1081
1094
|
const market = this.market(symbol);
|
|
@@ -1164,7 +1177,7 @@ export default class bitmart extends Exchange {
|
|
|
1164
1177
|
* @see https://developer-pro.bitmart.com/en/spot/#get-ticker-of-all-pairs-v2
|
|
1165
1178
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1166
1179
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
1167
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
1180
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
1168
1181
|
*/
|
|
1169
1182
|
await this.loadMarkets();
|
|
1170
1183
|
symbols = this.marketSymbols(symbols);
|
|
@@ -1198,7 +1211,7 @@ export default class bitmart extends Exchange {
|
|
|
1198
1211
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1199
1212
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
1200
1213
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
1201
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
1214
|
+
* @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
|
|
1202
1215
|
*/
|
|
1203
1216
|
await this.loadMarkets();
|
|
1204
1217
|
const market = this.market(symbol);
|
|
@@ -1514,7 +1527,7 @@ export default class bitmart extends Exchange {
|
|
|
1514
1527
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1515
1528
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
1516
1529
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
1517
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
1530
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
|
|
1518
1531
|
*/
|
|
1519
1532
|
if (symbol === undefined) {
|
|
1520
1533
|
throw new ArgumentsRequired(this.id + ' fetchMyTrades() requires a symbol argument');
|
|
@@ -1575,7 +1588,7 @@ export default class bitmart extends Exchange {
|
|
|
1575
1588
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1576
1589
|
* @param {int} [limit] the maximum number of trades to retrieve
|
|
1577
1590
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
1578
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
1591
|
+
* @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
|
|
1579
1592
|
*/
|
|
1580
1593
|
if (symbol === undefined) {
|
|
1581
1594
|
throw new ArgumentsRequired(this.id + ' fetchOrderTrades() requires a symbol argument');
|
|
@@ -1829,7 +1842,7 @@ export default class bitmart extends Exchange {
|
|
|
1829
1842
|
* @description fetch the trading fees for a market
|
|
1830
1843
|
* @param {string} symbol unified market symbol
|
|
1831
1844
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
1832
|
-
* @returns {object} a [fee structure]{@link https://
|
|
1845
|
+
* @returns {object} a [fee structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
|
1833
1846
|
*/
|
|
1834
1847
|
await this.loadMarkets();
|
|
1835
1848
|
const market = this.market(symbol);
|
|
@@ -1971,10 +1984,10 @@ export default class bitmart extends Exchange {
|
|
|
1971
1984
|
* @param {string} type 'market' or 'limit'
|
|
1972
1985
|
* @param {string} side 'buy' or 'sell'
|
|
1973
1986
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1974
|
-
* @param {float} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1987
|
+
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1975
1988
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
1976
1989
|
* @param {string} [params.marginMode] 'cross' or 'isolated'
|
|
1977
|
-
* @returns {object} an [order structure]{@link https://
|
|
1990
|
+
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1978
1991
|
*/
|
|
1979
1992
|
await this.loadMarkets();
|
|
1980
1993
|
const market = this.market(symbol);
|
|
@@ -2071,7 +2084,7 @@ export default class bitmart extends Exchange {
|
|
|
2071
2084
|
* @param {string} id order id
|
|
2072
2085
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
2073
2086
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2074
|
-
* @returns {object} An [order structure]{@link https://
|
|
2087
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
2075
2088
|
*/
|
|
2076
2089
|
if (symbol === undefined) {
|
|
2077
2090
|
throw new ArgumentsRequired(this.id + ' cancelOrder() requires a symbol argument');
|
|
@@ -2135,7 +2148,7 @@ export default class bitmart extends Exchange {
|
|
|
2135
2148
|
* @see https://developer-pro.bitmart.com/en/spot/#cancel-all-orders
|
|
2136
2149
|
* @param {string} symbol unified market symbol of the market to cancel orders in
|
|
2137
2150
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2138
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
2151
|
+
* @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
2139
2152
|
*/
|
|
2140
2153
|
await this.loadMarkets();
|
|
2141
2154
|
const request = {};
|
|
@@ -2233,7 +2246,7 @@ export default class bitmart extends Exchange {
|
|
|
2233
2246
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
2234
2247
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
2235
2248
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2236
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
2249
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
2237
2250
|
*/
|
|
2238
2251
|
return await this.fetchOrdersByStatus('open', symbol, since, limit, params);
|
|
2239
2252
|
}
|
|
@@ -2246,7 +2259,7 @@ export default class bitmart extends Exchange {
|
|
|
2246
2259
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
2247
2260
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
2248
2261
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2249
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
2262
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
2250
2263
|
*/
|
|
2251
2264
|
return await this.fetchOrdersByStatus('closed', symbol, since, limit, params);
|
|
2252
2265
|
}
|
|
@@ -2259,7 +2272,7 @@ export default class bitmart extends Exchange {
|
|
|
2259
2272
|
* @param {int} [since] timestamp in ms of the earliest order, default is undefined
|
|
2260
2273
|
* @param {int} [limit] max number of orders to return, default is undefined
|
|
2261
2274
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2262
|
-
* @returns {object} a list of [order structures]{@link https://
|
|
2275
|
+
* @returns {object} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
2263
2276
|
*/
|
|
2264
2277
|
return await this.fetchOrdersByStatus('canceled', symbol, since, limit, params);
|
|
2265
2278
|
}
|
|
@@ -2270,7 +2283,7 @@ export default class bitmart extends Exchange {
|
|
|
2270
2283
|
* @description fetches information on an order made by the user
|
|
2271
2284
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
2272
2285
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2273
|
-
* @returns {object} An [order structure]{@link https://
|
|
2286
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
2274
2287
|
*/
|
|
2275
2288
|
if (symbol === undefined) {
|
|
2276
2289
|
throw new ArgumentsRequired(this.id + ' fetchOrder() requires a symbol argument');
|
|
@@ -2318,7 +2331,7 @@ export default class bitmart extends Exchange {
|
|
|
2318
2331
|
* @description fetch the deposit address for a currency associated with this account
|
|
2319
2332
|
* @param {string} code unified currency code
|
|
2320
2333
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2321
|
-
* @returns {object} an [address structure]{@link https://
|
|
2334
|
+
* @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
|
|
2322
2335
|
*/
|
|
2323
2336
|
await this.loadMarkets();
|
|
2324
2337
|
const currency = this.currency(code);
|
|
@@ -2383,7 +2396,7 @@ export default class bitmart extends Exchange {
|
|
|
2383
2396
|
* @param {string} address the address to withdraw to
|
|
2384
2397
|
* @param {string} tag
|
|
2385
2398
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2386
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
2399
|
+
* @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
2387
2400
|
*/
|
|
2388
2401
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
2389
2402
|
this.checkAddress(address);
|
|
@@ -2492,7 +2505,7 @@ export default class bitmart extends Exchange {
|
|
|
2492
2505
|
* @param {string} id deposit id
|
|
2493
2506
|
* @param {string} code not used by bitmart fetchDeposit ()
|
|
2494
2507
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2495
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
2508
|
+
* @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
2496
2509
|
*/
|
|
2497
2510
|
await this.loadMarkets();
|
|
2498
2511
|
const request = {
|
|
@@ -2534,7 +2547,7 @@ export default class bitmart extends Exchange {
|
|
|
2534
2547
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
2535
2548
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
2536
2549
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2537
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
2550
|
+
* @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
2538
2551
|
*/
|
|
2539
2552
|
return await this.fetchTransactionsByType('deposit', code, since, limit, params);
|
|
2540
2553
|
}
|
|
@@ -2546,7 +2559,7 @@ export default class bitmart extends Exchange {
|
|
|
2546
2559
|
* @param {string} id withdrawal id
|
|
2547
2560
|
* @param {string} code not used by bitmart.fetchWithdrawal
|
|
2548
2561
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2549
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
2562
|
+
* @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
2550
2563
|
*/
|
|
2551
2564
|
await this.loadMarkets();
|
|
2552
2565
|
const request = {
|
|
@@ -2588,7 +2601,7 @@ export default class bitmart extends Exchange {
|
|
|
2588
2601
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
2589
2602
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
2590
2603
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2591
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
2604
|
+
* @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
2592
2605
|
*/
|
|
2593
2606
|
return await this.fetchTransactionsByType('withdraw', code, since, limit, params);
|
|
2594
2607
|
}
|
|
@@ -2687,7 +2700,7 @@ export default class bitmart extends Exchange {
|
|
|
2687
2700
|
* @param {string} symbol unified market symbol
|
|
2688
2701
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2689
2702
|
* @param {string} [params.marginMode] 'isolated' is the default and 'cross' is unavailable
|
|
2690
|
-
* @returns {object} a [margin loan structure]{@link https://
|
|
2703
|
+
* @returns {object} a [margin loan structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#margin-loan-structure}
|
|
2691
2704
|
*/
|
|
2692
2705
|
await this.loadMarkets();
|
|
2693
2706
|
if (symbol === undefined) {
|
|
@@ -2730,7 +2743,7 @@ export default class bitmart extends Exchange {
|
|
|
2730
2743
|
* @param {string} symbol unified market symbol
|
|
2731
2744
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2732
2745
|
* @param {string} [params.marginMode] 'isolated' is the default and 'cross' is unavailable
|
|
2733
|
-
* @returns {object} a [margin loan structure]{@link https://
|
|
2746
|
+
* @returns {object} a [margin loan structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#margin-loan-structure}
|
|
2734
2747
|
*/
|
|
2735
2748
|
await this.loadMarkets();
|
|
2736
2749
|
if (symbol === undefined) {
|
|
@@ -2795,7 +2808,7 @@ export default class bitmart extends Exchange {
|
|
|
2795
2808
|
* @see https://developer-pro.bitmart.com/en/spot/#get-trading-pair-borrowing-rate-and-amount
|
|
2796
2809
|
* @param {string} code unified currency code
|
|
2797
2810
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2798
|
-
* @returns {object} a [borrow rate structure]{@link https://
|
|
2811
|
+
* @returns {object} a [borrow rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure}
|
|
2799
2812
|
*/
|
|
2800
2813
|
await this.loadMarkets();
|
|
2801
2814
|
let market = undefined;
|
|
@@ -2894,7 +2907,7 @@ export default class bitmart extends Exchange {
|
|
|
2894
2907
|
* @description fetch the borrow interest rates of all currencies, currently only works for isolated margin
|
|
2895
2908
|
* @see https://developer-pro.bitmart.com/en/spot/#get-trading-pair-borrowing-rate-and-amount
|
|
2896
2909
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2897
|
-
* @returns {object} a list of [borrow rate structures]{@link https://
|
|
2910
|
+
* @returns {object} a list of [borrow rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure}
|
|
2898
2911
|
*/
|
|
2899
2912
|
await this.loadMarkets();
|
|
2900
2913
|
const response = await this.privateGetSpotV1MarginIsolatedPairs(params);
|
|
@@ -2985,7 +2998,7 @@ export default class bitmart extends Exchange {
|
|
|
2985
2998
|
* @param {string} fromAccount account to transfer from
|
|
2986
2999
|
* @param {string} toAccount account to transfer to
|
|
2987
3000
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2988
|
-
* @returns {object} a [transfer structure]{@link https://
|
|
3001
|
+
* @returns {object} a [transfer structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transfer-structure}
|
|
2989
3002
|
*/
|
|
2990
3003
|
await this.loadMarkets();
|
|
2991
3004
|
const currency = this.currency(code);
|
|
@@ -3065,7 +3078,7 @@ export default class bitmart extends Exchange {
|
|
|
3065
3078
|
* @param {int} [since] the earliest time in ms to fetch borrrow interest for
|
|
3066
3079
|
* @param {int} [limit] the maximum number of structures to retrieve
|
|
3067
3080
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
3068
|
-
* @returns {object[]} a list of [borrow interest structures]{@link https://
|
|
3081
|
+
* @returns {object[]} a list of [borrow interest structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#borrow-interest-structure}
|
|
3069
3082
|
*/
|
|
3070
3083
|
if (symbol === undefined) {
|
|
3071
3084
|
throw new ArgumentsRequired(this.id + ' fetchBorrowInterest() requires a symbol argument');
|
package/js/src/bitmex.js
CHANGED
|
@@ -798,7 +798,7 @@ export default class bitmex extends Exchange {
|
|
|
798
798
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
799
799
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
800
800
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
801
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
801
|
+
* @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
|
|
802
802
|
*/
|
|
803
803
|
await this.loadMarkets();
|
|
804
804
|
const market = this.market(symbol);
|
|
@@ -840,7 +840,7 @@ export default class bitmex extends Exchange {
|
|
|
840
840
|
* @description fetches information on an order made by the user
|
|
841
841
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
842
842
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
843
|
-
* @returns {object} An [order structure]{@link https://
|
|
843
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
844
844
|
*/
|
|
845
845
|
const filter = {
|
|
846
846
|
'filter': {
|
|
@@ -863,7 +863,7 @@ export default class bitmex extends Exchange {
|
|
|
863
863
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
864
864
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
865
865
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
866
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
866
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
867
867
|
*/
|
|
868
868
|
await this.loadMarkets();
|
|
869
869
|
let market = undefined;
|
|
@@ -897,7 +897,7 @@ export default class bitmex extends Exchange {
|
|
|
897
897
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
898
898
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
899
899
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
900
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
900
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
901
901
|
*/
|
|
902
902
|
const request = {
|
|
903
903
|
'filter': {
|
|
@@ -915,7 +915,7 @@ export default class bitmex extends Exchange {
|
|
|
915
915
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
916
916
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
917
917
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
918
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
918
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
919
919
|
*/
|
|
920
920
|
// Bitmex barfs if you set 'open': false in the filter...
|
|
921
921
|
const orders = await this.fetchOrders(symbol, since, limit, params);
|
|
@@ -930,7 +930,7 @@ export default class bitmex extends Exchange {
|
|
|
930
930
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
931
931
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
932
932
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
933
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
933
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
|
|
934
934
|
*/
|
|
935
935
|
await this.loadMarkets();
|
|
936
936
|
let market = undefined;
|
|
@@ -1126,7 +1126,7 @@ export default class bitmex extends Exchange {
|
|
|
1126
1126
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
1127
1127
|
* @param {int} [limit] max number of ledger entrys to return, default is undefined
|
|
1128
1128
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
1129
|
-
* @returns {object} a [ledger structure]{@link https://
|
|
1129
|
+
* @returns {object} a [ledger structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ledger-structure}
|
|
1130
1130
|
*/
|
|
1131
1131
|
await this.loadMarkets();
|
|
1132
1132
|
const request = {
|
|
@@ -1177,7 +1177,7 @@ export default class bitmex extends Exchange {
|
|
|
1177
1177
|
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
1178
1178
|
* @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
|
|
1179
1179
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
1180
|
-
* @returns {object} a list of [transaction structure]{@link https://
|
|
1180
|
+
* @returns {object} a list of [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
1181
1181
|
*/
|
|
1182
1182
|
await this.loadMarkets();
|
|
1183
1183
|
const request = {
|
|
@@ -1292,7 +1292,7 @@ export default class bitmex extends Exchange {
|
|
|
1292
1292
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1293
1293
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1294
1294
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
1295
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
1295
|
+
* @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
1296
1296
|
*/
|
|
1297
1297
|
await this.loadMarkets();
|
|
1298
1298
|
const market = this.market(symbol);
|
|
@@ -1313,7 +1313,7 @@ export default class bitmex extends Exchange {
|
|
|
1313
1313
|
* @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
|
|
1314
1314
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1315
1315
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
1316
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
1316
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
1317
1317
|
*/
|
|
1318
1318
|
await this.loadMarkets();
|
|
1319
1319
|
symbols = this.marketSymbols(symbols);
|
|
@@ -1767,9 +1767,9 @@ export default class bitmex extends Exchange {
|
|
|
1767
1767
|
* @param {string} type 'market' or 'limit'
|
|
1768
1768
|
* @param {string} side 'buy' or 'sell'
|
|
1769
1769
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1770
|
-
* @param {float} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1770
|
+
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1771
1771
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
1772
|
-
* @returns {object} an [order structure]{@link https://
|
|
1772
|
+
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1773
1773
|
*/
|
|
1774
1774
|
await this.loadMarkets();
|
|
1775
1775
|
const market = this.market(symbol);
|
|
@@ -1845,7 +1845,7 @@ export default class bitmex extends Exchange {
|
|
|
1845
1845
|
* @param {string} id order id
|
|
1846
1846
|
* @param {string} symbol not used by bitmex cancelOrder ()
|
|
1847
1847
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
1848
|
-
* @returns {object} An [order structure]{@link https://
|
|
1848
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1849
1849
|
*/
|
|
1850
1850
|
await this.loadMarkets();
|
|
1851
1851
|
// https://github.com/ccxt/ccxt/issues/6507
|
|
@@ -1876,7 +1876,7 @@ export default class bitmex extends Exchange {
|
|
|
1876
1876
|
* @param {string[]} ids order ids
|
|
1877
1877
|
* @param {string} symbol not used by bitmex cancelOrders ()
|
|
1878
1878
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
1879
|
-
* @returns {object} an list of [order structures]{@link https://
|
|
1879
|
+
* @returns {object} an list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1880
1880
|
*/
|
|
1881
1881
|
// return await this.cancelOrder (ids, symbol, params);
|
|
1882
1882
|
await this.loadMarkets();
|
|
@@ -1900,7 +1900,7 @@ export default class bitmex extends Exchange {
|
|
|
1900
1900
|
* @description cancel all open orders
|
|
1901
1901
|
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
1902
1902
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
1903
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
1903
|
+
* @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1904
1904
|
*/
|
|
1905
1905
|
await this.loadMarkets();
|
|
1906
1906
|
const request = {};
|
|
@@ -1958,7 +1958,7 @@ export default class bitmex extends Exchange {
|
|
|
1958
1958
|
* @description fetch all open positions
|
|
1959
1959
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
1960
1960
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
1961
|
-
* @returns {object[]} a list of [position structure]{@link https://
|
|
1961
|
+
* @returns {object[]} a list of [position structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#position-structure}
|
|
1962
1962
|
*/
|
|
1963
1963
|
await this.loadMarkets();
|
|
1964
1964
|
const response = await this.privateGetPosition(params);
|
|
@@ -2218,7 +2218,7 @@ export default class bitmex extends Exchange {
|
|
|
2218
2218
|
* @param {string} address the address to withdraw to
|
|
2219
2219
|
* @param {string} tag
|
|
2220
2220
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
2221
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
2221
|
+
* @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
2222
2222
|
*/
|
|
2223
2223
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
2224
2224
|
this.checkAddress(address);
|
|
@@ -2262,7 +2262,7 @@ export default class bitmex extends Exchange {
|
|
|
2262
2262
|
* @description fetch the funding rate for multiple markets
|
|
2263
2263
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
2264
2264
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
2265
|
-
* @returns {object} a dictionary of [funding rates structures]{@link https://
|
|
2265
|
+
* @returns {object} a dictionary of [funding rates structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rates-structure}, indexe by market symbols
|
|
2266
2266
|
*/
|
|
2267
2267
|
await this.loadMarkets();
|
|
2268
2268
|
const response = await this.publicGetInstrumentActiveAndIndices(params);
|
|
@@ -2451,7 +2451,7 @@ export default class bitmex extends Exchange {
|
|
|
2451
2451
|
* @param {string} code unified currency code
|
|
2452
2452
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
2453
2453
|
* @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']
|
|
2454
|
-
* @returns {object} an [address structure]{@link https://
|
|
2454
|
+
* @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
|
|
2455
2455
|
*/
|
|
2456
2456
|
await this.loadMarkets();
|
|
2457
2457
|
let networkCode = undefined;
|
package/js/src/bitopro.js
CHANGED
|
@@ -411,7 +411,7 @@ export default class bitopro extends Exchange {
|
|
|
411
411
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
412
412
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
413
413
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
414
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
414
|
+
* @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
415
415
|
*/
|
|
416
416
|
await this.loadMarkets();
|
|
417
417
|
const market = this.market(symbol);
|
|
@@ -442,7 +442,7 @@ export default class bitopro extends Exchange {
|
|
|
442
442
|
* @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
|
|
443
443
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
444
444
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
445
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
445
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
446
446
|
*/
|
|
447
447
|
await this.loadMarkets();
|
|
448
448
|
const response = await this.publicGetTickers();
|
|
@@ -472,7 +472,7 @@ export default class bitopro extends Exchange {
|
|
|
472
472
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
473
473
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
474
474
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
475
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
475
|
+
* @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
|
|
476
476
|
*/
|
|
477
477
|
await this.loadMarkets();
|
|
478
478
|
const market = this.market(symbol);
|
|
@@ -632,7 +632,7 @@ export default class bitopro extends Exchange {
|
|
|
632
632
|
* @name bitopro#fetchTradingFees
|
|
633
633
|
* @description fetch the trading fees for multiple markets
|
|
634
634
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
635
|
-
* @returns {object} a dictionary of [fee structures]{@link https://
|
|
635
|
+
* @returns {object} a dictionary of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure} indexed by market symbols
|
|
636
636
|
*/
|
|
637
637
|
await this.loadMarkets();
|
|
638
638
|
const response = await this.publicGetProvisioningLimitationsAndFees(params);
|
|
@@ -983,9 +983,9 @@ export default class bitopro extends Exchange {
|
|
|
983
983
|
* @param {string} type 'market' or 'limit'
|
|
984
984
|
* @param {string} side 'buy' or 'sell'
|
|
985
985
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
986
|
-
* @param {float} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
986
|
+
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
987
987
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
988
|
-
* @returns {object} an [order structure]{@link https://
|
|
988
|
+
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
989
989
|
*/
|
|
990
990
|
await this.loadMarkets();
|
|
991
991
|
const market = this.market(symbol);
|
|
@@ -1043,7 +1043,7 @@ export default class bitopro extends Exchange {
|
|
|
1043
1043
|
* @param {string} id order id
|
|
1044
1044
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
1045
1045
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
1046
|
-
* @returns {object} An [order structure]{@link https://
|
|
1046
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1047
1047
|
*/
|
|
1048
1048
|
if (symbol === undefined) {
|
|
1049
1049
|
throw new ArgumentsRequired(this.id + ' cancelOrder() requires the symbol argument');
|
|
@@ -1074,7 +1074,7 @@ export default class bitopro extends Exchange {
|
|
|
1074
1074
|
* @param {string[]} ids order ids
|
|
1075
1075
|
* @param {string} symbol unified market symbol
|
|
1076
1076
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
1077
|
-
* @returns {object} an list of [order structures]{@link https://
|
|
1077
|
+
* @returns {object} an list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1078
1078
|
*/
|
|
1079
1079
|
if (symbol === undefined) {
|
|
1080
1080
|
throw new ArgumentsRequired(this.id + ' cancelOrders() requires a symbol argument');
|
|
@@ -1104,7 +1104,7 @@ export default class bitopro extends Exchange {
|
|
|
1104
1104
|
* @description cancel all open orders
|
|
1105
1105
|
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
1106
1106
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
1107
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
1107
|
+
* @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1108
1108
|
*/
|
|
1109
1109
|
await this.loadMarkets();
|
|
1110
1110
|
const request = {
|
|
@@ -1138,7 +1138,7 @@ export default class bitopro extends Exchange {
|
|
|
1138
1138
|
* @description fetches information on an order made by the user
|
|
1139
1139
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
1140
1140
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
1141
|
-
* @returns {object} An [order structure]{@link https://
|
|
1141
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1142
1142
|
*/
|
|
1143
1143
|
if (symbol === undefined) {
|
|
1144
1144
|
throw new ArgumentsRequired(this.id + ' fetchOrder() requires the symbol argument');
|
|
@@ -1184,7 +1184,7 @@ export default class bitopro extends Exchange {
|
|
|
1184
1184
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1185
1185
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
1186
1186
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
1187
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1187
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1188
1188
|
*/
|
|
1189
1189
|
if (symbol === undefined) {
|
|
1190
1190
|
throw new ArgumentsRequired(this.id + ' fetchOrders() requires the symbol argument');
|
|
@@ -1252,7 +1252,7 @@ export default class bitopro extends Exchange {
|
|
|
1252
1252
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1253
1253
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
1254
1254
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
1255
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1255
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1256
1256
|
*/
|
|
1257
1257
|
const request = {
|
|
1258
1258
|
'statusKind': 'DONE',
|
|
@@ -1268,7 +1268,7 @@ export default class bitopro extends Exchange {
|
|
|
1268
1268
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1269
1269
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
1270
1270
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
1271
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
1271
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
|
|
1272
1272
|
*/
|
|
1273
1273
|
if (symbol === undefined) {
|
|
1274
1274
|
throw new ArgumentsRequired(this.id + ' fetchMyTrades() requires the symbol argument');
|
|
@@ -1405,7 +1405,7 @@ export default class bitopro extends Exchange {
|
|
|
1405
1405
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
1406
1406
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
1407
1407
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
1408
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
1408
|
+
* @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
1409
1409
|
*/
|
|
1410
1410
|
if (code === undefined) {
|
|
1411
1411
|
throw new ArgumentsRequired(this.id + ' fetchDeposits() requires the code argument');
|
|
@@ -1456,7 +1456,7 @@ export default class bitopro extends Exchange {
|
|
|
1456
1456
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
1457
1457
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
1458
1458
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
1459
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
1459
|
+
* @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
1460
1460
|
*/
|
|
1461
1461
|
if (code === undefined) {
|
|
1462
1462
|
throw new ArgumentsRequired(this.id + ' fetchWithdrawals() requires the code argument');
|
|
@@ -1505,7 +1505,7 @@ export default class bitopro extends Exchange {
|
|
|
1505
1505
|
* @param {string} id withdrawal id
|
|
1506
1506
|
* @param {string} code unified currency code of the currency withdrawn, default is undefined
|
|
1507
1507
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
1508
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
1508
|
+
* @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
1509
1509
|
*/
|
|
1510
1510
|
if (code === undefined) {
|
|
1511
1511
|
throw new ArgumentsRequired(this.id + ' fetchWithdrawal() requires the code argument');
|
|
@@ -1546,7 +1546,7 @@ export default class bitopro extends Exchange {
|
|
|
1546
1546
|
* @param {string} address the address to withdraw to
|
|
1547
1547
|
* @param {string} tag
|
|
1548
1548
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
1549
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
1549
|
+
* @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
1550
1550
|
*/
|
|
1551
1551
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
1552
1552
|
await this.loadMarkets();
|
|
@@ -1669,7 +1669,7 @@ export default class bitopro extends Exchange {
|
|
|
1669
1669
|
};
|
|
1670
1670
|
const data = this.json(rawData);
|
|
1671
1671
|
const payload = this.stringToBase64(data);
|
|
1672
|
-
const signature = this.hmac(payload, this.encode(this.secret), sha384);
|
|
1672
|
+
const signature = this.hmac(this.encode(payload), this.encode(this.secret), sha384);
|
|
1673
1673
|
headers['X-BITOPRO-APIKEY'] = this.apiKey;
|
|
1674
1674
|
headers['X-BITOPRO-PAYLOAD'] = payload;
|
|
1675
1675
|
headers['X-BITOPRO-SIGNATURE'] = signature;
|