ccxt-ir 4.22.0 → 4.23.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
@@ -158,6 +158,7 @@ var ramzinex = require('./src/ramzinex.js');
158
158
  var saraf = require('./src/saraf.js');
159
159
  var sarmayex = require('./src/sarmayex.js');
160
160
  var sarrafex = require('./src/sarrafex.js');
161
+ var swapwallet = require('./src/swapwallet.js');
161
162
  var tabdeal = require('./src/tabdeal.js');
162
163
  var talaavan = require('./src/talaavan.js');
163
164
  var talapp = require('./src/talapp.js');
@@ -263,7 +264,7 @@ var xt$1 = require('./src/pro/xt.js');
263
264
 
264
265
  //-----------------------------------------------------------------------------
265
266
  // this is updated by vss.js when building
266
- const version = '4.22.0';
267
+ const version = '4.23.0';
267
268
  Exchange["default"].ccxtVersion = version;
268
269
  const exchanges = {
269
270
  'abantether': abantether["default"],
@@ -412,6 +413,7 @@ const exchanges = {
412
413
  'saraf': saraf["default"],
413
414
  'sarmayex': sarmayex["default"],
414
415
  'sarrafex': sarrafex["default"],
416
+ 'swapwallet': swapwallet["default"],
415
417
  'tabdeal': tabdeal["default"],
416
418
  'talaavan': talaavan["default"],
417
419
  'talapp': talapp["default"],
@@ -714,6 +716,7 @@ exports.ramzinex = ramzinex["default"];
714
716
  exports.saraf = saraf["default"];
715
717
  exports.sarmayex = sarmayex["default"];
716
718
  exports.sarrafex = sarrafex["default"];
719
+ exports.swapwallet = swapwallet["default"];
717
720
  exports.tabdeal = tabdeal["default"];
718
721
  exports.talaavan = talaavan["default"];
719
722
  exports.talapp = talapp["default"];
@@ -0,0 +1,219 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var Exchange = require('./base/Exchange.js');
6
+
7
+ // ----------------------------------------------------------------------------
8
+ // ---------------------------------------------------------------------------
9
+ /**
10
+ * @class swapwallet
11
+ * @augments Exchange
12
+ */
13
+ class swapwallet extends Exchange["default"] {
14
+ describe() {
15
+ return this.deepExtend(super.describe(), {
16
+ 'id': 'swapwallet',
17
+ 'name': 'Swapwallet',
18
+ 'countries': ['IR'],
19
+ 'rateLimit': 1000,
20
+ 'version': 'v2',
21
+ 'certified': false,
22
+ 'pro': false,
23
+ 'has': {
24
+ 'CORS': undefined,
25
+ 'spot': false,
26
+ 'margin': false,
27
+ 'swap': false,
28
+ 'future': false,
29
+ 'option': false,
30
+ 'fetchMarkets': true,
31
+ 'fetchTicker': true,
32
+ 'fetchTickers': true,
33
+ 'otc': true,
34
+ },
35
+ 'options': {
36
+ 'defaultType': 'otc',
37
+ },
38
+ 'urls': {
39
+ 'api': {
40
+ 'public': 'https://swapwallet.app/api/v2',
41
+ },
42
+ 'www': 'https://swapwallet.app',
43
+ 'doc': 'https://swapwallet.app/api/v2/market/crypto/stats',
44
+ },
45
+ 'api': {
46
+ 'public': {
47
+ 'get': {
48
+ 'market/crypto/stats': 1,
49
+ },
50
+ },
51
+ },
52
+ });
53
+ }
54
+ async fetchMarkets(params = {}) {
55
+ /**
56
+ * @method
57
+ * @name swapwallet#fetchMarkets
58
+ * @description retrieves all OTC markets
59
+ * @see https://swapwallet.app/api/v2/market/crypto/stats
60
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
61
+ * @returns {object[]} an array of market structures
62
+ */
63
+ const response = await this.publicGetMarketCryptoStats(params);
64
+ const markets = this.safeDict(response, 'result', {});
65
+ const ids = Object.keys(markets);
66
+ const result = [];
67
+ for (let i = 0; i < ids.length; i++) {
68
+ const id = ids[i];
69
+ result.push(this.parseMarket(this.extend(markets[id], { 'id': id })));
70
+ }
71
+ return result;
72
+ }
73
+ parseMarket(market) {
74
+ // {
75
+ // "source": "USOON",
76
+ // "destination": "USDT",
77
+ // "marketData": {
78
+ // "bestSell": "165.72",
79
+ // "bestBuy": "162.43",
80
+ // "latestPrice": "164.08",
81
+ // "dayChange": "2.98",
82
+ // "volume24h": "3753.99"
83
+ // }
84
+ // }
85
+ const baseId = this.safeString(market, 'source');
86
+ const quoteId = this.safeString(market, 'destination');
87
+ const base = this.safeCurrencyCode(baseId);
88
+ const quote = this.safeCurrencyCode(quoteId);
89
+ const id = this.safeString(market, 'id', baseId + '-' + quoteId);
90
+ return {
91
+ 'id': id,
92
+ 'symbol': base + '/' + quote,
93
+ 'base': base,
94
+ 'quote': quote,
95
+ 'settle': undefined,
96
+ 'baseId': baseId,
97
+ 'quoteId': quoteId,
98
+ 'settleId': undefined,
99
+ 'type': 'otc',
100
+ 'spot': false,
101
+ 'margin': false,
102
+ 'swap': false,
103
+ 'future': false,
104
+ 'option': false,
105
+ 'active': undefined,
106
+ 'contract': false,
107
+ 'linear': undefined,
108
+ 'inverse': undefined,
109
+ 'contractSize': undefined,
110
+ 'expiry': undefined,
111
+ 'expiryDatetime': undefined,
112
+ 'strike': undefined,
113
+ 'optionType': undefined,
114
+ 'precision': {
115
+ 'amount': undefined,
116
+ 'price': undefined,
117
+ },
118
+ 'limits': {
119
+ 'leverage': {
120
+ 'min': undefined,
121
+ 'max': undefined,
122
+ },
123
+ 'amount': {
124
+ 'min': undefined,
125
+ 'max': undefined,
126
+ },
127
+ 'price': {
128
+ 'min': undefined,
129
+ 'max': undefined,
130
+ },
131
+ 'cost': {
132
+ 'min': undefined,
133
+ 'max': undefined,
134
+ },
135
+ },
136
+ 'created': undefined,
137
+ 'info': market,
138
+ };
139
+ }
140
+ async fetchTickers(symbols = undefined, params = {}) {
141
+ /**
142
+ * @method
143
+ * @name swapwallet#fetchTickers
144
+ * @description fetches 24 hour price statistics for multiple OTC markets
145
+ * @see https://swapwallet.app/api/v2/market/crypto/stats
146
+ * @param {string[]} [symbols] unified symbols, all markets are returned if undefined
147
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
148
+ * @returns {object} a dictionary of ticker structures indexed by symbol
149
+ */
150
+ await this.loadMarkets();
151
+ symbols = this.marketSymbols(symbols);
152
+ const response = await this.publicGetMarketCryptoStats(params);
153
+ const tickers = this.safeDict(response, 'result', {});
154
+ const ids = Object.keys(tickers);
155
+ const result = {};
156
+ for (let i = 0; i < ids.length; i++) {
157
+ const id = ids[i];
158
+ const ticker = this.parseTicker(tickers[id]);
159
+ result[ticker['symbol']] = ticker;
160
+ }
161
+ return this.filterByArrayTickers(result, 'symbol', symbols);
162
+ }
163
+ async fetchTicker(symbol, params = {}) {
164
+ /**
165
+ * @method
166
+ * @name swapwallet#fetchTicker
167
+ * @description fetches 24 hour price statistics for a single OTC market
168
+ * @see https://swapwallet.app/api/v2/market/crypto/stats
169
+ * @param {string} symbol unified market symbol
170
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
171
+ * @returns {object} a ticker structure
172
+ */
173
+ await this.loadMarkets();
174
+ const market = this.market(symbol);
175
+ const tickers = await this.fetchTickers([market['symbol']], params);
176
+ return tickers[market['symbol']];
177
+ }
178
+ parseTicker(ticker, market = undefined) {
179
+ const baseId = this.safeString(ticker, 'source');
180
+ const quoteId = this.safeString(ticker, 'destination');
181
+ const marketId = baseId + '-' + quoteId;
182
+ const symbol = this.safeSymbol(marketId, market, '-', 'otc');
183
+ const data = this.safeDict(ticker, 'marketData', {});
184
+ const last = this.safeString(data, 'latestPrice');
185
+ return this.safeTicker({
186
+ 'symbol': symbol,
187
+ 'timestamp': undefined,
188
+ 'datetime': undefined,
189
+ 'high': undefined,
190
+ 'low': undefined,
191
+ 'bid': this.safeString(data, 'bestBuy'),
192
+ 'bidVolume': undefined,
193
+ 'ask': this.safeString(data, 'bestSell'),
194
+ 'askVolume': undefined,
195
+ 'vwap': undefined,
196
+ 'open': undefined,
197
+ 'close': last,
198
+ 'last': last,
199
+ 'previousClose': undefined,
200
+ 'change': undefined,
201
+ 'percentage': this.safeString(data, 'dayChange'),
202
+ 'average': undefined,
203
+ 'baseVolume': this.safeString(data, 'volume24h'),
204
+ 'quoteVolume': undefined,
205
+ 'info': ticker,
206
+ }, market);
207
+ }
208
+ sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
209
+ const query = this.omit(params, this.extractParams(path));
210
+ let url = this.urls['api'][api] + '/' + this.implodeParams(path, params);
211
+ if (Object.keys(query).length) {
212
+ url += '?' + this.urlencode(query);
213
+ }
214
+ headers = this.extend({ 'Content-Type': 'application/json' }, headers);
215
+ return { 'url': url, 'method': method, 'body': body, 'headers': headers };
216
+ }
217
+ }
218
+
219
+ exports["default"] = swapwallet;
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.22.0";
7
+ declare const version = "4.23.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';
@@ -151,6 +151,7 @@ import ramzinex from './src/ramzinex.js';
151
151
  import saraf from './src/saraf.js';
152
152
  import sarmayex from './src/sarmayex.js';
153
153
  import sarrafex from './src/sarrafex.js';
154
+ import swapwallet from './src/swapwallet.js';
154
155
  import tabdeal from './src/tabdeal.js';
155
156
  import talaavan from './src/talaavan.js';
156
157
  import talapp from './src/talapp.js';
@@ -400,6 +401,7 @@ declare const exchanges: {
400
401
  saraf: typeof saraf;
401
402
  sarmayex: typeof sarmayex;
402
403
  sarrafex: typeof sarrafex;
404
+ swapwallet: typeof swapwallet;
403
405
  tabdeal: typeof tabdeal;
404
406
  talaavan: typeof talaavan;
405
407
  talapp: typeof talapp;
@@ -732,6 +734,7 @@ declare const ccxt: {
732
734
  saraf: typeof saraf;
733
735
  sarmayex: typeof sarmayex;
734
736
  sarrafex: typeof sarrafex;
737
+ swapwallet: typeof swapwallet;
735
738
  tabdeal: typeof tabdeal;
736
739
  talaavan: typeof talaavan;
737
740
  talapp: typeof talapp;
@@ -762,5 +765,5 @@ declare const ccxt: {
762
765
  zarpin: typeof zarpin;
763
766
  zonda: typeof zonda;
764
767
  } & typeof functions & typeof errors;
765
- 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, ariomex, arzinja, arzplus, asacoine, ascendex, asretether, baazar, bequant, bidarz, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit24, bit2c, bitbank, bitbarg, bitbns, bitfinex, bitflyer, bitget, bithumb, bitimen, bitir, bitmart, bitmex, bitopro, bitpin, bitrue, bitso, bitstamp, bitteam, bittrade, bitunix, bitvavo, bitwana, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, bydfi, cafearz, cex, changefa, coinbase, coinbaseadvanced, coinbaseexchange, coinbaseinternational, coincatch, coincheck, coinex, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, cryptomus, daric, defx, delta, deribit, derive, digifinex, digikalagold, ellipx, eterex, excoino, exino, exir, exmo, exnovin, farhadexchange, fmfwio, foxbit, gate, gateio, gemini, gerami, goldika, goldis, hamrahgold, hamtapay, hashkey, hibachi, hitbtc, hitobit, hollaex, htx, huobi, hyperliquid, independentreserve, indodax, iranexchange, jibitex, kcex, kifpoolme, kraken, krakenfutures, kucoin, kucoinfutures, latoken, lbank, luno, mazdax, melligold, mercado, mexc, milligold, modetrade, myokx, ndax, nobitex, novadax, oceanex, okcoin, okexchange, okx, okxus, ompfinex, onetrading, ourbit, oxfun, p2b, paradex, paymium, phemex, pingi, poloniex, pooleno, poulyar, probit, raastin, ramzinex, saraf, sarmayex, sarrafex, tabdeal, talaavan, talapp, talasea, technogold, tehran_exchange, tetherland, timex, tokocrypto, toobit, tradeogre, twox, ubitex, upbit, vertex, wallex, wallgold, wavesexchange, whitebit, woo, woofipro, xt, yobit, zaif, zarafza, zarminex, zarniv, zarpin, zonda, };
768
+ 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, ariomex, arzinja, arzplus, asacoine, ascendex, asretether, baazar, bequant, bidarz, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit24, bit2c, bitbank, bitbarg, bitbns, bitfinex, bitflyer, bitget, bithumb, bitimen, bitir, bitmart, bitmex, bitopro, bitpin, bitrue, bitso, bitstamp, bitteam, bittrade, bitunix, bitvavo, bitwana, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, bydfi, cafearz, cex, changefa, coinbase, coinbaseadvanced, coinbaseexchange, coinbaseinternational, coincatch, coincheck, coinex, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, cryptomus, daric, defx, delta, deribit, derive, digifinex, digikalagold, ellipx, eterex, excoino, exino, exir, exmo, exnovin, farhadexchange, fmfwio, foxbit, gate, gateio, gemini, gerami, goldika, goldis, hamrahgold, hamtapay, hashkey, hibachi, hitbtc, hitobit, hollaex, htx, huobi, hyperliquid, independentreserve, indodax, iranexchange, jibitex, kcex, kifpoolme, kraken, krakenfutures, kucoin, kucoinfutures, latoken, lbank, luno, mazdax, melligold, mercado, mexc, milligold, modetrade, myokx, ndax, nobitex, novadax, oceanex, okcoin, okexchange, okx, okxus, ompfinex, onetrading, ourbit, oxfun, p2b, paradex, paymium, phemex, pingi, poloniex, pooleno, poulyar, probit, raastin, ramzinex, saraf, sarmayex, sarrafex, swapwallet, tabdeal, talaavan, talapp, talasea, technogold, tehran_exchange, tetherland, timex, tokocrypto, toobit, tradeogre, twox, ubitex, upbit, vertex, wallex, wallgold, wavesexchange, whitebit, woo, woofipro, xt, yobit, zaif, zarafza, zarminex, zarniv, zarpin, zonda, };
766
769
  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.22.0';
41
+ const version = '4.23.0';
42
42
  Exchange.ccxtVersion = version;
43
43
  //-----------------------------------------------------------------------------
44
44
  import abantether from './src/abantether.js';
@@ -187,6 +187,7 @@ import ramzinex from './src/ramzinex.js';
187
187
  import saraf from './src/saraf.js';
188
188
  import sarmayex from './src/sarmayex.js';
189
189
  import sarrafex from './src/sarrafex.js';
190
+ import swapwallet from './src/swapwallet.js';
190
191
  import tabdeal from './src/tabdeal.js';
191
192
  import talaavan from './src/talaavan.js';
192
193
  import talapp from './src/talapp.js';
@@ -437,6 +438,7 @@ const exchanges = {
437
438
  'saraf': saraf,
438
439
  'sarmayex': sarmayex,
439
440
  'sarrafex': sarrafex,
441
+ 'swapwallet': swapwallet,
440
442
  'tabdeal': tabdeal,
441
443
  'talaavan': talaavan,
442
444
  'talapp': talapp,
@@ -554,6 +556,6 @@ pro.exchanges = Object.keys(pro);
554
556
  pro['Exchange'] = Exchange; // now the same for rest and ts
555
557
  //-----------------------------------------------------------------------------
556
558
  const ccxt = Object.assign({ version, Exchange, Precise, 'exchanges': Object.keys(exchanges), 'pro': pro }, exchanges, functions, errors);
557
- 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, ariomex, arzinja, arzplus, asacoine, ascendex, asretether, baazar, bequant, bidarz, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit24, bit2c, bitbank, bitbarg, bitbns, bitfinex, bitflyer, bitget, bithumb, bitimen, bitir, bitmart, bitmex, bitopro, bitpin, bitrue, bitso, bitstamp, bitteam, bittrade, bitunix, bitvavo, bitwana, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, bydfi, cafearz, cex, changefa, coinbase, coinbaseadvanced, coinbaseexchange, coinbaseinternational, coincatch, coincheck, coinex, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, cryptomus, daric, defx, delta, deribit, derive, digifinex, digikalagold, ellipx, eterex, excoino, exino, exir, exmo, exnovin, farhadexchange, fmfwio, foxbit, gate, gateio, gemini, gerami, goldika, goldis, hamrahgold, hamtapay, hashkey, hibachi, hitbtc, hitobit, hollaex, htx, huobi, hyperliquid, independentreserve, indodax, iranexchange, jibitex, kcex, kifpoolme, kraken, krakenfutures, kucoin, kucoinfutures, latoken, lbank, luno, mazdax, melligold, mercado, mexc, milligold, modetrade, myokx, ndax, nobitex, novadax, oceanex, okcoin, okexchange, okx, okxus, ompfinex, onetrading, ourbit, oxfun, p2b, paradex, paymium, phemex, pingi, poloniex, pooleno, poulyar, probit, raastin, ramzinex, saraf, sarmayex, sarrafex, tabdeal, talaavan, talapp, talasea, technogold, tehran_exchange, tetherland, timex, tokocrypto, toobit, tradeogre, twox, ubitex, upbit, vertex, wallex, wallgold, wavesexchange, whitebit, woo, woofipro, xt, yobit, zaif, zarafza, zarminex, zarniv, zarpin, zonda, };
559
+ 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, ariomex, arzinja, arzplus, asacoine, ascendex, asretether, baazar, bequant, bidarz, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit24, bit2c, bitbank, bitbarg, bitbns, bitfinex, bitflyer, bitget, bithumb, bitimen, bitir, bitmart, bitmex, bitopro, bitpin, bitrue, bitso, bitstamp, bitteam, bittrade, bitunix, bitvavo, bitwana, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, bydfi, cafearz, cex, changefa, coinbase, coinbaseadvanced, coinbaseexchange, coinbaseinternational, coincatch, coincheck, coinex, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, cryptomus, daric, defx, delta, deribit, derive, digifinex, digikalagold, ellipx, eterex, excoino, exino, exir, exmo, exnovin, farhadexchange, fmfwio, foxbit, gate, gateio, gemini, gerami, goldika, goldis, hamrahgold, hamtapay, hashkey, hibachi, hitbtc, hitobit, hollaex, htx, huobi, hyperliquid, independentreserve, indodax, iranexchange, jibitex, kcex, kifpoolme, kraken, krakenfutures, kucoin, kucoinfutures, latoken, lbank, luno, mazdax, melligold, mercado, mexc, milligold, modetrade, myokx, ndax, nobitex, novadax, oceanex, okcoin, okexchange, okx, okxus, ompfinex, onetrading, ourbit, oxfun, p2b, paradex, paymium, phemex, pingi, poloniex, pooleno, poulyar, probit, raastin, ramzinex, saraf, sarmayex, sarrafex, swapwallet, tabdeal, talaavan, talapp, talasea, technogold, tehran_exchange, tetherland, timex, tokocrypto, toobit, tradeogre, twox, ubitex, upbit, vertex, wallex, wallgold, wavesexchange, whitebit, woo, woofipro, xt, yobit, zaif, zarafza, zarminex, zarniv, zarpin, zonda, };
558
560
  export default ccxt;
