ccxt-ir 4.8.2 → 4.9.0

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/dist/cjs/ccxt.js CHANGED
@@ -45,6 +45,7 @@ var bitso = require('./src/bitso.js');
45
45
  var bitstamp = require('./src/bitstamp.js');
46
46
  var bitteam = require('./src/bitteam.js');
47
47
  var bittrade = require('./src/bittrade.js');
48
+ var bitunix = require('./src/bitunix.js');
48
49
  var bitvavo = require('./src/bitvavo.js');
49
50
  var blockchaincom = require('./src/blockchaincom.js');
50
51
  var blofin = require('./src/blofin.js');
@@ -223,7 +224,7 @@ var xt$1 = require('./src/pro/xt.js');
223
224
 
224
225
  //-----------------------------------------------------------------------------
225
226
  // this is updated by vss.js when building
226
- const version = '4.8.2';
227
+ const version = '4.9.0';
227
228
  Exchange["default"].ccxtVersion = version;
228
229
  const exchanges = {
229
230
  'abantether': abantether["default"],
@@ -259,6 +260,7 @@ const exchanges = {
259
260
  'bitstamp': bitstamp["default"],
260
261
  'bitteam': bitteam["default"],
261
262
  'bittrade': bittrade["default"],
263
+ 'bitunix': bitunix["default"],
262
264
  'bitvavo': bitvavo["default"],
263
265
  'blockchaincom': blockchaincom["default"],
264
266
  'blofin': blofin["default"],
@@ -521,6 +523,7 @@ exports.bitso = bitso["default"];
521
523
  exports.bitstamp = bitstamp["default"];
522
524
  exports.bitteam = bitteam["default"];
523
525
  exports.bittrade = bittrade["default"];
526
+ exports.bitunix = bitunix["default"];
524
527
  exports.bitvavo = bitvavo["default"];
525
528
  exports.blockchaincom = blockchaincom["default"];
526
529
  exports.blofin = blofin["default"];
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var Exchange$1 = require('../base/Exchange.js');
6
+
7
+ // ----------------------------------------------------------------------------
8
+ class Exchange extends Exchange$1["default"] {
9
+ }
10
+
11
+ exports["default"] = Exchange;
@@ -0,0 +1,327 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var bitunix$1 = require('./abstract/bitunix.js');
6
+
7
+ // ----------------------------------------------------------------------------
8
+ // ---------------------------------------------------------------------------
9
+ /**
10
+ * @class bitunix
11
+ * @augments Exchange
12
+ * @description Set rateLimit to 1000 if fully verified
13
+ */
14
+ class bitunix extends bitunix$1["default"] {
15
+ describe() {
16
+ return this.deepExtend(super.describe(), {
17
+ 'id': 'bitunix',
18
+ 'name': 'bitunix',
19
+ 'countries': ['IR'],
20
+ 'rateLimit': 1000,
21
+ 'version': '1',
22
+ 'certified': false,
23
+ 'pro': false,
24
+ 'has': {
25
+ 'CORS': undefined,
26
+ 'spot': true,
27
+ 'margin': false,
28
+ 'swap': false,
29
+ 'future': true,
30
+ 'option': false,
31
+ 'addMargin': false,
32
+ 'cancelAllOrders': false,
33
+ 'cancelOrder': false,
34
+ 'cancelOrders': false,
35
+ 'createDepositAddress': false,
36
+ 'createOrder': false,
37
+ 'createStopLimitOrder': false,
38
+ 'createStopMarketOrder': false,
39
+ 'createStopOrder': false,
40
+ 'editOrder': false,
41
+ 'fetchBalance': false,
42
+ 'fetchBorrowInterest': false,
43
+ 'fetchBorrowRateHistories': false,
44
+ 'fetchBorrowRateHistory': false,
45
+ 'fetchClosedOrders': false,
46
+ 'fetchCrossBorrowRate': false,
47
+ 'fetchCrossBorrowRates': false,
48
+ 'fetchCurrencies': false,
49
+ 'fetchDepositAddress': false,
50
+ 'fetchDeposits': false,
51
+ 'fetchFundingHistory': false,
52
+ 'fetchFundingRate': false,
53
+ 'fetchFundingRateHistory': false,
54
+ 'fetchFundingRates': false,
55
+ 'fetchIndexOHLCV': false,
56
+ 'fetchIsolatedBorrowRate': false,
57
+ 'fetchIsolatedBorrowRates': false,
58
+ 'fetchL2OrderBook': false,
59
+ 'fetchL3OrderBook': false,
60
+ 'fetchLedger': false,
61
+ 'fetchLedgerEntry': false,
62
+ 'fetchLeverageTiers': false,
63
+ 'fetchMarkets': true,
64
+ 'fetchMarkOHLCV': false,
65
+ 'fetchMyTrades': false,
66
+ 'fetchOHLCV': true,
67
+ 'fetchOpenInterestHistory': false,
68
+ 'fetchOpenOrders': false,
69
+ 'fetchOrder': false,
70
+ 'fetchOrderBook': true,
71
+ 'fetchOrders': false,
72
+ 'fetchOrderTrades': 'emulated',
73
+ 'fetchPositions': false,
74
+ 'fetchPremiumIndexOHLCV': false,
75
+ 'fetchTicker': true,
76
+ 'fetchTickers': true,
77
+ 'fetchTime': false,
78
+ 'fetchTrades': false,
79
+ 'fetchTradingFee': false,
80
+ 'fetchTradingFees': false,
81
+ 'fetchWithdrawals': false,
82
+ 'setLeverage': false,
83
+ 'setMarginMode': false,
84
+ 'transfer': false,
85
+ 'withdraw': false,
86
+ },
87
+ 'comment': 'This comment is optional',
88
+ 'urls': {
89
+ 'logo': 'https://cdn.arz.digital/cr-odin/img/exchanges/bitunix/64x64.png',
90
+ 'api': {
91
+ 'market': 'https://openapi.bitunix.com/',
92
+ 'tickers': 'https://api.bitunix.com/',
93
+ },
94
+ 'www': 'https://www.bitunix.com/',
95
+ 'doc': [
96
+ 'https://openapidoc.bitunix.com/',
97
+ ],
98
+ },
99
+ 'timeframes': {
100
+ '1m': '1',
101
+ '5m': '5',
102
+ '15m': '15',
103
+ '30m': '30',
104
+ '1h': '60',
105
+ '3h': '180',
106
+ '4h': '240',
107
+ '12h': '720',
108
+ '1d': '1D',
109
+ '1w': '1W',
110
+ },
111
+ 'api': {
112
+ 'public': {
113
+ 'get': {
114
+ 'api/spot/v1/common/coin_pair/list/': 1,
115
+ 'web/api/v1/common/tickers/': 1,
116
+ },
117
+ },
118
+ },
119
+ 'fees': {
120
+ 'trading': {
121
+ 'tierBased': false,
122
+ 'percentage': true,
123
+ 'maker': this.parseNumber('0.001'),
124
+ 'taker': this.parseNumber('0.001'),
125
+ },
126
+ },
127
+ });
128
+ }
129
+ async fetchMarkets(params = {}) {
130
+ /**
131
+ * @method
132
+ * @name bitunix#fetchMarkets
133
+ * @description retrieves data on all markets for bitunix
134
+ * @see https://api-docs.bitunix.ir/#be8d9c51a2
135
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
136
+ * @returns {object[]} an array of objects representing market data
137
+ */
138
+ const response = await this.publicGetApiSpotV1CommonCoinPairList(params);
139
+ const markets = this.safeList(response, 'data');
140
+ const result = [];
141
+ for (let i = 0; i < markets.length; i++) {
142
+ const market = this.parseMarket(markets[i]);
143
+ result.push(market);
144
+ }
145
+ return result;
146
+ }
147
+ parseMarket(market) {
148
+ // {
149
+ // id: 1,
150
+ // symbol: "btcusdt",
151
+ // base: "BTC",
152
+ // baseIcon: "https://img.bitunix.com/config/kv/228408.png",
153
+ // quote: "USDT",
154
+ // quoteIcon: "https://img.bitunix.com/config/coin/USDT.png",
155
+ // basePrecision: 5,
156
+ // quotePrecision: 2,
157
+ // minPrice: "10.0000000000000000",
158
+ // minVolume: "0.0000500000000000",
159
+ // maxAmount: "500000.0000000000000000",
160
+ // minAmount: "0.0000000000000000",
161
+ // maxLimitOrderAmount: "1500000.0000000000000000",
162
+ // maxMarketOrderAmount: "2000000.0000000000000000",
163
+ // maxSlippage: "0.0500",
164
+ // premiumFactor: "0.0500",
165
+ // minBuyPriceOffset: "-0.8000",
166
+ // maxSellPriceOffset: "50.0000",
167
+ // isOpen: 1,
168
+ // isHot: 1,
169
+ // isRecommend: 1,
170
+ // isShow: 1,
171
+ // tradeArea: "USDT",
172
+ // sort: 1,
173
+ // openTime: null,
174
+ // ctime: "2023-05-12T18:03:08Z",
175
+ // precisions: [
176
+ // "0.0100000000000000",
177
+ // "0.1000000000000000",
178
+ // "1.0000000000000000",
179
+ // "10.0000000000000000",
180
+ // "100.0000000000000000"
181
+ // ]
182
+ // }
183
+ const baseId = this.safeString(market, 'base');
184
+ const quoteId = this.safeString(market, 'quote');
185
+ const base = this.safeCurrencyCode(baseId);
186
+ const quote = this.safeCurrencyCode(quoteId);
187
+ const id = (base + quote);
188
+ return {
189
+ 'id': id,
190
+ 'symbol': base + '/' + quote,
191
+ 'base': base,
192
+ 'quote': quote,
193
+ 'settle': undefined,
194
+ 'baseId': baseId,
195
+ 'quoteId': quoteId,
196
+ 'settleId': undefined,
197
+ 'type': 'spot',
198
+ 'spot': true,
199
+ 'margin': false,
200
+ 'swap': false,
201
+ 'future': false,
202
+ 'option': false,
203
+ 'active': true,
204
+ 'contract': false,
205
+ 'linear': undefined,
206
+ 'inverse': undefined,
207
+ 'contractSize': undefined,
208
+ 'expiry': undefined,
209
+ 'expiryDatetime': undefined,
210
+ 'strike': undefined,
211
+ 'optionType': undefined,
212
+ 'precision': {
213
+ 'amount': undefined,
214
+ 'price': undefined,
215
+ },
216
+ 'limits': {
217
+ 'leverage': {
218
+ 'min': undefined,
219
+ 'max': undefined,
220
+ },
221
+ 'amount': {
222
+ 'min': undefined,
223
+ 'max': undefined,
224
+ },
225
+ 'price': {
226
+ 'min': undefined,
227
+ 'max': undefined,
228
+ },
229
+ 'cost': {
230
+ 'min': undefined,
231
+ 'max': undefined,
232
+ },
233
+ },
234
+ 'created': undefined,
235
+ 'info': market,
236
+ };
237
+ }
238
+ async fetchTickers(symbols = undefined, params = {}) {
239
+ /**
240
+ * @method
241
+ * @name bitunix#fetchTickers
242
+ * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
243
+ * @see https://api-docs.bitunix.ir/#be8d9c51a2
244
+ * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
245
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
246
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
247
+ */
248
+ await this.loadMarkets();
249
+ if (symbols !== undefined) {
250
+ symbols = this.marketSymbols(symbols);
251
+ }
252
+ const response = await this.publicGetWebApiV1CommonTickers();
253
+ const markets = this.safeList(response, 'data');
254
+ const result = {};
255
+ for (let i = 0; i < markets.length; i++) {
256
+ const ticker = this.parseTicker(markets[i]);
257
+ const symbol = ticker['symbol'];
258
+ result[symbol] = ticker;
259
+ }
260
+ return this.filterByArrayTickers(result, 'symbol', symbols);
261
+ }
262
+ async fetchTicker(symbol, params = {}) {
263
+ /**
264
+ * @method
265
+ * @name bitunix#fetchTicker
266
+ * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
267
+ * @see https://api-docs.bitunix.ir/#be8d9c51a2
268
+ * @param {string} symbol unified symbol of the market to fetch the ticker for
269
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
270
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
271
+ */
272
+ const ticker = await this.fetchTickers([symbol]);
273
+ return ticker[symbol];
274
+ }
275
+ parseTicker(ticker, market = undefined) {
276
+ // {
277
+ // symbol: "BTCUSDT",
278
+ // base: "BTC",
279
+ // quote: "USDT",
280
+ // close: "112832.34",
281
+ // rose24h: "0.2276416293",
282
+ // volume: "228310106.7861019"
283
+ // },
284
+ const marketType = 'spot';
285
+ const marketId = this.safeString(ticker, 'symbol');
286
+ const symbol = this.safeSymbol(marketId, market, undefined, marketType);
287
+ const last = this.safeFloat(ticker, 'close', 0);
288
+ const change = this.safeFloat(ticker, 'rose24h', 0);
289
+ const quoteVolume = this.safeFloat(ticker, 'volume', 0);
290
+ let baseVolume = 0;
291
+ if (last !== 0) {
292
+ baseVolume = quoteVolume / last;
293
+ }
294
+ return this.safeTicker({
295
+ 'symbol': symbol,
296
+ 'timestamp': undefined,
297
+ 'datetime': undefined,
298
+ 'high': undefined,
299
+ 'low': undefined,
300
+ 'bid': undefined,
301
+ 'bidVolume': undefined,
302
+ 'ask': undefined,
303
+ 'askVolume': undefined,
304
+ 'vwap': undefined,
305
+ 'open': undefined,
306
+ 'close': last,
307
+ 'last': last,
308
+ 'previousClose': undefined,
309
+ 'change': change,
310
+ 'percentage': change,
311
+ 'average': undefined,
312
+ 'baseVolume': baseVolume,
313
+ 'quoteVolume': quoteVolume,
314
+ 'info': ticker,
315
+ }, market);
316
+ }
317
+ sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
318
+ let url = this.urls['api']['market'] + '/' + path;
319
+ if (path === 'web/api/v1/common/tickers/') {
320
+ url = this.urls['api']['tickers'] + '/' + path;
321
+ }
322
+ headers = { 'Content-Type': 'application/json' };
323
+ return { 'url': url, 'method': method, 'body': body, 'headers': headers };
324
+ }
325
+ }
326
+
327
+ exports["default"] = bitunix;
@@ -1634,7 +1634,7 @@ class xt extends xt$1["default"] {
1634
1634
  response = await this.publicInverseGetFutureMarketV1PublicQAggTicker(this.extend(request, params));
1635
1635
  }
1636
1636
  else {
1637
- response = await this.publicSpotGetTicker24h(this.extend(request, params));
1637
+ response = await this.publicSpotGetTicker(this.extend(request, params));
1638
1638
  }
1639
1639
  //
1640
1640
  // spot
@@ -1897,7 +1897,7 @@ class xt extends xt$1["default"] {
1897
1897
  'change': this.safeNumber(ticker, 'cv'),
1898
1898
  'percentage': this.parseNumber(percentage),
1899
1899
  'average': undefined,
1900
- 'baseVolume': undefined,
1900
+ 'baseVolume': this.safeNumber2(ticker, 'a', 'q'),
1901
1901
  'quoteVolume': this.safeNumber2(ticker, 'a', 'v'),
1902
1902
  'info': ticker,
1903
1903
  }, market);
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, MarketMarginModes, 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, 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, RestrictedLocation, 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.8.2";
7
+ declare const version = "4.9.0";
8
8
  import abantether from './src/abantether.js';
