ccxt-ir 4.17.0 → 4.18.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 (65) hide show
  1. package/README.md +4 -4
  2. package/dist/373.ccxt.browser.js +1 -1
  3. package/dist/373.ccxt.browser.min.js +1 -1
  4. package/dist/ccxt.browser.min.js +15 -15
  5. package/dist/cjs/ccxt.js +34 -1
  6. package/dist/cjs/package.json +1 -1
  7. package/dist/cjs/src/baazar.js +160 -0
  8. package/dist/cjs/src/daric.js +181 -0
  9. package/dist/cjs/src/digikalagold.js +178 -0
  10. package/dist/cjs/src/goldcore.js +155 -0
  11. package/dist/cjs/src/goldika.js +163 -0
  12. package/dist/cjs/src/goldis.js +157 -0
  13. package/dist/cjs/src/hamrahgold.js +171 -0
  14. package/dist/cjs/src/talapp.js +156 -0
  15. package/dist/cjs/src/zarafza.js +159 -0
  16. package/dist/cjs/src/zarminex.js +162 -0
  17. package/dist/cjs/src/zarniv.js +178 -0
  18. package/js/ccxt.d.ts +35 -2
  19. package/js/ccxt.js +24 -2
  20. package/js/src/abstract/baazar.d.ts +8 -0
  21. package/js/src/abstract/baazar.js +11 -0
  22. package/js/src/abstract/daric.d.ts +8 -0
  23. package/js/src/abstract/daric.js +11 -0
  24. package/js/src/abstract/digikalagold.d.ts +8 -0
  25. package/js/src/abstract/digikalagold.js +11 -0
  26. package/js/src/abstract/goldcore.d.ts +8 -0
  27. package/js/src/abstract/goldcore.js +11 -0
  28. package/js/src/abstract/goldika.d.ts +8 -0
  29. package/js/src/abstract/goldika.js +11 -0
  30. package/js/src/abstract/goldis.d.ts +8 -0
  31. package/js/src/abstract/goldis.js +11 -0
  32. package/js/src/abstract/hamrahgold.d.ts +8 -0
  33. package/js/src/abstract/hamrahgold.js +11 -0
  34. package/js/src/abstract/talapp.d.ts +8 -0
  35. package/js/src/abstract/talapp.js +11 -0
  36. package/js/src/abstract/zarafza.d.ts +8 -0
  37. package/js/src/abstract/zarafza.js +11 -0
  38. package/js/src/abstract/zarminex.d.ts +8 -0
  39. package/js/src/abstract/zarminex.js +11 -0
  40. package/js/src/abstract/zarniv.d.ts +9 -0
  41. package/js/src/abstract/zarniv.js +11 -0
  42. package/js/src/baazar.d.ts +20 -0
  43. package/js/src/baazar.js +159 -0
  44. package/js/src/daric.d.ts +22 -0
  45. package/js/src/daric.js +180 -0
  46. package/js/src/digikalagold.d.ts +21 -0
  47. package/js/src/digikalagold.js +177 -0
  48. package/js/src/goldcore.d.ts +20 -0
  49. package/js/src/goldcore.js +154 -0
  50. package/js/src/goldika.d.ts +20 -0
  51. package/js/src/goldika.js +162 -0
  52. package/js/src/goldis.d.ts +21 -0
  53. package/js/src/goldis.js +156 -0
  54. package/js/src/hamrahgold.d.ts +21 -0
  55. package/js/src/hamrahgold.js +170 -0
  56. package/js/src/talapp.d.ts +20 -0
  57. package/js/src/talapp.js +155 -0
  58. package/js/src/zarafza.d.ts +20 -0
  59. package/js/src/zarafza.js +158 -0
  60. package/js/src/zarminex.d.ts +20 -0
  61. package/js/src/zarminex.js +161 -0
  62. package/js/src/zarniv.d.ts +21 -0
  63. package/js/src/zarniv.js +177 -0
  64. package/js/test.js +50 -43
  65. package/package.json +1 -1