559
561
  //-----------------------------------------------------------------------------
@@ -0,0 +1,8 @@
1
+ import { implicitReturnType } from '../base/types.js';
2
+ import { Exchange as _Exchange } from '../base/Exchange.js';
3
+ interface Exchange {
4
+ publicGetMarketCryptoStats(params?: {}): Promise<implicitReturnType>;
5
+ }
6
+ declare abstract class Exchange extends _Exchange {
7
+ }
8
+ 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;
@@ -311,7 +311,7 @@ export default class coinbaseexchange extends Exchange {
311
311
  * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
312
312
  */
313
313
  fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
314
- parseTransactionStatus(transaction: any): "canceled" | "pending" | "ok" | "failed";
314
+ parseTransactionStatus(transaction: any): "pending" | "ok" | "failed" | "canceled";
315
315
  parseTransaction(transaction: Dict, currency?: Currency): Transaction;
316
316
  /**
317
317
  * @method
@@ -1,8 +1,2 @@
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
1
  export = $root;
8
2
  declare var $root: {};
@@ -5,7 +5,7 @@ export function deflate(data: any, opts: any, cb: any): () => void;
5
5
  * @param opts The compression options
6
6
  * @returns The deflated version of the data
7
7
  */
8
- export function deflateSync(data: any, opts: any): Uint8Array | Uint16Array | Uint32Array;
8
+ export function deflateSync(data: any, opts: any): Uint8Array | Uint32Array | Uint16Array;
9
9
  export function inflate(data: any, opts: any, cb: any): () => void;
10
10
  /**
11
11
  * Expands DEFLATE data with no wrapper
@@ -21,7 +21,7 @@ export function gzip(data: any, opts: any, cb: any): () => void;
21
21
  * @param opts The compression options
22
22
  * @returns The gzipped version of the data
23
23
  */
24
- export function gzipSync(data: any, opts: any): Uint8Array | Uint16Array | Uint32Array;
24
+ export function gzipSync(data: any, opts: any): Uint8Array | Uint32Array | Uint16Array;
25
25
  export function gunzip(data: any, opts: any, cb: any): () => void;
26
26
  /**
27
27
  * Expands GZIP data
@@ -37,7 +37,7 @@ export function zlib(data: any, opts: any, cb: any): () => void;
37
37
  * @param opts The compression options
38
38
  * @returns The zlib-compressed version of the data
39
39
  */
40
- export function zlibSync(data: any, opts: any): Uint8Array | Uint16Array | Uint32Array;
40
+ export function zlibSync(data: any, opts: any): Uint8Array | Uint32Array | Uint16Array;
41
41
  export function unzlib(data: any, opts: any, cb: any): () => void;
42
42
  /**
43
43
  * Expands Zlib data
@@ -61,7 +61,7 @@ export function decompressSync(data: any, out: any): any;
61
61
  * not need to be true unless decoding a binary string.
62
62
  * @returns The string encoded in UTF-8/Latin-1 binary
63
63
  */
64
- export function strToU8(str: any, latin1: any): Uint8Array | Uint16Array | Uint32Array;
64
+ export function strToU8(str: any, latin1: any): Uint8Array | Uint32Array | Uint16Array;
65
65
  /**
66
66
  * Converts a Uint8Array to a string
67
67
  * @param dat The data to decode to string
@@ -69,7 +69,7 @@ export function strToU8(str: any, latin1: any): Uint8Array | Uint16Array | Uint3
69
69
  * not need to be true unless encoding to binary string.
70
70
  * @returns The original UTF-8/Latin-1 string
71
71
  */
72
- export function strFromU8(dat: any, latin1: any): string | Uint8Array | Uint16Array | Uint32Array;
72
+ export function strFromU8(dat: any, latin1: any): string | Uint8Array | Uint32Array | Uint16Array;
73
73
  export function zip(data: any, opts: any, cb: any): () => void;
74
74
  /**
75
75
  * Synchronously creates a ZIP file. Prefer using `zip` for better performance
@@ -15,7 +15,7 @@ export declare class BigInteger {
15
15
  protected intValue(): number;
16
16
  protected byteValue(): number;
17
17
  protected shortValue(): number;
18
- protected signum(): 0 | 1 | -1;
18
+ protected signum(): 1 | 0 | -1;
19
19
  toByteArray(): number[];
20
20
  protected equals(a: BigInteger): boolean;
21
21
  protected min(a: BigInteger): BigInteger;
@@ -1,9 +1,3 @@
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
1
  declare const _default: string;
8
2
  export declare namespace formatters {
9
3
  function RFC1738(value: any): string;
@@ -1,9 +1,3 @@
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
1
  import formats = require("./formats.cjs");
8
2
  import parse = require("./parse.cjs");
9
3
  import stringify = require("./stringify.cjs");
@@ -1,8 +1,2 @@
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
1
  declare function _exports(str: any, opts: any): any;
8
2
  export = _exports;
@@ -1,8 +1,2 @@
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
1
  declare function _exports(object: any, opts: any): string;
8
2
  export = _exports;
@@ -1,9 +1,3 @@
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
1
  export function arrayToObject(source: any, options: any): any;
8
2
  export function assign(target: any, source: any): any;
9
3
  export function combine(a: any, b: any): any[];
@@ -1,5 +1,5 @@
1
1
  import { Abi, FunctionAbi, RawArgs } from '../../../types/index.js';
2
2
  import { AbiParserInterface } from './interface.js';
3
3
  export declare function createAbiParser(abi: Abi): AbiParserInterface;
4
- export declare function getAbiVersion(abi: Abi): 0 | 1 | 2;
4
+ export declare function getAbiVersion(abi: Abi): 1 | 0 | 2;
5
5
  export declare function isNoConstructorValid(method: string, argsCalldata: RawArgs, abiMethod?: FunctionAbi): boolean;
@@ -0,0 +1,20 @@
1
+ import Exchange from './base/Exchange.js';
2
+ import { Market, Strings, Ticker, Tickers } from './base/types.js';
3
+ /**
4
+ * @class swapwallet
5
+ * @augments Exchange
6
+ */
7
+ export default class swapwallet extends Exchange {
8
+ describe(): any;
9
+ fetchMarkets(params?: {}): Promise<Market[]>;
10
+ parseMarket(market: any): Market;
11
+ fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
12
+ fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
13
+ parseTicker(ticker: any, market?: Market): Ticker;
14
+ sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
15
+ url: string;
16
+ method: string;
17
+ body: any;
18
+ headers: any;
19
+ };
20
+ }