9
9
  import afratether from './src/afratether.js';
10
10
  import alpaca from './src/alpaca.js';
@@ -38,6 +38,7 @@ import bitso from './src/bitso.js';
38
38
  import bitstamp from './src/bitstamp.js';
39
39
  import bitteam from './src/bitteam.js';
40
40
  import bittrade from './src/bittrade.js';
41
+ import bitunix from './src/bitunix.js';
41
42
  import bitvavo from './src/bitvavo.js';
42
43
  import blockchaincom from './src/blockchaincom.js';
43
44
  import blofin from './src/blofin.js';
@@ -247,6 +248,7 @@ declare const exchanges: {
247
248
  bitstamp: typeof bitstamp;
248
249
  bitteam: typeof bitteam;
249
250
  bittrade: typeof bittrade;
251
+ bitunix: typeof bitunix;
250
252
  bitvavo: typeof bitvavo;
251
253
  blockchaincom: typeof blockchaincom;
252
254
  blofin: typeof blofin;
@@ -539,6 +541,7 @@ declare const ccxt: {
539
541
  bitstamp: typeof bitstamp;
540
542
  bitteam: typeof bitteam;
541
543
  bittrade: typeof bittrade;
544
+ bitunix: typeof bitunix;
542
545
  bitvavo: typeof bitvavo;
543
546
  blockchaincom: typeof blockchaincom;
544
547
  blofin: typeof blofin;
@@ -642,5 +645,5 @@ declare const ccxt: {
642
645
  zaif: typeof zaif;
643
646
  zonda: typeof zonda;
644
647
  } & typeof functions & typeof errors;
645
- export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, RestrictedLocation, 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, abantether, afratether, alpaca, apex, arzinja, arzplus, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit24, bit2c, bitbank, bitbns, bitfinex, bitflyer, bitget, bithumb, bitimen, bitir, bitmart, bitmex, bitopro, bitpin, bitrue, bitso, bitstamp, bitteam, bittrade, bitvavo, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, cex, coinbase, coinbaseadvanced, coinbaseexchange, coinbaseinternational, coincatch, coincheck, coinex, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, cryptomus, defx, delta, deribit, derive, digifinex, ellipx, eterex, excoino, exir, exmo, exnovin, farhadexchange, fmfwio, foxbit, gate, gateio, gemini, hashkey, hibachi, hitbtc, hitobit, hollaex, htx, huobi, hyperliquid, independentreserve, indodax, jibitex, kcex, kraken, krakenfutures, kucoin, kucoinfutures, latoken, lbank, luno, mercado, mexc, modetrade, myokx, ndax, nobitex, novadax, oceanex, okcoin, okexchange, okx, okxus, ompfinex, onetrading, oxfun, p2b, paradex, paymium, phemex, poloniex, probit, ramzinex, sarmayex, sarrafex, tabdeal, tetherland, timex, tokocrypto, toobit, tradeogre, twox, ubitex, upbit, vertex, wallex, wavesexchange, whitebit, woo, woofipro, xt, yobit, zaif, zonda, };
648
+ export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, RestrictedLocation, 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, abantether, afratether, alpaca, apex, arzinja, arzplus, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit24, bit2c, bitbank, bitbns, bitfinex, bitflyer, bitget, bithumb, bitimen, bitir, bitmart, bitmex, bitopro, bitpin, bitrue, bitso, bitstamp, bitteam, bittrade, bitunix, bitvavo, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, cex, coinbase, coinbaseadvanced, coinbaseexchange, coinbaseinternational, coincatch, coincheck, coinex, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, cryptomus, defx, delta, deribit, derive, digifinex, ellipx, eterex, excoino, exir, exmo, exnovin, farhadexchange, fmfwio, foxbit, gate, gateio, gemini, hashkey, hibachi, hitbtc, hitobit, hollaex, htx, huobi, hyperliquid, independentreserve, indodax, jibitex, kcex, kraken, krakenfutures, kucoin, kucoinfutures, latoken, lbank, luno, mercado, mexc, modetrade, myokx, ndax, nobitex, novadax, oceanex, okcoin, okexchange, okx, okxus, ompfinex, onetrading, oxfun, p2b, paradex, paymium, phemex, poloniex, probit, ramzinex, sarmayex, sarrafex, tabdeal, tetherland, timex, tokocrypto, toobit, tradeogre, twox, ubitex, upbit, vertex, wallex, wavesexchange, whitebit, woo, woofipro, xt, yobit, zaif, zonda, };
646
649
  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, RestrictedLocation, 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.8.2';
