ccxt-ir 4.9.32 → 4.10.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
@@ -19,6 +19,7 @@ var apex = require('./src/apex.js');
19
19
  var arzinja = require('./src/arzinja.js');
20
20
  var arzplus = require('./src/arzplus.js');
21
21
  var ascendex = require('./src/ascendex.js');
22
+ var asretether = require('./src/asretether.js');
22
23
  var bequant = require('./src/bequant.js');
23
24
  var bigone = require('./src/bigone.js');
24
25
  var binance = require('./src/binance.js');
@@ -235,7 +236,7 @@ var xt$1 = require('./src/pro/xt.js');
235
236
 
236
237
  //-----------------------------------------------------------------------------
237
238
  // this is updated by vss.js when building
238
- const version = '4.9.32';
239
+ const version = '4.10.0';
239
240
  Exchange["default"].ccxtVersion = version;
240
241
  const exchanges = {
241
242
  'abantether': abantether["default"],
@@ -245,6 +246,7 @@ const exchanges = {
245
246
  'arzinja': arzinja["default"],
246
247
  'arzplus': arzplus["default"],
247
248
  'ascendex': ascendex["default"],
249
+ 'asretether': asretether["default"],
248
250
  'bequant': bequant["default"],
249
251
  'bigone': bigone["default"],
250
252
  'binance': binance["default"],
@@ -519,6 +521,7 @@ exports.apex = apex["default"];
519
521
  exports.arzinja = arzinja["default"];
520
522
  exports.arzplus = arzplus["default"];
521
523
  exports.ascendex = ascendex["default"];
524
+ exports.asretether = asretether["default"];
522
525
  exports.bequant = bequant["default"];
523
526
  exports.bigone = bigone["default"];
524
527
  exports.binance = binance["default"];
@@ -1 +1 @@
1
- { "type": "commonjs" }
1
+ { "type": "commonjs" }
@@ -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,325 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var asretether$1 = require('./abstract/asretether.js');
6
+
7
+ // ----------------------------------------------------------------------------
8
+ // ---------------------------------------------------------------------------
9
+ /**
10
+ * @class asretether
11
+ * @augments Exchange
12
+ * @description Set rateLimit to 1000 if fully verified
13
+ */
14
+ class asretether extends asretether$1["default"] {
15
+ describe() {
16
+ return this.deepExtend(super.describe(), {
17
+ 'id': 'asretether',
18
+ 'name': 'Asretether',
19
+ 'countries': ['IR'],
20
+ 'rateLimit': 1000,
21
+ 'version': '2',
22
+ 'certified': false,
23
+ 'pro': false,
24
+ 'has': {
25
+ 'CORS': undefined,
26
+ 'spot': true,
27
+ 'margin': false,
28
+ 'swap': false,
29
+ 'future': false,
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': false,
67
+ 'fetchOpenInterestHistory': false,
68
+ 'fetchOpenOrders': false,
69
+ 'fetchOrder': false,
70
+ 'fetchOrderBook': false,
71
+ 'fetchOrders': false,
72
+ 'fetchOrderTrades': false,
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
+ 'otc': true,
83
+ 'setLeverage': false,
84
+ 'setMarginMode': false,
85
+ 'transfer': false,
86
+ 'withdraw': false,
87
+ },
88
+ 'comment': 'OTC market for USDT and other cryptocurrencies',
89
+ 'urls': {
90
+ 'logo': 'https://cdn.arz.digital/cr-odin/img/exchanges/asretether/64x64.png',
91
+ 'api': {
92
+ 'public': 'https://api.asretether.com',
93
+ },
94
+ 'www': 'https://asretether.com',
95
+ 'doc': [
96
+ 'https://api.asretether.com/docs',
97
+ ],
98
+ },
99
+ 'api': {
100
+ 'public': {
101
+ 'get': {
102
+ 'v2/market': 1,
103
+ },
104
+ },
105
+ },
106
+ 'fees': {
107
+ 'trading': {
108
+ 'tierBased': false,
109
+ 'percentage': true,
110
+ 'maker': this.parseNumber('0'),
111
+ 'taker': this.parseNumber('0'),
112
+ },
113
+ },
114
+ });
115
+ }
116
+ async fetchMarkets(params = {}) {
117
+ /**
118
+ * @method
119
+ * @name asretether#fetchMarkets
120
+ * @description retrieves data on all markets for asretether
121
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
122
+ * @returns {object[]} an array of objects representing market data
123
+ */
124
+ const response = await this.publicGetV2Market(params);
125
+ const data = this.safeList(response, 'data', []);
126
+ const result = [];
127
+ for (let i = 0; i < data.length; i++) {
128
+ const market = this.parseMarket(data[i]);
129
+ result.push(market);
130
+ }
131
+ return result;
132
+ }
133
+ parseMarket(market) {
134
+ // {
135
+ // id: 2,
136
+ // symbol: "USDT-IRT",
137
+ // status: "ACTIVE",
138
+ // high_24h: "181978",
139
+ // low_24h: "172874",
140
+ // irt_high_24h: 0,
141
+ // irt_low_24h: 0,
142
+ // change_24h: 0,
143
+ // volume_24h: 100000,
144
+ // price: {
145
+ // price_buy: "178410",
146
+ // price_sell: "176402",
147
+ // price_in_tether: "1.0000"
148
+ // },
149
+ // base_currency: {
150
+ // slug: "USDT",
151
+ // decimals: 6,
152
+ // full_name: "Tether",
153
+ // persian_name: "تتر",
154
+ // icon_url: "https://box.asretether.com/currency-icons/usdt.png"
155
+ // },
156
+ // quote_currency: {
157
+ // slug: "IRT",
158
+ // decimals: 0,
159
+ // full_name: "IR Toman",
160
+ // persian_name: "تومان",
161
+ // icon_url: "https://box.asretether.com/currency-icons/irt.png"
162
+ // }
163
+ // },
164
+ const id = this.safeString(market, 'symbol');
165
+ const baseCurrency = this.safeDict(market, 'base_currency', {});
166
+ const quoteCurrency = this.safeDict(market, 'quote_currency', {});
167
+ const baseId = this.safeString(baseCurrency, 'slug');
168
+ const quoteId = this.safeString(quoteCurrency, 'slug');
169
+ const base = this.safeCurrencyCode(baseId);
170
+ const quote = this.safeCurrencyCode(quoteId);
171
+ const basePrecision = this.safeInteger(baseCurrency, 'decimals');
172
+ const quotePrecision = this.safeInteger(quoteCurrency, 'decimals');
173
+ const status = this.safeString(market, 'status');
174
+ const enabled = status === 'ACTIVE';
175
+ return {
176
+ 'id': id,
177
+ 'symbol': base + '/' + quote,
178
+ 'base': base,
179
+ 'quote': quote,
180
+ 'settle': undefined,
181
+ 'baseId': baseId,
182
+ 'quoteId': quoteId,
183
+ 'settleId': undefined,
184
+ 'type': 'otc',
185
+ 'spot': false,
186
+ 'margin': false,
187
+ 'swap': false,
188
+ 'future': false,
189
+ 'option': false,
190
+ 'active': enabled,
191
+ 'contract': false,
192
+ 'linear': undefined,
193
+ 'inverse': undefined,
194
+ 'contractSize': undefined,
195
+ 'expiry': undefined,
196
+ 'expiryDatetime': undefined,
197
+ 'strike': undefined,
198
+ 'optionType': undefined,
199
+ 'precision': {
200
+ 'amount': basePrecision,
201
+ 'price': quotePrecision,
202
+ },
203
+ 'limits': {
204
+ 'leverage': {
205
+ 'min': undefined,
206
+ 'max': undefined,
207
+ },
208
+ 'amount': {
209
+ 'min': undefined,
210
+ 'max': undefined,
211
+ },
212
+ 'price': {
213
+ 'min': undefined,
214
+ 'max': undefined,
215
+ },
216
+ 'cost': {
217
+ 'min': undefined,
218
+ 'max': undefined,
219
+ },
220
+ },
221
+ 'created': undefined,
222
+ 'info': market,
223
+ };
224
+ }
225
+ async fetchTickers(symbols = undefined, params = {}) {
226
+ /**
227
+ * @method
228
+ * @name asretether#fetchTickers
229
+ * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
230
+ * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
231
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
232
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
233
+ */
234
+ await this.loadMarkets();
235
+ if (symbols !== undefined) {
236
+ symbols = this.marketSymbols(symbols);
237
+ }
238
+ const response = await this.publicGetV2Market(params);
239
+ const data = this.safeList(response, 'data', []);
240
+ const result = {};
241
+ for (let i = 0; i < data.length; i++) {
242
+ const ticker = this.parseTicker(data[i]);
243
+ const symbol = ticker['symbol'];
244
+ result[symbol] = ticker;
245
+ }
246
+ return this.filterByArrayTickers(result, 'symbol', symbols);
247
+ }
248
+ async fetchTicker(symbol, params = {}) {
249
+ /**
250
+ * @method
251
+ * @name asretether#fetchTicker
252
+ * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
253
+ * @param {string} symbol unified symbol of the market to fetch the ticker for
254
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
255
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
256
+ */
257
+ await this.loadMarkets();
258
+ const market = this.market(symbol);
259
+ const request = {
260
+ 'symbol': market['id'],
261
+ };
262
+ const response = await this.publicGetV2Market(request);
263
+ const data = this.safeList(response, 'data', []);
264
+ if (data.length > 0) {
265
+ return this.parseTicker(data[0], market);
266
+ }
267
+ throw new Error('Ticker not found');
268
+ }
269
+ parseTicker(ticker, market = undefined) {
270
+ const baseCurrency = this.safeDict(ticker, 'base_currency', {});
271
+ const quoteCurrency = this.safeDict(ticker, 'quote_currency', {});
272
+ const baseId = this.safeString(baseCurrency, 'slug');
273
+ const quoteId = this.safeString(quoteCurrency, 'slug');
274
+ const base = this.safeCurrencyCode(baseId);
275
+ const quote = this.safeCurrencyCode(quoteId);
276
+ const symbol = base + '/' + quote;
277
+ // Handle price selection based on quote currency
278
+ const price = this.safeDict(ticker, 'price', {});
279
+ let last = undefined;
280
+ if (quote === 'IRT') {
281
+ last = this.safeFloat(price, 'price_sell');
282
+ }
283
+ else if (quote === 'USDT') {
284
+ last = this.safeFloat(price, 'price_in_tether');
285
+ }
286
+ const high = this.safeFloat(ticker, 'high_24h');
287
+ const low = this.safeFloat(ticker, 'low_24h');
288
+ const baseVolume = this.safeFloat(ticker, 'volume_24h');
289
+ return this.safeTicker({
290
+ 'symbol': symbol,
291
+ 'timestamp': undefined,
292
+ 'datetime': undefined,
293
+ 'high': high,
294
+ 'low': low,
295
+ 'bid': undefined,
296
+ 'bidVolume': undefined,
297
+ 'ask': undefined,
298
+ 'askVolume': undefined,
299
+ 'vwap': undefined,
300
+ 'open': undefined,
301
+ 'close': last,
302
+ 'last': last,
303
+ 'previousClose': undefined,
304
+ 'change': this.safeFloat(ticker, 'change_24h'),
305
+ 'percentage': undefined,
306
+ 'average': undefined,
307
+ 'baseVolume': baseVolume,
308
+ 'quoteVolume': undefined,
309
+ 'info': ticker,
310
+ }, market);
311
+ }
312
+ sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
313
+ let url = this.urls['api']['public'] + '/' + path;
314
+ const query = this.omit(params, this.extractParams(path));
315
+ query['limit'] = this.safeString(query, 'limit', '1000');
316
+ // Add query parameters if any remain
317
+ if (Object.keys(query).length) {
318
+ url = url + '?' + this.urlencode(query);
319
+ }
320
+ headers = { 'Content-Type': 'application/json' };
321
+ return { 'url': url, 'method': method, 'body': body, 'headers': headers };
322
+ }
323
+ }
324
+
325
+ exports["default"] = asretether;
@@ -79,6 +79,7 @@ class raastin extends raastin$1["default"] {
79
79
  'fetchTradingFee': false,
80
80
  'fetchTradingFees': false,
81
81
  'fetchWithdrawals': false,
82
+ 'otc': true,
82
83
  'setLeverage': false,
83
84
  'setMarginMode': false,
84
85
  'transfer': false,
@@ -101,6 +102,7 @@ class raastin extends raastin$1["default"] {
101
102
  'api/v1/market/symbols': 1,
102
103
  'api/v1/market/symbols/{symbol}/': 1,
103
104
  'api/v1/market/depth/{symbol}': 1,
105
+ 'api/v1/market': 1,
104
106
  },
105
107
  },
106
108
  },
