ccxt-ir 4.20.1 → 4.22.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/README.md +4 -4
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +10 -1
- package/dist/cjs/src/abstract/exino.js +11 -0
- package/dist/cjs/src/ariomex.js +198 -0
- package/dist/cjs/src/arzplus.js +2 -2
- package/dist/cjs/src/bitimen.js +2 -2
- package/dist/cjs/src/bitir.js +2 -2
- package/dist/cjs/src/bitpin.js +3 -3
- package/dist/cjs/src/excoino.js +2 -2
- package/dist/cjs/src/exino.js +215 -0
- package/dist/cjs/src/exir.js +2 -2
- package/dist/cjs/src/exnovin.js +1 -1
- package/dist/cjs/src/hitobit.js +2 -2
- package/dist/cjs/src/jibitex.js +2 -2
- package/dist/cjs/src/kifpoolme.js +1 -1
- package/dist/cjs/src/nobitex.js +3 -3
- package/dist/cjs/src/okexchange.js +2 -2
- package/dist/cjs/src/ompfinex.js +2 -2
- package/dist/cjs/src/pingi.js +1 -1
- package/dist/cjs/src/poulyar.js +190 -0
- package/dist/cjs/src/raastin.js +1 -1
- package/dist/cjs/src/ramzinex.js +10 -10
- package/dist/cjs/src/sarrafex.js +2 -2
- package/dist/cjs/src/tabdeal.js +2 -2
- package/dist/cjs/src/ubitex.js +3 -3
- package/dist/cjs/src/wallex.js +2 -2
- package/js/ccxt.d.ts +11 -2
- package/js/ccxt.js +8 -2
- package/js/src/abstract/ariomex.d.ts +8 -0
- package/js/src/abstract/ariomex.js +11 -0
- package/js/src/abstract/exino.d.ts +8 -0
- package/js/src/abstract/exino.js +11 -0
- package/js/src/abstract/poulyar.d.ts +8 -0
- package/js/src/abstract/poulyar.js +11 -0
- package/js/src/ariomex.d.ts +21 -0
- package/js/src/ariomex.js +197 -0
- package/js/src/arzplus.js +2 -2
- package/js/src/base/Exchange.d.ts +2 -2
- package/js/src/bitimen.js +2 -2
- package/js/src/bitir.js +2 -2
- package/js/src/bitpin.js +3 -3
- package/js/src/coinbaseexchange.d.ts +1 -1
- package/js/src/excoino.js +2 -2
- package/js/src/exino.d.ts +16 -0
- package/js/src/exino.js +214 -0
- package/js/src/exir.js +2 -2
- package/js/src/exnovin.js +1 -1
- package/js/src/hitobit.js +2 -2
- package/js/src/jibitex.js +2 -2
- package/js/src/kifpoolme.js +1 -1
- package/js/src/nobitex.js +3 -3
- package/js/src/okexchange.js +2 -2
- package/js/src/ompfinex.js +2 -2
- package/js/src/pingi.js +1 -1
- package/js/src/poulyar.d.ts +20 -0
- package/js/src/poulyar.js +189 -0
- package/js/src/protobuf/mexc/compiled.d.cts +6 -0
- package/js/src/raastin.js +1 -1
- package/js/src/ramzinex.js +10 -10
- package/js/src/sarrafex.js +2 -2
- package/js/src/static_dependencies/fflake/browser.d.ts +5 -5
- package/js/src/static_dependencies/jsencrypt/lib/jsbn/jsbn.d.ts +1 -1
- package/js/src/static_dependencies/qs/formats.d.cts +6 -0
- package/js/src/static_dependencies/qs/index.d.cts +6 -0
- package/js/src/static_dependencies/qs/parse.d.cts +6 -0
- package/js/src/static_dependencies/qs/stringify.d.cts +6 -0
- package/js/src/static_dependencies/qs/utils.d.cts +6 -0
- package/js/src/static_dependencies/starknet/utils/calldata/parser/index.d.ts +1 -1
- package/js/src/tabdeal.js +2 -2
- package/js/src/ubitex.js +3 -3
- package/js/src/wallex.js +2 -2
- package/js/test.d.ts +1 -1
- package/js/test.js +35 -63
- package/package.json +1 -1
package/js/src/jibitex.js
CHANGED
|
@@ -353,7 +353,7 @@ export default class jibitex extends Exchange {
|
|
|
353
353
|
*/
|
|
354
354
|
await this.loadMarkets();
|
|
355
355
|
const market = this.market(symbol);
|
|
356
|
-
const endTime =
|
|
356
|
+
const endTime = this.milliseconds();
|
|
357
357
|
const request = {
|
|
358
358
|
'market': market['id'],
|
|
359
359
|
'from': (endTime / 1000) - (24 * 60 * 60),
|
|
@@ -401,7 +401,7 @@ export default class jibitex extends Exchange {
|
|
|
401
401
|
};
|
|
402
402
|
const response = await this.publicGetApi1OrdersOrderBookMarket(request);
|
|
403
403
|
const orderBook = this.safeDict(response, 'content');
|
|
404
|
-
const timestamp =
|
|
404
|
+
const timestamp = this.milliseconds();
|
|
405
405
|
return this.parseOrderBook(orderBook, symbol, timestamp, 'buys', 'sells', 'unitPrice', 'size');
|
|
406
406
|
}
|
|
407
407
|
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
|
package/js/src/kifpoolme.js
CHANGED
|
@@ -363,7 +363,7 @@ export default class kifpoolme extends Exchange {
|
|
|
363
363
|
*/
|
|
364
364
|
await this.loadMarkets();
|
|
365
365
|
const market = this.market(symbol);
|
|
366
|
-
const endTime =
|
|
366
|
+
const endTime = this.milliseconds();
|
|
367
367
|
const request = {
|
|
368
368
|
'symbol': market['baseId'],
|
|
369
369
|
'currency': market['quoteId'],
|
package/js/src/nobitex.js
CHANGED
|
@@ -358,7 +358,7 @@ export default class nobitex extends Exchange {
|
|
|
358
358
|
*/
|
|
359
359
|
await this.loadMarkets();
|
|
360
360
|
const market = this.market(symbol);
|
|
361
|
-
const endTime =
|
|
361
|
+
const endTime = this.milliseconds();
|
|
362
362
|
if (market['quote'] === 'IRT') {
|
|
363
363
|
market['id'] = market['symbol'].replace('/', '');
|
|
364
364
|
}
|
|
@@ -425,10 +425,10 @@ export default class nobitex extends Exchange {
|
|
|
425
425
|
const bids = this.safeList(response, 'bids');
|
|
426
426
|
const asks = this.safeList(response, 'asks');
|
|
427
427
|
for (let i = 0; i < bids.length; i++) {
|
|
428
|
-
bids[i][0] = bids[i][0] ? bids[i][0] / 10 : 0;
|
|
428
|
+
bids[i][0] = bids[i][0] ? this.parseToNumeric(bids[i][0]) / 10 : 0;
|
|
429
429
|
}
|
|
430
430
|
for (let i = 0; i < asks.length; i++) {
|
|
431
|
-
asks[i][0] = asks[i][0] ? asks[i][0] / 10 : 0;
|
|
431
|
+
asks[i][0] = asks[i][0] ? this.parseToNumeric(asks[i][0]) / 10 : 0;
|
|
432
432
|
}
|
|
433
433
|
response['bids'] = bids;
|
|
434
434
|
response['asks'] = asks;
|
package/js/src/okexchange.js
CHANGED
|
@@ -315,7 +315,7 @@ export default class okexchange extends Exchange {
|
|
|
315
315
|
*/
|
|
316
316
|
await this.loadMarkets();
|
|
317
317
|
const market = this.market(symbol);
|
|
318
|
-
const endTime =
|
|
318
|
+
const endTime = this.milliseconds();
|
|
319
319
|
const request = {
|
|
320
320
|
'symbol': symbol.replace('/', ''),
|
|
321
321
|
'startTime': endTime - 24 * 60 * 60 * 1000,
|
|
@@ -355,7 +355,7 @@ export default class okexchange extends Exchange {
|
|
|
355
355
|
};
|
|
356
356
|
const response = await this.publicGetOapiV1MarketOrderbook(request);
|
|
357
357
|
const orderBook = this.safeDict(response, 'books', {});
|
|
358
|
-
const timestamp =
|
|
358
|
+
const timestamp = this.milliseconds();
|
|
359
359
|
return this.parseOrderBook(orderBook, symbol, timestamp);
|
|
360
360
|
}
|
|
361
361
|
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
|
package/js/src/ompfinex.js
CHANGED
|
@@ -413,7 +413,7 @@ export default class ompfinex extends Exchange {
|
|
|
413
413
|
if (market['quote'] === 'IRT') {
|
|
414
414
|
symbol = market['base'] + 'IRR';
|
|
415
415
|
}
|
|
416
|
-
const endTime =
|
|
416
|
+
const endTime = this.milliseconds();
|
|
417
417
|
const request = {
|
|
418
418
|
'symbol': symbol.replace('/', ''),
|
|
419
419
|
'from': (endTime / 1000) - (24 * 60 * 60),
|
|
@@ -487,7 +487,7 @@ export default class ompfinex extends Exchange {
|
|
|
487
487
|
else {
|
|
488
488
|
orderbook = this.safeDict(orderbook, market['base'] + market['quote']);
|
|
489
489
|
}
|
|
490
|
-
const timestamp =
|
|
490
|
+
const timestamp = this.milliseconds();
|
|
491
491
|
return this.parseOrderBook(orderbook, symbol, timestamp, 'bids', 'asks', 'price', 'amount');
|
|
492
492
|
}
|
|
493
493
|
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
|
package/js/src/pingi.js
CHANGED
|
@@ -390,7 +390,7 @@ export default class pingi extends Exchange {
|
|
|
390
390
|
*/
|
|
391
391
|
await this.loadMarkets();
|
|
392
392
|
const market = this.market(symbol);
|
|
393
|
-
const endTime =
|
|
393
|
+
const endTime = this.milliseconds();
|
|
394
394
|
const request = {
|
|
395
395
|
'symbol': market['base'] + '/' + market['quote'],
|
|
396
396
|
'resolution': this.safeString(this.timeframes, timeframe, timeframe),
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import Exchange from './base/Exchange.js';
|
|
2
|
+
import { Market, Strings, Ticker, Tickers } from './base/types.js';
|
|
3
|
+
/**
|
|
4
|
+
* @class poulyar
|
|
5
|
+
* @augments Exchange
|
|
6
|
+
*/
|
|
7
|
+
export default class poulyar extends Exchange {
|
|
8
|
+
describe(): any;
|
|
9
|
+
fetchMarkets(params?: {}): Promise<Market[]>;
|
|
10
|
+
parseMarket(market: any): Market;
|
|
11
|
+
fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
|
|
12
|
+
fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
|
|
13
|
+
parseTicker(ticker: any, market?: Market): Ticker;
|
|
14
|
+
sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
|
|
15
|
+
url: string;
|
|
16
|
+
method: string;
|
|
17
|
+
body: any;
|
|
18
|
+
headers: any;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -0,0 +1,189 @@
|
|
|
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 from './base/Exchange.js';
|
|
9
|
+
// ---------------------------------------------------------------------------
|
|
10
|
+
/**
|
|
11
|
+
* @class poulyar
|
|
12
|
+
* @augments Exchange
|
|
13
|
+
*/
|
|
14
|
+
export default class poulyar extends Exchange {
|
|
15
|
+
describe() {
|
|
16
|
+
return this.deepExtend(super.describe(), {
|
|
17
|
+
'id': 'poulyar',
|
|
18
|
+
'name': 'Poulyar',
|
|
19
|
+
'countries': ['IR'],
|
|
20
|
+
'rateLimit': 1000,
|
|
21
|
+
'version': 'v2',
|
|
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
|
+
'fetchMarkets': true,
|
|
32
|
+
'fetchTicker': true,
|
|
33
|
+
'fetchTickers': true,
|
|
34
|
+
'otc': true,
|
|
35
|
+
},
|
|
36
|
+
'options': {
|
|
37
|
+
'defaultType': 'otc',
|
|
38
|
+
},
|
|
39
|
+
'urls': {
|
|
40
|
+
'api': {
|
|
41
|
+
'public': 'https://api.poulyar.com',
|
|
42
|
+
},
|
|
43
|
+
'www': 'https://poulyar.com',
|
|
44
|
+
'doc': 'https://api.poulyar.com/api/v2/market-data',
|
|
45
|
+
},
|
|
46
|
+
'api': {
|
|
47
|
+
'public': {
|
|
48
|
+
'get': {
|
|
49
|
+
'api/v2/market-data': 1,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
async fetchMarkets(params = {}) {
|
|
56
|
+
/**
|
|
57
|
+
* @method
|
|
58
|
+
* @name poulyar#fetchMarkets
|
|
59
|
+
* @description retrieves data on all OTC markets for poulyar
|
|
60
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
61
|
+
* @returns {object[]} an array of objects representing market data
|
|
62
|
+
*/
|
|
63
|
+
const response = await this.publicGetApiV2MarketData(params);
|
|
64
|
+
const result = this.safeDict(response, 'result', {});
|
|
65
|
+
const markets = this.safeDict(result, 'symbols', {});
|
|
66
|
+
const marketIds = Object.keys(markets);
|
|
67
|
+
const parsedMarkets = [];
|
|
68
|
+
for (let i = 0; i < marketIds.length; i++) {
|
|
69
|
+
parsedMarkets.push(this.parseMarket(markets[marketIds[i]]));
|
|
70
|
+
}
|
|
71
|
+
return parsedMarkets;
|
|
72
|
+
}
|
|
73
|
+
parseMarket(market) {
|
|
74
|
+
const id = this.safeString(market, 'symbol');
|
|
75
|
+
const baseId = this.safeString(market, 'baseAsset');
|
|
76
|
+
const quoteId = this.safeString(market, 'quoteAsset');
|
|
77
|
+
const base = this.safeCurrencyCode(baseId);
|
|
78
|
+
const quote = this.safeCurrencyCode(quoteId);
|
|
79
|
+
return {
|
|
80
|
+
'id': id,
|
|
81
|
+
'symbol': base + '/' + quote,
|
|
82
|
+
'base': base,
|
|
83
|
+
'quote': quote,
|
|
84
|
+
'settle': undefined,
|
|
85
|
+
'baseId': baseId,
|
|
86
|
+
'quoteId': quoteId,
|
|
87
|
+
'settleId': undefined,
|
|
88
|
+
'type': 'otc',
|
|
89
|
+
'spot': false,
|
|
90
|
+
'margin': false,
|
|
91
|
+
'swap': false,
|
|
92
|
+
'future': false,
|
|
93
|
+
'option': false,
|
|
94
|
+
'active': true,
|
|
95
|
+
'contract': false,
|
|
96
|
+
'linear': undefined,
|
|
97
|
+
'inverse': undefined,
|
|
98
|
+
'contractSize': undefined,
|
|
99
|
+
'expiry': undefined,
|
|
100
|
+
'expiryDatetime': undefined,
|
|
101
|
+
'strike': undefined,
|
|
102
|
+
'optionType': undefined,
|
|
103
|
+
'precision': {
|
|
104
|
+
'amount': this.safeNumber(market, 'basePrecision'),
|
|
105
|
+
'price': this.safeNumber(market, 'quotePrecision'),
|
|
106
|
+
},
|
|
107
|
+
'limits': {
|
|
108
|
+
'leverage': { 'min': undefined, 'max': undefined },
|
|
109
|
+
'amount': { 'min': this.safeNumber(market, 'minQty'), 'max': undefined },
|
|
110
|
+
'price': { 'min': undefined, 'max': undefined },
|
|
111
|
+
'cost': { 'min': this.safeNumber(market, 'minNotional'), 'max': undefined },
|
|
112
|
+
},
|
|
113
|
+
'created': undefined,
|
|
114
|
+
'info': market,
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
async fetchTicker(symbol, params = {}) {
|
|
118
|
+
/**
|
|
119
|
+
* @method
|
|
120
|
+
* @name poulyar#fetchTicker
|
|
121
|
+
* @description fetches a price ticker for an OTC market
|
|
122
|
+
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
123
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
124
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
125
|
+
*/
|
|
126
|
+
const tickers = await this.fetchTickers([symbol], params);
|
|
127
|
+
return tickers[symbol];
|
|
128
|
+
}
|
|
129
|
+
async fetchTickers(symbols = undefined, params = {}) {
|
|
130
|
+
/**
|
|
131
|
+
* @method
|
|
132
|
+
* @name poulyar#fetchTickers
|
|
133
|
+
* @description fetches price tickers for all OTC markets
|
|
134
|
+
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the tickers for
|
|
135
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
136
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
137
|
+
*/
|
|
138
|
+
await this.loadMarkets();
|
|
139
|
+
if (symbols !== undefined) {
|
|
140
|
+
symbols = this.marketSymbols(symbols);
|
|
141
|
+
}
|
|
142
|
+
const response = await this.publicGetApiV2MarketData(params);
|
|
143
|
+
const result = this.safeDict(response, 'result', {});
|
|
144
|
+
const markets = this.safeDict(result, 'symbols', {});
|
|
145
|
+
const marketIds = Object.keys(markets);
|
|
146
|
+
const tickers = {};
|
|
147
|
+
for (let i = 0; i < marketIds.length; i++) {
|
|
148
|
+
const ticker = this.parseTicker(markets[marketIds[i]]);
|
|
149
|
+
tickers[ticker['symbol']] = ticker;
|
|
150
|
+
}
|
|
151
|
+
return this.filterByArrayTickers(tickers, 'symbol', symbols);
|
|
152
|
+
}
|
|
153
|
+
parseTicker(ticker, market = undefined) {
|
|
154
|
+
const marketId = this.safeString(ticker, 'symbol');
|
|
155
|
+
market = this.safeMarket(marketId, market);
|
|
156
|
+
const stats = this.safeDict(ticker, 'stats', {});
|
|
157
|
+
return this.safeTicker({
|
|
158
|
+
'symbol': market['symbol'],
|
|
159
|
+
'timestamp': this.parse8601(this.safeString(ticker, 'updatedAt')),
|
|
160
|
+
'datetime': undefined,
|
|
161
|
+
'high': undefined,
|
|
162
|
+
'low': undefined,
|
|
163
|
+
'bid': this.safeString(stats, 'bidPrice'),
|
|
164
|
+
'bidVolume': undefined,
|
|
165
|
+
'ask': this.safeString(stats, 'askPrice'),
|
|
166
|
+
'askVolume': undefined,
|
|
167
|
+
'vwap': undefined,
|
|
168
|
+
'open': undefined,
|
|
169
|
+
'close': this.safeString(stats, 'lastPrice'),
|
|
170
|
+
'last': this.safeString(stats, 'lastPrice'),
|
|
171
|
+
'previousClose': undefined,
|
|
172
|
+
'change': undefined,
|
|
173
|
+
'percentage': this.safeString(stats, '24h_ch'),
|
|
174
|
+
'average': undefined,
|
|
175
|
+
'baseVolume': undefined,
|
|
176
|
+
'quoteVolume': undefined,
|
|
177
|
+
'info': ticker,
|
|
178
|
+
}, market);
|
|
179
|
+
}
|
|
180
|
+
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
|
|
181
|
+
let url = this.urls['api'][api] + '/' + this.implodeParams(path, params);
|
|
182
|
+
const query = this.omit(params, this.extractParams(path));
|
|
183
|
+
if (Object.keys(query).length) {
|
|
184
|
+
url += '?' + this.urlencode(query);
|
|
185
|
+
}
|
|
186
|
+
headers = { 'Accept': 'application/json' };
|
|
187
|
+
return { 'url': url, 'method': method, 'body': body, 'headers': headers };
|
|
188
|
+
}
|
|
189
|
+
}
|
|
@@ -1,2 +1,8 @@
|
|
|
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
|
+
|
|
1
7
|
export = $root;
|
|
2
8
|
declare var $root: {};
|
package/js/src/raastin.js
CHANGED
|
@@ -498,7 +498,7 @@ export default class raastin extends Exchange {
|
|
|
498
498
|
// "bids": [{ "price": "164003", "amount": "19.99", "depth": "1", "total": "3278419" }],
|
|
499
499
|
// "asks": [{ "price": "166000", "amount": "47.79", "depth": "2", "total": "7933140" }]
|
|
500
500
|
// }
|
|
501
|
-
const timestamp =
|
|
501
|
+
const timestamp = this.milliseconds();
|
|
502
502
|
return this.parseOrderBook(response, symbol, timestamp, 'bids', 'asks', 'price', 'amount');
|
|
503
503
|
}
|
|
504
504
|
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
|
package/js/src/ramzinex.js
CHANGED
|
@@ -390,7 +390,7 @@ export default class ramzinex extends Exchange {
|
|
|
390
390
|
'vwap': undefined,
|
|
391
391
|
'open': open,
|
|
392
392
|
'close': close,
|
|
393
|
-
'last':
|
|
393
|
+
'last': high,
|
|
394
394
|
'previousClose': undefined,
|
|
395
395
|
'change': change,
|
|
396
396
|
'percentage': undefined,
|
|
@@ -418,7 +418,7 @@ export default class ramzinex extends Exchange {
|
|
|
418
418
|
if (market['quote'] === 'IRT') {
|
|
419
419
|
symbol = market['base'] + 'IRR';
|
|
420
420
|
}
|
|
421
|
-
const endTime =
|
|
421
|
+
const endTime = this.milliseconds();
|
|
422
422
|
const request = {
|
|
423
423
|
'symbol': symbol.replace('/', ''),
|
|
424
424
|
'from': (endTime / 1000) - (24 * 60 * 60),
|
|
@@ -444,11 +444,11 @@ export default class ramzinex extends Exchange {
|
|
|
444
444
|
const ohlcvs = [];
|
|
445
445
|
for (let i = 0; i < openList.length; i++) {
|
|
446
446
|
if (market['quote'] === 'IRT') {
|
|
447
|
-
openList[i] = openList[i] ? openList[i] / 10 : 0;
|
|
448
|
-
highList[i] = highList[i] ? highList[i] / 10 : 0;
|
|
449
|
-
lastList[i] = lastList[i] ? lastList[i] / 10 : 0;
|
|
450
|
-
closeList[i] = closeList[i] ? closeList[i] / 10 : 0;
|
|
451
|
-
volumeList[i] = volumeList[i] ? volumeList[i] / 10 : 0;
|
|
447
|
+
openList[i] = openList[i] ? this.parseToNumeric(openList[i]) / 10 : 0;
|
|
448
|
+
highList[i] = highList[i] ? this.parseToNumeric(highList[i]) / 10 : 0;
|
|
449
|
+
lastList[i] = lastList[i] ? this.parseToNumeric(lastList[i]) / 10 : 0;
|
|
450
|
+
closeList[i] = closeList[i] ? this.parseToNumeric(closeList[i]) / 10 : 0;
|
|
451
|
+
volumeList[i] = volumeList[i] ? this.parseToNumeric(volumeList[i]) / 10 : 0;
|
|
452
452
|
}
|
|
453
453
|
ohlcvs.push([
|
|
454
454
|
timestampList[i],
|
|
@@ -483,15 +483,15 @@ export default class ramzinex extends Exchange {
|
|
|
483
483
|
const bids = this.safeList(orderbook, 'sells');
|
|
484
484
|
const asks = this.safeList(orderbook, 'buys');
|
|
485
485
|
for (let i = 0; i < bids.length; i++) {
|
|
486
|
-
bids[i][0] = bids[i][0] ? bids[i][0] / 10 : 0;
|
|
486
|
+
bids[i][0] = bids[i][0] ? this.parseToNumeric(bids[i][0]) / 10 : 0;
|
|
487
487
|
}
|
|
488
488
|
for (let i = 0; i < asks.length; i++) {
|
|
489
|
-
asks[i][0] = asks[i][0] ? asks[i][0] / 10 : 0;
|
|
489
|
+
asks[i][0] = asks[i][0] ? this.parseToNumeric(asks[i][0]) / 10 : 0;
|
|
490
490
|
}
|
|
491
491
|
orderbook['buys'] = asks;
|
|
492
492
|
orderbook['sells'] = bids;
|
|
493
493
|
}
|
|
494
|
-
const timestamp =
|
|
494
|
+
const timestamp = this.milliseconds();
|
|
495
495
|
return this.parseOrderBook(orderbook, symbol, timestamp, 'sells', 'buys');
|
|
496
496
|
}
|
|
497
497
|
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
|
package/js/src/sarrafex.js
CHANGED
|
@@ -427,7 +427,7 @@ export default class sarrafex extends Exchange {
|
|
|
427
427
|
*/
|
|
428
428
|
await this.loadMarkets();
|
|
429
429
|
const market = this.market(symbol);
|
|
430
|
-
const endTime =
|
|
430
|
+
const endTime = this.milliseconds();
|
|
431
431
|
const request = {
|
|
432
432
|
'symbol': market['base'] + market['quote'],
|
|
433
433
|
'from': (endTime / 1000) - (24 * 60 * 60),
|
|
@@ -483,7 +483,7 @@ export default class sarrafex extends Exchange {
|
|
|
483
483
|
};
|
|
484
484
|
let orderBook = await this.publicGetApiGatewayExchangerOrderbook(request);
|
|
485
485
|
orderBook = this.safeDict(orderBook, 0);
|
|
486
|
-
const timestamp =
|
|
486
|
+
const timestamp = this.milliseconds();
|
|
487
487
|
return this.parseOrderBook(orderBook, symbol, timestamp, 'bids', 'asks', 'price', 'quantity');
|
|
488
488
|
}
|
|
489
489
|
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
|
|
@@ -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 | Uint16Array | Uint32Array;
|
|
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 | Uint16Array | Uint32Array;
|
|
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 | Uint16Array | Uint32Array;
|
|
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 | Uint16Array | Uint32Array;
|
|
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 | Uint32Array | Uint1
|
|
|
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 | Uint16Array | Uint32Array;
|
|
73
73
|
export function zip(data: any, opts: any, cb: any): () => void;
|
|
74
74
|
/**
|
|
75
75
|
* Synchronously creates a ZIP file. Prefer using `zip` for better performance
|
|
@@ -15,7 +15,7 @@ export declare class BigInteger {
|
|
|
15
15
|
protected intValue(): number;
|
|
16
16
|
protected byteValue(): number;
|
|
17
17
|
protected shortValue(): number;
|
|
18
|
-
protected signum():
|
|
18
|
+
protected signum(): 0 | 1 | -1;
|
|
19
19
|
toByteArray(): number[];
|
|
20
20
|
protected equals(a: BigInteger): boolean;
|
|
21
21
|
protected min(a: BigInteger): BigInteger;
|
|
@@ -1,3 +1,9 @@
|
|
|
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
|
+
|
|
1
7
|
declare const _default: string;
|
|
2
8
|
export declare namespace formatters {
|
|
3
9
|
function RFC1738(value: any): string;
|
|
@@ -1,3 +1,9 @@
|
|
|
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
|
+
|
|
1
7
|
import formats = require("./formats.cjs");
|
|
2
8
|
import parse = require("./parse.cjs");
|
|
3
9
|
import stringify = require("./stringify.cjs");
|
|
@@ -1,2 +1,8 @@
|
|
|
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
|
+
|
|
1
7
|
declare function _exports(str: any, opts: any): any;
|
|
2
8
|
export = _exports;
|
|
@@ -1,2 +1,8 @@
|
|
|
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
|
+
|
|
1
7
|
declare function _exports(object: any, opts: any): string;
|
|
2
8
|
export = _exports;
|
|
@@ -1,3 +1,9 @@
|
|
|
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
|
+
|
|
1
7
|
export function arrayToObject(source: any, options: any): any;
|
|
2
8
|
export function assign(target: any, source: any): any;
|
|
3
9
|
export function combine(a: any, b: any): any[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Abi, FunctionAbi, RawArgs } from '../../../types/index.js';
|
|
2
2
|
import { AbiParserInterface } from './interface.js';
|
|
3
3
|
export declare function createAbiParser(abi: Abi): AbiParserInterface;
|
|
4
|
-
export declare function getAbiVersion(abi: Abi):
|
|
4
|
+
export declare function getAbiVersion(abi: Abi): 0 | 1 | 2;
|
|
5
5
|
export declare function isNoConstructorValid(method: string, argsCalldata: RawArgs, abiMethod?: FunctionAbi): boolean;
|
package/js/src/tabdeal.js
CHANGED
|
@@ -315,7 +315,7 @@ export default class tabdeal extends Exchange {
|
|
|
315
315
|
*/
|
|
316
316
|
await this.loadMarkets();
|
|
317
317
|
const market = this.market(symbol);
|
|
318
|
-
const endTime =
|
|
318
|
+
const endTime = this.milliseconds();
|
|
319
319
|
const request = {
|
|
320
320
|
'symbol': market['id'],
|
|
321
321
|
'from': (endTime / 1000) - (24 * 60 * 60),
|
|
@@ -369,7 +369,7 @@ export default class tabdeal extends Exchange {
|
|
|
369
369
|
'tabdealSymbol': market['id'],
|
|
370
370
|
};
|
|
371
371
|
const response = await this.publicGetRApiV1Depth(request);
|
|
372
|
-
const timestamp =
|
|
372
|
+
const timestamp = this.milliseconds();
|
|
373
373
|
return this.parseOrderBook(response, symbol, timestamp);
|
|
374
374
|
}
|
|
375
375
|
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
|
package/js/src/ubitex.js
CHANGED
|
@@ -356,7 +356,7 @@ export default class ubitex extends Exchange {
|
|
|
356
356
|
*/
|
|
357
357
|
await this.loadMarkets();
|
|
358
358
|
const market = this.market(symbol);
|
|
359
|
-
const endTime =
|
|
359
|
+
const endTime = this.milliseconds();
|
|
360
360
|
const request = {
|
|
361
361
|
'symbol': market['base'] + market['quote'],
|
|
362
362
|
'from': (endTime / 1000) - (24 * 60 * 60),
|
|
@@ -412,13 +412,13 @@ export default class ubitex extends Exchange {
|
|
|
412
412
|
'id': market['id'],
|
|
413
413
|
};
|
|
414
414
|
const orderBook = await this.publicGetApiDashboard(request);
|
|
415
|
-
const timestamp =
|
|
415
|
+
const timestamp = this.milliseconds();
|
|
416
416
|
return this.parseOrderBook(orderBook, symbol, timestamp, 'buyers', 'sellers', 'price', 'totalAmount');
|
|
417
417
|
}
|
|
418
418
|
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
|
|
419
419
|
const query = this.omit(params, this.extractParams(path));
|
|
420
420
|
let url = this.urls['api']['public'] + '/' + path;
|
|
421
|
-
if (params
|
|
421
|
+
if (this.safeString(params, 'src') !== undefined && this.safeString(params, 'dest') !== undefined) {
|
|
422
422
|
url = url + '?' + this.urlencode(query);
|
|
423
423
|
}
|
|
424
424
|
if (path === 'api/dashboard') {
|
package/js/src/wallex.js
CHANGED
|
@@ -395,7 +395,7 @@ export default class wallex extends Exchange {
|
|
|
395
395
|
*/
|
|
396
396
|
await this.loadMarkets();
|
|
397
397
|
const market = this.market(symbol);
|
|
398
|
-
const endTime =
|
|
398
|
+
const endTime = this.milliseconds();
|
|
399
399
|
const request = {
|
|
400
400
|
'symbol': market['id'],
|
|
401
401
|
'from': (endTime / 1000) - (24 * 60 * 60),
|
|
@@ -449,7 +449,7 @@ export default class wallex extends Exchange {
|
|
|
449
449
|
};
|
|
450
450
|
const response = await this.publicGetV1Depth(request);
|
|
451
451
|
const orderBook = this.safeDict(response, 'result', {});
|
|
452
|
-
const timestamp =
|
|
452
|
+
const timestamp = this.milliseconds();
|
|
453
453
|
return this.parseOrderBook(orderBook, symbol, timestamp, 'bid', 'ask', 'price', 'quantity');
|
|
454
454
|
}
|
|
455
455
|
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
|
package/js/test.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|