41
+ const version = '4.9.0';
42
42
  Exchange.ccxtVersion = version;
43
43
  //-----------------------------------------------------------------------------
44
44
  import abantether from './src/abantether.js';
@@ -74,6 +74,7 @@ import bitso from './src/bitso.js';
74
74
  import bitstamp from './src/bitstamp.js';
75
75
  import bitteam from './src/bitteam.js';
76
76
  import bittrade from './src/bittrade.js';
77
+ import bitunix from './src/bitunix.js';
77
78
  import bitvavo from './src/bitvavo.js';
78
79
  import blockchaincom from './src/blockchaincom.js';
79
80
  import blofin from './src/blofin.js';
@@ -284,6 +285,7 @@ const exchanges = {
284
285
  'bitstamp': bitstamp,
285
286
  'bitteam': bitteam,
286
287
  'bittrade': bittrade,
288
+ 'bitunix': bitunix,
287
289
  'bitvavo': bitvavo,
288
290
  'blockchaincom': blockchaincom,
289
291
  'blofin': blofin,
@@ -474,6 +476,6 @@ pro.exchanges = Object.keys(pro);
474
476
  pro['Exchange'] = Exchange; // now the same for rest and ts
475
477
  //-----------------------------------------------------------------------------
476
478
  const ccxt = Object.assign({ version, Exchange, Precise, 'exchanges': Object.keys(exchanges), 'pro': pro }, exchanges, functions, errors);
477
- export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, RestrictedLocation, 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, abantether, afratether, alpaca, apex, arzinja, arzplus, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit24, bit2c, bitbank, bitbns, bitfinex, bitflyer, bitget, bithumb, bitimen, bitir, bitmart, bitmex, bitopro, bitpin, bitrue, bitso, bitstamp, bitteam, bittrade, bitvavo, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, cex, coinbase, coinbaseadvanced, coinbaseexchange, coinbaseinternational, coincatch, coincheck, coinex, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, cryptomus, defx, delta, deribit, derive, digifinex, ellipx, eterex, excoino, exir, exmo, exnovin, farhadexchange, fmfwio, foxbit, gate, gateio, gemini, hashkey, hibachi, hitbtc, hitobit, hollaex, htx, huobi, hyperliquid, independentreserve, indodax, jibitex, kcex, kraken, krakenfutures, kucoin, kucoinfutures, latoken, lbank, luno, mercado, mexc, modetrade, myokx, ndax, nobitex, novadax, oceanex, okcoin, okexchange, okx, okxus, ompfinex, onetrading, oxfun, p2b, paradex, paymium, phemex, poloniex, probit, ramzinex, sarmayex, sarrafex, tabdeal, tetherland, timex, tokocrypto, toobit, tradeogre, twox, ubitex, upbit, vertex, wallex, wavesexchange, whitebit, woo, woofipro, xt, yobit, zaif, zonda, };
479
+ export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, RestrictedLocation, 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, abantether, afratether, alpaca, apex, arzinja, arzplus, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit24, bit2c, bitbank, bitbns, bitfinex, bitflyer, bitget, bithumb, bitimen, bitir, bitmart, bitmex, bitopro, bitpin, bitrue, bitso, bitstamp, bitteam, bittrade, bitunix, bitvavo, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, cex, coinbase, coinbaseadvanced, coinbaseexchange, coinbaseinternational, coincatch, coincheck, coinex, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, cryptomus, defx, delta, deribit, derive, digifinex, ellipx, eterex, excoino, exir, exmo, exnovin, farhadexchange, fmfwio, foxbit, gate, gateio, gemini, hashkey, hibachi, hitbtc, hitobit, hollaex, htx, huobi, hyperliquid, independentreserve, indodax, jibitex, kcex, kraken, krakenfutures, kucoin, kucoinfutures, latoken, lbank, luno, mercado, mexc, modetrade, myokx, ndax, nobitex, novadax, oceanex, okcoin, okexchange, okx, okxus, ompfinex, onetrading, oxfun, p2b, paradex, paymium, phemex, poloniex, probit, ramzinex, sarmayex, sarrafex, tabdeal, tetherland, timex, tokocrypto, toobit, tradeogre, twox, ubitex, upbit, vertex, wallex, wavesexchange, whitebit, woo, woofipro, xt, yobit, zaif, zonda, };
478
480
  export default ccxt;
