ccxt 4.4.73 → 4.4.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.min.js +2 -2
- package/dist/cjs/ccxt.js +1 -11
- package/dist/cjs/src/ace.js +9 -6
- package/dist/cjs/src/alpaca.js +3 -0
- package/dist/cjs/src/ascendex.js +6 -0
- package/dist/cjs/src/base/Exchange.js +36 -14
- package/dist/cjs/src/bequant.js +1 -0
- package/dist/cjs/src/binanceusdm.js +1 -1
- package/dist/cjs/src/bit2c.js +30 -4
- package/dist/cjs/src/bitbank.js +32 -0
- package/dist/cjs/src/bitbns.js +1 -1
- package/dist/cjs/src/bitflyer.js +1 -0
- package/dist/cjs/src/bithumb.js +34 -0
- package/dist/cjs/src/bitmart.js +74 -7
- package/dist/cjs/src/bitopro.js +37 -0
- package/dist/cjs/src/blofin.js +1 -1
- package/dist/cjs/src/bybit.js +14 -1
- package/dist/cjs/src/coinlist.js +87 -11
- package/dist/cjs/src/deribit.js +29 -1
- package/dist/cjs/src/gate.js +12 -7
- package/dist/cjs/src/hitbtc.js +7 -1
- package/dist/cjs/src/okx.js +29 -25
- package/dist/cjs/src/pro/ascendex.js +1 -1
- package/dist/cjs/src/pro/bingx.js +10 -1
- package/dist/cjs/src/pro/bitget.js +10 -1
- package/dist/cjs/src/pro/bitmart.js +10 -1
- package/dist/cjs/src/pro/bitopro.js +5 -4
- package/dist/cjs/src/pro/onetrading.js +7 -7
- package/js/ccxt.d.ts +2 -14
- package/js/ccxt.js +2 -10
- package/js/src/abstract/bitmart.d.ts +2 -0
- package/js/src/abstract/coinlist.d.ts +3 -0
- package/js/src/ace.js +9 -6
- package/js/src/alpaca.js +3 -0
- package/js/src/ascendex.js +6 -0
- package/js/src/base/Exchange.d.ts +1 -0
- package/js/src/base/Exchange.js +36 -14
- package/js/src/bequant.js +1 -0
- package/js/src/binanceusdm.js +1 -1
- package/js/src/bit2c.js +30 -4
- package/js/src/bitbank.js +32 -0
- package/js/src/bitbns.js +1 -1
- package/js/src/bitflyer.js +1 -0
- package/js/src/bithumb.js +34 -0
- package/js/src/bitmart.d.ts +24 -0
- package/js/src/bitmart.js +74 -7
- package/js/src/bitopro.js +37 -0
- package/js/src/blofin.js +1 -1
- package/js/src/bybit.js +14 -1
- package/js/src/coinlist.js +87 -11
- package/js/src/deribit.js +29 -1
- package/js/src/gate.js +12 -7
- package/js/src/hitbtc.js +7 -1
- package/js/src/okx.js +29 -25
- package/js/src/pro/ascendex.js +1 -1
- package/js/src/pro/bingx.js +10 -1
- package/js/src/pro/bitget.js +10 -1
- package/js/src/pro/bitmart.js +10 -1
- package/js/src/pro/bitopro.js +5 -4
- package/js/src/pro/onetrading.d.ts +7 -7
- package/js/src/pro/onetrading.js +7 -7
- package/package.json +1 -1
- package/js/src/abstract/bitcoincom.d.ts +0 -118
- package/js/src/abstract/bitcoincom.js +0 -11
- package/js/src/abstract/bitfinex1.d.ts +0 -72
- package/js/src/abstract/bitfinex1.js +0 -11
- package/js/src/abstract/bitpanda.d.ts +0 -26
- package/js/src/abstract/bitpanda.js +0 -11
- package/js/src/abstract/poloniexfutures.d.ts +0 -51
- package/js/src/abstract/poloniexfutures.js +0 -11
- package/js/src/abstract/wazirx.d.ts +0 -33
- package/js/src/abstract/wazirx.js +0 -11
- package/js/src/bitcoincom.d.ts +0 -4
- package/js/src/bitcoincom.js +0 -18
- package/js/src/bitpanda.d.ts +0 -4
- package/js/src/bitpanda.js +0 -17
- package/js/src/poloniexfutures.d.ts +0 -321
- package/js/src/poloniexfutures.js +0 -1941
- package/js/src/pro/bitcoincom.d.ts +0 -4
- package/js/src/pro/bitcoincom.js +0 -34
- package/js/src/pro/bitpanda.d.ts +0 -4
- package/js/src/pro/bitpanda.js +0 -17
- package/js/src/pro/poloniexfutures.d.ts +0 -108
- package/js/src/pro/poloniexfutures.js +0 -1042
- package/js/src/pro/wazirx.d.ts +0 -102
- package/js/src/pro/wazirx.js +0 -784
- package/js/src/static_dependencies/starknet/utils/json.d.ts +0 -24
- package/js/src/static_dependencies/starknet/utils/json.js +0 -43
|
@@ -77,6 +77,9 @@ class bingx extends bingx$1 {
|
|
|
77
77
|
'depth': 100,
|
|
78
78
|
'interval': 500, // 100, 200, 500, 1000
|
|
79
79
|
},
|
|
80
|
+
'watchTrades': {
|
|
81
|
+
'ignoreDuplicates': true,
|
|
82
|
+
},
|
|
80
83
|
},
|
|
81
84
|
'streaming': {
|
|
82
85
|
'keepAlive': 1800000, // 30 minutes
|
|
@@ -498,7 +501,13 @@ class bingx extends bingx$1 {
|
|
|
498
501
|
if (this.newUpdates) {
|
|
499
502
|
limit = trades.getLimit(symbol, limit);
|
|
500
503
|
}
|
|
501
|
-
|
|
504
|
+
const result = this.filterBySinceLimit(trades, since, limit, 'timestamp', true);
|
|
505
|
+
if (this.handleOption('watchTrades', 'ignoreDuplicates', true)) {
|
|
506
|
+
let filtered = this.removeRepeatedTradesFromArray(result);
|
|
507
|
+
filtered = this.sortBy(filtered, 'timestamp');
|
|
508
|
+
return filtered;
|
|
509
|
+
}
|
|
510
|
+
return result;
|
|
502
511
|
}
|
|
503
512
|
handleTrades(client, message) {
|
|
504
513
|
//
|
|
@@ -70,6 +70,9 @@ class bitget extends bitget$1 {
|
|
|
70
70
|
'watchOrderBook': {
|
|
71
71
|
'checksum': true,
|
|
72
72
|
},
|
|
73
|
+
'watchTrades': {
|
|
74
|
+
'ignoreDuplicates': true,
|
|
75
|
+
},
|
|
73
76
|
},
|
|
74
77
|
'streaming': {
|
|
75
78
|
'ping': this.ping,
|
|
@@ -787,7 +790,13 @@ class bitget extends bitget$1 {
|
|
|
787
790
|
const tradeSymbol = this.safeString(first, 'symbol');
|
|
788
791
|
limit = trades.getLimit(tradeSymbol, limit);
|
|
789
792
|
}
|
|
790
|
-
|
|
793
|
+
const result = this.filterBySinceLimit(trades, since, limit, 'timestamp', true);
|
|
794
|
+
if (this.handleOption('watchTrades', 'ignoreDuplicates', true)) {
|
|
795
|
+
let filtered = this.removeRepeatedTradesFromArray(result);
|
|
796
|
+
filtered = this.sortBy(filtered, 'timestamp');
|
|
797
|
+
return filtered;
|
|
798
|
+
}
|
|
799
|
+
return result;
|
|
791
800
|
}
|
|
792
801
|
/**
|
|
793
802
|
* @method
|
|
@@ -63,6 +63,9 @@ class bitmart extends bitmart$1 {
|
|
|
63
63
|
'watchOrderBookForSymbols': {
|
|
64
64
|
'depth': 'depth/increase100',
|
|
65
65
|
},
|
|
66
|
+
'watchTrades': {
|
|
67
|
+
'ignoreDuplicates': true,
|
|
68
|
+
},
|
|
66
69
|
'ws': {
|
|
67
70
|
'inflate': true,
|
|
68
71
|
},
|
|
@@ -308,7 +311,13 @@ class bitmart extends bitmart$1 {
|
|
|
308
311
|
const tradeSymbol = this.safeString(first, 'symbol');
|
|
309
312
|
limit = trades.getLimit(tradeSymbol, limit);
|
|
310
313
|
}
|
|
311
|
-
|
|
314
|
+
const result = this.filterBySinceLimit(trades, since, limit, 'timestamp', true);
|
|
315
|
+
if (this.handleOption('watchTrades', 'ignoreDuplicates', true)) {
|
|
316
|
+
let filtered = this.removeRepeatedTradesFromArray(result);
|
|
317
|
+
filtered = this.sortBy(filtered, 'timestamp');
|
|
318
|
+
return filtered;
|
|
319
|
+
}
|
|
320
|
+
return result;
|
|
312
321
|
}
|
|
313
322
|
getParamsForMultipleSub(methodName, symbols, limit = undefined, params = {}) {
|
|
314
323
|
symbols = this.marketSymbols(symbols, undefined, false, true);
|
|
@@ -355,15 +355,16 @@ class bitopro extends bitopro$1 {
|
|
|
355
355
|
// }
|
|
356
356
|
//
|
|
357
357
|
const marketId = this.safeString(message, 'pair');
|
|
358
|
-
|
|
358
|
+
// market-ids are lowercase in REST API and uppercase in WS API
|
|
359
|
+
const market = this.safeMarket(marketId.toLowerCase(), undefined, '_');
|
|
359
360
|
const symbol = market['symbol'];
|
|
360
361
|
const event = this.safeString(message, 'event');
|
|
361
362
|
const messageHash = event + ':' + symbol;
|
|
362
|
-
const result = this.parseTicker(message);
|
|
363
|
+
const result = this.parseTicker(message, market);
|
|
364
|
+
result['symbol'] = this.safeString(market, 'symbol'); // symbol returned from REST's parseTicker is distorted for WS, so re-set it from market object
|
|
363
365
|
const timestamp = this.safeInteger(message, 'timestamp');
|
|
364
|
-
const datetime = this.safeString(message, 'datetime');
|
|
365
366
|
result['timestamp'] = timestamp;
|
|
366
|
-
result['datetime'] = datetime
|
|
367
|
+
result['datetime'] = this.iso8601(timestamp); // we shouldn't set "datetime" string provided by server, as those values are obviously wrong offset from UTC
|
|
367
368
|
this.tickers[symbol] = result;
|
|
368
369
|
client.resolve(result, messageHash);
|
|
369
370
|
}
|
|
@@ -74,7 +74,7 @@ class onetrading extends onetrading$1 {
|
|
|
74
74
|
}
|
|
75
75
|
/**
|
|
76
76
|
* @method
|
|
77
|
-
* @name
|
|
77
|
+
* @name onetrading#watchBalance
|
|
78
78
|
* @see https://developers.bitpanda.com/exchange/#account-history-channel
|
|
79
79
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
80
80
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -133,7 +133,7 @@ class onetrading extends onetrading$1 {
|
|
|
133
133
|
}
|
|
134
134
|
/**
|
|
135
135
|
* @method
|
|
136
|
-
* @name
|
|
136
|
+
* @name onetrading#watchTicker
|
|
137
137
|
* @see https://developers.bitpanda.com/exchange/#market-ticker-channel
|
|
138
138
|
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
139
139
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
@@ -159,7 +159,7 @@ class onetrading extends onetrading$1 {
|
|
|
159
159
|
}
|
|
160
160
|
/**
|
|
161
161
|
* @method
|
|
162
|
-
* @name
|
|
162
|
+
* @name onetrading#watchTickers
|
|
163
163
|
* @see https://developers.bitpanda.com/exchange/#market-ticker-channel
|
|
164
164
|
* @description watches price tickers, a statistical calculation with the information for all markets or those specified.
|
|
165
165
|
* @param {string} symbols unified symbols of the markets to fetch the ticker for
|
|
@@ -255,7 +255,7 @@ class onetrading extends onetrading$1 {
|
|
|
255
255
|
}
|
|
256
256
|
/**
|
|
257
257
|
* @method
|
|
258
|
-
* @name
|
|
258
|
+
* @name onetrading#watchMyTrades
|
|
259
259
|
* @see https://developers.bitpanda.com/exchange/#account-history-channel
|
|
260
260
|
* @description get the list of trades associated with the user
|
|
261
261
|
* @param {string} symbol unified symbol of the market to fetch trades for. Use 'any' to watch all trades
|
|
@@ -299,7 +299,7 @@ class onetrading extends onetrading$1 {
|
|
|
299
299
|
}
|
|
300
300
|
/**
|
|
301
301
|
* @method
|
|
302
|
-
* @name
|
|
302
|
+
* @name onetrading#watchOrderBook
|
|
303
303
|
* @see https://developers.bitpanda.com/exchange/#market-ticker-channel
|
|
304
304
|
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
305
305
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
@@ -416,7 +416,7 @@ class onetrading extends onetrading$1 {
|
|
|
416
416
|
}
|
|
417
417
|
/**
|
|
418
418
|
* @method
|
|
419
|
-
* @name
|
|
419
|
+
* @name onetrading#watchOrders
|
|
420
420
|
* @see https://developers.bitpanda.com/exchange/#account-history-channel
|
|
421
421
|
* @description watches information on multiple orders made by the user
|
|
422
422
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
@@ -1031,7 +1031,7 @@ class onetrading extends onetrading$1 {
|
|
|
1031
1031
|
}
|
|
1032
1032
|
/**
|
|
1033
1033
|
* @method
|
|
1034
|
-
* @name
|
|
1034
|
+
* @name onetrading#watchOHLCV
|
|
1035
1035
|
* @see https://developers.bitpanda.com/exchange/#candlesticks-channel
|
|
1036
1036
|
* @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1037
1037
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
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, FundingRate, FundingRates, Position, BorrowInterest, LeverageTier, LedgerEntry, DepositWithdrawFeeNetwork, DepositWithdrawFee, TransferEntry, CrossBorrowRate, IsolatedBorrowRate, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, CancellationRequest, FundingHistory, MarketMarginModes, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, LeverageTiers, LongShortRatio, OrderBooks, OpenInterests, ConstructorArgs } from './src/base/types.js';
|
|
6
6
|
import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, 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, UnsubscribeError } from './src/base/errors.js';
|
|
7
|
-
declare const version = "4.4.
|
|
7
|
+
declare const version = "4.4.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';
|
|
@@ -18,7 +18,6 @@ import bingx from './src/bingx.js';
|
|
|
18
18
|
import bit2c from './src/bit2c.js';
|
|
19
19
|
import bitbank from './src/bitbank.js';
|
|
20
20
|
import bitbns from './src/bitbns.js';
|
|
21
|
-
import bitcoincom from './src/bitcoincom.js';
|
|
22
21
|
import bitfinex from './src/bitfinex.js';
|
|
23
22
|
import bitflyer from './src/bitflyer.js';
|
|
24
23
|
import bitget from './src/bitget.js';
|
|
@@ -26,7 +25,6 @@ import bithumb from './src/bithumb.js';
|
|
|
26
25
|
import bitmart from './src/bitmart.js';
|
|
27
26
|
import bitmex from './src/bitmex.js';
|
|
28
27
|
import bitopro from './src/bitopro.js';
|
|
29
|
-
import bitpanda from './src/bitpanda.js';
|
|
30
28
|
import bitrue from './src/bitrue.js';
|
|
31
29
|
import bitso from './src/bitso.js';
|
|
32
30
|
import bitstamp from './src/bitstamp.js';
|
|
@@ -122,14 +120,12 @@ import binancecoinmPro from './src/pro/binancecoinm.js';
|
|
|
122
120
|
import binanceusPro from './src/pro/binanceus.js';
|
|
123
121
|
import binanceusdmPro from './src/pro/binanceusdm.js';
|
|
124
122
|
import bingxPro from './src/pro/bingx.js';
|
|
125
|
-
import bitcoincomPro from './src/pro/bitcoincom.js';
|
|
126
123
|
import bitfinexPro from './src/pro/bitfinex.js';
|
|
127
124
|
import bitgetPro from './src/pro/bitget.js';
|
|
128
125
|
import bithumbPro from './src/pro/bithumb.js';
|
|
129
126
|
import bitmartPro from './src/pro/bitmart.js';
|
|
130
127
|
import bitmexPro from './src/pro/bitmex.js';
|
|
131
128
|
import bitoproPro from './src/pro/bitopro.js';
|
|
132
|
-
import bitpandaPro from './src/pro/bitpanda.js';
|
|
133
129
|
import bitruePro from './src/pro/bitrue.js';
|
|
134
130
|
import bitstampPro from './src/pro/bitstamp.js';
|
|
135
131
|
import bitvavoPro from './src/pro/bitvavo.js';
|
|
@@ -200,7 +196,6 @@ declare const exchanges: {
|
|
|
200
196
|
bit2c: typeof bit2c;
|
|
201
197
|
bitbank: typeof bitbank;
|
|
202
198
|
bitbns: typeof bitbns;
|
|
203
|
-
bitcoincom: typeof bitcoincom;
|
|
204
199
|
bitfinex: typeof bitfinex;
|
|
205
200
|
bitflyer: typeof bitflyer;
|
|
206
201
|
bitget: typeof bitget;
|
|
@@ -208,7 +203,6 @@ declare const exchanges: {
|
|
|
208
203
|
bitmart: typeof bitmart;
|
|
209
204
|
bitmex: typeof bitmex;
|
|
210
205
|
bitopro: typeof bitopro;
|
|
211
|
-
bitpanda: typeof bitpanda;
|
|
212
206
|
bitrue: typeof bitrue;
|
|
213
207
|
bitso: typeof bitso;
|
|
214
208
|
bitstamp: typeof bitstamp;
|
|
@@ -306,14 +300,12 @@ declare const pro: {
|
|
|
306
300
|
binanceus: typeof binanceusPro;
|
|
307
301
|
binanceusdm: typeof binanceusdmPro;
|
|
308
302
|
bingx: typeof bingxPro;
|
|
309
|
-
bitcoincom: typeof bitcoincomPro;
|
|
310
303
|
bitfinex: typeof bitfinexPro;
|
|
311
304
|
bitget: typeof bitgetPro;
|
|
312
305
|
bithumb: typeof bithumbPro;
|
|
313
306
|
bitmart: typeof bitmartPro;
|
|
314
307
|
bitmex: typeof bitmexPro;
|
|
315
308
|
bitopro: typeof bitoproPro;
|
|
316
|
-
bitpanda: typeof bitpandaPro;
|
|
317
309
|
bitrue: typeof bitruePro;
|
|
318
310
|
bitstamp: typeof bitstampPro;
|
|
319
311
|
bitvavo: typeof bitvavoPro;
|
|
@@ -385,14 +377,12 @@ declare const ccxt: {
|
|
|
385
377
|
binanceus: typeof binanceusPro;
|
|
386
378
|
binanceusdm: typeof binanceusdmPro;
|
|
387
379
|
bingx: typeof bingxPro;
|
|
388
|
-
bitcoincom: typeof bitcoincomPro;
|
|
389
380
|
bitfinex: typeof bitfinexPro;
|
|
390
381
|
bitget: typeof bitgetPro;
|
|
391
382
|
bithumb: typeof bithumbPro;
|
|
392
383
|
bitmart: typeof bitmartPro;
|
|
393
384
|
bitmex: typeof bitmexPro;
|
|
394
385
|
bitopro: typeof bitoproPro;
|
|
395
|
-
bitpanda: typeof bitpandaPro;
|
|
396
386
|
bitrue: typeof bitruePro;
|
|
397
387
|
bitstamp: typeof bitstampPro;
|
|
398
388
|
bitvavo: typeof bitvavoPro;
|
|
@@ -464,7 +454,6 @@ declare const ccxt: {
|
|
|
464
454
|
bit2c: typeof bit2c;
|
|
465
455
|
bitbank: typeof bitbank;
|
|
466
456
|
bitbns: typeof bitbns;
|
|
467
|
-
bitcoincom: typeof bitcoincom;
|
|
468
457
|
bitfinex: typeof bitfinex;
|
|
469
458
|
bitflyer: typeof bitflyer;
|
|
470
459
|
bitget: typeof bitget;
|
|
@@ -472,7 +461,6 @@ declare const ccxt: {
|
|
|
472
461
|
bitmart: typeof bitmart;
|
|
473
462
|
bitmex: typeof bitmex;
|
|
474
463
|
bitopro: typeof bitopro;
|
|
475
|
-
bitpanda: typeof bitpanda;
|
|
476
464
|
bitrue: typeof bitrue;
|
|
477
465
|
bitso: typeof bitso;
|
|
478
466
|
bitstamp: typeof bitstamp;
|
|
@@ -561,5 +549,5 @@ declare const ccxt: {
|
|
|
561
549
|
zaif: typeof zaif;
|
|
562
550
|
zonda: typeof zonda;
|
|
563
551
|
} & typeof functions & typeof errors;
|
|
564
|
-
export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, 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, UnsubscribeError, Int, int, Str, Strings, Num, Bool, IndexType, OrderSide, OrderType, MarketType, SubType, Dict, NullableDict, List, NullableList, Fee, OHLCV, OHLCVC, implicitReturnType, Market, Currency, ConstructorArgs, Dictionary, MinMax, FeeInterface, TradingFeeInterface, MarketMarginModes, MarketInterface, Trade, Order, OrderBook, OrderBooks, Ticker, Transaction, Tickers, CurrencyInterface, Balance, BalanceAccount, Account, PartialBalances, Balances, DepositAddress, WithdrawalResponse, FundingRate, FundingRates, Position, BorrowInterest, LeverageTier, LedgerEntry, DepositWithdrawFeeNetwork, DepositWithdrawFee, TransferEntry, CrossBorrowRate, IsolatedBorrowRate, FundingRateHistory, OpenInterest, OpenInterests, Liquidation, OrderRequest, CancellationRequest, FundingHistory, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, LongShortRatio, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, LeverageTiers, ace, alpaca, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbns,
|
|
552
|
+
export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, 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, UnsubscribeError, Int, int, Str, Strings, Num, Bool, IndexType, OrderSide, OrderType, MarketType, SubType, Dict, NullableDict, List, NullableList, Fee, OHLCV, OHLCVC, implicitReturnType, Market, Currency, ConstructorArgs, Dictionary, MinMax, FeeInterface, TradingFeeInterface, MarketMarginModes, MarketInterface, Trade, Order, OrderBook, OrderBooks, Ticker, Transaction, Tickers, CurrencyInterface, Balance, BalanceAccount, Account, PartialBalances, Balances, DepositAddress, WithdrawalResponse, FundingRate, FundingRates, Position, BorrowInterest, LeverageTier, LedgerEntry, DepositWithdrawFeeNetwork, DepositWithdrawFee, TransferEntry, CrossBorrowRate, IsolatedBorrowRate, FundingRateHistory, OpenInterest, OpenInterests, Liquidation, OrderRequest, CancellationRequest, FundingHistory, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, LongShortRatio, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, LeverageTiers, ace, alpaca, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbns, bitfinex, bitflyer, bitget, bithumb, bitmart, bitmex, bitopro, bitrue, bitso, bitstamp, bitteam, bitvavo, bl3p, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, cex, coinbase, coinbaseadvanced, coinbaseexchange, coinbaseinternational, coincatch, coincheck, coinex, coinlist, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, cryptomus, defx, delta, deribit, derive, digifinex, ellipx, exmo, fmfwio, gate, gateio, gemini, hashkey, hitbtc, hollaex, htx, huobi, huobijp, hyperliquid, idex, independentreserve, indodax, kraken, krakenfutures, kucoin, kucoinfutures, kuna, latoken, lbank, luno, mercado, mexc, myokx, ndax, novadax, oceanex, okcoin, okx, onetrading, oxfun, p2b, paradex, paymium, phemex, poloniex, probit, timex, tokocrypto, tradeogre, upbit, vertex, wavesexchange, whitebit, woo, woofipro, xt, yobit, zaif, zonda, };
|
|
565
553
|
export default ccxt;
|
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, ManualInteractionNeeded, 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, UnsubscribeError } from './src/base/errors.js';
|
|
39
39
|
//-----------------------------------------------------------------------------
|
|
40
40
|
// this is updated by vss.js when building
|
|
41
|
-
const version = '4.4.
|
|
41
|
+
const version = '4.4.74';
|
|
42
42
|
Exchange.ccxtVersion = version;
|
|
43
43
|
//-----------------------------------------------------------------------------
|
|
44
44
|
import ace from './src/ace.js';
|
|
@@ -54,7 +54,6 @@ import bingx from './src/bingx.js';
|
|
|
54
54
|
import bit2c from './src/bit2c.js';
|
|
55
55
|
import bitbank from './src/bitbank.js';
|
|
56
56
|
import bitbns from './src/bitbns.js';
|
|
57
|
-
import bitcoincom from './src/bitcoincom.js';
|
|
58
57
|
import bitfinex from './src/bitfinex.js';
|
|
59
58
|
import bitflyer from './src/bitflyer.js';
|
|
60
59
|
import bitget from './src/bitget.js';
|
|
@@ -62,7 +61,6 @@ import bithumb from './src/bithumb.js';
|
|
|
62
61
|
import bitmart from './src/bitmart.js';
|
|
63
62
|
import bitmex from './src/bitmex.js';
|
|
64
63
|
import bitopro from './src/bitopro.js';
|
|
65
|
-
import bitpanda from './src/bitpanda.js';
|
|
66
64
|
import bitrue from './src/bitrue.js';
|
|
67
65
|
import bitso from './src/bitso.js';
|
|
68
66
|
import bitstamp from './src/bitstamp.js';
|
|
@@ -159,14 +157,12 @@ import binancecoinmPro from './src/pro/binancecoinm.js';
|
|
|
159
157
|
import binanceusPro from './src/pro/binanceus.js';
|
|
160
158
|
import binanceusdmPro from './src/pro/binanceusdm.js';
|
|
161
159
|
import bingxPro from './src/pro/bingx.js';
|
|
162
|
-
import bitcoincomPro from './src/pro/bitcoincom.js';
|
|
163
160
|
import bitfinexPro from './src/pro/bitfinex.js';
|
|
164
161
|
import bitgetPro from './src/pro/bitget.js';
|
|
165
162
|
import bithumbPro from './src/pro/bithumb.js';
|
|
166
163
|
import bitmartPro from './src/pro/bitmart.js';
|
|
167
164
|
import bitmexPro from './src/pro/bitmex.js';
|
|
168
165
|
import bitoproPro from './src/pro/bitopro.js';
|
|
169
|
-
import bitpandaPro from './src/pro/bitpanda.js';
|
|
170
166
|
import bitruePro from './src/pro/bitrue.js';
|
|
171
167
|
import bitstampPro from './src/pro/bitstamp.js';
|
|
172
168
|
import bitvavoPro from './src/pro/bitvavo.js';
|
|
@@ -237,7 +233,6 @@ const exchanges = {
|
|
|
237
233
|
'bit2c': bit2c,
|
|
238
234
|
'bitbank': bitbank,
|
|
239
235
|
'bitbns': bitbns,
|
|
240
|
-
'bitcoincom': bitcoincom,
|
|
241
236
|
'bitfinex': bitfinex,
|
|
242
237
|
'bitflyer': bitflyer,
|
|
243
238
|
'bitget': bitget,
|
|
@@ -245,7 +240,6 @@ const exchanges = {
|
|
|
245
240
|
'bitmart': bitmart,
|
|
246
241
|
'bitmex': bitmex,
|
|
247
242
|
'bitopro': bitopro,
|
|
248
|
-
'bitpanda': bitpanda,
|
|
249
243
|
'bitrue': bitrue,
|
|
250
244
|
'bitso': bitso,
|
|
251
245
|
'bitstamp': bitstamp,
|
|
@@ -343,14 +337,12 @@ const pro = {
|
|
|
343
337
|
'binanceus': binanceusPro,
|
|
344
338
|
'binanceusdm': binanceusdmPro,
|
|
345
339
|
'bingx': bingxPro,
|
|
346
|
-
'bitcoincom': bitcoincomPro,
|
|
347
340
|
'bitfinex': bitfinexPro,
|
|
348
341
|
'bitget': bitgetPro,
|
|
349
342
|
'bithumb': bithumbPro,
|
|
350
343
|
'bitmart': bitmartPro,
|
|
351
344
|
'bitmex': bitmexPro,
|
|
352
345
|
'bitopro': bitoproPro,
|
|
353
|
-
'bitpanda': bitpandaPro,
|
|
354
346
|
'bitrue': bitruePro,
|
|
355
347
|
'bitstamp': bitstampPro,
|
|
356
348
|
'bitvavo': bitvavoPro,
|
|
@@ -420,6 +412,6 @@ pro.exchanges = Object.keys(pro);
|
|
|
420
412
|
pro['Exchange'] = Exchange; // now the same for rest and ts
|
|
421
413
|
//-----------------------------------------------------------------------------
|
|
422
414
|
const ccxt = Object.assign({ version, Exchange, Precise, 'exchanges': Object.keys(exchanges), 'pro': pro }, exchanges, functions, errors);
|
|
423
|
-
export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, 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, UnsubscribeError, ace, alpaca, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbns,
|
|
415
|
+
export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, 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, UnsubscribeError, ace, alpaca, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbns, bitfinex, bitflyer, bitget, bithumb, bitmart, bitmex, bitopro, bitrue, bitso, bitstamp, bitteam, bitvavo, bl3p, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, cex, coinbase, coinbaseadvanced, coinbaseexchange, coinbaseinternational, coincatch, coincheck, coinex, coinlist, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, cryptomus, defx, delta, deribit, derive, digifinex, ellipx, exmo, fmfwio, gate, gateio, gemini, hashkey, hitbtc, hollaex, htx, huobi, huobijp, hyperliquid, idex, independentreserve, indodax, kraken, krakenfutures, kucoin, kucoinfutures, kuna, latoken, lbank, luno, mercado, mexc, myokx, ndax, novadax, oceanex, okcoin, okx, onetrading, oxfun, p2b, paradex, paymium, phemex, poloniex, probit, timex, tokocrypto, tradeogre, upbit, vertex, wavesexchange, whitebit, woo, woofipro, xt, yobit, zaif, zonda, };
|
|
424
416
|
export default ccxt;
|
|
425
417
|
//-----------------------------------------------------------------------------
|
|
@@ -67,6 +67,7 @@ interface Exchange {
|
|
|
67
67
|
privateGetContractPrivateAffilateRebateList(params?: {}): Promise<implicitReturnType>;
|
|
68
68
|
privateGetContractPrivateAffilateTradeList(params?: {}): Promise<implicitReturnType>;
|
|
69
69
|
privateGetContractPrivateTransactionHistory(params?: {}): Promise<implicitReturnType>;
|
|
70
|
+
privateGetContractPrivateGetPositionMode(params?: {}): Promise<implicitReturnType>;
|
|
70
71
|
privatePostAccountSubAccountMainV1SubToMain(params?: {}): Promise<implicitReturnType>;
|
|
71
72
|
privatePostAccountSubAccountSubV1SubToMain(params?: {}): Promise<implicitReturnType>;
|
|
72
73
|
privatePostAccountSubAccountMainV1MainToSub(params?: {}): Promise<implicitReturnType>;
|
|
@@ -111,6 +112,7 @@ interface Exchange {
|
|
|
111
112
|
privatePostContractPrivateModifyTpSlOrder(params?: {}): Promise<implicitReturnType>;
|
|
112
113
|
privatePostContractPrivateSubmitTrailOrder(params?: {}): Promise<implicitReturnType>;
|
|
113
114
|
privatePostContractPrivateCancelTrailOrder(params?: {}): Promise<implicitReturnType>;
|
|
115
|
+
privatePostContractPrivateSetPositionMode(params?: {}): Promise<implicitReturnType>;
|
|
114
116
|
}
|
|
115
117
|
declare abstract class Exchange extends _Exchange {
|
|
116
118
|
}
|
|
@@ -15,6 +15,7 @@ interface Exchange {
|
|
|
15
15
|
publicGetV1Leaderboard(params?: {}): Promise<implicitReturnType>;
|
|
16
16
|
publicGetV1AffiliateCompetitionCode(params?: {}): Promise<implicitReturnType>;
|
|
17
17
|
publicGetV1CompetitionCompetitionId(params?: {}): Promise<implicitReturnType>;
|
|
18
|
+
publicGetV1SymbolsSymbolFunding(params?: {}): Promise<implicitReturnType>;
|
|
18
19
|
privateGetV1Fees(params?: {}): Promise<implicitReturnType>;
|
|
19
20
|
privateGetV1Accounts(params?: {}): Promise<implicitReturnType>;
|
|
20
21
|
privateGetV1AccountsTraderId(params?: {}): Promise<implicitReturnType>;
|
|
@@ -34,6 +35,7 @@ interface Exchange {
|
|
|
34
35
|
privateGetV1Credits(params?: {}): Promise<implicitReturnType>;
|
|
35
36
|
privateGetV1Positions(params?: {}): Promise<implicitReturnType>;
|
|
36
37
|
privateGetV1AccountsTraderIdCompetitions(params?: {}): Promise<implicitReturnType>;
|
|
38
|
+
privateGetV1ClosedPositions(params?: {}): Promise<implicitReturnType>;
|
|
37
39
|
privatePostV1Keys(params?: {}): Promise<implicitReturnType>;
|
|
38
40
|
privatePostV1Orders(params?: {}): Promise<implicitReturnType>;
|
|
39
41
|
privatePostV1OrdersCancelAllAfter(params?: {}): Promise<implicitReturnType>;
|
|
@@ -47,6 +49,7 @@ interface Exchange {
|
|
|
47
49
|
privatePostV1AccountsTraderIdCreateCompetition(params?: {}): Promise<implicitReturnType>;
|
|
48
50
|
privatePatchV1OrdersOrderId(params?: {}): Promise<implicitReturnType>;
|
|
49
51
|
privatePatchV1OrdersBulk(params?: {}): Promise<implicitReturnType>;
|
|
52
|
+
privatePutV1AccountsTraderIdAlias(params?: {}): Promise<implicitReturnType>;
|
|
50
53
|
privateDeleteV1KeysKey(params?: {}): Promise<implicitReturnType>;
|
|
51
54
|
privateDeleteV1Orders(params?: {}): Promise<implicitReturnType>;
|
|
52
55
|
privateDeleteV1OrdersOrderId(params?: {}): Promise<implicitReturnType>;
|
package/js/src/ace.js
CHANGED
|
@@ -25,6 +25,12 @@ export default class ace extends Exchange {
|
|
|
25
25
|
'rateLimit': 100,
|
|
26
26
|
'pro': false,
|
|
27
27
|
'has': {
|
|
28
|
+
'CORS': undefined,
|
|
29
|
+
'spot': true,
|
|
30
|
+
'margin': false,
|
|
31
|
+
'swap': false,
|
|
32
|
+
'future': false,
|
|
33
|
+
'option': false,
|
|
28
34
|
'addMargin': false,
|
|
29
35
|
'borrowCrossMargin': false,
|
|
30
36
|
'borrowIsolatedMargin': false,
|
|
@@ -34,7 +40,6 @@ export default class ace extends Exchange {
|
|
|
34
40
|
'cancelOrders': false,
|
|
35
41
|
'closeAllPositions': false,
|
|
36
42
|
'closePosition': false,
|
|
37
|
-
'CORS': undefined,
|
|
38
43
|
'createOrder': true,
|
|
39
44
|
'createOrderWithTakeProfitAndStopLoss': false,
|
|
40
45
|
'createOrderWithTakeProfitAndStopLossWs': false,
|
|
@@ -85,6 +90,8 @@ export default class ace extends Exchange {
|
|
|
85
90
|
'fetchOpenInterestHistory': false,
|
|
86
91
|
'fetchOpenInterests': false,
|
|
87
92
|
'fetchOpenOrders': true,
|
|
93
|
+
'fetchOption': false,
|
|
94
|
+
'fetchOptionChain': false,
|
|
88
95
|
'fetchOrder': true,
|
|
89
96
|
'fetchOrderBook': true,
|
|
90
97
|
'fetchOrders': false,
|
|
@@ -108,11 +115,9 @@ export default class ace extends Exchange {
|
|
|
108
115
|
'fetchTransactions': false,
|
|
109
116
|
'fetchTransfer': false,
|
|
110
117
|
'fetchTransfers': false,
|
|
118
|
+
'fetchVolatilityHistory': false,
|
|
111
119
|
'fetchWithdrawal': false,
|
|
112
120
|
'fetchWithdrawals': false,
|
|
113
|
-
'future': false,
|
|
114
|
-
'margin': false,
|
|
115
|
-
'option': false,
|
|
116
121
|
'reduceMargin': false,
|
|
117
122
|
'repayCrossMargin': false,
|
|
118
123
|
'repayIsolatedMargin': false,
|
|
@@ -120,8 +125,6 @@ export default class ace extends Exchange {
|
|
|
120
125
|
'setMargin': false,
|
|
121
126
|
'setMarginMode': false,
|
|
122
127
|
'setPositionMode': false,
|
|
123
|
-
'spot': true,
|
|
124
|
-
'swap': false,
|
|
125
128
|
'transfer': false,
|
|
126
129
|
'withdraw': false,
|
|
127
130
|
'ws': false,
|
package/js/src/alpaca.js
CHANGED
|
@@ -118,6 +118,8 @@ export default class alpaca extends Exchange {
|
|
|
118
118
|
'fetchOpenInterests': false,
|
|
119
119
|
'fetchOpenOrder': false,
|
|
120
120
|
'fetchOpenOrders': true,
|
|
121
|
+
'fetchOption': false,
|
|
122
|
+
'fetchOptionChain': false,
|
|
121
123
|
'fetchOrder': true,
|
|
122
124
|
'fetchOrderBook': true,
|
|
123
125
|
'fetchOrders': true,
|
|
@@ -140,6 +142,7 @@ export default class alpaca extends Exchange {
|
|
|
140
142
|
'fetchTransactionFees': false,
|
|
141
143
|
'fetchTransactions': false,
|
|
142
144
|
'fetchTransfers': false,
|
|
145
|
+
'fetchVolatilityHistory': false,
|
|
143
146
|
'fetchWithdrawals': true,
|
|
144
147
|
'reduceMargin': false,
|
|
145
148
|
'repayCrossMargin': false,
|
package/js/src/ascendex.js
CHANGED
|
@@ -59,6 +59,7 @@ export default class ascendex extends Exchange {
|
|
|
59
59
|
'fetchFundingRate': 'emulated',
|
|
60
60
|
'fetchFundingRateHistory': false,
|
|
61
61
|
'fetchFundingRates': true,
|
|
62
|
+
'fetchGreeks': false,
|
|
62
63
|
'fetchIndexOHLCV': false,
|
|
63
64
|
'fetchLeverage': 'emulated',
|
|
64
65
|
'fetchLeverages': true,
|
|
@@ -68,10 +69,13 @@ export default class ascendex extends Exchange {
|
|
|
68
69
|
'fetchMarketLeverageTiers': 'emulated',
|
|
69
70
|
'fetchMarkets': true,
|
|
70
71
|
'fetchMarkOHLCV': false,
|
|
72
|
+
'fetchMySettlementHistory': false,
|
|
71
73
|
'fetchOHLCV': true,
|
|
72
74
|
'fetchOpenInterest': false,
|
|
73
75
|
'fetchOpenInterestHistory': false,
|
|
74
76
|
'fetchOpenOrders': true,
|
|
77
|
+
'fetchOption': false,
|
|
78
|
+
'fetchOptionChain': false,
|
|
75
79
|
'fetchOrder': true,
|
|
76
80
|
'fetchOrderBook': true,
|
|
77
81
|
'fetchOrders': false,
|
|
@@ -80,6 +84,7 @@ export default class ascendex extends Exchange {
|
|
|
80
84
|
'fetchPositions': true,
|
|
81
85
|
'fetchPositionsRisk': false,
|
|
82
86
|
'fetchPremiumIndexOHLCV': false,
|
|
87
|
+
'fetchSettlementHistory': false,
|
|
83
88
|
'fetchTicker': true,
|
|
84
89
|
'fetchTickers': true,
|
|
85
90
|
'fetchTime': true,
|
|
@@ -91,6 +96,7 @@ export default class ascendex extends Exchange {
|
|
|
91
96
|
'fetchTransactions': 'emulated',
|
|
92
97
|
'fetchTransfer': false,
|
|
93
98
|
'fetchTransfers': false,
|
|
99
|
+
'fetchVolatilityHistory': false,
|
|
94
100
|
'fetchWithdrawal': false,
|
|
95
101
|
'fetchWithdrawals': true,
|
|
96
102
|
'reduceMargin': true,
|
|
@@ -859,6 +859,7 @@ export default class Exchange {
|
|
|
859
859
|
fetchPaginatedCallIncremental(method: string, symbol?: Str, since?: any, limit?: any, params?: {}, pageKey?: any, maxEntriesPerRequest?: any): Promise<any>;
|
|
860
860
|
sortCursorPaginatedResult(result: any): any;
|
|
861
861
|
removeRepeatedElementsFromArray(input: any, fallbackToTimestamp?: boolean): any;
|
|
862
|
+
removeRepeatedTradesFromArray(input: any): any;
|
|
862
863
|
handleUntilOption(key: string, request: any, params: any, multiplier?: number): any[];
|
|
863
864
|
safeOpenInterest(interest: Dict, market?: Market): OpenInterest;
|
|
864
865
|
parseLiquidation(liquidation: any, market?: Market): Liquidation;
|
package/js/src/base/Exchange.js
CHANGED
|
@@ -2505,9 +2505,6 @@ export default class Exchange {
|
|
|
2505
2505
|
}
|
|
2506
2506
|
safeCurrencyStructure(currency) {
|
|
2507
2507
|
// derive data from networks: deposit, withdraw, active, fee, limits, precision
|
|
2508
|
-
const currencyDeposit = this.safeBool(currency, 'deposit');
|
|
2509
|
-
const currencyWithdraw = this.safeBool(currency, 'withdraw');
|
|
2510
|
-
const currencyActive = this.safeBool(currency, 'active');
|
|
2511
2508
|
const networks = this.safeDict(currency, 'networks', {});
|
|
2512
2509
|
const keys = Object.keys(networks);
|
|
2513
2510
|
const length = keys.length;
|
|
@@ -2516,19 +2513,18 @@ export default class Exchange {
|
|
|
2516
2513
|
const key = keys[i];
|
|
2517
2514
|
const network = networks[key];
|
|
2518
2515
|
const deposit = this.safeBool(network, 'deposit');
|
|
2516
|
+
const currencyDeposit = this.safeBool(currency, 'deposit');
|
|
2519
2517
|
if (currencyDeposit === undefined || deposit) {
|
|
2520
2518
|
currency['deposit'] = deposit;
|
|
2521
2519
|
}
|
|
2522
2520
|
const withdraw = this.safeBool(network, 'withdraw');
|
|
2521
|
+
const currencyWithdraw = this.safeBool(currency, 'withdraw');
|
|
2523
2522
|
if (currencyWithdraw === undefined || withdraw) {
|
|
2524
2523
|
currency['withdraw'] = withdraw;
|
|
2525
2524
|
}
|
|
2526
|
-
const active = this.safeBool(network, 'active');
|
|
2527
|
-
if (currencyActive === undefined || active) {
|
|
2528
|
-
currency['active'] = active;
|
|
2529
|
-
}
|
|
2530
2525
|
// set network 'active' to false if D or W is disabled
|
|
2531
|
-
|
|
2526
|
+
let active = this.safeBool(network, 'active');
|
|
2527
|
+
if (active === undefined) {
|
|
2532
2528
|
if (deposit && withdraw) {
|
|
2533
2529
|
currency['networks'][key]['active'] = true;
|
|
2534
2530
|
}
|
|
@@ -2536,6 +2532,11 @@ export default class Exchange {
|
|
|
2536
2532
|
currency['networks'][key]['active'] = false;
|
|
2537
2533
|
}
|
|
2538
2534
|
}
|
|
2535
|
+
active = this.safeBool(network, 'active');
|
|
2536
|
+
const currencyActive = this.safeBool(currency, 'active');
|
|
2537
|
+
if (currencyActive === undefined || active) {
|
|
2538
|
+
currency['active'] = active;
|
|
2539
|
+
}
|
|
2539
2540
|
// find lowest fee (which is more desired)
|
|
2540
2541
|
const fee = this.safeString(network, 'fee');
|
|
2541
2542
|
const feeMain = this.safeString(currency, 'fee');
|
|
@@ -6717,21 +6718,42 @@ export default class Exchange {
|
|
|
6717
6718
|
return result;
|
|
6718
6719
|
}
|
|
6719
6720
|
removeRepeatedElementsFromArray(input, fallbackToTimestamp = true) {
|
|
6720
|
-
const
|
|
6721
|
+
const uniqueDic = {};
|
|
6722
|
+
const uniqueResult = [];
|
|
6721
6723
|
for (let i = 0; i < input.length; i++) {
|
|
6722
6724
|
const entry = input[i];
|
|
6723
6725
|
const uniqValue = fallbackToTimestamp ? this.safeStringN(entry, ['id', 'timestamp', 0]) : this.safeString(entry, 'id');
|
|
6724
|
-
if (uniqValue !== undefined && !(uniqValue in
|
|
6725
|
-
|
|
6726
|
+
if (uniqValue !== undefined && !(uniqValue in uniqueDic)) {
|
|
6727
|
+
uniqueDic[uniqValue] = 1;
|
|
6728
|
+
uniqueResult.push(entry);
|
|
6726
6729
|
}
|
|
6727
6730
|
}
|
|
6728
|
-
const
|
|
6729
|
-
const valuesLength = values.length;
|
|
6731
|
+
const valuesLength = uniqueResult.length;
|
|
6730
6732
|
if (valuesLength > 0) {
|
|
6731
|
-
return
|
|
6733
|
+
return uniqueResult;
|
|
6732
6734
|
}
|
|
6733
6735
|
return input;
|
|
6734
6736
|
}
|
|
6737
|
+
removeRepeatedTradesFromArray(input) {
|
|
6738
|
+
const uniqueResult = {};
|
|
6739
|
+
for (let i = 0; i < input.length; i++) {
|
|
6740
|
+
const entry = input[i];
|
|
6741
|
+
let id = this.safeString(entry, 'id');
|
|
6742
|
+
if (id === undefined) {
|
|
6743
|
+
const price = this.safeString(entry, 'price');
|
|
6744
|
+
const amount = this.safeString(entry, 'amount');
|
|
6745
|
+
const timestamp = this.safeString(entry, 'timestamp');
|
|
6746
|
+
const side = this.safeString(entry, 'side');
|
|
6747
|
+
// unique trade identifier
|
|
6748
|
+
id = 't_' + timestamp.toString() + '_' + side + '_' + price + '_' + amount;
|
|
6749
|
+
}
|
|
6750
|
+
if (id !== undefined && !(id in uniqueResult)) {
|
|
6751
|
+
uniqueResult[id] = entry;
|
|
6752
|
+
}
|
|
6753
|
+
}
|
|
6754
|
+
const values = Object.values(uniqueResult);
|
|
6755
|
+
return values;
|
|
6756
|
+
}
|
|
6735
6757
|
handleUntilOption(key, request, params, multiplier = 1) {
|
|
6736
6758
|
const until = this.safeInteger2(params, 'until', 'till');
|
|
6737
6759
|
if (until !== undefined) {
|
package/js/src/bequant.js
CHANGED
|
@@ -17,6 +17,7 @@ export default class bequant extends hitbtc {
|
|
|
17
17
|
'urls': {
|
|
18
18
|
'logo': 'https://github.com/user-attachments/assets/0583ef1f-29fe-4b7c-8189-63565a0e2867',
|
|
19
19
|
'api': {
|
|
20
|
+
// v3
|
|
20
21
|
'public': 'https://api.bequant.io/api/3',
|
|
21
22
|
'private': 'https://api.bequant.io/api/3',
|
|
22
23
|
},
|
package/js/src/binanceusdm.js
CHANGED
|
@@ -34,7 +34,7 @@ export default class binanceusdm extends binance {
|
|
|
34
34
|
'fetchMarkets': ['linear'],
|
|
35
35
|
'defaultSubType': 'linear',
|
|
36
36
|
// https://www.binance.com/en/support/faq/360033162192
|
|
37
|
-
// tier amount, maintenance margin, initial margin
|
|
37
|
+
// tier amount, maintenance margin, initial margin,
|
|
38
38
|
'leverageBrackets': undefined,
|
|
39
39
|
'marginTypes': {},
|
|
40
40
|
'marginModes': {},
|