@@ -0,0 +1,159 @@
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 baazar
12
+ * @augments Exchange
13
+ */
14
+ export default class baazar extends Exchange {
15
+ describe() {
16
+ return this.deepExtend(super.describe(), {
17
+ 'id': 'baazar',
18
+ 'name': 'Baazar',
19
+ 'countries': ['IR'],
20
+ 'rateLimit': 1000,
21
+ 'version': 'v1',
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.baazar.ir',
42
+ },
43
+ 'www': 'https://baazar.ir',
44
+ 'doc': 'https://api.baazar.ir/landing/v1/price/DAILY/30',
45
+ },
46
+ 'api': {
47
+ 'public': {
48
+ 'get': {
49
+ 'landing/v1/price/DAILY/30': 1,
50
+ },
51
+ },
52
+ },
53
+ });
54
+ }
55
+ async fetchMarkets(params = {}) {
56
+ const response = await this.publicGetLandingV1PriceDAILY30(params);
57
+ return [this.parseMarket(response)];
58
+ }
59
+ parseMarket(response) {
60
+ const data = this.safeDict(response, 'data', {});
61
+ return {
62
+ 'id': 'XAU18IRT',
63
+ 'symbol': 'XAU18/IRT',
64
+ 'base': 'XAU18',
65
+ 'quote': 'IRT',
66
+ 'settle': undefined,
67
+ 'baseId': 'XAU18',
68
+ 'quoteId': 'IRT',
69
+ 'settleId': undefined,
70
+ 'type': 'otc',
71
+ 'spot': false,
72
+ 'margin': false,
73
+ 'swap': false,
74
+ 'future': false,
75
+ 'option': false,
76
+ 'active': this.safeNumber(data, 'currentTime') !== undefined,
77
+ 'contract': false,
78
+ 'linear': undefined,
79
+ 'inverse': undefined,
80
+ 'contractSize': undefined,
81
+ 'expiry': undefined,
82
+ 'expiryDatetime': undefined,
83
+ 'strike': undefined,
84
+ 'optionType': undefined,
85
+ 'precision': {
86
+ 'amount': undefined,
87
+ 'price': undefined,
88
+ },
89
+ 'limits': {
90
+ 'leverage': { 'min': undefined, 'max': undefined },
91
+ 'amount': { 'min': undefined, 'max': undefined },
92
+ 'price': { 'min': undefined, 'max': undefined },
93
+ 'cost': { 'min': undefined, 'max': undefined },
94
+ },
95
+ 'created': undefined,
96
+ 'info': data,
97
+ };
98
+ }
99
+ async fetchTicker(symbol, params = {}) {
100
+ await this.loadMarkets();
101
+ const market = this.market(symbol);
102
+ const response = await this.publicGetLandingV1PriceDAILY30(params);
103
+ return this.parseTicker(response, market);
104
+ }
105
+ async fetchTickers(symbols = undefined, params = {}) {
106
+ await this.loadMarkets();
107
+ if (symbols !== undefined) {
108
+ symbols = this.marketSymbols(symbols);
109
+ }
110
+ const response = await this.publicGetLandingV1PriceDAILY30(params);
111
+ const market = this.market('XAU18/IRT');
112
+ const ticker = this.parseTicker(response, market);
113
+ const result = {};
114
+ result[ticker['symbol']] = ticker;
115
+ return this.filterByArrayTickers(result, 'symbol', symbols);
116
+ }
117
+ parseTicker(response, market = undefined) {
118
+ const data = this.safeDict(response, 'data', {});
119
+ let bid = this.safeNumber(data, 'sellPrice');
120
+ let ask = this.safeNumber(data, 'buyPrice');
121
+ if (bid !== undefined) {
122
+ bid = bid / 10;
123
+ }
124
+ if (ask !== undefined) {
125
+ ask = ask / 10;
126
+ }
127
+ return this.safeTicker({
128
+ 'symbol': market['symbol'],
129
+ 'timestamp': this.safeInteger(data, 'currentTime'),
130
+ 'datetime': undefined,
131
+ 'high': undefined,
132
+ 'low': undefined,
133
+ 'bid': bid,
134
+ 'bidVolume': undefined,
135
+ 'ask': ask,
136
+ 'askVolume': undefined,
137
+ 'vwap': undefined,
138
+ 'open': undefined,
139
+ 'close': ask,
140
+ 'last': ask,
141
+ 'previousClose': undefined,
142
+ 'change': undefined,
143
+ 'percentage': undefined,
144
+ 'average': undefined,
145
+ 'baseVolume': undefined,
146
+ 'quoteVolume': undefined,
147
+ 'info': data,
148
+ }, market);
149
+ }
150
+ sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
151
+ let url = this.urls['api'][api] + '/' + this.implodeParams(path, params);
152
+ const query = this.omit(params, this.extractParams(path));
153
+ if (Object.keys(query).length) {
154
+ url += '?' + this.urlencode(query);
155
+ }
156
+ headers = { 'Accept': 'application/json' };
157
+ return { 'url': url, 'method': method, 'body': body, 'headers': headers };
158
+ }
159
+ }
@@ -0,0 +1,22 @@
1
+ import Exchange from './base/Exchange.js';
2
+ import { Market, Strings, Ticker, Tickers } from './base/types.js';
3
+ /**
4
+ * @class daric
5
+ * @augments Exchange
6
+ */
7
+ export default class daric extends Exchange {
8
+ describe(): any;
9
+ fetchMarkets(params?: {}): Promise<Market[]>;
10
+ fetchPairList(params?: {}): any;
11
+ parseMarkets(response: any): Market[];
12
+ parseMarket(market: any): Market;
13
+ fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
14
+ fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
15
+ parseTicker(response: any, market?: Market): Ticker;
16
+ sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
17
+ url: string;
18
+ method: string;
19
+ body: any;
20
+ headers: any;
21
+ };
22
+ }
@@ -0,0 +1,180 @@
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 daric
12
+ * @augments Exchange
13
+ */
14
+ export default class daric extends Exchange {
15
+ describe() {
16
+ return this.deepExtend(super.describe(), {
17
+ 'id': 'daric',
18
+ 'name': 'Daric',
19
+ 'countries': ['IR'],
20
+ 'rateLimit': 1000,
21
+ 'version': '1',
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://apie.daric.gold',
42
+ },
43
+ 'www': 'https://daric.gold',
44
+ 'doc': 'https://apie.daric.gold/public/general/PairList?src=TMN',
45
+ },
46
+ 'api': {
47
+ 'public': {
48
+ 'get': {
49
+ 'public/general/PairList': 1,
50
+ },
51
+ },
52
+ },
53
+ });
54
+ }
55
+ async fetchMarkets(params = {}) {
56
+ const response = await this.fetchPairList(params);
57
+ return this.parseMarkets(response);
58
+ }
59
+ fetchPairList(params = {}) {
60
+ return this.publicGetPublicGeneralPairList(this.extend({ 'src': 'TMN' }, params));
61
+ }
62
+ parseMarkets(response) {
63
+ let markets = [];
64
+ if (Array.isArray(response)) {
65
+ markets = response;
66
+ }
67
+ const result = [];
68
+ for (let i = 0; i < markets.length; i++) {
69
+ const market = markets[i];
70
+ const baseId = this.safeString(market, 'destinationCoinSymbol');
71
+ if (baseId === 'GOLD18' || baseId === 'SILVER') {
72
+ result.push(this.parseMarket(market));
73
+ }
74
+ }
75
+ return result;
76
+ }
77
+ parseMarket(market) {
78
+ const baseId = this.safeString(market, 'destinationCoinSymbol');
79
+ let base = 'XAG';
80
+ if (baseId === 'GOLD18') {
81
+ base = 'XAU18';
82
+ }
83
+ const quote = 'IRT';
84
+ return {
85
+ 'id': this.safeString(market, 'id'),
86
+ 'symbol': base + '/' + quote,
87
+ 'base': base,
88
+ 'quote': quote,
89
+ 'settle': undefined,
90
+ 'baseId': baseId,
91
+ 'quoteId': this.safeString(market, 'sourceCoinSymbol'),
92
+ 'settleId': undefined,
93
+ 'type': 'otc',
94
+ 'spot': false,
95
+ 'margin': false,
96
+ 'swap': false,
97
+ 'future': false,
98
+ 'option': false,
99
+ 'active': true,
100
+ 'contract': false,
101
+ 'linear': undefined,
102
+ 'inverse': undefined,
103
+ 'contractSize': undefined,
104
+ 'expiry': undefined,
105
+ 'expiryDatetime': undefined,
106
+ 'strike': undefined,
107
+ 'optionType': undefined,
108
+ 'precision': {
109
+ 'amount': undefined,
110
+ 'price': this.safeInteger(market, 'decimalLength'),
111
+ },
112
+ 'limits': {
113
+ 'leverage': { 'min': undefined, 'max': undefined },
114
+ 'amount': { 'min': undefined, 'max': undefined },
115
+ 'price': { 'min': undefined, 'max': undefined },
116
+ 'cost': { 'min': undefined, 'max': undefined },
117
+ },
118
+ 'created': undefined,
119
+ 'info': market,
120
+ };
121
+ }
122
+ async fetchTicker(symbol, params = {}) {
123
+ await this.loadMarkets();
124
+ const market = this.market(symbol);
125
+ const response = await this.fetchPairList(params);
126
+ return this.parseTicker(response, market);
127
+ }
128
+ async fetchTickers(symbols = undefined, params = {}) {
129
+ await this.loadMarkets();
130
+ if (symbols !== undefined) {
131
+ symbols = this.marketSymbols(symbols);
132
+ }
133
+ const response = await this.fetchPairList(params);
134
+ const result = {};
135
+ const markets = this.parseMarkets(response);
136
+ for (let i = 0; i < markets.length; i++) {
137
+ const ticker = this.parseTicker(response, markets[i]);
138
+ result[ticker['symbol']] = ticker;
139
+ }
140
+ return this.filterByArrayTickers(result, 'symbol', symbols);
141
+ }
142
+ parseTicker(response, market = undefined) {
143
+ let markets = [];
144
+ if (Array.isArray(response)) {
145
+ markets = response;
146
+ }
147
+ const ticker = this.filterBy(markets, 'destinationCoinSymbol', market['baseId'])[0];
148
+ return this.safeTicker({
149
+ 'symbol': market['symbol'],
150
+ 'timestamp': undefined,
151
+ 'datetime': undefined,
152
+ 'high': this.safeNumber(ticker, 'highestRecentOrder'),
153
+ 'low': this.safeNumber(ticker, 'lowestRecentOrder'),
154
+ 'bid': this.safeNumber(ticker, 'bestBuy'),
155
+ 'bidVolume': undefined,
156
+ 'ask': this.safeNumber(ticker, 'bestSell'),
157
+ 'askVolume': undefined,
158
+ 'vwap': undefined,
159
+ 'open': undefined,
160
+ 'close': this.safeNumber(ticker, 'lastOrderPrice'),
161
+ 'last': this.safeNumber(ticker, 'lastOrderPrice'),
162
+ 'previousClose': undefined,
163
+ 'change': undefined,
164
+ 'percentage': this.safeNumber(ticker, 'change'),
165
+ 'average': undefined,
166
+ 'baseVolume': this.safeNumber(ticker, 'todayTradeAmount'),
167
+ 'quoteVolume': this.safeNumber(ticker, 'todayTradeTotal'),
168
+ 'info': ticker,
169
+ }, market);
170
+ }
171
+ sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
172
+ let url = this.urls['api'][api] + '/' + this.implodeParams(path, params);
173
+ const query = this.omit(params, this.extractParams(path));
174
+ if (Object.keys(query).length) {
175
+ url += '?' + this.urlencode(query);
176
+ }
177
+ headers = { 'Accept': 'application/json' };
178
+ return { 'url': url, 'method': method, 'body': body, 'headers': headers };
179
+ }
180
+ }
@@ -0,0 +1,21 @@
1
+ import Exchange from './base/Exchange.js';
2
+ import { Market, Strings, Ticker, Tickers } from './base/types.js';
3
+ /**
4
+ * @class digikalagold
5
+ * @augments Exchange
6
+ */
7
+ export default class digikalagold extends Exchange {
8
+ describe(): any;
9
+ fetchMarkets(params?: {}): Promise<Market[]>;
10
+ fetchPrice(params?: {}): Promise<any>;
11
+ parseMarketEntry(response: any, id: string): Market;
12
+ fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
13
+ fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
14
+ parseTicker(response: 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
+ }
@@ -0,0 +1,177 @@
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
+ import { ExchangeError } from './base/errors.js';
10
+ // ---------------------------------------------------------------------------
11
+ /**
12
+ * @class digikalagold
13
+ * @augments Exchange
14
+ */
15
+ export default class digikalagold extends Exchange {
16
+ describe() {
17
+ return this.deepExtend(super.describe(), {
18
+ 'id': 'digikalagold',
19
+ 'name': 'Digikala Gold',
20
+ 'countries': ['IR'],
21
+ 'rateLimit': 1000,
22
+ 'version': 'v1',
23
+ 'certified': false,
24
+ 'pro': false,
25
+ 'has': {
26
+ 'CORS': undefined,
27
+ 'spot': false,
28
+ 'margin': false,
29
+ 'swap': false,
30
+ 'future': false,
31
+ 'option': false,
32
+ 'fetchMarkets': true,
33
+ 'fetchTicker': true,
34
+ 'fetchTickers': true,
35
+ 'otc': true,
36
+ },
37
+ 'options': {
38
+ 'defaultType': 'otc',
39
+ },
40
+ 'urls': {
41
+ 'api': {
42
+ 'public': 'https://api.digikala.com',
43
+ },
44
+ 'www': 'https://www.digikala.com',
45
+ 'doc': 'https://api.digikala.com/non-inventory/v1/prices/',
46
+ },
47
+ 'api': {
48
+ 'public': {
49
+ 'get': {
50
+ 'non-inventory/v1/prices/': 1,
51
+ },
52
+ },
53
+ },
54
+ });
55
+ }
56
+ async fetchMarkets(params = {}) {
57
+ const response = await this.fetchPrice(params);
58
+ return [
59
+ this.parseMarketEntry(response, 'gold18'),
60
+ this.parseMarketEntry(response, 'silver999'),
61
+ ];
62
+ }
63
+ async fetchPrice(params = {}) {
64
+ const response = await this.publicGetNonInventoryV1Prices(params);
65
+ const gold = this.safeDict(response, 'gold18', {});
66
+ if (this.safeNumber(gold, 'price') !== undefined) {
67
+ return response;
68
+ }
69
+ throw new ExchangeError(this.id + ' returned an invalid response');
70
+ }
71
+ parseMarketEntry(response, id) {
72
+ const isGold = id === 'gold18';
73
+ let base = 'XAG';
74
+ if (isGold) {
75
+ base = 'XAU18';
76
+ }
77
+ const quote = 'IRT';
78
+ const info = this.safeDict(response, id, {});
79
+ return {
80
+ 'id': base + quote,
81
+ 'symbol': base + '/' + quote,
82
+ 'base': base,
83
+ 'quote': quote,
84
+ 'settle': undefined,
85
+ 'baseId': id,
86
+ 'quoteId': quote,
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': undefined,
105
+ 'price': undefined,
106
+ },
107
+ 'limits': {
108
+ 'leverage': { 'min': undefined, 'max': undefined },
109
+ 'amount': { 'min': undefined, 'max': undefined },
110
+ 'price': { 'min': undefined, 'max': undefined },
111
+ 'cost': { 'min': undefined, 'max': undefined },
112
+ },
113
+ 'created': undefined,
114
+ 'info': info,
115
+ };
116
+ }
117
+ async fetchTicker(symbol, params = {}) {
118
+ await this.loadMarkets();
119
+ const market = this.market(symbol);
120
+ const response = await this.fetchPrice(params);
121
+ return this.parseTicker(response, market);
122
+ }
123
+ async fetchTickers(symbols = undefined, params = {}) {
124
+ await this.loadMarkets();
125
+ if (symbols !== undefined) {
126
+ symbols = this.marketSymbols(symbols);
127
+ }
128
+ const response = await this.fetchPrice(params);
129
+ const result = {};
130
+ const marketSymbols = ['XAU18/IRT', 'XAG/IRT'];
131
+ for (let i = 0; i < marketSymbols.length; i++) {
132
+ const symbol = marketSymbols[i];
133
+ const market = this.market(symbol);
134
+ const ticker = this.parseTicker(response, market);
135
+ result[ticker['symbol']] = ticker;
136
+ }
137
+ return this.filterByArrayTickers(result, 'symbol', symbols);
138
+ }
139
+ parseTicker(response, market = undefined) {
140
+ const data = this.safeDict(response, market['baseId'], {});
141
+ let price = this.safeNumber(data, 'price');
142
+ if (price !== undefined) {
143
+ price = price * 100;
144
+ }
145
+ return this.safeTicker({
146
+ 'symbol': market['symbol'],
147
+ 'timestamp': undefined,
148
+ 'datetime': undefined,
149
+ 'high': undefined,
150
+ 'low': undefined,
151
+ 'bid': price,
152
+ 'bidVolume': undefined,
153
+ 'ask': price,
154
+ 'askVolume': undefined,
155
+ 'vwap': undefined,
156
+ 'open': undefined,
157
+ 'close': price,
158
+ 'last': price,
159
+ 'previousClose': undefined,
160
+ 'change': undefined,
161
+ 'percentage': undefined,
162
+ 'average': undefined,
163
+ 'baseVolume': undefined,
164
+ 'quoteVolume': undefined,
165
+ 'info': data,
166
+ }, market);
167
+ }
168
+ sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
169
+ let url = this.urls['api'][api] + '/' + this.implodeParams(path, params);
170
+ const query = this.omit(params, this.extractParams(path));
171
+ if (Object.keys(query).length) {
172
+ url += '?' + this.urlencode(query);
173
+ }
174
+ headers = { 'Accept': 'application/json' };
175
+ return { 'url': url, 'method': method, 'body': body, 'headers': headers };
176
+ }
177
+ }
@@ -0,0 +1,20 @@
1
+ import Exchange from './base/Exchange.js';
2
+ import { Market, Strings, Ticker, Tickers } from './base/types.js';
3
+ /**
4
+ * @class goldcore
5
+ * @augments Exchange
6
+ */
7
+ export default class goldcore extends Exchange {
8
+ describe(): any;
9
+ fetchMarkets(params?: {}): Promise<Market[]>;
10
+ parseMarket(response: any): Market;
11
+ fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
12
+ fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
13
+ parseTicker(response: 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
+ }