479
481
  //-----------------------------------------------------------------------------
@@ -0,0 +1,9 @@
1
+ import { implicitReturnType } from '../base/types.js';
2
+ import { Exchange as _Exchange } from '../base/Exchange.js';
3
+ interface Exchange {
4
+ publicGetApiSpotV1CommonCoinPairList(params?: {}): Promise<implicitReturnType>;
5
+ publicGetWebApiV1CommonTickers(params?: {}): Promise<implicitReturnType>;
6
+ }
7
+ declare abstract class Exchange extends _Exchange {
8
+ }
9
+ export default Exchange;
@@ -0,0 +1,11 @@
1
+ // ----------------------------------------------------------------------------
2
+
3
+ // PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
4
+ // https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
5
+ // EDIT THE CORRESPONDENT .ts FILE INSTEAD
6
+
7
+ // -------------------------------------------------------------------------------
8
+ import { Exchange as _Exchange } from '../base/Exchange.js';
9
+ class Exchange extends _Exchange {
10
+ }
11
+ export default Exchange;
@@ -252,7 +252,7 @@ export default class Exchange {
252
252
  outputLen: number;
253
253
  blockLen: number;
254
254
  create(): import("../static_dependencies/noble-hashes/utils.js").Hash<import("../static_dependencies/noble-hashes/utils.js").Hash<any>>;
255
- }, digest?: "hex" | "base64" | "binary") => any;
255
+ }, digest?: "binary" | "hex" | "base64") => any;
256
256
  arrayConcat: (a: any[], b: any[]) => any[];
