ccxt-ir 4.13.1 → 4.14.1

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
@@ -142,6 +142,7 @@ var pooleno = require('./src/pooleno.js');
142
142
  var probit = require('./src/probit.js');
143
143
  var raastin = require('./src/raastin.js');
144
144
  var ramzinex = require('./src/ramzinex.js');
145
+ var saraf = require('./src/saraf.js');
145
146
  var sarmayex = require('./src/sarmayex.js');
146
147
  var sarrafex = require('./src/sarrafex.js');
147
148
  var tabdeal = require('./src/tabdeal.js');
@@ -240,7 +241,7 @@ var xt$1 = require('./src/pro/xt.js');
240
241
 
241
242
  //-----------------------------------------------------------------------------
242
243
  // this is updated by vss.js when building
243
- const version = '4.13.1';
244
+ const version = '4.14.1';
244
245
  Exchange["default"].ccxtVersion = version;
245
246
  const exchanges = {
246
247
  'abantether': abantether["default"],
@@ -373,6 +374,7 @@ const exchanges = {
373
374
  'probit': probit["default"],
374
375
  'raastin': raastin["default"],
375
376
  'ramzinex': ramzinex["default"],
377
+ 'saraf': saraf["default"],
376
378
  'sarmayex': sarmayex["default"],
377
379
  'sarrafex': sarrafex["default"],
378
380
  'tabdeal': tabdeal["default"],
@@ -652,6 +654,7 @@ exports.pooleno = pooleno["default"];
652
654
  exports.probit = probit["default"];
653
655
  exports.raastin = raastin["default"];
654
656
  exports.ramzinex = ramzinex["default"];
657
+ exports.saraf = saraf["default"];
655
658
  exports.sarmayex = sarmayex["default"];
656
659
  exports.sarrafex = sarrafex["default"];
657
660
  exports.tabdeal = tabdeal["default"];
@@ -0,0 +1,310 @@
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 saraf
11
+ * @augments Exchange
12
+ * @description Set rateLimit to 1000 if fully verified
13
+ */
14
+ class saraf extends Exchange["default"] {
15
+ describe() {
16
+ return this.deepExtend(super.describe(), {
17
+ 'id': 'saraf',
18
+ 'name': 'Saraf',
19
+ 'countries': ['IR'],
20
+ 'rateLimit': 1000,
21
+ 'version': '3',
22
+ 'certified': false,
23
+ 'pro': false,
24
+ 'has': {
25
+ 'CORS': undefined,
26
+ 'spot': false,
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': 'emulated',
73
+ 'fetchPositions': false,
74
+ 'fetchPremiumIndexOHLCV': false,
75
+ 'fetchTicker': true,
76
+ 'fetchTickers': true,
77
+ 'fetchTime': false,
78
+ 'fetchTrades': false,
79
+ 'fetchTradingFee': false,
80
+ 'fetchTradingFees': false,
81
+ 'fetchWithdrawals': false,
82
+ 'otc': true,
83
+ 'setLeverage': false,
84
+ 'setMarginMode': false,
85
+ 'transfer': false,
86
+ 'withdraw': false,
87
+ },
88
+ 'options': {
89
+ 'defaultType': 'otc',
90
+ },
91
+ 'urls': {
92
+ 'logo': 'https://cdn.arz.digital/cr-odin/img/exchanges/saraf/64x64.png',
93
+ 'api': {
94
+ 'public': 'https://api.saraf.app',
95
+ },
96
+ 'www': 'https://saraf.app',
97
+ 'doc': [
98
+ 'https://saraf.app',
99
+ ],
100
+ },
101
+ 'api': {
102
+ 'public': {
103
+ 'get': {
104
+ 'v1/prices/listed': 1,
105
+ },
106
+ },
107
+ },
108
+ 'fees': {
109
+ 'trading': {
110
+ 'tierBased': false,
111
+ 'percentage': true,
112
+ 'maker': this.parseNumber('0'),
113
+ 'taker': this.parseNumber('0'),
114
+ },
115
+ },
116
+ });
117
+ }
118
+ parseMarket(market) {
119
+ const baseId = this.safeString(market, 's');
120
+ const quoteId = 'IRT';
121
+ const base = this.safeCurrencyCode(baseId);
122
+ const quote = this.safeCurrencyCode(quoteId);
123
+ return {
124
+ 'id': baseId,
125
+ 'symbol': base + '/' + quote,
126
+ 'base': base,
127
+ 'quote': quote,
128
+ 'settle': undefined,
129
+ 'baseId': baseId,
130
+ 'quoteId': quoteId,
131
+ 'settleId': undefined,
132
+ 'type': 'otc',
133
+ 'spot': false,
134
+ 'margin': false,
135
+ 'swap': false,
136
+ 'future': false,
137
+ 'option': false,
138
+ 'active': this.safeBool(market, 'ct', true),
139
+ 'contract': false,
140
+ 'linear': undefined,
141
+ 'inverse': undefined,
142
+ 'contractSize': undefined,
143
+ 'expiry': undefined,
144
+ 'expiryDatetime': undefined,
145
+ 'strike': undefined,
146
+ 'optionType': undefined,
147
+ 'precision': {
148
+ 'amount': undefined,
149
+ 'price': this.safeInteger(market, 'r'),
150
+ },
151
+ 'limits': {
152
+ 'leverage': {
153
+ 'min': undefined,
154
+ 'max': undefined,
155
+ },
156
+ 'amount': {
157
+ 'min': undefined,
158
+ 'max': undefined,
159
+ },
160
+ 'price': {
161
+ 'min': undefined,
162
+ 'max': undefined,
163
+ },
164
+ 'cost': {
165
+ 'min': undefined,
166
+ 'max': undefined,
167
+ },
168
+ },
169
+ 'created': undefined,
170
+ 'info': market,
171
+ };
172
+ }
173
+ async fetchMarkets(params = {}) {
174
+ /**
175
+ * @method
176
+ * @name saraf#fetchMarkets
177
+ * @description retrieves data on all markets for saraf
178
+ * @see https://api.saraf.app/v3/prices/crypto
179
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
180
+ * @returns {object[]} an array of objects representing market data
181
+ */
182
+ const response = await this.publicGetV1PricesListed(params);
183
+ const price = this.safeDict(response, 'price', {});
184
+ const items = this.safeDict(price, 'Items', {});
185
+ const lastUpdateTime = this.safeInteger(price, 'lastUpdateTime');
186
+ const itemKeys = Object.keys(items);
187
+ const result = [];
188
+ for (let i = 0; i < itemKeys.length; i++) {
189
+ const item = this.safeDict(items, itemKeys[i], {});
190
+ item['lastUpdateTime'] = lastUpdateTime;
191
+ const baseId = this.safeString(item, 's');
192
+ if ((baseId === undefined) || (baseId === 'IRT')) {
193
+ continue;
194
+ }
195
+ result.push(this.parseMarket(item));
196
+ }
197
+ return result;
198
+ }
199
+ async fetchTickers(symbols = undefined, params = {}) {
200
+ /**
201
+ * @method
202
+ * @name saraf#fetchTickers
203
+ * @description fetches price tickers for multiple markets
204
+ * @see https://api.saraf.app/v3/prices/crypto
205
+ * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
206
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
207
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
208
+ */
209
+ await this.loadMarkets();
210
+ if (symbols !== undefined) {
211
+ symbols = this.marketSymbols(symbols);
212
+ }
213
+ const response = await this.publicGetV1PricesListed(params);
214
+ const price = this.safeDict(response, 'price', {});
215
+ const items = this.safeDict(price, 'Items', {});
216
+ const lastUpdateTime = this.safeInteger(price, 'lastUpdateTime');
217
+ const itemKeys = Object.keys(items);
218
+ const result = {};
219
+ for (let i = 0; i < itemKeys.length; i++) {
220
+ const item = this.safeDict(items, itemKeys[i], {});
221
+ item['lastUpdateTime'] = lastUpdateTime;
222
+ const baseId = this.safeString(item, 's');
223
+ if ((baseId === undefined) || (baseId === 'IRT') || (baseId === 'FIXED')) {
224
+ continue;
225
+ }
226
+ const ticker = this.parseTicker(item);
227
+ result[ticker['symbol']] = ticker;
228
+ }
229
+ return this.filterByArrayTickers(result, 'symbol', symbols);
230
+ }
231
+ async fetchTicker(symbol, params = {}) {
232
+ /**
233
+ * @method
234
+ * @name saraf#fetchTicker
235
+ * @description fetches a price ticker, a statistical calculation for a specific market
236
+ * @see https://api.saraf.app/v3/prices/crypto
237
+ * @param {string} symbol unified symbol of the market to fetch the ticker for
238
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
239
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
240
+ */
241
+ const tickers = await this.fetchTickers([symbol], params);
242
+ return tickers[symbol];
243
+ }
244
+ parseTicker(ticker, market = undefined) {
245
+ const baseId = this.safeString(ticker, 's');
246
+ const quoteId = 'IRT';
247
+ const base = this.safeCurrencyCode(baseId);
248
+ const quote = this.safeCurrencyCode(quoteId);
249
+ const symbol = base + '/' + quote;
250
+ const history = this.safeList(ticker, 'h', []);
251
+ let high = undefined;
252
+ let low = undefined;
253
+ let open = undefined;
254
+ if (history.length > 0) {
255
+ high = this.safeNumber(history, 0);
256
+ low = this.safeNumber(history, 0);
257
+ open = this.safeNumber(history, history.length - 1);
258
+ for (let i = 1; i < history.length; i++) {
259
+ const price = this.safeNumber(history, i);
260
+ high = Math.max(high, price);
261
+ low = Math.min(low, price);
262
+ }
263
+ }
264
+ const last = this.safeNumber(ticker, 'p');
265
+ const percentage = this.safeNumber(ticker, 'c');
266
+ const timestamp = this.safeInteger2(ticker, 'ut', 'lastUpdateTime');
267
+ let change = undefined;
268
+ if ((last !== undefined) && (open !== undefined)) {
269
+ change = last - open;
270
+ }
271
+ if (market === undefined) {
272
+ market = this.safeMarketStructure(this.parseMarket(ticker));
273
+ }
274
+ return this.safeTicker({
275
+ 'symbol': symbol,
276
+ 'timestamp': timestamp,
277
+ 'datetime': this.iso8601(timestamp),
278
+ 'high': high,
279
+ 'low': low,
280
+ 'bid': undefined,
281
+ 'bidVolume': undefined,
282
+ 'ask': undefined,
283
+ 'askVolume': undefined,
284
+ 'vwap': undefined,
285
+ 'open': open,
286
+ 'close': last,
287
+ 'last': last,
288
+ 'previousClose': undefined,
289
+ 'change': change,
290
+ 'percentage': percentage,
291
+ 'average': undefined,
292
+ 'baseVolume': undefined,
293
+ 'quoteVolume': undefined,
294
+ 'info': ticker,
295
+ }, market);
296
+ }
297
+ sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
298
+ const query = this.omit(params, this.extractParams(path));
299
+ let url = this.urls['api'][api] + '/' + this.implodeParams(path, params);
300
+ if (Object.keys(query).length) {
301
+ url += '?' + this.urlencode(query);
302
+ }
303
+ headers = {
304
+ 'Content-Type': 'application/json',
305
+ };
306
+ return { 'url': url, 'method': method, 'body': body, 'headers': headers };
307
+ }
308
+ }
309
+
310
+ exports["default"] = saraf;
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.13.1";
7
+ declare const version = "4.14.1";
8
8
  import abantether from './src/abantether.js';
9
9
  import afratether from './src/afratether.js';
10
10
  import alpaca from './src/alpaca.js';
@@ -135,6 +135,7 @@ import pooleno from './src/pooleno.js';
135
135
  import probit from './src/probit.js';
136
136
  import raastin from './src/raastin.js';
137
137
  import ramzinex from './src/ramzinex.js';
138
+ import saraf from './src/saraf.js';
138
139
  import sarmayex from './src/sarmayex.js';
139
140
  import sarrafex from './src/sarrafex.js';
140
141
  import tabdeal from './src/tabdeal.js';
@@ -361,6 +362,7 @@ declare const exchanges: {
361
362
  probit: typeof probit;
362
363
  raastin: typeof raastin;
363
364
  ramzinex: typeof ramzinex;
365
+ saraf: typeof saraf;
364
366
  sarmayex: typeof sarmayex;
365
367
  sarrafex: typeof sarrafex;
366
368
  tabdeal: typeof tabdeal;
@@ -670,6 +672,7 @@ declare const ccxt: {
670
672
  probit: typeof probit;
671
673
  raastin: typeof raastin;
672
674
  ramzinex: typeof ramzinex;
675
+ saraf: typeof saraf;
673
676
  sarmayex: typeof sarmayex;
674
677
  sarrafex: typeof sarrafex;
675
678
  tabdeal: typeof tabdeal;
@@ -693,5 +696,5 @@ declare const ccxt: {
693
696
  zaif: typeof zaif;
694
697
  zonda: typeof zonda;
695
698
  } & typeof functions & typeof errors;
696
- 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, 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, 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, ourbit, 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, };
699
+ 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, 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, 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, ourbit, oxfun, p2b, paradex, paymium, phemex, pingi, poloniex, pooleno, probit, raastin, ramzinex, saraf, sarmayex, sarrafex, tabdeal, tehran_exchange, tetherland, timex, tokocrypto, toobit, tradeogre, twox, ubitex, upbit, vertex, wallex, wavesexchange, whitebit, woo, woofipro, xt, yobit, zaif, zonda, };
697
700
  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.13.1';
41
+ const version = '4.14.1';
42
42
  Exchange.ccxtVersion = version;
43
43
  //-----------------------------------------------------------------------------
44
44
  import abantether from './src/abantether.js';
@@ -171,6 +171,7 @@ import pooleno from './src/pooleno.js';
171
171
  import probit from './src/probit.js';
172
172
  import raastin from './src/raastin.js';
173
173
  import ramzinex from './src/ramzinex.js';
174
+ import saraf from './src/saraf.js';
174
175
  import sarmayex from './src/sarmayex.js';
175
176
  import sarrafex from './src/sarrafex.js';
176
177
  import tabdeal from './src/tabdeal.js';
@@ -398,6 +399,7 @@ const exchanges = {
398
399
  'probit': probit,
399
400
  'raastin': raastin,
400
401
  'ramzinex': ramzinex,
402
+ 'saraf': saraf,
401
403
  'sarmayex': sarmayex,
402
404
  'sarrafex': sarrafex,
403
405
  'tabdeal': tabdeal,
@@ -508,6 +510,6 @@ pro.exchanges = Object.keys(pro);
508
510
  pro['Exchange'] = Exchange; // now the same for rest and ts
509
511
  //-----------------------------------------------------------------------------
510
512
  const ccxt = Object.assign({ version, Exchange, Precise, 'exchanges': Object.keys(exchanges), 'pro': pro }, exchanges, functions, errors);
511
- export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, RestrictedLocation, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending, UnsubscribeError, abantether, afratether, alpaca, apex, arzinja, arzplus, ascendex, asretether, 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, 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, ourbit, 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, };
513
+ export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, RestrictedLocation, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending, UnsubscribeError, abantether, afratether, alpaca, apex, arzinja, arzplus, ascendex, asretether, 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, 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, ourbit, oxfun, p2b, paradex, paymium, phemex, pingi, poloniex, pooleno, probit, raastin, ramzinex, saraf, sarmayex, sarrafex, tabdeal, tehran_exchange, tetherland, timex, tokocrypto, toobit, tradeogre, twox, ubitex, upbit, vertex, wallex, wavesexchange, whitebit, woo, woofipro, xt, yobit, zaif, zonda, };
512
514
  export default ccxt;
513
515
  //-----------------------------------------------------------------------------
@@ -0,0 +1,8 @@
1
+ import { implicitReturnType } from '../base/types.js';
2
+ import { Exchange as _Exchange } from '../base/Exchange.js';
3
+ interface Exchange {
4
+ publicGetV1PricesListed(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?: "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: {};
@@ -0,0 +1,21 @@
1
+ import Exchange from './base/Exchange.js';
2
+ import { Market, Strings, Ticker, Tickers } from './base/types.js';
3
+ /**
4
+ * @class saraf
5
+ * @augments Exchange
6
+ * @description Set rateLimit to 1000 if fully verified
7
+ */
8
+ export default class saraf extends Exchange {
9
+ describe(): any;
10
+ parseMarket(market: any): Market;
11
+ fetchMarkets(params?: {}): Promise<Market[]>;
12
+ fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
13
+ fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
14
+ parseTicker(ticker: any, market?: Market): Ticker;
15
+ sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
16
+ url: string;
17
+ method: string;
18
+ body: any;
19
+ headers: any;
20
+ };
21
+ }