@@ -122,10 +124,24 @@ class raastin extends raastin$1["default"] {
122
124
  * @param {object} [params] extra parameters specific to the exchange API endpoint
123
125
  * @returns {object[]} an array of objects representing market data
124
126
  */
127
+ const result = [];
128
+ const marketType = this.safeString(params, 'type', 'spot');
129
+ if (marketType === 'otc') {
130
+ const qoutes = ['irt', 'usdt'];
131
+ for (let i = 0; i < qoutes.length; i++) {
132
+ const quote = qoutes[i];
133
+ const OTCmarkets = await this.publicGetApiV1Market(this.extend(params, { 'quote': quote }));
134
+ for (let j = 0; j < OTCmarkets.length; j++) {
135
+ OTCmarkets[j]['quote'] = quote;
136
+ const market = this.parseOtcMarket(OTCmarkets[j]);
137
+ result.push(market);
138
+ }
139
+ }
140
+ return result;
141
+ }
125
142
  const response = await this.publicGetApiV1MarketSymbols(params);
126
143
  // Response is a flat array, not nested in 'result'
127
144
  const markets = response;
128
- const result = [];
129
145
  for (let i = 0; i < markets.length; i++) {
130
146
  const market = this.parseMarket(markets[i]);
131
147
  result.push(market);
@@ -240,6 +256,68 @@ class raastin extends raastin$1["default"] {
240
256
  'info': market,
241
257
  };
242
258
  }
259
+ parseOtcMarket(market) {
260
+ // {
261
+ // symbol: "USDT",
262
+ // ask: "1",
263
+ // bid: "1",
264
+ // name: "tether"
265
+ // },
266
+ const baseSymbol = this.safeString(market, 'symbol');
267
+ const base = this.safeCurrencyCode(baseSymbol.toUpperCase());
268
+ const quote = this.safeCurrencyCode(market['quote'].toUpperCase());
269
+ const id = base.toUpperCase() + quote.toUpperCase();
270
+ const enabled = true;
271
+ return {
272
+ 'id': id,
273
+ 'symbol': base + '/' + quote,
274
+ 'base': base,
275
+ 'quote': quote,
276
+ 'settle': undefined,
277
+ 'baseId': base,
278
+ 'quoteId': quote,
279
+ 'settleId': undefined,
280
+ 'type': 'otc',
281
+ 'spot': false,
282
+ 'margin': false,
283
+ 'swap': false,
284
+ 'future': false,
285
+ 'option': false,
286
+ 'active': enabled,
287
+ 'contract': false,
288
+ 'linear': undefined,
289
+ 'inverse': undefined,
290
+ 'contractSize': undefined,
291
+ 'expiry': undefined,
292
+ 'expiryDatetime': undefined,
293
+ 'strike': undefined,
294
+ 'optionType': undefined,
295
+ 'precision': {
296
+ 'amount': undefined,
297
+ 'price': undefined,
298
+ },
299
+ 'limits': {
300
+ 'leverage': {
301
+ 'min': undefined,
302
+ 'max': undefined,
303
+ },
304
+ 'amount': {
305
+ 'min': undefined,
306
+ 'max': undefined,
307
+ },
308
+ 'price': {
309
+ 'min': undefined,
310
+ 'max': undefined,
311
+ },
312
+ 'cost': {
313
+ 'min': undefined,
314
+ 'max': undefined,
315
+ },
316
+ },
317
+ 'created': undefined,
318
+ 'info': market,
319
+ };
320
+ }
243
321
  async fetchTickers(symbols = undefined, params = {}) {
244
322
  /**
245
323
  * @method
@@ -249,13 +327,27 @@ class raastin extends raastin$1["default"] {
249
327
  * @param {object} [params] extra parameters specific to the exchange API endpoint
250
328
  * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
251
329
  */
252
- await this.loadMarkets();
330
+ const marketType = this.safeString(params, 'type', 'spot');
331
+ await this.loadMarkets(false, { 'type': marketType });
253
332
  if (symbols !== undefined) {
254
333
  symbols = this.marketSymbols(symbols);
255
334
  }
256
- const response = await this.publicGetApiV1MarketSymbols(params);
257
- const markets = this.safeList(response, response);
258
335
  const result = {};
336
+ if (marketType === 'otc') {
337
+ const qoutes = ['irt', 'usdt'];
338
+ for (let i = 0; i < qoutes.length; i++) {
339
+ const quote = qoutes[i];
340
+ const OTCmarkets = await this.publicGetApiV1Market(this.extend(params, { 'quote': quote }));
341
+ for (let j = 0; j < OTCmarkets.length; j++) {
342
+ OTCmarkets[j]['quote'] = quote.toUpperCase();
343
+ const ticker = await this.parseOTCTicker(OTCmarkets[j]);
344
+ const symbol = ticker['symbol'];
345
+ result[symbol] = ticker;
346
+ }
347
+ }
348
+ return this.filterByArrayTickers(result, 'symbol', symbols);
349
+ }
350
+ const markets = await this.publicGetApiV1MarketSymbols(params);
259
351
  for (let i = 0; i < markets.length; i++) {
260
352
  const marketData = markets[i];
261
353
  const ticker = this.parseTicker(marketData);
@@ -273,7 +365,12 @@ class raastin extends raastin$1["default"] {
273
365
  * @param {object} [params] extra parameters specific to the exchange API endpoint
274
366
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
275
367
  */
276
- await this.loadMarkets();
368
+ const marketType = this.safeString(params, 'type', 'spot');
369
+ await this.loadMarkets(false, { 'type': marketType });
370
+ if (marketType === 'otc') {
371
+ const tickers = await this.fetchTickers([symbol], { 'type': 'otc' });
372
+ return tickers[symbol];
373
+ }
277
374
  const market = this.market(symbol);
278
375
  const request = {
279
376
  'symbol': market['id'],
@@ -289,36 +386,61 @@ class raastin extends raastin$1["default"] {
289
386
  const symbol = this.safeSymbol(marketId, market, undefined, marketType);
290
387
  // Since the exact ticker fields are not provided in the user's example,
291
388
  // we'll set up the basic structure. These may need adjustment based on actual API response.
292
- const last = this.safeFloat(ticker, 'last_price', 0);
293
- const high = this.safeFloat(ticker, '24h_high', 0);
294
- const low = this.safeFloat(ticker, '24h_low', 0);
295
- const baseVolume = this.safeFloat(ticker, '24h_volume', 0);
296
- const quoteVolume = this.safeFloat(ticker, '24h_quote_volume', 0);
297
- const bid = this.safeFloat(ticker, 'bid_price', 0);
298
- const ask = this.safeFloat(ticker, 'ask_price', 0);
389
+ const last = this.safeFloat(ticker, 'price', 0);
390
+ const high = this.safeFloat(ticker, 'high', 0);
391
+ const low = this.safeFloat(ticker, 'low', 0);
392
+ const baseVolume = this.safeFloat(ticker, 'base_volume', 0);
393
+ const quoteVolume = this.safeFloat(ticker, 'volume', 0);
394
+ const changePercentage = this.safeFloat(ticker, 'change_percentage', 0);
299
395
  return this.safeTicker({
300
396
  'symbol': symbol,
301
397
  'timestamp': undefined,
302
398
  'datetime': undefined,
303
399
  'high': high,
304
400
  'low': low,
305
- 'bid': bid,
401
+ 'bid': undefined,
306
402
  'bidVolume': undefined,
307
- 'ask': ask,
403
+ 'ask': undefined,
308
404
  'askVolume': undefined,
309
405
  'vwap': undefined,
310
406
  'open': undefined,
311
407
  'close': last,
312
408
  'last': last,
313
409
  'previousClose': undefined,
314
- 'change': undefined,
315
- 'percentage': undefined,
410
+ 'change': changePercentage,
411
+ 'percentage': changePercentage,
316
412
  'average': undefined,
317
413
  'baseVolume': baseVolume,
318
414
  'quoteVolume': quoteVolume,
319
415
  'info': ticker,
320
416
  }, market);
321
417
  }
418
+ parseOTCTicker(ticker, market = undefined) {
419
+ const symbol = this.safeString(ticker, 'symbol') + '/' + this.safeString(ticker, 'quote');
420
+ const bid = this.safeFloat(ticker, 'bid');
421
+ const ask = this.safeFloat(ticker, 'ask');
422
+ return this.safeTicker({
423
+ 'symbol': symbol,
424
+ 'timestamp': undefined,
425
+ 'datetime': undefined,
426
+ 'high': undefined,
427
+ 'low': undefined,
428
+ 'bid': bid,
429
+ 'bidVolume': undefined,
430
+ 'ask': ask,
431
+ 'askVolume': undefined,
432
+ 'vwap': undefined,
433
+ 'open': undefined,
434
+ 'close': undefined,
435
+ 'previousClose': undefined,
436
+ 'change': undefined,
437
+ 'percentage': undefined,
438
+ 'average': undefined,
439
+ 'baseVolume': undefined,
440
+ 'quoteVolume': undefined,
441
+ 'info': ticker,
442
+ }, market);
443
+ }
322
444
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
323
445
  /**
324
446
  * @method
@@ -359,6 +481,12 @@ class raastin extends raastin$1["default"] {
359
481
  if (Object.keys(query).length) {
360
482
  url = url + '?' + this.urlencode(query);
361
483
  }
484
+ if (path === 'api/v1/market') {
485
+ const quote = this.safeString(params, 'quote');
486
+ if (quote !== undefined) {
487
+ url = this.urls['api']['public'] + '/' + path + '/' + quote + '/info';
488
+ }
489
+ }
362
490
  headers = { 'Content-Type': 'application/json' };
363
491
  return { 'url': url, 'method': method, 'body': body, 'headers': headers };
364
492
  }
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.9.32";
7
+ declare const version = "4.10.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';
@@ -12,6 +12,7 @@ import apex from './src/apex.js';
12
12
  import arzinja from './src/arzinja.js';
13
13
  import arzplus from './src/arzplus.js';
14
14
  import ascendex from './src/ascendex.js';
15
+ import asretether from './src/asretether.js';
15
16
  import bequant from './src/bequant.js';
16
17
  import bigone from './src/bigone.js';
17
18
  import binance from './src/binance.js';
@@ -233,6 +234,7 @@ declare const exchanges: {
233
234
  arzinja: typeof arzinja;
234
235
  arzplus: typeof arzplus;
235
236
  ascendex: typeof ascendex;
237
+ asretether: typeof asretether;
236
238
  bequant: typeof bequant;
237
239
  bigone: typeof bigone;
238
240
  binance: typeof binance;
@@ -537,6 +539,7 @@ declare const ccxt: {
537
539
  arzinja: typeof arzinja;
538
540
  arzplus: typeof arzplus;
539
541
  ascendex: typeof ascendex;
542
+ asretether: typeof asretether;
540
543
  bequant: typeof bequant;
541
544
  bigone: typeof bigone;
542
545
  binance: typeof binance;
@@ -678,5 +681,5 @@ declare const ccxt: {
678
681
  zaif: typeof zaif;
679
682
  zonda: typeof zonda;
680
683
  } & typeof functions & typeof errors;
681
- 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, bitbarg, 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, bydfi, cafearz, 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, hamtapay, hashkey, hibachi, hitbtc, hitobit, hollaex, htx, huobi, hyperliquid, independentreserve, indodax, iranexchange, jibitex, kcex, kifpoolme, kraken, krakenfutures, kucoin, kucoinfutures, latoken, lbank, luno, mazdax, mercado, mexc, modetrade, myokx, ndax, nobitex, novadax, oceanex, okcoin, okexchange, okx, okxus, ompfinex, onetrading, oxfun, p2b, paradex, paymium, phemex, pingi, poloniex, pooleno, probit, raastin, ramzinex, sarmayex, sarrafex, tabdeal, tehran_exchange, tetherland, timex, tokocrypto, toobit, tradeogre, twox, ubitex, upbit, vertex, wallex, wavesexchange, whitebit, woo, woofipro, xt, yobit, zaif, zonda, };
684
+ 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, asretether, bequant, 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, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, bydfi, cafearz, 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, hamtapay, hashkey, hibachi, hitbtc, hitobit, hollaex, htx, huobi, hyperliquid, independentreserve, indodax, iranexchange, jibitex, kcex, kifpoolme, kraken, krakenfutures, kucoin, kucoinfutures, latoken, lbank, luno, mazdax, mercado, mexc, modetrade, myokx, ndax, nobitex, novadax, oceanex, okcoin, okexchange, okx, okxus, ompfinex, onetrading, oxfun, p2b, paradex, paymium, phemex, pingi, poloniex, pooleno, probit, raastin, ramzinex, sarmayex, sarrafex, tabdeal, tehran_exchange, tetherland, timex, tokocrypto, toobit, tradeogre, twox, ubitex, upbit, vertex, wallex, wavesexchange, whitebit, woo, woofipro, xt, yobit, zaif, zonda, };
682
685
  export default ccxt;