257
257
  encode: (str: string) => Uint8Array;
258
258
  urlencode: (object: object, sort?: boolean) => string;
@@ -261,7 +261,7 @@ export default class Exchange {
261
261
  outputLen: number;
262
262
  blockLen: number;
263
263
  create(): import("../static_dependencies/noble-hashes/utils.js").Hash<import("../static_dependencies/noble-hashes/utils.js").Hash<any>>;
264
- }, digest?: "hex" | "base64" | "binary") => any;
264
+ }, digest?: "binary" | "hex" | "base64") => any;
265
265
  numberToString: typeof functions.numberToString;
266
266
  parseTimeframe: (timeframe: string) => number;
267
267
  safeInteger2: (o: any, k1: IndexType, k2: IndexType, $default?: number) => number;
@@ -0,0 +1,21 @@
1
+ import Exchange from './abstract/bitunix.js';
2
+ import { Market, Strings, Ticker, Tickers } from './base/types.js';
3
+ /**
4
+ * @class bitunix
5
+ * @augments Exchange
6
+ * @description Set rateLimit to 1000 if fully verified
7
+ */
8
+ export default class bitunix extends Exchange {
9
+ describe(): any;
10
+ fetchMarkets(params?: {}): Promise<Market[]>;
11
+ parseMarket(market: any): Market;
12
+ fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
13
+ fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
14
+ parseTicker(ticker: any, market?: Market): Ticker;
15
+ sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
16
+ url: string;
17
+ method: string;
18
+ body: any;
19
+ headers: any;
20
+ };
21
+ }