ccxt-ir 4.22.0 → 4.23.2
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 +3 -3
- package/dist/cjs/ccxt.js +4 -1
- package/dist/cjs/src/bitbarg.js +23 -4
- package/dist/cjs/src/swapwallet.js +219 -0
- package/js/ccxt.d.ts +5 -2
- package/js/ccxt.js +4 -2
- package/js/src/abstract/swapwallet.d.ts +8 -0
- package/js/src/abstract/swapwallet.js +11 -0
- package/js/src/base/Exchange.d.ts +2 -2
- package/js/src/bitbarg.js +23 -4
- package/js/src/coinbaseexchange.d.ts +1 -1
- package/js/src/protobuf/mexc/compiled.d.cts +0 -6
- package/js/src/static_dependencies/fflake/browser.d.ts +5 -5
- package/js/src/static_dependencies/jsencrypt/lib/asn1js/asn1.d.ts +2 -2
- package/js/src/static_dependencies/jsencrypt/lib/jsbn/jsbn.d.ts +1 -1
- package/js/src/static_dependencies/qs/formats.d.cts +0 -6
- package/js/src/static_dependencies/qs/index.d.cts +0 -6
- package/js/src/static_dependencies/qs/parse.d.cts +0 -6
- package/js/src/static_dependencies/qs/stringify.d.cts +0 -6
- package/js/src/static_dependencies/qs/utils.d.cts +0 -6
- package/js/src/static_dependencies/starknet/utils/calldata/parser/index.d.ts +1 -1
- package/js/src/swapwallet.d.ts +20 -0
- package/js/src/swapwallet.js +218 -0
- package/js/test.d.ts +1 -1
- package/js/test.js +15 -35
- package/package.json +1 -1
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.
|
|
267
|
+
const version = '4.23.2';
|
|
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"];
|
package/dist/cjs/src/bitbarg.js
CHANGED
|
@@ -126,7 +126,12 @@ class bitbarg extends bitbarg$1["default"] {
|
|
|
126
126
|
// "decimal": 8,
|
|
127
127
|
// "isFavorite": false,
|
|
128
128
|
const baseId = this.safeString(market, 'coin');
|
|
129
|
-
|
|
129
|
+
// Bitbarg reports USDT's price in IRT; all other currencies are
|
|
130
|
+
// quoted in USDT.
|
|
131
|
+
let quoteId = 'USDT';
|
|
132
|
+
if (baseId === 'USDT') {
|
|
133
|
+
quoteId = 'IRT';
|
|
134
|
+
}
|
|
130
135
|
const base = this.safeCurrencyCode(baseId);
|
|
131
136
|
const quote = this.safeCurrencyCode(quoteId);
|
|
132
137
|
const id = baseId + '/' + quoteId;
|
|
@@ -222,13 +227,19 @@ class bitbarg extends bitbarg$1["default"] {
|
|
|
222
227
|
};
|
|
223
228
|
const response = await this.publicGetApiV1Currencies(request);
|
|
224
229
|
const data = this.safeDict(response, 'result', {});
|
|
230
|
+
const meta = this.safeDict(data, 'meta', {});
|
|
231
|
+
const usdtPrice = this.safeFloat(meta, 'usdtPrice');
|
|
225
232
|
const items = this.safeList(data, 'items', []);
|
|
226
233
|
const result = {};
|
|
227
234
|
for (let i = 0; i < items.length; i++) {
|
|
228
235
|
const coinData = items[i];
|
|
229
236
|
const baseId = this.safeString(coinData, 'coin');
|
|
230
|
-
//
|
|
231
|
-
|
|
237
|
+
// All currencies are quoted in USDT except USDT itself, which is
|
|
238
|
+
// quoted in IRT by the API.
|
|
239
|
+
let quoteId = 'USDT';
|
|
240
|
+
if (baseId === 'USDT') {
|
|
241
|
+
quoteId = 'IRT';
|
|
242
|
+
}
|
|
232
243
|
const base = this.safeCurrencyCode(baseId);
|
|
233
244
|
const quote = this.safeCurrencyCode(quoteId);
|
|
234
245
|
const symbol = base + '/' + quote;
|
|
@@ -238,6 +249,9 @@ class bitbarg extends bitbarg$1["default"] {
|
|
|
238
249
|
'quoteId': quoteId,
|
|
239
250
|
'id': baseId + '/' + quoteId,
|
|
240
251
|
}, coinData);
|
|
252
|
+
if (baseId === 'USDT' && usdtPrice !== undefined) {
|
|
253
|
+
ticker['price'] = usdtPrice;
|
|
254
|
+
}
|
|
241
255
|
result[symbol] = this.parseTicker(ticker);
|
|
242
256
|
}
|
|
243
257
|
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
@@ -272,7 +286,12 @@ class bitbarg extends bitbarg$1["default"] {
|
|
|
272
286
|
// "chart": [...]
|
|
273
287
|
// }
|
|
274
288
|
const marketType = 'spot';
|
|
275
|
-
const
|
|
289
|
+
const baseId = this.safeString(ticker, 'coin');
|
|
290
|
+
let quoteId = 'USDT';
|
|
291
|
+
if (baseId === 'USDT') {
|
|
292
|
+
quoteId = 'IRT';
|
|
293
|
+
}
|
|
294
|
+
const marketId = baseId + '/' + quoteId;
|
|
276
295
|
const symbol = this.safeSymbol(marketId, market, undefined, marketType);
|
|
277
296
|
const last = this.safeFloat(ticker, 'price', 0);
|
|
278
297
|
const percentage = this.safeFloat(ticker, 'percent', 0);
|
|
@@ -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 = { 'Content-Type': 'application/json' };
|
|
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.
|
|
7
|
+
declare const version = "4.23.2";
|
|
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.
|
|
41
|
+
const version = '4.23.2';
|
|
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;
|
|
@@ -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?: "
|
|
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?: "
|
|
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;
|
package/js/src/bitbarg.js
CHANGED
|
@@ -127,7 +127,12 @@ export default class bitbarg extends Exchange {
|
|
|
127
127
|
// "decimal": 8,
|
|
128
128
|
// "isFavorite": false,
|
|
129
129
|
const baseId = this.safeString(market, 'coin');
|
|
130
|
-
|
|
130
|
+
// Bitbarg reports USDT's price in IRT; all other currencies are
|
|
131
|
+
// quoted in USDT.
|
|
132
|
+
let quoteId = 'USDT';
|
|
133
|
+
if (baseId === 'USDT') {
|
|
134
|
+
quoteId = 'IRT';
|
|
135
|
+
}
|
|
131
136
|
const base = this.safeCurrencyCode(baseId);
|
|
132
137
|
const quote = this.safeCurrencyCode(quoteId);
|
|
133
138
|
const id = baseId + '/' + quoteId;
|
|
@@ -223,13 +228,19 @@ export default class bitbarg extends Exchange {
|
|
|
223
228
|
};
|
|
224
229
|
const response = await this.publicGetApiV1Currencies(request);
|
|
225
230
|
const data = this.safeDict(response, 'result', {});
|
|
231
|
+
const meta = this.safeDict(data, 'meta', {});
|
|
232
|
+
const usdtPrice = this.safeFloat(meta, 'usdtPrice');
|
|
226
233
|
const items = this.safeList(data, 'items', []);
|
|
227
234
|
const result = {};
|
|
228
235
|
for (let i = 0; i < items.length; i++) {
|
|
229
236
|
const coinData = items[i];
|
|
230
237
|
const baseId = this.safeString(coinData, 'coin');
|
|
231
|
-
//
|
|
232
|
-
|
|
238
|
+
// All currencies are quoted in USDT except USDT itself, which is
|
|
239
|
+
// quoted in IRT by the API.
|
|
240
|
+
let quoteId = 'USDT';
|
|
241
|
+
if (baseId === 'USDT') {
|
|
242
|
+
quoteId = 'IRT';
|
|
243
|
+
}
|
|
233
244
|
const base = this.safeCurrencyCode(baseId);
|
|
234
245
|
const quote = this.safeCurrencyCode(quoteId);
|
|
235
246
|
const symbol = base + '/' + quote;
|
|
@@ -239,6 +250,9 @@ export default class bitbarg extends Exchange {
|
|
|
239
250
|
'quoteId': quoteId,
|
|
240
251
|
'id': baseId + '/' + quoteId,
|
|
241
252
|
}, coinData);
|
|
253
|
+
if (baseId === 'USDT' && usdtPrice !== undefined) {
|
|
254
|
+
ticker['price'] = usdtPrice;
|
|
255
|
+
}
|
|
242
256
|
result[symbol] = this.parseTicker(ticker);
|
|
243
257
|
}
|
|
244
258
|
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
@@ -273,7 +287,12 @@ export default class bitbarg extends Exchange {
|
|
|
273
287
|
// "chart": [...]
|
|
274
288
|
// }
|
|
275
289
|
const marketType = 'spot';
|
|
276
|
-
const
|
|
290
|
+
const baseId = this.safeString(ticker, 'coin');
|
|
291
|
+
let quoteId = 'USDT';
|
|
292
|
+
if (baseId === 'USDT') {
|
|
293
|
+
quoteId = 'IRT';
|
|
294
|
+
}
|
|
295
|
+
const marketId = baseId + '/' + quoteId;
|
|
277
296
|
const symbol = this.safeSymbol(marketId, market, undefined, marketType);
|
|
278
297
|
const last = this.safeFloat(ticker, 'price', 0);
|
|
279
298
|
const percentage = this.safeFloat(ticker, 'percent', 0);
|
|
@@ -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): "
|
|
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 |
|
|
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 |
|
|
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 |
|
|
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 |
|
|
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 |
|
|
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
|
|
@@ -12,7 +12,7 @@ export declare class Stream {
|
|
|
12
12
|
parseStringUTF(start: number, end: number): string;
|
|
13
13
|
parseStringBMP(start: number, end: number): string;
|
|
14
14
|
parseTime(start: number, end: number, shortYear: boolean): string;
|
|
15
|
-
parseInteger(start: number, end: number): string |
|
|
15
|
+
parseInteger(start: number, end: number): string | -1 | 0;
|
|
16
16
|
parseBitString(start: number, end: number, maxLength: number): string;
|
|
17
17
|
parseOctetString(start: number, end: number, maxLength: number): string;
|
|
18
18
|
parseOID(start: number, end: number, maxLength: number): string;
|
|
@@ -25,7 +25,7 @@ export declare class ASN1 {
|
|
|
25
25
|
private tag;
|
|
26
26
|
sub: ASN1[];
|
|
27
27
|
typeName(): string;
|
|
28
|
-
content(maxLength: number): string |
|
|
28
|
+
content(maxLength: number): string | -1 | 0;
|
|
29
29
|
toString(): string;
|
|
30
30
|
toPrettyString(indent: string): string;
|
|
31
31
|
posStart(): number;
|
|
@@ -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():
|
|
18
|
+
protected signum(): 1 | -1 | 0;
|
|
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;
|