ccxt 4.1.64 → 4.1.65
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 +3 -3
- package/dist/ccxt.browser.js +2558 -2534
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +13 -13
- package/dist/cjs/src/alpaca.js +10 -10
- package/dist/cjs/src/ascendex.js +33 -33
- package/dist/cjs/src/base/Exchange.js +6 -6
- package/dist/cjs/src/bigone.js +23 -23
- package/dist/cjs/src/binance.js +68 -68
- package/dist/cjs/src/binanceus.js +1 -0
- package/dist/cjs/src/bingx.js +33 -33
- package/dist/cjs/src/bit2c.js +11 -11
- package/dist/cjs/src/bitbank.js +14 -14
- package/dist/cjs/src/bitbns.js +15 -15
- package/dist/cjs/src/bitfinex.js +24 -24
- package/dist/cjs/src/bitfinex2.js +30 -30
- package/dist/cjs/src/bitflyer.js +17 -17
- package/dist/cjs/src/bitforex.js +12 -12
- package/dist/cjs/src/bitget.js +50 -50
- package/dist/cjs/src/bithumb.js +13 -13
- package/dist/cjs/src/bitmart.js +74 -59
- package/dist/cjs/src/bitmex.js +29 -28
- package/dist/cjs/src/bitopro.js +23 -23
- package/dist/cjs/src/bitpanda.js +25 -25
- package/dist/cjs/src/bitrue.js +26 -26
- package/dist/cjs/src/bitso.js +22 -22
- package/dist/cjs/src/bitstamp.js +24 -24
- package/dist/cjs/src/bittrex.js +31 -31
- package/dist/cjs/src/bitvavo.js +23 -23
- package/dist/cjs/src/bl3p.js +7 -7
- package/dist/cjs/src/blockchaincom.js +23 -23
- package/dist/cjs/src/btcalpha.js +17 -17
- package/dist/cjs/src/btcbox.js +9 -9
- package/dist/cjs/src/btcmarkets.js +19 -19
- package/dist/cjs/src/btcturk.js +13 -13
- package/dist/cjs/src/bybit.js +71 -67
- package/dist/cjs/src/cex.js +17 -17
- package/dist/cjs/src/coinbase.js +28 -28
- package/dist/cjs/src/coinbasepro.js +27 -27
- package/dist/cjs/src/coincheck.js +11 -11
- package/dist/cjs/src/coinex.js +42 -42
- package/dist/cjs/src/coinlist.js +29 -29
- package/dist/cjs/src/coinmate.js +14 -14
- package/dist/cjs/src/coinone.js +13 -13
- package/dist/cjs/src/coinsph.js +25 -25
- package/dist/cjs/src/coinspot.js +9 -9
- package/dist/cjs/src/cryptocom.js +33 -32
- package/dist/cjs/src/currencycom.js +24 -24
- package/dist/cjs/src/delta.js +29 -29
- package/dist/cjs/src/deribit.js +35 -35
- package/dist/cjs/src/digifinex.js +43 -43
- package/dist/cjs/src/exmo.js +30 -30
- package/dist/cjs/src/gate.js +39 -39
- package/dist/cjs/src/gemini.js +18 -18
- package/dist/cjs/src/hitbtc.js +40 -40
- package/dist/cjs/src/hollaex.js +26 -26
- package/dist/cjs/src/htx.js +48 -48
- package/dist/cjs/src/huobijp.js +24 -24
- package/dist/cjs/src/idex.js +23 -23
- package/dist/cjs/src/independentreserve.js +12 -12
- package/dist/cjs/src/indodax.js +16 -16
- package/dist/cjs/src/kraken.js +28 -28
- package/dist/cjs/src/krakenfutures.js +9 -9
- package/dist/cjs/src/kucoin.js +39 -39
- package/dist/cjs/src/kucoinfutures.js +24 -24
- package/dist/cjs/src/kuna.js +25 -25
- package/dist/cjs/src/latoken.js +20 -20
- package/dist/cjs/src/lbank.js +24 -24
- package/dist/cjs/src/luno.js +17 -17
- package/dist/cjs/src/lykke.js +18 -18
- package/dist/cjs/src/mercado.js +13 -13
- package/dist/cjs/src/mexc.js +47 -45
- package/dist/cjs/src/ndax.js +23 -23
- package/dist/cjs/src/novadax.js +23 -23
- package/dist/cjs/src/oceanex.js +19 -19
- package/dist/cjs/src/okcoin.js +25 -25
- package/dist/cjs/src/okx.js +53 -53
- package/dist/cjs/src/p2b.js +14 -14
- package/dist/cjs/src/paymium.js +10 -10
- package/dist/cjs/src/phemex.js +32 -32
- package/dist/cjs/src/poloniex.js +27 -27
- package/dist/cjs/src/poloniexfutures.js +21 -21
- package/dist/cjs/src/pro/alpaca.js +6 -6
- package/dist/cjs/src/pro/ascendex.js +5 -5
- package/dist/cjs/src/pro/binance.js +21 -21
- package/dist/cjs/src/pro/bingx.js +6 -6
- package/dist/cjs/src/pro/bitfinex.js +4 -4
- package/dist/cjs/src/pro/bitfinex2.js +7 -7
- package/dist/cjs/src/pro/bitget.js +12 -12
- package/dist/cjs/src/pro/bitmart.js +5 -5
- package/dist/cjs/src/pro/bitmex.js +8 -8
- package/dist/cjs/src/pro/bitopro.js +4 -4
- package/dist/cjs/src/pro/bitpanda.js +7 -7
- package/dist/cjs/src/pro/bitrue.js +2 -2
- package/dist/cjs/src/pro/bitstamp.js +3 -3
- package/dist/cjs/src/pro/bittrex.js +7 -7
- package/dist/cjs/src/pro/bitvavo.js +6 -6
- package/dist/cjs/src/pro/blockchaincom.js +6 -6
- package/dist/cjs/src/pro/bybit.js +12 -12
- package/dist/cjs/src/pro/cex.js +9 -9
- package/dist/cjs/src/pro/coinbase.js +6 -6
- package/dist/cjs/src/pro/coinbasepro.js +10 -10
- package/dist/cjs/src/pro/coinex.js +7 -7
- package/dist/cjs/src/pro/cryptocom.js +13 -13
- package/dist/cjs/src/pro/currencycom.js +5 -5
- package/dist/cjs/src/pro/deribit.js +7 -7
- package/dist/cjs/src/pro/exmo.js +5 -5
- package/dist/cjs/src/pro/gate.js +10 -10
- package/dist/cjs/src/pro/gemini.js +4 -4
- package/dist/cjs/src/pro/hitbtc.js +11 -11
- package/dist/cjs/src/pro/hollaex.js +5 -5
- package/dist/cjs/src/pro/htx.js +8 -8
- package/dist/cjs/src/pro/huobijp.js +4 -4
- package/dist/cjs/src/pro/idex.js +5 -5
- package/dist/cjs/src/pro/independentreserve.js +2 -2
- package/dist/cjs/src/pro/kraken.js +11 -11
- package/dist/cjs/src/pro/krakenfutures.js +8 -8
- package/dist/cjs/src/pro/kucoin.js +10 -10
- package/dist/cjs/src/pro/kucoinfutures.js +8 -8
- package/dist/cjs/src/pro/luno.js +4 -4
- package/dist/cjs/src/pro/mexc.js +7 -7
- package/dist/cjs/src/pro/ndax.js +4 -4
- package/dist/cjs/src/pro/okcoin.js +6 -6
- package/dist/cjs/src/pro/okx.js +16 -16
- package/dist/cjs/src/pro/phemex.js +7 -7
- package/dist/cjs/src/pro/poloniex.js +7 -7
- package/dist/cjs/src/pro/poloniexfutures.js +5 -5
- package/dist/cjs/src/pro/probit.js +6 -6
- package/dist/cjs/src/pro/upbit.js +3 -3
- package/dist/cjs/src/pro/wazirx.js +7 -7
- package/dist/cjs/src/pro/whitebit.js +7 -7
- package/dist/cjs/src/pro/woo.js +1 -1
- package/dist/cjs/src/probit.js +24 -24
- package/dist/cjs/src/tidex.js +15 -15
- package/dist/cjs/src/timex.js +19 -19
- package/dist/cjs/src/tokocrypto.js +21 -21
- package/dist/cjs/src/upbit.js +22 -22
- package/dist/cjs/src/wavesexchange.js +19 -19
- package/dist/cjs/src/wazirx.js +15 -15
- package/dist/cjs/src/whitebit.js +29 -29
- package/dist/cjs/src/woo.js +26 -26
- package/dist/cjs/src/yobit.js +17 -17
- package/dist/cjs/src/zaif.js +10 -10
- package/dist/cjs/src/zonda.js +16 -16
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/mexc.d.ts +2 -0
- package/js/src/ace.js +13 -13
- package/js/src/alpaca.js +10 -10
- package/js/src/ascendex.js +33 -33
- package/js/src/base/Exchange.js +6 -6
- package/js/src/bigone.js +23 -23
- package/js/src/binance.js +68 -68
- package/js/src/binanceus.js +1 -0
- package/js/src/bingx.js +33 -33
- package/js/src/bit2c.js +11 -11
- package/js/src/bitbank.js +14 -14
- package/js/src/bitbns.js +15 -15
- package/js/src/bitfinex.js +24 -24
- package/js/src/bitfinex2.js +30 -30
- package/js/src/bitflyer.js +17 -17
- package/js/src/bitforex.js +12 -12
- package/js/src/bitget.js +50 -50
- package/js/src/bithumb.js +13 -13
- package/js/src/bitmart.js +74 -59
- package/js/src/bitmex.js +29 -28
- package/js/src/bitopro.js +23 -23
- package/js/src/bitpanda.js +25 -25
- package/js/src/bitrue.js +26 -26
- package/js/src/bitso.js +22 -22
- package/js/src/bitstamp.js +24 -24
- package/js/src/bittrex.js +31 -31
- package/js/src/bitvavo.js +23 -23
- package/js/src/bl3p.js +7 -7
- package/js/src/blockchaincom.js +23 -23
- package/js/src/btcalpha.js +17 -17
- package/js/src/btcbox.js +9 -9
- package/js/src/btcmarkets.js +19 -19
- package/js/src/btcturk.js +13 -13
- package/js/src/bybit.js +71 -67
- package/js/src/cex.js +17 -17
- package/js/src/coinbase.js +28 -28
- package/js/src/coinbasepro.js +27 -27
- package/js/src/coincheck.js +11 -11
- package/js/src/coinex.js +42 -42
- package/js/src/coinlist.js +29 -29
- package/js/src/coinmate.js +14 -14
- package/js/src/coinone.js +13 -13
- package/js/src/coinsph.js +25 -25
- package/js/src/coinspot.js +9 -9
- package/js/src/cryptocom.js +33 -32
- package/js/src/currencycom.js +24 -24
- package/js/src/delta.js +29 -29
- package/js/src/deribit.js +35 -35
- package/js/src/digifinex.js +43 -43
- package/js/src/exmo.js +30 -30
- package/js/src/gate.js +39 -39
- package/js/src/gemini.js +18 -18
- package/js/src/hitbtc.js +40 -40
- package/js/src/hollaex.js +26 -26
- package/js/src/htx.js +48 -48
- package/js/src/huobijp.js +24 -24
- package/js/src/idex.js +23 -23
- package/js/src/independentreserve.js +12 -12
- package/js/src/indodax.js +16 -16
- package/js/src/kraken.js +28 -28
- package/js/src/krakenfutures.js +9 -9
- package/js/src/kucoin.js +39 -39
- package/js/src/kucoinfutures.js +24 -24
- package/js/src/kuna.js +25 -25
- package/js/src/latoken.js +20 -20
- package/js/src/lbank.js +24 -24
- package/js/src/luno.js +17 -17
- package/js/src/lykke.js +18 -18
- package/js/src/mercado.js +13 -13
- package/js/src/mexc.js +47 -45
- package/js/src/ndax.js +23 -23
- package/js/src/novadax.js +23 -23
- package/js/src/oceanex.js +19 -19
- package/js/src/okcoin.js +25 -25
- package/js/src/okx.js +53 -53
- package/js/src/p2b.js +14 -14
- package/js/src/paymium.js +10 -10
- package/js/src/phemex.js +32 -32
- package/js/src/poloniex.js +27 -27
- package/js/src/poloniexfutures.js +21 -21
- package/js/src/pro/alpaca.js +6 -6
- package/js/src/pro/ascendex.js +5 -5
- package/js/src/pro/binance.js +21 -21
- package/js/src/pro/bingx.js +6 -6
- package/js/src/pro/bitfinex.js +4 -4
- package/js/src/pro/bitfinex2.js +7 -7
- package/js/src/pro/bitget.js +12 -12
- package/js/src/pro/bitmart.js +5 -5
- package/js/src/pro/bitmex.js +8 -8
- package/js/src/pro/bitopro.js +4 -4
- package/js/src/pro/bitpanda.js +7 -7
- package/js/src/pro/bitrue.js +2 -2
- package/js/src/pro/bitstamp.js +3 -3
- package/js/src/pro/bittrex.js +7 -7
- package/js/src/pro/bitvavo.js +6 -6
- package/js/src/pro/blockchaincom.js +6 -6
- package/js/src/pro/bybit.js +12 -12
- package/js/src/pro/cex.js +9 -9
- package/js/src/pro/coinbase.js +6 -6
- package/js/src/pro/coinbasepro.js +10 -10
- package/js/src/pro/coinex.js +7 -7
- package/js/src/pro/cryptocom.js +13 -13
- package/js/src/pro/currencycom.js +5 -5
- package/js/src/pro/deribit.js +7 -7
- package/js/src/pro/exmo.js +5 -5
- package/js/src/pro/gate.js +10 -10
- package/js/src/pro/gemini.js +4 -4
- package/js/src/pro/hitbtc.js +11 -11
- package/js/src/pro/hollaex.js +5 -5
- package/js/src/pro/htx.js +8 -8
- package/js/src/pro/huobijp.js +4 -4
- package/js/src/pro/idex.js +5 -5
- package/js/src/pro/independentreserve.js +2 -2
- package/js/src/pro/kraken.js +11 -11
- package/js/src/pro/krakenfutures.js +8 -8
- package/js/src/pro/kucoin.js +10 -10
- package/js/src/pro/kucoinfutures.js +8 -8
- package/js/src/pro/luno.js +4 -4
- package/js/src/pro/mexc.js +7 -7
- package/js/src/pro/ndax.js +4 -4
- package/js/src/pro/okcoin.js +6 -6
- package/js/src/pro/okx.js +16 -16
- package/js/src/pro/phemex.js +7 -7
- package/js/src/pro/poloniex.js +7 -7
- package/js/src/pro/poloniexfutures.js +5 -5
- package/js/src/pro/probit.js +6 -6
- package/js/src/pro/upbit.js +3 -3
- package/js/src/pro/wazirx.js +7 -7
- package/js/src/pro/whitebit.js +7 -7
- package/js/src/pro/woo.js +1 -1
- package/js/src/probit.js +24 -24
- package/js/src/tidex.js +15 -15
- package/js/src/timex.js +19 -19
- package/js/src/tokocrypto.js +21 -21
- package/js/src/upbit.js +22 -22
- package/js/src/wavesexchange.js +19 -19
- package/js/src/wazirx.js +15 -15
- package/js/src/whitebit.js +29 -29
- package/js/src/woo.js +26 -26
- package/js/src/yobit.js +17 -17
- package/js/src/zaif.js +10 -10
- package/js/src/zonda.js +16 -16
- package/package.json +1 -1
package/js/src/bybit.js
CHANGED
|
@@ -1284,7 +1284,7 @@ export default class bybit extends Exchange {
|
|
|
1284
1284
|
* @name bybit#fetchTime
|
|
1285
1285
|
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
1286
1286
|
* @see https://bybit-exchange.github.io/docs/v5/market/time
|
|
1287
|
-
* @param {object} [params] extra parameters specific to the
|
|
1287
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1288
1288
|
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
1289
1289
|
*/
|
|
1290
1290
|
const response = await this.publicGetV5MarketTime(params);
|
|
@@ -1308,7 +1308,7 @@ export default class bybit extends Exchange {
|
|
|
1308
1308
|
* @name bybit#fetchCurrencies
|
|
1309
1309
|
* @description fetches all available currencies on an exchange
|
|
1310
1310
|
* @see https://bybit-exchange.github.io/docs/v5/asset/coin-info
|
|
1311
|
-
* @param {object} [params] extra parameters specific to the
|
|
1311
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1312
1312
|
* @returns {object} an associative dictionary of currencies
|
|
1313
1313
|
*/
|
|
1314
1314
|
if (!this.checkRequiredCredentials(false)) {
|
|
@@ -1439,7 +1439,7 @@ export default class bybit extends Exchange {
|
|
|
1439
1439
|
* @name bybit#fetchMarkets
|
|
1440
1440
|
* @description retrieves data on all markets for bybit
|
|
1441
1441
|
* @see https://bybit-exchange.github.io/docs/v5/market/instrument
|
|
1442
|
-
* @param {object} [params] extra parameters specific to the exchange
|
|
1442
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1443
1443
|
* @returns {object[]} an array of objects representing market data
|
|
1444
1444
|
*/
|
|
1445
1445
|
if (this.options['adjustForTimeDifference']) {
|
|
@@ -2007,7 +2007,7 @@ export default class bybit extends Exchange {
|
|
|
2007
2007
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
2008
2008
|
* @see https://bybit-exchange.github.io/docs/v5/market/tickers
|
|
2009
2009
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
2010
|
-
* @param {object} [params] extra parameters specific to the
|
|
2010
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2011
2011
|
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
2012
2012
|
*/
|
|
2013
2013
|
if (symbol === undefined) {
|
|
@@ -2082,17 +2082,39 @@ export default class bybit extends Exchange {
|
|
|
2082
2082
|
/**
|
|
2083
2083
|
* @method
|
|
2084
2084
|
* @name bybit#fetchTickers
|
|
2085
|
-
* @description fetches price tickers for multiple markets, statistical
|
|
2085
|
+
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
2086
2086
|
* @see https://bybit-exchange.github.io/docs/v5/market/tickers
|
|
2087
2087
|
* @param {string[]} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
2088
|
-
* @param {object} [params] extra parameters specific to the
|
|
2088
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2089
2089
|
* @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
2090
2090
|
*/
|
|
2091
2091
|
await this.loadMarkets();
|
|
2092
2092
|
let market = undefined;
|
|
2093
|
+
const parsedSymbols = [];
|
|
2093
2094
|
if (symbols !== undefined) {
|
|
2094
|
-
|
|
2095
|
-
|
|
2095
|
+
const marketTypeInfo = this.handleMarketTypeAndParams('fetchTickers', undefined, params);
|
|
2096
|
+
const defaultType = marketTypeInfo[0]; // don't omit here
|
|
2097
|
+
// we can't use marketSymbols here due to the conflicing ids between markets
|
|
2098
|
+
let currentType = undefined;
|
|
2099
|
+
for (let i = 0; i < symbols.length; i++) {
|
|
2100
|
+
const symbol = symbols[i];
|
|
2101
|
+
// using safeMarket here because if the user provides for instance BTCUSDT and "type": "spot" in params we should
|
|
2102
|
+
// infer the market type from the type provided and not from the conflicting id (BTCUSDT might be swap or spot)
|
|
2103
|
+
const isExchangeSpecificSymbol = (symbol.indexOf('/') === -1);
|
|
2104
|
+
if (isExchangeSpecificSymbol) {
|
|
2105
|
+
market = this.safeMarket(symbol, undefined, undefined, defaultType);
|
|
2106
|
+
}
|
|
2107
|
+
else {
|
|
2108
|
+
market = this.market(symbol);
|
|
2109
|
+
}
|
|
2110
|
+
if (currentType === undefined) {
|
|
2111
|
+
currentType = market['type'];
|
|
2112
|
+
}
|
|
2113
|
+
else if (market['type'] !== currentType) {
|
|
2114
|
+
throw new BadRequest(this.id + ' fetchTickers can only accept a list of symbols of the same type');
|
|
2115
|
+
}
|
|
2116
|
+
parsedSymbols.push(market['symbol']);
|
|
2117
|
+
}
|
|
2096
2118
|
}
|
|
2097
2119
|
const request = {
|
|
2098
2120
|
// 'symbol': market['id'],
|
|
@@ -2100,7 +2122,6 @@ export default class bybit extends Exchange {
|
|
|
2100
2122
|
// 'expDate': '', Expiry date. e.g., 25DEC22. For option only
|
|
2101
2123
|
};
|
|
2102
2124
|
let type = undefined;
|
|
2103
|
-
const isTypeInParams = ('type' in params);
|
|
2104
2125
|
[type, params] = this.handleMarketTypeAndParams('fetchTickers', market, params);
|
|
2105
2126
|
if (type === 'spot') {
|
|
2106
2127
|
request['category'] = 'spot';
|
|
@@ -2154,24 +2175,7 @@ export default class bybit extends Exchange {
|
|
|
2154
2175
|
//
|
|
2155
2176
|
const result = this.safeValue(response, 'result', {});
|
|
2156
2177
|
const tickerList = this.safeValue(result, 'list', []);
|
|
2157
|
-
|
|
2158
|
-
if (market === undefined && isTypeInParams) {
|
|
2159
|
-
// create a "fake" market for the type
|
|
2160
|
-
market = {
|
|
2161
|
-
'type': (type === 'swap' || type === 'future') ? 'swap' : type,
|
|
2162
|
-
};
|
|
2163
|
-
}
|
|
2164
|
-
for (let i = 0; i < tickerList.length; i++) {
|
|
2165
|
-
const ticker = this.parseTicker(tickerList[i], market);
|
|
2166
|
-
const symbol = ticker['symbol'];
|
|
2167
|
-
// this is needed because bybit returns
|
|
2168
|
-
// futures with type = swap
|
|
2169
|
-
const marketInner = this.market(symbol);
|
|
2170
|
-
if (marketInner['type'] === type) {
|
|
2171
|
-
tickers[symbol] = ticker;
|
|
2172
|
-
}
|
|
2173
|
-
}
|
|
2174
|
-
return this.filterByArrayTickers(tickers, 'symbol', symbols);
|
|
2178
|
+
return this.parseTickers(tickerList, parsedSymbols);
|
|
2175
2179
|
}
|
|
2176
2180
|
parseOHLCV(ohlcv, market = undefined) {
|
|
2177
2181
|
//
|
|
@@ -2208,7 +2212,7 @@ export default class bybit extends Exchange {
|
|
|
2208
2212
|
* @param {string} timeframe the length of time each candle represents
|
|
2209
2213
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
2210
2214
|
* @param {int} [limit] the maximum amount of candles to fetch
|
|
2211
|
-
* @param {object} [params] extra parameters specific to the
|
|
2215
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2212
2216
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
2213
2217
|
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
2214
2218
|
*/
|
|
@@ -2370,7 +2374,7 @@ export default class bybit extends Exchange {
|
|
|
2370
2374
|
* @description fetches funding rates for multiple markets
|
|
2371
2375
|
* @see https://bybit-exchange.github.io/docs/v5/market/tickers
|
|
2372
2376
|
* @param {string[]} symbols unified symbols of the markets to fetch the funding rates for, all market funding rates are returned if not assigned
|
|
2373
|
-
* @param {object} [params] extra parameters specific to the
|
|
2377
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2374
2378
|
* @returns {object} an array of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
2375
2379
|
*/
|
|
2376
2380
|
await this.loadMarkets();
|
|
@@ -2453,7 +2457,7 @@ export default class bybit extends Exchange {
|
|
|
2453
2457
|
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
2454
2458
|
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
2455
2459
|
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
|
|
2456
|
-
* @param {object} [params] extra parameters specific to the
|
|
2460
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2457
2461
|
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
2458
2462
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
2459
2463
|
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
@@ -2737,7 +2741,7 @@ export default class bybit extends Exchange {
|
|
|
2737
2741
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
2738
2742
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
2739
2743
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
2740
|
-
* @param {object} [params] extra parameters specific to the
|
|
2744
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2741
2745
|
* @param {string} [params.type] market type, ['swap', 'option', 'spot']
|
|
2742
2746
|
* @param {string} [params.subType] market subType, ['linear', 'inverse']
|
|
2743
2747
|
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
@@ -2795,7 +2799,7 @@ export default class bybit extends Exchange {
|
|
|
2795
2799
|
* @see https://bybit-exchange.github.io/docs/v5/market/orderbook
|
|
2796
2800
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
2797
2801
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
2798
|
-
* @param {object} [params] extra parameters specific to the
|
|
2802
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2799
2803
|
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
2800
2804
|
*/
|
|
2801
2805
|
if (symbol === undefined) {
|
|
@@ -3024,7 +3028,7 @@ export default class bybit extends Exchange {
|
|
|
3024
3028
|
* @see https://bybit-exchange.github.io/docs/v5/spot-margin-normal/account-info
|
|
3025
3029
|
* @see https://bybit-exchange.github.io/docs/v5/asset/all-balance
|
|
3026
3030
|
* @see https://bybit-exchange.github.io/docs/v5/account/wallet-balance
|
|
3027
|
-
* @param {object} [params] extra parameters specific to the
|
|
3031
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3028
3032
|
* @param {string} [params.type] wallet type, ['spot', 'swap', 'fund']
|
|
3029
3033
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure}
|
|
3030
3034
|
*/
|
|
@@ -3423,7 +3427,7 @@ export default class bybit extends Exchange {
|
|
|
3423
3427
|
* @description fetches information on an order made by the user
|
|
3424
3428
|
* @see https://bybit-exchange.github.io/docs/v5/order/order-list
|
|
3425
3429
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
3426
|
-
* @param {object} [params] extra parameters specific to the
|
|
3430
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3427
3431
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3428
3432
|
*/
|
|
3429
3433
|
if (symbol === undefined) {
|
|
@@ -3456,7 +3460,7 @@ export default class bybit extends Exchange {
|
|
|
3456
3460
|
* @param {string} side 'buy' or 'sell'
|
|
3457
3461
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
3458
3462
|
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
3459
|
-
* @param {object} [params] extra parameters specific to the
|
|
3463
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3460
3464
|
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK"
|
|
3461
3465
|
* @param {bool} [params.postOnly] true or false whether the order is post-only
|
|
3462
3466
|
* @param {bool} [params.reduceOnly] true or false whether the order is reduce-only
|
|
@@ -3939,7 +3943,7 @@ export default class bybit extends Exchange {
|
|
|
3939
3943
|
* @param {string} side 'buy' or 'sell'
|
|
3940
3944
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
3941
3945
|
* @param {float} price the price at which the order is to be fullfilled, in units of the base currency, ignored in market orders
|
|
3942
|
-
* @param {object} [params] extra parameters specific to the
|
|
3946
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3943
3947
|
* @param {float} [params.triggerPrice] The price that a trigger order is triggered at
|
|
3944
3948
|
* @param {float} [params.stopLossPrice] The price that a stop loss order is triggered at
|
|
3945
3949
|
* @param {float} [params.takeProfitPrice] The price that a take profit order is triggered at
|
|
@@ -4103,7 +4107,7 @@ export default class bybit extends Exchange {
|
|
|
4103
4107
|
* @see https://bybit-exchange.github.io/docs/v5/order/cancel-order
|
|
4104
4108
|
* @param {string} id order id
|
|
4105
4109
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
4106
|
-
* @param {object} [params] extra parameters specific to the
|
|
4110
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4107
4111
|
* @param {boolean} [params.stop] *spot only* whether the order is a stop order
|
|
4108
4112
|
* @param {string} [params.orderFilter] *spot only* 'Order' or 'StopOrder' or 'tpslOrder'
|
|
4109
4113
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -4217,7 +4221,7 @@ export default class bybit extends Exchange {
|
|
|
4217
4221
|
* @description cancel all open orders
|
|
4218
4222
|
* @see https://bybit-exchange.github.io/docs/v5/order/cancel-all
|
|
4219
4223
|
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
4220
|
-
* @param {object} [params] extra parameters specific to the
|
|
4224
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4221
4225
|
* @param {boolean} [params.stop] true if stop order
|
|
4222
4226
|
* @param {string} [params.type] market type, ['swap', 'option', 'spot']
|
|
4223
4227
|
* @param {string} [params.subType] market subType, ['linear', 'inverse']
|
|
@@ -4388,7 +4392,7 @@ export default class bybit extends Exchange {
|
|
|
4388
4392
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
4389
4393
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
4390
4394
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
4391
|
-
* @param {object} [params] extra parameters specific to the
|
|
4395
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4392
4396
|
* @param {boolean} [params.stop] true if stop order
|
|
4393
4397
|
* @param {string} [params.type] market type, ['swap', 'option', 'spot']
|
|
4394
4398
|
* @param {string} [params.subType] market subType, ['linear', 'inverse']
|
|
@@ -4504,7 +4508,7 @@ export default class bybit extends Exchange {
|
|
|
4504
4508
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
4505
4509
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
4506
4510
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
4507
|
-
* @param {object} [params] extra parameters specific to the
|
|
4511
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4508
4512
|
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4509
4513
|
*/
|
|
4510
4514
|
await this.loadMarkets();
|
|
@@ -4522,7 +4526,7 @@ export default class bybit extends Exchange {
|
|
|
4522
4526
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
4523
4527
|
* @param {int} [since] timestamp in ms of the earliest order, default is undefined
|
|
4524
4528
|
* @param {int} [limit] max number of orders to return, default is undefined
|
|
4525
|
-
* @param {object} [params] extra parameters specific to the
|
|
4529
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4526
4530
|
* @param {boolean} [params.stop] true if stop order
|
|
4527
4531
|
* @param {string} [params.type] market type, ['swap', 'option', 'spot']
|
|
4528
4532
|
* @param {string} [params.subType] market subType, ['linear', 'inverse']
|
|
@@ -4585,7 +4589,7 @@ export default class bybit extends Exchange {
|
|
|
4585
4589
|
* @param {string} symbol unified market symbol
|
|
4586
4590
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
4587
4591
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
4588
|
-
* @param {object} [params] extra parameters specific to the
|
|
4592
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4589
4593
|
* @param {boolean} [params.stop] true if stop order
|
|
4590
4594
|
* @param {string} [params.type] market type, ['swap', 'option', 'spot']
|
|
4591
4595
|
* @param {string} [params.subType] market subType, ['linear', 'inverse']
|
|
@@ -4696,7 +4700,7 @@ export default class bybit extends Exchange {
|
|
|
4696
4700
|
* @param {string} symbol unified market symbol
|
|
4697
4701
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
4698
4702
|
* @param {int} [limit] the maximum number of trades to retrieve
|
|
4699
|
-
* @param {object} [params] extra parameters specific to the
|
|
4703
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4700
4704
|
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
4701
4705
|
*
|
|
4702
4706
|
*/
|
|
@@ -4765,7 +4769,7 @@ export default class bybit extends Exchange {
|
|
|
4765
4769
|
* @param {string} symbol unified market symbol
|
|
4766
4770
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
4767
4771
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
4768
|
-
* @param {object} [params] extra parameters specific to the
|
|
4772
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4769
4773
|
* @param {boolean} [params.stop] true if stop order
|
|
4770
4774
|
* @param {string} [params.type] market type, ['swap', 'option', 'spot']
|
|
4771
4775
|
* @param {string} [params.subType] market subType, ['linear', 'inverse']
|
|
@@ -4889,7 +4893,7 @@ export default class bybit extends Exchange {
|
|
|
4889
4893
|
* @description fetch a dictionary of addresses for a currency, indexed by network
|
|
4890
4894
|
* @see https://bybit-exchange.github.io/docs/v5/asset/master-deposit-addr
|
|
4891
4895
|
* @param {string} code unified currency code of the currency for the deposit address
|
|
4892
|
-
* @param {object} [params] extra parameters specific to the
|
|
4896
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4893
4897
|
* @returns {object} a dictionary of [address structures]{@link https://docs.ccxt.com/#/?id=address-structure} indexed by the network
|
|
4894
4898
|
*/
|
|
4895
4899
|
await this.loadMarkets();
|
|
@@ -4933,7 +4937,7 @@ export default class bybit extends Exchange {
|
|
|
4933
4937
|
* @description fetch the deposit address for a currency associated with this account
|
|
4934
4938
|
* @see https://bybit-exchange.github.io/docs/v5/asset/master-deposit-addr
|
|
4935
4939
|
* @param {string} code unified currency code
|
|
4936
|
-
* @param {object} [params] extra parameters specific to the
|
|
4940
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4937
4941
|
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
4938
4942
|
*/
|
|
4939
4943
|
await this.loadMarkets();
|
|
@@ -4982,7 +4986,7 @@ export default class bybit extends Exchange {
|
|
|
4982
4986
|
* @param {string} code unified currency code
|
|
4983
4987
|
* @param {int} [since] the earliest time in ms to fetch deposits for, default = 30 days before the current time
|
|
4984
4988
|
* @param {int} [limit] the maximum number of deposits structures to retrieve, default = 50, max = 50
|
|
4985
|
-
* @param {object} [params] extra parameters specific to the
|
|
4989
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4986
4990
|
* @param {int} [params.until] the latest time in ms to fetch deposits for, default = 30 days after since
|
|
4987
4991
|
*
|
|
4988
4992
|
* EXCHANGE SPECIFIC PARAMETERS
|
|
@@ -5053,7 +5057,7 @@ export default class bybit extends Exchange {
|
|
|
5053
5057
|
* @param {string} code unified currency code
|
|
5054
5058
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
5055
5059
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
5056
|
-
* @param {object} [params] extra parameters specific to the
|
|
5060
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5057
5061
|
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
5058
5062
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
5059
5063
|
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
@@ -5233,7 +5237,7 @@ export default class bybit extends Exchange {
|
|
|
5233
5237
|
* @param {string} code unified currency code, default is undefined
|
|
5234
5238
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
5235
5239
|
* @param {int} [limit] max number of ledger entrys to return, default is undefined
|
|
5236
|
-
* @param {object} [params] extra parameters specific to the
|
|
5240
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5237
5241
|
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
5238
5242
|
*/
|
|
5239
5243
|
await this.loadMarkets();
|
|
@@ -5497,7 +5501,7 @@ export default class bybit extends Exchange {
|
|
|
5497
5501
|
* @param {float} amount the amount to withdraw
|
|
5498
5502
|
* @param {string} address the address to withdraw to
|
|
5499
5503
|
* @param {string} tag
|
|
5500
|
-
* @param {object} [params] extra parameters specific to the
|
|
5504
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5501
5505
|
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
5502
5506
|
*/
|
|
5503
5507
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
@@ -5540,7 +5544,7 @@ export default class bybit extends Exchange {
|
|
|
5540
5544
|
* @description fetch data on a single open contract trade position
|
|
5541
5545
|
* @see https://bybit-exchange.github.io/docs/v5/position
|
|
5542
5546
|
* @param {string} symbol unified market symbol of the market the position is held in, default is undefined
|
|
5543
|
-
* @param {object} [params] extra parameters specific to the
|
|
5547
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5544
5548
|
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
5545
5549
|
*/
|
|
5546
5550
|
if (symbol === undefined) {
|
|
@@ -5696,7 +5700,7 @@ export default class bybit extends Exchange {
|
|
|
5696
5700
|
* @description fetch all open positions
|
|
5697
5701
|
* @see https://bybit-exchange.github.io/docs/v5/position
|
|
5698
5702
|
* @param {string[]} symbols list of unified market symbols
|
|
5699
|
-
* @param {object} [params] extra parameters specific to the
|
|
5703
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5700
5704
|
* @param {string} [params.type] market type, ['swap', 'option', 'spot']
|
|
5701
5705
|
* @param {string} [params.subType] market subType, ['linear', 'inverse']
|
|
5702
5706
|
* @param {string} [params.baseCoin] Base coin. Supports linear, inverse & option
|
|
@@ -6021,7 +6025,7 @@ export default class bybit extends Exchange {
|
|
|
6021
6025
|
* @see https://bybit-exchange.github.io/docs/v5/position/cross-isolate
|
|
6022
6026
|
* @param {string} marginMode account mode must be either [isolated, cross, portfolio], trade mode must be either [isolated, cross]
|
|
6023
6027
|
* @param {string} symbol unified market symbol of the market the position is held in, default is undefined
|
|
6024
|
-
* @param {object} [params] extra parameters specific to the
|
|
6028
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6025
6029
|
* @param {string} [params.leverage] the rate of leverage, is required if setting trade mode (symbol)
|
|
6026
6030
|
* @returns {object} response from the exchange
|
|
6027
6031
|
*/
|
|
@@ -6124,7 +6128,7 @@ export default class bybit extends Exchange {
|
|
|
6124
6128
|
* @see https://bybit-exchange.github.io/docs/v5/position/leverage
|
|
6125
6129
|
* @param {float} leverage the rate of leverage
|
|
6126
6130
|
* @param {string} symbol unified market symbol
|
|
6127
|
-
* @param {object} [params] extra parameters specific to the
|
|
6131
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6128
6132
|
* @param {string} [params.buyLeverage] leverage for buy side
|
|
6129
6133
|
* @param {string} [params.sellLeverage] leverage for sell side
|
|
6130
6134
|
* @returns {object} response from the exchange
|
|
@@ -6176,7 +6180,7 @@ export default class bybit extends Exchange {
|
|
|
6176
6180
|
* @see https://bybit-exchange.github.io/docs/v5/position/position-mode
|
|
6177
6181
|
* @param {bool} hedged
|
|
6178
6182
|
* @param {string} symbol used for unified account with inverse market
|
|
6179
|
-
* @param {object} [params] extra parameters specific to the
|
|
6183
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6180
6184
|
* @returns {object} response from the exchange
|
|
6181
6185
|
*/
|
|
6182
6186
|
await this.loadMarkets();
|
|
@@ -6396,7 +6400,7 @@ export default class bybit extends Exchange {
|
|
|
6396
6400
|
* @description fetch the rate of interest to borrow a currency for margin trading
|
|
6397
6401
|
* @see https://bybit-exchange.github.io/docs/zh-TW/v5/spot-margin-normal/interest-quota
|
|
6398
6402
|
* @param {string} code unified currency code
|
|
6399
|
-
* @param {object} [params] extra parameters specific to the
|
|
6403
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6400
6404
|
* @returns {object} a [borrow rate structure]{@link https://docs.ccxt.com/#/?id=borrow-rate-structure}
|
|
6401
6405
|
*/
|
|
6402
6406
|
await this.loadMarkets();
|
|
@@ -6455,7 +6459,7 @@ export default class bybit extends Exchange {
|
|
|
6455
6459
|
* @param {string} symbol unified market symbol when fetch interest in isolated markets
|
|
6456
6460
|
* @param {number} [since] the earliest time in ms to fetch borrrow interest for
|
|
6457
6461
|
* @param {number} [limit] the maximum number of structures to retrieve
|
|
6458
|
-
* @param {object} [params] extra parameters specific to the
|
|
6462
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6459
6463
|
* @returns {object[]} a list of [borrow interest structures]{@link https://docs.ccxt.com/#/?id=borrow-interest-structure}
|
|
6460
6464
|
*/
|
|
6461
6465
|
await this.loadMarkets();
|
|
@@ -6524,7 +6528,7 @@ export default class bybit extends Exchange {
|
|
|
6524
6528
|
* @param {float} amount amount to transfer
|
|
6525
6529
|
* @param {string} fromAccount account to transfer from
|
|
6526
6530
|
* @param {string} toAccount account to transfer to
|
|
6527
|
-
* @param {object} [params] extra parameters specific to the
|
|
6531
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6528
6532
|
* @param {string} [params.transferId] UUID, which is unique across the platform
|
|
6529
6533
|
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
6530
6534
|
*/
|
|
@@ -6576,7 +6580,7 @@ export default class bybit extends Exchange {
|
|
|
6576
6580
|
* @param {string} code unified currency code of the currency transferred
|
|
6577
6581
|
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
6578
6582
|
* @param {int} [limit] the maximum number of transfer structures to retrieve
|
|
6579
|
-
* @param {object} [params] extra parameters specific to the
|
|
6583
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6580
6584
|
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
6581
6585
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
6582
6586
|
* @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
@@ -6634,7 +6638,7 @@ export default class bybit extends Exchange {
|
|
|
6634
6638
|
* @see https://bybit-exchange.github.io/docs/v5/spot-margin-normal/borrow
|
|
6635
6639
|
* @param {string} code unified currency code of the currency to borrow
|
|
6636
6640
|
* @param {float} amount the amount to borrow
|
|
6637
|
-
* @param {object} [params] extra parameters specific to the
|
|
6641
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6638
6642
|
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
6639
6643
|
*/
|
|
6640
6644
|
await this.loadMarkets();
|
|
@@ -6670,7 +6674,7 @@ export default class bybit extends Exchange {
|
|
|
6670
6674
|
* @see https://bybit-exchange.github.io/docs/v5/spot-margin-normal/repay
|
|
6671
6675
|
* @param {string} code unified currency code of the currency to repay
|
|
6672
6676
|
* @param {float} amount the amount to repay
|
|
6673
|
-
* @param {object} [params] extra parameters specific to the
|
|
6677
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6674
6678
|
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
6675
6679
|
*/
|
|
6676
6680
|
await this.loadMarkets();
|
|
@@ -6816,7 +6820,7 @@ export default class bybit extends Exchange {
|
|
|
6816
6820
|
* @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market
|
|
6817
6821
|
* @see https://bybit-exchange.github.io/docs/v5/market/risk-limit
|
|
6818
6822
|
* @param {string} symbol unified market symbol
|
|
6819
|
-
* @param {object} [params] extra parameters specific to the
|
|
6823
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6820
6824
|
* @returns {object} a [leverage tiers structure]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}
|
|
6821
6825
|
*/
|
|
6822
6826
|
await this.loadMarkets();
|
|
@@ -6883,7 +6887,7 @@ export default class bybit extends Exchange {
|
|
|
6883
6887
|
* @description fetch the trading fees for a market
|
|
6884
6888
|
* @see https://bybit-exchange.github.io/docs/v5/account/fee-rate
|
|
6885
6889
|
* @param {string} symbol unified market symbol
|
|
6886
|
-
* @param {object} [params] extra parameters specific to the
|
|
6890
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6887
6891
|
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
6888
6892
|
*/
|
|
6889
6893
|
await this.loadMarkets();
|
|
@@ -6923,7 +6927,7 @@ export default class bybit extends Exchange {
|
|
|
6923
6927
|
* @name bybit#fetchTradingFees
|
|
6924
6928
|
* @description fetch the trading fees for multiple markets
|
|
6925
6929
|
* @see https://bybit-exchange.github.io/docs/v5/account/fee-rate
|
|
6926
|
-
* @param {object} [params] extra parameters specific to the
|
|
6930
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6927
6931
|
* @param {string} [params.type] market type, ['swap', 'option', 'spot']
|
|
6928
6932
|
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
6929
6933
|
*/
|
|
@@ -7021,7 +7025,7 @@ export default class bybit extends Exchange {
|
|
|
7021
7025
|
* @description fetch deposit and withdraw fees
|
|
7022
7026
|
* @see https://bybit-exchange.github.io/docs/v5/asset/coin-info
|
|
7023
7027
|
* @param {string[]} codes list of unified currency codes
|
|
7024
|
-
* @param {object} [params] extra parameters specific to the
|
|
7028
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7025
7029
|
* @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
7026
7030
|
*/
|
|
7027
7031
|
this.checkRequiredCredentials();
|
|
@@ -7251,7 +7255,7 @@ export default class bybit extends Exchange {
|
|
|
7251
7255
|
* @description fetch the historical volatility of an option market based on an underlying asset
|
|
7252
7256
|
* @see https://bybit-exchange.github.io/docs/v5/market/iv
|
|
7253
7257
|
* @param {string} code unified currency code
|
|
7254
|
-
* @param {object} [params] extra parameters specific to the
|
|
7258
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7255
7259
|
* @param {int} [params.period] the period in days to fetch the volatility for: 7,14,21,30,60,90,180,270
|
|
7256
7260
|
* @returns {object[]} a list of [volatility history objects]{@link https://docs.ccxt.com/#/?id=volatility-structure}
|
|
7257
7261
|
*/
|
|
@@ -7307,7 +7311,7 @@ export default class bybit extends Exchange {
|
|
|
7307
7311
|
* @description fetches an option contracts greeks, financial metrics used to measure the factors that affect the price of an options contract
|
|
7308
7312
|
* @see https://bybit-exchange.github.io/docs/api-explorer/v5/market/tickers
|
|
7309
7313
|
* @param {string} symbol unified symbol of the market to fetch greeks for
|
|
7310
|
-
* @param {object} [params] extra parameters specific to the
|
|
7314
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7311
7315
|
* @returns {object} a [greeks structure]{@link https://docs.ccxt.com/#/?id=greeks-structure}
|
|
7312
7316
|
*/
|
|
7313
7317
|
await this.loadMarkets();
|
package/js/src/cex.js
CHANGED
|
@@ -229,7 +229,7 @@ export default class cex extends Exchange {
|
|
|
229
229
|
* @method
|
|
230
230
|
* @name cex#fetchCurrencies
|
|
231
231
|
* @description fetches all available currencies on an exchange
|
|
232
|
-
* @param {object} [params] extra parameters specific to the
|
|
232
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
233
233
|
* @returns {object} an associative dictionary of currencies
|
|
234
234
|
*/
|
|
235
235
|
const response = await this.fetchCurrenciesFromCache(params);
|
|
@@ -335,7 +335,7 @@ export default class cex extends Exchange {
|
|
|
335
335
|
* @method
|
|
336
336
|
* @name cex#fetchMarkets
|
|
337
337
|
* @description retrieves data on all markets for cex
|
|
338
|
-
* @param {object} [params] extra parameters specific to the exchange
|
|
338
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
339
339
|
* @returns {object[]} an array of objects representing market data
|
|
340
340
|
*/
|
|
341
341
|
const currenciesResponse = await this.fetchCurrenciesFromCache(params);
|
|
@@ -467,7 +467,7 @@ export default class cex extends Exchange {
|
|
|
467
467
|
* @method
|
|
468
468
|
* @name cex#fetchBalance
|
|
469
469
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
470
|
-
* @param {object} [params] extra parameters specific to the
|
|
470
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
471
471
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
472
472
|
*/
|
|
473
473
|
await this.loadMarkets();
|
|
@@ -481,7 +481,7 @@ export default class cex extends Exchange {
|
|
|
481
481
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
482
482
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
483
483
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
484
|
-
* @param {object} [params] extra parameters specific to the
|
|
484
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
485
485
|
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
486
486
|
*/
|
|
487
487
|
await this.loadMarkets();
|
|
@@ -525,7 +525,7 @@ export default class cex extends Exchange {
|
|
|
525
525
|
* @param {string} timeframe the length of time each candle represents
|
|
526
526
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
527
527
|
* @param {int} [limit] the maximum amount of candles to fetch
|
|
528
|
-
* @param {object} [params] extra parameters specific to the
|
|
528
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
529
529
|
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
530
530
|
*/
|
|
531
531
|
await this.loadMarkets();
|
|
@@ -598,9 +598,9 @@ export default class cex extends Exchange {
|
|
|
598
598
|
/**
|
|
599
599
|
* @method
|
|
600
600
|
* @name cex#fetchTickers
|
|
601
|
-
* @description fetches price tickers for multiple markets, statistical
|
|
601
|
+
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
602
602
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
603
|
-
* @param {object} [params] extra parameters specific to the
|
|
603
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
604
604
|
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
605
605
|
*/
|
|
606
606
|
await this.loadMarkets();
|
|
@@ -627,7 +627,7 @@ export default class cex extends Exchange {
|
|
|
627
627
|
* @name cex#fetchTicker
|
|
628
628
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
629
629
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
630
|
-
* @param {object} [params] extra parameters specific to the
|
|
630
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
631
631
|
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
632
632
|
*/
|
|
633
633
|
await this.loadMarkets();
|
|
@@ -681,7 +681,7 @@ export default class cex extends Exchange {
|
|
|
681
681
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
682
682
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
683
683
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
684
|
-
* @param {object} [params] extra parameters specific to the
|
|
684
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
685
685
|
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
686
686
|
*/
|
|
687
687
|
await this.loadMarkets();
|
|
@@ -697,7 +697,7 @@ export default class cex extends Exchange {
|
|
|
697
697
|
* @method
|
|
698
698
|
* @name cex#fetchTradingFees
|
|
699
699
|
* @description fetch the trading fees for multiple markets
|
|
700
|
-
* @param {object} [params] extra parameters specific to the
|
|
700
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
701
701
|
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
702
702
|
*/
|
|
703
703
|
await this.loadMarkets();
|
|
@@ -744,7 +744,7 @@ export default class cex extends Exchange {
|
|
|
744
744
|
* @param {string} side 'buy' or 'sell'
|
|
745
745
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
746
746
|
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
747
|
-
* @param {object} [params] extra parameters specific to the
|
|
747
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
748
748
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
749
749
|
*/
|
|
750
750
|
// for market buy it requires the amount of quote currency to spend
|
|
@@ -823,7 +823,7 @@ export default class cex extends Exchange {
|
|
|
823
823
|
* @description cancels an open order
|
|
824
824
|
* @param {string} id order id
|
|
825
825
|
* @param {string} symbol not used by cex cancelOrder ()
|
|
826
|
-
* @param {object} [params] extra parameters specific to the
|
|
826
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
827
827
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
828
828
|
*/
|
|
829
829
|
await this.loadMarkets();
|
|
@@ -1108,7 +1108,7 @@ export default class cex extends Exchange {
|
|
|
1108
1108
|
* @param {string} symbol unified market symbol
|
|
1109
1109
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1110
1110
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
1111
|
-
* @param {object} [params] extra parameters specific to the
|
|
1111
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1112
1112
|
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1113
1113
|
*/
|
|
1114
1114
|
await this.loadMarkets();
|
|
@@ -1134,7 +1134,7 @@ export default class cex extends Exchange {
|
|
|
1134
1134
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
1135
1135
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1136
1136
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
1137
|
-
* @param {object} [params] extra parameters specific to the
|
|
1137
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1138
1138
|
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1139
1139
|
*/
|
|
1140
1140
|
if (symbol === undefined) {
|
|
@@ -1153,7 +1153,7 @@ export default class cex extends Exchange {
|
|
|
1153
1153
|
* @name cex#fetchOrder
|
|
1154
1154
|
* @description fetches information on an order made by the user
|
|
1155
1155
|
* @param {string} symbol not used by cex fetchOrder
|
|
1156
|
-
* @param {object} [params] extra parameters specific to the
|
|
1156
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1157
1157
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1158
1158
|
*/
|
|
1159
1159
|
await this.loadMarkets();
|
|
@@ -1272,7 +1272,7 @@ export default class cex extends Exchange {
|
|
|
1272
1272
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
1273
1273
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1274
1274
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
1275
|
-
* @param {object} [params] extra parameters specific to the
|
|
1275
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1276
1276
|
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1277
1277
|
*/
|
|
1278
1278
|
await this.loadMarkets();
|
|
@@ -1515,7 +1515,7 @@ export default class cex extends Exchange {
|
|
|
1515
1515
|
* @name cex#fetchDepositAddress
|
|
1516
1516
|
* @description fetch the deposit address for a currency associated with this account
|
|
1517
1517
|
* @param {string} code unified currency code
|
|
1518
|
-
* @param {object} [params] extra parameters specific to the
|
|
1518
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1519
1519
|
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
1520
1520
|
*/
|
|
1521
1521
|
await this.loadMarkets();
|