ccxt 4.3.73 → 4.3.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 +5 -5
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +1 -1
- package/dist/cjs/src/binance.js +236 -87
- package/dist/cjs/src/bybit.js +42 -7
- package/dist/cjs/src/mexc.js +1 -1
- package/dist/cjs/src/pro/alpaca.js +5 -0
- package/dist/cjs/src/pro/binance.js +15 -2
- package/dist/cjs/src/pro/bitfinex.js +5 -0
- package/dist/cjs/src/whitebit.js +17 -2
- package/dist/cjs/src/woo.js +1 -1
- package/dist/cjs/src/yobit.js +55 -29
- package/examples/js/cli.js +13 -10
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/binance.d.ts +5 -0
- package/js/src/abstract/binancecoinm.d.ts +5 -0
- package/js/src/abstract/binanceus.d.ts +5 -0
- package/js/src/abstract/binanceusdm.d.ts +5 -0
- package/js/src/abstract/bybit.d.ts +1 -0
- package/js/src/ace.js +1 -1
- package/js/src/binance.js +236 -87
- package/js/src/bybit.js +42 -7
- package/js/src/mexc.js +1 -1
- package/js/src/pro/alpaca.js +5 -0
- package/js/src/pro/binance.js +15 -2
- package/js/src/pro/bitfinex.js +5 -0
- package/js/src/whitebit.js +17 -2
- package/js/src/woo.js +1 -1
- package/js/src/yobit.d.ts +1 -0
- package/js/src/yobit.js +55 -29
- package/package.json +1 -1
|
@@ -49,6 +49,7 @@ class alpaca extends alpaca$1 {
|
|
|
49
49
|
* @method
|
|
50
50
|
* @name alpaca#watchTicker
|
|
51
51
|
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
52
|
+
* @see https://docs.alpaca.markets/docs/real-time-crypto-pricing-data#quotes
|
|
52
53
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
53
54
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
54
55
|
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -124,6 +125,7 @@ class alpaca extends alpaca$1 {
|
|
|
124
125
|
* @method
|
|
125
126
|
* @name alpaca#watchOHLCV
|
|
126
127
|
* @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
128
|
+
* @see https://docs.alpaca.markets/docs/real-time-crypto-pricing-data#bars
|
|
127
129
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
128
130
|
* @param {string} timeframe the length of time each candle represents
|
|
129
131
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
@@ -180,6 +182,7 @@ class alpaca extends alpaca$1 {
|
|
|
180
182
|
* @method
|
|
181
183
|
* @name alpaca#watchOrderBook
|
|
182
184
|
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
185
|
+
* @see https://docs.alpaca.markets/docs/real-time-crypto-pricing-data#orderbooks
|
|
183
186
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
184
187
|
* @param {int} [limit] the maximum amount of order book entries to return.
|
|
185
188
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -259,6 +262,7 @@ class alpaca extends alpaca$1 {
|
|
|
259
262
|
* @method
|
|
260
263
|
* @name alpaca#watchTrades
|
|
261
264
|
* @description watches information on multiple trades made in a market
|
|
265
|
+
* @see https://docs.alpaca.markets/docs/real-time-crypto-pricing-data#trades
|
|
262
266
|
* @param {string} symbol unified market symbol of the market trades were made in
|
|
263
267
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
264
268
|
* @param {int} [limit] the maximum number of trade structures to retrieve
|
|
@@ -311,6 +315,7 @@ class alpaca extends alpaca$1 {
|
|
|
311
315
|
* @method
|
|
312
316
|
* @name alpaca#watchMyTrades
|
|
313
317
|
* @description watches information on multiple trades made by the user
|
|
318
|
+
* @see https://docs.alpaca.markets/docs/websocket-streaming#trade-updates
|
|
314
319
|
* @param {string} symbol unified market symbol of the market trades were made in
|
|
315
320
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
316
321
|
* @param {int} [limit] the maximum number of trade structures to retrieve
|
|
@@ -931,10 +931,15 @@ class binance extends binance$1 {
|
|
|
931
931
|
* @method
|
|
932
932
|
* @name binance#watchTradesForSymbols
|
|
933
933
|
* @description get the list of most recent trades for a list of symbols
|
|
934
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#aggregate-trade-streams
|
|
935
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#trade-streams
|
|
936
|
+
* @see https://binance-docs.github.io/apidocs/futures/en/#aggregate-trade-streams
|
|
937
|
+
* @see https://binance-docs.github.io/apidocs/delivery/en/#aggregate-trade-streams
|
|
934
938
|
* @param {string[]} symbols unified symbol of the market to fetch trades for
|
|
935
939
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
936
940
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
937
941
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
942
|
+
* @param {string} [params.name] the name of the method to call, 'trade' or 'aggTrade', default is 'trade'
|
|
938
943
|
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
939
944
|
*/
|
|
940
945
|
await this.loadMarkets();
|
|
@@ -947,8 +952,9 @@ class binance extends binance$1 {
|
|
|
947
952
|
}
|
|
948
953
|
streamHash += '::' + symbols.join(',');
|
|
949
954
|
}
|
|
950
|
-
|
|
951
|
-
|
|
955
|
+
let name = undefined;
|
|
956
|
+
[name, params] = this.handleOptionAndParams(params, 'watchTradesForSymbols', 'name', 'trade');
|
|
957
|
+
params = this.omit(params, 'callerMethodName');
|
|
952
958
|
const firstMarket = this.market(symbols[0]);
|
|
953
959
|
let type = firstMarket['type'];
|
|
954
960
|
if (firstMarket['contract']) {
|
|
@@ -988,12 +994,18 @@ class binance extends binance$1 {
|
|
|
988
994
|
* @method
|
|
989
995
|
* @name binance#watchTrades
|
|
990
996
|
* @description get the list of most recent trades for a particular symbol
|
|
997
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#aggregate-trade-streams
|
|
998
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#trade-streams
|
|
999
|
+
* @see https://binance-docs.github.io/apidocs/futures/en/#aggregate-trade-streams
|
|
1000
|
+
* @see https://binance-docs.github.io/apidocs/delivery/en/#aggregate-trade-streams
|
|
991
1001
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
992
1002
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
993
1003
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
994
1004
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1005
|
+
* @param {string} [params.name] the name of the method to call, 'trade' or 'aggTrade', default is 'trade'
|
|
995
1006
|
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
996
1007
|
*/
|
|
1008
|
+
params['callerMethodName'] = 'watchTrades';
|
|
997
1009
|
return await this.watchTradesForSymbols([symbol], since, limit, params);
|
|
998
1010
|
}
|
|
999
1011
|
parseWsTrade(trade, market = undefined) {
|
|
@@ -1255,6 +1267,7 @@ class binance extends binance$1 {
|
|
|
1255
1267
|
const subscribe = {
|
|
1256
1268
|
'id': requestId,
|
|
1257
1269
|
};
|
|
1270
|
+
params = this.omit(params, 'callerMethodName');
|
|
1258
1271
|
const [symbol, timeframe, candles] = await this.watchMultiple(url, messageHashes, this.extend(request, params), messageHashes, subscribe);
|
|
1259
1272
|
if (this.newUpdates) {
|
|
1260
1273
|
limit = candles.getLimit(symbol, limit);
|
|
@@ -57,6 +57,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
57
57
|
* @method
|
|
58
58
|
* @name bitfinex#watchTrades
|
|
59
59
|
* @description get the list of most recent trades for a particular symbol
|
|
60
|
+
* @see https://docs.bitfinex.com/v1/reference/ws-public-trades
|
|
60
61
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
61
62
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
62
63
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
@@ -76,6 +77,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
76
77
|
* @method
|
|
77
78
|
* @name bitfinex#watchTicker
|
|
78
79
|
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
80
|
+
* @see https://docs.bitfinex.com/v1/reference/ws-public-ticker
|
|
79
81
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
80
82
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
81
83
|
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -248,6 +250,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
248
250
|
* @method
|
|
249
251
|
* @name bitfinex#watchOrderBook
|
|
250
252
|
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
253
|
+
* @see https://docs.bitfinex.com/v1/reference/ws-public-order-books
|
|
251
254
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
252
255
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
253
256
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -458,6 +461,8 @@ class bitfinex extends bitfinex$1 {
|
|
|
458
461
|
* @method
|
|
459
462
|
* @name bitfinex#watchOrders
|
|
460
463
|
* @description watches information on multiple orders made by the user
|
|
464
|
+
* @see https://docs.bitfinex.com/v1/reference/ws-auth-order-updates
|
|
465
|
+
* @see https://docs.bitfinex.com/v1/reference/ws-auth-order-snapshots
|
|
461
466
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
462
467
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
463
468
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
package/dist/cjs/src/whitebit.js
CHANGED
|
@@ -804,8 +804,23 @@ class whitebit extends whitebit$1 {
|
|
|
804
804
|
// "change": "2.12" // in percent
|
|
805
805
|
// }
|
|
806
806
|
//
|
|
807
|
+
// WS market_update
|
|
808
|
+
//
|
|
809
|
+
// {
|
|
810
|
+
// "open": "52853.04",
|
|
811
|
+
// "close": "55913.88",
|
|
812
|
+
// "high": "56272",
|
|
813
|
+
// "low": "49549.67",
|
|
814
|
+
// "volume": "57331.067185",
|
|
815
|
+
// "deal": "3063860382.42985338",
|
|
816
|
+
// "last": "55913.88",
|
|
817
|
+
// "period": 86400
|
|
818
|
+
// }
|
|
807
819
|
market = this.safeMarket(undefined, market);
|
|
808
|
-
|
|
820
|
+
// last price is provided as "last" or "last_price"
|
|
821
|
+
const last = this.safeString2(ticker, 'last', 'last_price');
|
|
822
|
+
// if "close" is provided, use it, otherwise use <last>
|
|
823
|
+
const close = this.safeString(ticker, 'close', last);
|
|
809
824
|
return this.safeTicker({
|
|
810
825
|
'symbol': market['symbol'],
|
|
811
826
|
'timestamp': undefined,
|
|
@@ -818,7 +833,7 @@ class whitebit extends whitebit$1 {
|
|
|
818
833
|
'askVolume': undefined,
|
|
819
834
|
'vwap': undefined,
|
|
820
835
|
'open': this.safeString(ticker, 'open'),
|
|
821
|
-
'close':
|
|
836
|
+
'close': close,
|
|
822
837
|
'last': last,
|
|
823
838
|
'previousClose': undefined,
|
|
824
839
|
'change': undefined,
|
package/dist/cjs/src/woo.js
CHANGED
|
@@ -144,7 +144,7 @@ class woo extends woo$1 {
|
|
|
144
144
|
'https://support.woo.org/hc/en-001/articles/4404611795353--Trading-Fees',
|
|
145
145
|
],
|
|
146
146
|
'referral': {
|
|
147
|
-
'url': 'https://x.woo.org/register?ref=
|
|
147
|
+
'url': 'https://x.woo.org/register?ref=DIJT0CNL',
|
|
148
148
|
'discount': 0.35,
|
|
149
149
|
},
|
|
150
150
|
},
|
package/dist/cjs/src/yobit.js
CHANGED
|
@@ -547,6 +547,22 @@ class yobit extends yobit$1 {
|
|
|
547
547
|
'info': ticker,
|
|
548
548
|
}, market);
|
|
549
549
|
}
|
|
550
|
+
async fetchTickersHelper(idsString, params = {}) {
|
|
551
|
+
const request = {
|
|
552
|
+
'pair': idsString,
|
|
553
|
+
};
|
|
554
|
+
const tickers = await this.publicGetTickerPair(this.extend(request, params));
|
|
555
|
+
const result = {};
|
|
556
|
+
const keys = Object.keys(tickers);
|
|
557
|
+
for (let k = 0; k < keys.length; k++) {
|
|
558
|
+
const id = keys[k];
|
|
559
|
+
const ticker = tickers[id];
|
|
560
|
+
const market = this.safeMarket(id);
|
|
561
|
+
const symbol = market['symbol'];
|
|
562
|
+
result[symbol] = this.parseTicker(ticker, market);
|
|
563
|
+
}
|
|
564
|
+
return result;
|
|
565
|
+
}
|
|
550
566
|
async fetchTickers(symbols = undefined, params = {}) {
|
|
551
567
|
/**
|
|
552
568
|
* @method
|
|
@@ -555,43 +571,53 @@ class yobit extends yobit$1 {
|
|
|
555
571
|
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
556
572
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
557
573
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
574
|
+
* @param {object} [params.all] you can set to `true` for convenience to fetch all tickers from this exchange by sending multiple requests
|
|
558
575
|
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
559
576
|
*/
|
|
560
|
-
|
|
561
|
-
|
|
577
|
+
let allSymbols = undefined;
|
|
578
|
+
[allSymbols, params] = this.handleParamBool(params, 'all', false);
|
|
579
|
+
if (symbols === undefined && !allSymbols) {
|
|
580
|
+
throw new errors.ArgumentsRequired(this.id + ' fetchTickers() requires "symbols" argument or use `params["all"] = true` to send multiple requests for all markets');
|
|
562
581
|
}
|
|
563
582
|
await this.loadMarkets();
|
|
564
|
-
|
|
565
|
-
let ids = undefined;
|
|
566
|
-
if (symbols === undefined) {
|
|
567
|
-
ids = this.ids;
|
|
568
|
-
}
|
|
569
|
-
else {
|
|
570
|
-
ids = this.marketIds(symbols);
|
|
571
|
-
}
|
|
572
|
-
const idsLength = ids.length;
|
|
573
|
-
const idsString = ids.join('-');
|
|
583
|
+
const promises = [];
|
|
574
584
|
const maxLength = this.safeInteger(this.options, 'maxUrlLength', 2048);
|
|
575
585
|
// max URL length is 2048 symbols, including http schema, hostname, tld, etc...
|
|
576
|
-
const lenghtOfBaseUrl =
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
586
|
+
const lenghtOfBaseUrl = 40; // safe space for the url including api-base and endpoint dir is 30 chars
|
|
587
|
+
if (allSymbols) {
|
|
588
|
+
symbols = this.symbols;
|
|
589
|
+
let ids = '';
|
|
590
|
+
for (let i = 0; i < this.ids.length; i++) {
|
|
591
|
+
const id = this.ids[i];
|
|
592
|
+
const prefix = (ids === '') ? '' : '-';
|
|
593
|
+
ids += prefix + id;
|
|
594
|
+
if (ids.length > maxLength) {
|
|
595
|
+
promises.push(this.fetchTickersHelper(ids, params));
|
|
596
|
+
ids = '';
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
if (ids !== '') {
|
|
600
|
+
promises.push(this.fetchTickersHelper(ids, params));
|
|
601
|
+
}
|
|
580
602
|
}
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
603
|
+
else {
|
|
604
|
+
symbols = this.marketSymbols(symbols);
|
|
605
|
+
const ids = this.marketIds(symbols);
|
|
606
|
+
const idsLength = ids.length;
|
|
607
|
+
const idsString = ids.join('-');
|
|
608
|
+
const actualLength = idsString.length + lenghtOfBaseUrl;
|
|
609
|
+
if (actualLength > maxLength) {
|
|
610
|
+
throw new errors.ArgumentsRequired(this.id + ' fetchTickers() is being requested for ' + idsLength.toString() + ' markets (which has an URL length of ' + actualLength.toString() + ' characters), but it exceedes max URL length (' + maxLength.toString() + '), please pass limisted symbols array to fetchTickers to fit in one request');
|
|
611
|
+
}
|
|
612
|
+
promises.push(this.fetchTickersHelper(idsString, params));
|
|
613
|
+
}
|
|
614
|
+
const resultAll = await Promise.all(promises);
|
|
615
|
+
let finalResult = {};
|
|
616
|
+
for (let i = 0; i < resultAll.length; i++) {
|
|
617
|
+
const result = this.filterByArrayTickers(resultAll[i], 'symbol', symbols);
|
|
618
|
+
finalResult = this.extend(finalResult, result);
|
|
593
619
|
}
|
|
594
|
-
return
|
|
620
|
+
return finalResult;
|
|
595
621
|
}
|
|
596
622
|
async fetchTicker(symbol, params = {}) {
|
|
597
623
|
/**
|
package/examples/js/cli.js
CHANGED
|
@@ -38,6 +38,7 @@ let [processPath, , exchangeId, methodName, ... params] = process.argv.filter (x
|
|
|
38
38
|
, shouldCreateResponseReport = process.argv.includes ('--response')
|
|
39
39
|
, shouldCreateBoth = process.argv.includes ('--static')
|
|
40
40
|
, raw = process.argv.includes ('--raw')
|
|
41
|
+
, noKeys = process.argv.includes ('--no-keys')
|
|
41
42
|
|
|
42
43
|
//-----------------------------------------------------------------------------
|
|
43
44
|
if (!raw) {
|
|
@@ -107,17 +108,19 @@ try {
|
|
|
107
108
|
exchange.options['defaultType'] = 'option';
|
|
108
109
|
}
|
|
109
110
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
if (credentialValue
|
|
118
|
-
|
|
111
|
+
if (!noKeys) {
|
|
112
|
+
// check auth keys in env var
|
|
113
|
+
const requiredCredentials = exchange.requiredCredentials;
|
|
114
|
+
for (const [credential, isRequired] of Object.entries (requiredCredentials)) {
|
|
115
|
+
if (isRequired && exchange[credential] === undefined) {
|
|
116
|
+
const credentialEnvName = (exchangeId + '_' + credential).toUpperCase () // example: KRAKEN_APIKEY
|
|
117
|
+
let credentialValue = process.env[credentialEnvName]
|
|
118
|
+
if (credentialValue) {
|
|
119
|
+
if (credentialValue.indexOf('---BEGIN') > -1) {
|
|
120
|
+
credentialValue = credentialValue.replaceAll('\\n', '\n');
|
|
121
|
+
}
|
|
122
|
+
exchange[credential] = credentialValue
|
|
119
123
|
}
|
|
120
|
-
exchange[credential] = credentialValue
|
|
121
124
|
}
|
|
122
125
|
}
|
|
123
126
|
}
|
package/js/ccxt.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import * as functions from './src/base/functions.js';
|
|
|
4
4
|
import * as errors from './src/base/errors.js';
|
|
5
5
|
import type { Int, int, Str, Strings, Num, Bool, IndexType, OrderSide, OrderType, MarketType, SubType, Dict, NullableDict, List, NullableList, Fee, OHLCV, OHLCVC, implicitReturnType, Market, Currency, Dictionary, MinMax, FeeInterface, TradingFeeInterface, MarketInterface, Trade, Order, OrderBook, Ticker, Transaction, Tickers, CurrencyInterface, Balance, BalanceAccount, Account, PartialBalances, Balances, DepositAddress, WithdrawalResponse, DepositAddressResponse, FundingRate, FundingRates, Position, BorrowInterest, LeverageTier, LedgerEntry, DepositWithdrawFeeNetwork, DepositWithdrawFee, TransferEntry, CrossBorrowRate, IsolatedBorrowRate, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, CancellationRequest, FundingHistory, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, LeverageTiers } from './src/base/types.js';
|
|
6
6
|
import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending } from './src/base/errors.js';
|
|
7
|
-
declare const version = "4.3.
|
|
7
|
+
declare const version = "4.3.74";
|
|
8
8
|
import ace from './src/ace.js';
|
|
9
9
|
import alpaca from './src/alpaca.js';
|
|
10
10
|
import ascendex from './src/ascendex.js';
|
package/js/ccxt.js
CHANGED
|
@@ -38,7 +38,7 @@ import * as errors from './src/base/errors.js';
|
|
|
38
38
|
import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending } from './src/base/errors.js';
|
|
39
39
|
//-----------------------------------------------------------------------------
|
|
40
40
|
// this is updated by vss.js when building
|
|
41
|
-
const version = '4.3.
|
|
41
|
+
const version = '4.3.75';
|
|
42
42
|
Exchange.ccxtVersion = version;
|
|
43
43
|
//-----------------------------------------------------------------------------
|
|
44
44
|
import ace from './src/ace.js';
|
|
@@ -522,6 +522,8 @@ interface Exchange {
|
|
|
522
522
|
fapiPrivateGetTradeAsyn(params?: {}): Promise<implicitReturnType>;
|
|
523
523
|
fapiPrivateGetTradeAsynId(params?: {}): Promise<implicitReturnType>;
|
|
524
524
|
fapiPrivateGetFeeBurn(params?: {}): Promise<implicitReturnType>;
|
|
525
|
+
fapiPrivateGetSymbolConfig(params?: {}): Promise<implicitReturnType>;
|
|
526
|
+
fapiPrivateGetAccountConfig(params?: {}): Promise<implicitReturnType>;
|
|
525
527
|
fapiPrivatePostBatchOrders(params?: {}): Promise<implicitReturnType>;
|
|
526
528
|
fapiPrivatePostPositionSideDual(params?: {}): Promise<implicitReturnType>;
|
|
527
529
|
fapiPrivatePostPositionMargin(params?: {}): Promise<implicitReturnType>;
|
|
@@ -545,6 +547,9 @@ interface Exchange {
|
|
|
545
547
|
fapiPrivateV2GetAccount(params?: {}): Promise<implicitReturnType>;
|
|
546
548
|
fapiPrivateV2GetBalance(params?: {}): Promise<implicitReturnType>;
|
|
547
549
|
fapiPrivateV2GetPositionRisk(params?: {}): Promise<implicitReturnType>;
|
|
550
|
+
fapiPrivateV3GetAccount(params?: {}): Promise<implicitReturnType>;
|
|
551
|
+
fapiPrivateV3GetBalance(params?: {}): Promise<implicitReturnType>;
|
|
552
|
+
fapiPrivateV3GetPositionRisk(params?: {}): Promise<implicitReturnType>;
|
|
548
553
|
eapiPublicGetPing(params?: {}): Promise<implicitReturnType>;
|
|
549
554
|
eapiPublicGetTime(params?: {}): Promise<implicitReturnType>;
|
|
550
555
|
eapiPublicGetExchangeInfo(params?: {}): Promise<implicitReturnType>;
|
|
@@ -522,6 +522,8 @@ interface binance {
|
|
|
522
522
|
fapiPrivateGetTradeAsyn(params?: {}): Promise<implicitReturnType>;
|
|
523
523
|
fapiPrivateGetTradeAsynId(params?: {}): Promise<implicitReturnType>;
|
|
524
524
|
fapiPrivateGetFeeBurn(params?: {}): Promise<implicitReturnType>;
|
|
525
|
+
fapiPrivateGetSymbolConfig(params?: {}): Promise<implicitReturnType>;
|
|
526
|
+
fapiPrivateGetAccountConfig(params?: {}): Promise<implicitReturnType>;
|
|
525
527
|
fapiPrivatePostBatchOrders(params?: {}): Promise<implicitReturnType>;
|
|
526
528
|
fapiPrivatePostPositionSideDual(params?: {}): Promise<implicitReturnType>;
|
|
527
529
|
fapiPrivatePostPositionMargin(params?: {}): Promise<implicitReturnType>;
|
|
@@ -545,6 +547,9 @@ interface binance {
|
|
|
545
547
|
fapiPrivateV2GetAccount(params?: {}): Promise<implicitReturnType>;
|
|
546
548
|
fapiPrivateV2GetBalance(params?: {}): Promise<implicitReturnType>;
|
|
547
549
|
fapiPrivateV2GetPositionRisk(params?: {}): Promise<implicitReturnType>;
|
|
550
|
+
fapiPrivateV3GetAccount(params?: {}): Promise<implicitReturnType>;
|
|
551
|
+
fapiPrivateV3GetBalance(params?: {}): Promise<implicitReturnType>;
|
|
552
|
+
fapiPrivateV3GetPositionRisk(params?: {}): Promise<implicitReturnType>;
|
|
548
553
|
eapiPublicGetPing(params?: {}): Promise<implicitReturnType>;
|
|
549
554
|
eapiPublicGetTime(params?: {}): Promise<implicitReturnType>;
|
|
550
555
|
eapiPublicGetExchangeInfo(params?: {}): Promise<implicitReturnType>;
|
|
@@ -574,6 +574,8 @@ interface binance {
|
|
|
574
574
|
fapiPrivateGetTradeAsyn(params?: {}): Promise<implicitReturnType>;
|
|
575
575
|
fapiPrivateGetTradeAsynId(params?: {}): Promise<implicitReturnType>;
|
|
576
576
|
fapiPrivateGetFeeBurn(params?: {}): Promise<implicitReturnType>;
|
|
577
|
+
fapiPrivateGetSymbolConfig(params?: {}): Promise<implicitReturnType>;
|
|
578
|
+
fapiPrivateGetAccountConfig(params?: {}): Promise<implicitReturnType>;
|
|
577
579
|
fapiPrivatePostBatchOrders(params?: {}): Promise<implicitReturnType>;
|
|
578
580
|
fapiPrivatePostPositionSideDual(params?: {}): Promise<implicitReturnType>;
|
|
579
581
|
fapiPrivatePostPositionMargin(params?: {}): Promise<implicitReturnType>;
|
|
@@ -597,6 +599,9 @@ interface binance {
|
|
|
597
599
|
fapiPrivateV2GetAccount(params?: {}): Promise<implicitReturnType>;
|
|
598
600
|
fapiPrivateV2GetBalance(params?: {}): Promise<implicitReturnType>;
|
|
599
601
|
fapiPrivateV2GetPositionRisk(params?: {}): Promise<implicitReturnType>;
|
|
602
|
+
fapiPrivateV3GetAccount(params?: {}): Promise<implicitReturnType>;
|
|
603
|
+
fapiPrivateV3GetBalance(params?: {}): Promise<implicitReturnType>;
|
|
604
|
+
fapiPrivateV3GetPositionRisk(params?: {}): Promise<implicitReturnType>;
|
|
600
605
|
eapiPublicGetPing(params?: {}): Promise<implicitReturnType>;
|
|
601
606
|
eapiPublicGetTime(params?: {}): Promise<implicitReturnType>;
|
|
602
607
|
eapiPublicGetExchangeInfo(params?: {}): Promise<implicitReturnType>;
|
|
@@ -522,6 +522,8 @@ interface binance {
|
|
|
522
522
|
fapiPrivateGetTradeAsyn(params?: {}): Promise<implicitReturnType>;
|
|
523
523
|
fapiPrivateGetTradeAsynId(params?: {}): Promise<implicitReturnType>;
|
|
524
524
|
fapiPrivateGetFeeBurn(params?: {}): Promise<implicitReturnType>;
|
|
525
|
+
fapiPrivateGetSymbolConfig(params?: {}): Promise<implicitReturnType>;
|
|
526
|
+
fapiPrivateGetAccountConfig(params?: {}): Promise<implicitReturnType>;
|
|
525
527
|
fapiPrivatePostBatchOrders(params?: {}): Promise<implicitReturnType>;
|
|
526
528
|
fapiPrivatePostPositionSideDual(params?: {}): Promise<implicitReturnType>;
|
|
527
529
|
fapiPrivatePostPositionMargin(params?: {}): Promise<implicitReturnType>;
|
|
@@ -545,6 +547,9 @@ interface binance {
|
|
|
545
547
|
fapiPrivateV2GetAccount(params?: {}): Promise<implicitReturnType>;
|
|
546
548
|
fapiPrivateV2GetBalance(params?: {}): Promise<implicitReturnType>;
|
|
547
549
|
fapiPrivateV2GetPositionRisk(params?: {}): Promise<implicitReturnType>;
|
|
550
|
+
fapiPrivateV3GetAccount(params?: {}): Promise<implicitReturnType>;
|
|
551
|
+
fapiPrivateV3GetBalance(params?: {}): Promise<implicitReturnType>;
|
|
552
|
+
fapiPrivateV3GetPositionRisk(params?: {}): Promise<implicitReturnType>;
|
|
548
553
|
eapiPublicGetPing(params?: {}): Promise<implicitReturnType>;
|
|
549
554
|
eapiPublicGetTime(params?: {}): Promise<implicitReturnType>;
|
|
550
555
|
eapiPublicGetExchangeInfo(params?: {}): Promise<implicitReturnType>;
|
|
@@ -52,6 +52,7 @@ interface Exchange {
|
|
|
52
52
|
publicGetV5SpotCrossMarginTradeBorrowToken(params?: {}): Promise<implicitReturnType>;
|
|
53
53
|
publicGetV5InsLoanProductInfos(params?: {}): Promise<implicitReturnType>;
|
|
54
54
|
publicGetV5InsLoanEnsureTokensConvert(params?: {}): Promise<implicitReturnType>;
|
|
55
|
+
privateGetV5MarketInstrumentsInfo(params?: {}): Promise<implicitReturnType>;
|
|
55
56
|
privateGetV2PrivateWalletFundRecords(params?: {}): Promise<implicitReturnType>;
|
|
56
57
|
privateGetSpotV3PrivateOrder(params?: {}): Promise<implicitReturnType>;
|
|
57
58
|
privateGetSpotV3PrivateOpenOrders(params?: {}): Promise<implicitReturnType>;
|
package/js/src/ace.js
CHANGED
|
@@ -355,7 +355,7 @@ export default class ace extends Exchange {
|
|
|
355
355
|
for (let i = 0; i < pairs.length; i++) {
|
|
356
356
|
const marketId = pairs[i];
|
|
357
357
|
const market = this.safeMarket(marketId);
|
|
358
|
-
const rawTicker = this.safeDict(response, marketId);
|
|
358
|
+
const rawTicker = this.safeDict(response, marketId, {});
|
|
359
359
|
const ticker = this.parseTicker(rawTicker, market);
|
|
360
360
|
tickers.push(ticker);
|
|
361
361
|
}
|