ccxt-ir 4.16.1 → 4.17.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.
Files changed (46) hide show
  1. package/README.md +4 -4
  2. package/dist/ccxt.browser.min.js +3 -3
  3. package/dist/cjs/ccxt.js +252 -240
  4. package/dist/cjs/src/asacoine.js +19 -7
  5. package/dist/cjs/src/base/Exchange.js +7364 -7360
  6. package/dist/cjs/src/bitpin.js +1 -1
  7. package/dist/cjs/src/iranexchange.js +390 -390
  8. package/dist/cjs/src/melligold.js +221 -0
  9. package/dist/cjs/src/milligold.js +156 -0
  10. package/dist/cjs/src/technogold.js +153 -0
  11. package/dist/cjs/src/wallgold.js +164 -0
  12. package/js/ccxt.d.ts +718 -706
  13. package/js/ccxt.js +521 -513
  14. package/js/src/abstract/melligold.d.ts +8 -0
  15. package/js/src/abstract/melligold.js +11 -0
  16. package/js/src/abstract/milligold.d.ts +8 -0
  17. package/js/src/abstract/milligold.js +11 -0
  18. package/js/src/abstract/technogold.d.ts +8 -0
  19. package/js/src/abstract/technogold.js +11 -0
  20. package/js/src/abstract/wallgold.d.ts +8 -0
  21. package/js/src/abstract/wallgold.js +11 -0
  22. package/js/src/asacoine.js +19 -7
  23. package/js/src/base/Exchange.d.ts +926 -926
  24. package/js/src/base/Exchange.js +7397 -7393
  25. package/js/src/bitpin.js +1 -1
  26. package/js/src/coinbaseexchange.d.ts +334 -334
  27. package/js/src/iranexchange.js +393 -393
  28. package/js/src/melligold.d.ts +21 -0
  29. package/js/src/melligold.js +220 -0
  30. package/js/src/milligold.d.ts +20 -0
  31. package/js/src/milligold.js +155 -0
  32. package/js/src/protobuf/mexc/compiled.d.cts +2 -2
  33. package/js/src/static_dependencies/fflake/browser.d.ts +222 -222
  34. package/js/src/static_dependencies/jsencrypt/lib/jsbn/jsbn.d.ts +101 -101
  35. package/js/src/static_dependencies/qs/formats.d.cts +8 -8
  36. package/js/src/static_dependencies/qs/index.d.cts +4 -4
  37. package/js/src/static_dependencies/qs/parse.d.cts +2 -2
  38. package/js/src/static_dependencies/qs/stringify.d.cts +2 -2
  39. package/js/src/static_dependencies/qs/utils.d.cts +9 -9
  40. package/js/src/static_dependencies/starknet/utils/calldata/parser/index.d.ts +5 -5
  41. package/js/src/technogold.d.ts +20 -0
  42. package/js/src/technogold.js +152 -0
  43. package/js/src/wallgold.d.ts +21 -0
  44. package/js/src/wallgold.js +163 -0
  45. package/js/test.js +61 -79
  46. package/package.json +1 -1
@@ -0,0 +1,8 @@
1
+ import { implicitReturnType } from '../base/types.js';
2
+ import { Exchange as _Exchange } from '../base/Exchange.js';
3
+ interface Exchange {
4
+ publicGetApiV1ExchangeBuySellPrice(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;
@@ -0,0 +1,8 @@
1
+ import { implicitReturnType } from '../base/types.js';
2
+ import { Exchange as _Exchange } from '../base/Exchange.js';
3
+ interface Exchange {
4
+ publicGetApiV1PublicMilliPriceExternal(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;
@@ -0,0 +1,8 @@
1
+ import { implicitReturnType } from '../base/types.js';
2
+ import { Exchange as _Exchange } from '../base/Exchange.js';
3
+ interface Exchange {
4
+ publicGetCustomerTradeablesOnlyPrice1(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;
@@ -0,0 +1,8 @@
1
+ import { implicitReturnType } from '../base/types.js';
2
+ import { Exchange as _Exchange } from '../base/Exchange.js';
3
+ interface Exchange {
4
+ publicGetApiV1Price(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;
@@ -234,14 +234,26 @@ export default class asacoine extends Exchange {
234
234
  const bid = this.safeList(ticker, 'bid', []);
235
235
  const ask = this.safeList(ticker, 'ask', []);
236
236
  const nestedOrderBook = this.safeDict(ticker, 'orderBook');
237
- const cumulativeOrderBook = nestedOrderBook === undefined && this.safeString(ticker, 'bestBid') !== undefined ? ticker : nestedOrderBook;
238
- const orderBook = cumulativeOrderBook === undefined ? {} : cumulativeOrderBook;
239
- const bidPriceString = cumulativeOrderBook === undefined ? this.safeString(bid, 0) : this.safeString(orderBook, 'bestBid');
240
- const askPriceString = cumulativeOrderBook === undefined ? this.safeString(ask, 0) : this.safeString(orderBook, 'bestAsk');
237
+ let cumulativeOrderBook = nestedOrderBook;
238
+ if ((nestedOrderBook === undefined) && (this.safeString(ticker, 'bestBid') !== undefined)) {
239
+ cumulativeOrderBook = ticker;
240
+ }
241
+ let orderBook = cumulativeOrderBook;
242
+ if (orderBook === undefined) {
243
+ orderBook = {};
244
+ }
245
+ let bidPriceString = this.safeString(orderBook, 'bestBid');
246
+ let askPriceString = this.safeString(orderBook, 'bestAsk');
247
+ let bidVolume = this.safeNumber(orderBook, 'bidSize');
248
+ let askVolume = this.safeNumber(orderBook, 'askSize');
249
+ if (cumulativeOrderBook === undefined) {
250
+ bidPriceString = this.safeString(bid, 0);
251
+ askPriceString = this.safeString(ask, 0);
252
+ bidVolume = this.safeNumber(bid, 1);
253
+ askVolume = this.safeNumber(ask, 1);
254
+ }
241
255
  const bidPrice = this.parseNumber(bidPriceString);
242
256
  const askPrice = this.parseNumber(askPriceString);
243
- const bidVolume = cumulativeOrderBook === undefined ? this.safeNumber(bid, 1) : this.safeNumber(orderBook, 'bidSize');
244
- const askVolume = cumulativeOrderBook === undefined ? this.safeNumber(ask, 1) : this.safeNumber(orderBook, 'askSize');
245
257
  let last = undefined;
246
258
  if ((bidPriceString !== undefined) && (askPriceString !== undefined)) {
247
259
  last = this.parseNumber(Precise.stringDiv(Precise.stringAdd(bidPriceString, askPriceString), '2'));
@@ -285,7 +297,7 @@ export default class asacoine extends Exchange {
285
297
  if (symbols !== undefined) {
286
298
  symbols = this.marketSymbols(symbols);
287
299
  }
288
- let response;
300
+ let response = {};
289
301
  if (type === 'otc') {
290
302
  response = await this.publicGetV1MarketPairsCumulative(request);
291
303
  }