ccxt-ir 4.18.1 → 4.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/ccxt.js CHANGED
@@ -181,6 +181,7 @@ var zaif = require('./src/zaif.js');
181
181
  var zarafza = require('./src/zarafza.js');
182
182
  var zarminex = require('./src/zarminex.js');
183
183
  var zarniv = require('./src/zarniv.js');
184
+ var zarpin = require('./src/zarpin.js');
184
185
  var zonda = require('./src/zonda.js');
185
186
  var alpaca$1 = require('./src/pro/alpaca.js');
186
187
  var apex$1 = require('./src/pro/apex.js');
@@ -258,7 +259,7 @@ var xt$1 = require('./src/pro/xt.js');
258
259
 
259
260
  //-----------------------------------------------------------------------------
260
261
  // this is updated by vss.js when building
261
- const version = '4.18.1';
262
+ const version = '4.19.0';
262
263
  Exchange["default"].ccxtVersion = version;
263
264
  const exchanges = {
264
265
  'abantether': abantether["default"],
@@ -430,6 +431,7 @@ const exchanges = {
430
431
  'zarafza': zarafza["default"],
431
432
  'zarminex': zarminex["default"],
432
433
  'zarniv': zarniv["default"],
434
+ 'zarpin': zarpin["default"],
433
435
  'zonda': zonda["default"],
434
436
  };
435
437
  const pro = {
@@ -727,6 +729,7 @@ exports.zaif = zaif["default"];
727
729
  exports.zarafza = zarafza["default"];
728
730
  exports.zarminex = zarminex["default"];
729
731
  exports.zarniv = zarniv["default"];
732
+ exports.zarpin = zarpin["default"];
730
733
  exports.zonda = zonda["default"];
731
734
  exports["default"] = ccxt;
732
735
  exports.exchanges = exchanges;
@@ -1 +1 @@
1
- { "type": "commonjs" }
1
+ { "type": "commonjs" }
@@ -75,7 +75,7 @@ class daric extends Exchange["default"] {
75
75
  }
76
76
  parseMarket(market) {
77
77
  const baseId = this.safeString(market, 'destinationCoinSymbol');
78
- let base = 'XAG';
78
+ let base = 'XAG-1G';
79
79
  if (baseId === 'GOLD18') {
80
80
  base = 'XAU18';
81
81
  }
@@ -69,7 +69,7 @@ class digikalagold extends Exchange["default"] {
69
69
  }
70
70
  parseMarketEntry(response, id) {
71
71
  const isGold = id === 'gold18';
72
- let base = 'XAG';
72
+ let base = 'XAG-1G';
73
73
  if (isGold) {
74
74
  base = 'XAU18';
75
75
  }
@@ -126,7 +126,7 @@ class digikalagold extends Exchange["default"] {
126
126
  }
127
127
  const response = await this.fetchPrice(params);
128
128
  const result = {};
129
- const marketSymbols = ['XAU18/IRT', 'XAG/IRT'];
129
+ const marketSymbols = ['XAU18/IRT', 'XAG-1G/IRT'];
130
130
  for (let i = 0; i < marketSymbols.length; i++) {
131
131
  const symbol = marketSymbols[i];
132
132
  const market = this.market(symbol);
@@ -103,7 +103,10 @@ class melligold extends Exchange["default"] {
103
103
  parseMarket(response, baseId = undefined) {
104
104
  const data = this.safeDict(response, 'data', {});
105
105
  const lowerAmounts = this.safeDict(data, 'lower_amounts', {});
106
- const base = this.safeCurrencyCode(baseId);
106
+ let base = this.safeCurrencyCode(baseId);
107
+ if (base === 'XAG') {
108
+ base = 'XAG-1G';
109
+ }
107
110
  const quote = 'IRT';
108
111
  return {
109
112
  'id': base + quote,
@@ -161,7 +164,7 @@ class melligold extends Exchange["default"] {
161
164
  symbols = this.marketSymbols(symbols);
162
165
  }
163
166
  const result = {};
164
- const marketSymbols = ['XAU18/IRT', 'XAG/IRT'];
167
+ const marketSymbols = ['XAU18/IRT', 'XAG-1G/IRT'];
165
168
  for (let i = 0; i < marketSymbols.length; i++) {
166
169
  const market = this.market(marketSymbols[i]);
167
170
  const response = await this.requestWithCookie(this.extend({
@@ -67,7 +67,7 @@ class zarniv extends Exchange["default"] {
67
67
  ];
68
68
  }
69
69
  parseMarketEntry(response, metal) {
70
- let base = 'XAG';
70
+ let base = 'XAG-1G';
71
71
  if (metal === 'gold') {
72
72
  base = 'XAU18';
73
73
  }
@@ -124,7 +124,7 @@ class zarniv extends Exchange["default"] {
124
124
  const goldResponse = await this.fetchPrice('gold', params);
125
125
  const silverResponse = await this.fetchPrice('silver', params);
126
126
  const goldMarket = this.market('XAU18/IRT');
127
- const silverMarket = this.market('XAG/IRT');
127
+ const silverMarket = this.market('XAG-1G/IRT');
128
128
  const goldTicker = this.parseTicker(goldResponse, goldMarket);
129
129
  const silverTicker = this.parseTicker(silverResponse, silverMarket);
130
130
  const result = {};
@@ -0,0 +1,185 @@
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 zarpin
11
+ * @augments Exchange
12
+ */
13
+ class zarpin extends Exchange["default"] {
14
+ describe() {
15
+ return this.deepExtend(super.describe(), {
16
+ 'id': 'zarpin',
17
+ 'name': 'Zarpin',
18
+ 'countries': ['IR'],
19
+ 'rateLimit': 1000,
20
+ 'version': 'v1',
21
+ 'certified': false,
22
+ 'pro': false,
23
+ 'has': {
24
+ 'CORS': undefined,
25
+ 'spot': false,
26
+ 'margin': false,
27
+ 'swap': false,
28
+ 'future': false,
29
+ 'option': false,
30
+ 'fetchMarkets': true,
31
+ 'fetchTicker': true,
32
+ 'fetchTickers': true,
33
+ 'otc': true,
34
+ },
35
+ 'options': {
36
+ 'defaultType': 'otc',
37
+ },
38
+ 'urls': {
39
+ 'api': {
40
+ 'public': 'https://api-khazaneh.zarpin.com',
41
+ },
42
+ 'www': 'https://zarpin.com',
43
+ 'doc': 'https://api-khazaneh.zarpin.com/v1/prc/prices',
44
+ },
45
+ 'api': {
46
+ 'public': {
47
+ 'get': {
48
+ 'v1/prc/prices': 1,
49
+ },
50
+ },
51
+ },
52
+ });
53
+ }
54
+ async fetchMarkets(params = {}) {
55
+ const response = await this.publicGetV1PrcPrices(params);
56
+ return this.parseMarkets(response);
57
+ }
58
+ parseMarkets(response) {
59
+ let prices = [];
60
+ if (Array.isArray(response)) {
61
+ prices = response;
62
+ }
63
+ const result = [];
64
+ for (let i = 0; i < prices.length; i++) {
65
+ const price = prices[i];
66
+ const code = this.safeString(price, 'code');
67
+ if (code === 'GOLD_IRT' || code === 'SILVER_IRT') {
68
+ result.push(this.parseMarket(price));
69
+ }
70
+ }
71
+ return result;
72
+ }
73
+ parseMarket(market) {
74
+ const code = this.safeString(market, 'code');
75
+ let base = 'XAG-1G';
76
+ if (code === 'GOLD_IRT') {
77
+ base = 'XAU18';
78
+ }
79
+ const quote = 'IRT';
80
+ return {
81
+ 'id': code,
82
+ 'symbol': base + '/' + quote,
83
+ 'base': base,
84
+ 'quote': quote,
85
+ 'settle': undefined,
86
+ 'baseId': code,
87
+ 'quoteId': quote,
88
+ 'settleId': undefined,
89
+ 'type': 'otc',
90
+ 'spot': false,
91
+ 'margin': false,
92
+ 'swap': false,
93
+ 'future': false,
94
+ 'option': false,
95
+ 'active': this.safeNumber(market, 'price') !== undefined,
96
+ 'contract': false,
97
+ 'linear': undefined,
98
+ 'inverse': undefined,
99
+ 'contractSize': undefined,
100
+ 'expiry': undefined,
101
+ 'expiryDatetime': undefined,
102
+ 'strike': undefined,
103
+ 'optionType': undefined,
104
+ 'precision': {
105
+ 'amount': undefined,
106
+ 'price': undefined,
107
+ },
108
+ 'limits': {
109
+ 'leverage': { 'min': undefined, 'max': undefined },
110
+ 'amount': { 'min': undefined, 'max': undefined },
111
+ 'price': { 'min': undefined, 'max': undefined },
112
+ 'cost': { 'min': undefined, 'max': undefined },
113
+ },
114
+ 'created': undefined,
115
+ 'info': market,
116
+ };
117
+ }
118
+ async fetchTicker(symbol, params = {}) {
119
+ await this.loadMarkets();
120
+ const market = this.market(symbol);
121
+ const response = await this.publicGetV1PrcPrices(params);
122
+ return this.parseTicker(response, market);
123
+ }
124
+ async fetchTickers(symbols = undefined, params = {}) {
125
+ await this.loadMarkets();
126
+ if (symbols !== undefined) {
127
+ symbols = this.marketSymbols(symbols);
128
+ }
129
+ const response = await this.publicGetV1PrcPrices(params);
130
+ const markets = this.parseMarkets(response);
131
+ const result = {};
132
+ for (let i = 0; i < markets.length; i++) {
133
+ const ticker = this.parseTicker(response, markets[i]);
134
+ result[ticker['symbol']] = ticker;
135
+ }
136
+ return this.filterByArrayTickers(result, 'symbol', symbols);
137
+ }
138
+ parseTicker(response, market = undefined) {
139
+ let prices = [];
140
+ if (Array.isArray(response)) {
141
+ prices = response;
142
+ }
143
+ let price = {};
144
+ for (let i = 0; i < prices.length; i++) {
145
+ const entry = prices[i];
146
+ if (this.safeString(entry, 'code') === market['baseId']) {
147
+ price = entry;
148
+ break;
149
+ }
150
+ }
151
+ return this.safeTicker({
152
+ 'symbol': market['symbol'],
153
+ 'timestamp': undefined,
154
+ 'datetime': undefined,
155
+ 'high': this.safeNumber(price, 'max_24h_price'),
156
+ 'low': this.safeNumber(price, 'min_24h_price'),
157
+ 'bid': this.safeNumber(price, 'price'),
158
+ 'bidVolume': undefined,
159
+ 'ask': this.safeNumber(price, 'price'),
160
+ 'askVolume': undefined,
161
+ 'vwap': undefined,
162
+ 'open': this.safeNumber(price, 'price_at_in_last_24h'),
163
+ 'close': this.safeNumber(price, 'price'),
164
+ 'last': this.safeNumber(price, 'price'),
165
+ 'previousClose': this.safeNumber(price, 'price_at_in_last_24h'),
166
+ 'change': undefined,
167
+ 'percentage': this.safeNumber(price, 'price_change_24h'),
168
+ 'average': undefined,
169
+ 'baseVolume': undefined,
170
+ 'quoteVolume': undefined,
171
+ 'info': price,
172
+ }, market);
173
+ }
174
+ sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
175
+ let url = this.urls['api'][api] + '/' + this.implodeParams(path, params);
176
+ const query = this.omit(params, this.extractParams(path));
177
+ if (Object.keys(query).length) {
178
+ url += '?' + this.urlencode(query);
179
+ }
180
+ headers = { 'Accept': 'application/json' };
181
+ return { 'url': url, 'method': method, 'body': body, 'headers': headers };
182
+ }
183
+ }
184
+
185
+ exports["default"] = zarpin;
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.18.1";
7
+ declare const version = "4.19.0";
8
8
  import abantether from './src/abantether.js';
9
9
  import afratether from './src/afratether.js';
10
10
  import alpaca from './src/alpaca.js';
@@ -174,6 +174,7 @@ import zaif from './src/zaif.js';
174
174
  import zarafza from './src/zarafza.js';
175
175
  import zarminex from './src/zarminex.js';
176
176
  import zarniv from './src/zarniv.js';
177
+ import zarpin from './src/zarpin.js';
177
178
  import zonda from './src/zonda.js';
178
179
  import alpacaPro from './src/pro/alpaca.js';
179
180
  import apexPro from './src/pro/apex.js';
@@ -418,6 +419,7 @@ declare const exchanges: {
418
419
  zarafza: typeof zarafza;
419
420
  zarminex: typeof zarminex;
420
421
  zarniv: typeof zarniv;
422
+ zarpin: typeof zarpin;
421
423
  zonda: typeof zonda;
422
424
  };
423
425
  declare const pro: {
@@ -745,7 +747,8 @@ declare const ccxt: {
745
747
  zarafza: typeof zarafza;
746
748
  zarminex: typeof zarminex;
747
749
  zarniv: typeof zarniv;
750
+ zarpin: typeof zarpin;
748
751
  zonda: typeof zonda;
749
752
  } & typeof functions & typeof errors;
750
- 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, asacoine, ascendex, asretether, baazar, 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, daric, defx, delta, deribit, derive, digifinex, digikalagold, ellipx, eterex, excoino, exir, exmo, exnovin, farhadexchange, fmfwio, foxbit, gate, gateio, gemini, goldika, goldis, hamrahgold, hamtapay, hashkey, hibachi, hitbtc, hitobit, hollaex, htx, huobi, hyperliquid, independentreserve, indodax, iranexchange, jibitex, kcex, kifpoolme, kraken, krakenfutures, kucoin, kucoinfutures, latoken, lbank, luno, mazdax, melligold, mercado, mexc, milligold, 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, talaavan, talapp, talasea, technogold, tehran_exchange, tetherland, timex, tokocrypto, toobit, tradeogre, twox, ubitex, upbit, vertex, wallex, wallgold, wavesexchange, whitebit, woo, woofipro, xt, yobit, zaif, zarafza, zarminex, zarniv, zonda, };
753
+ 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, asacoine, ascendex, asretether, baazar, 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, daric, defx, delta, deribit, derive, digifinex, digikalagold, ellipx, eterex, excoino, exir, exmo, exnovin, farhadexchange, fmfwio, foxbit, gate, gateio, gemini, goldika, goldis, hamrahgold, hamtapay, hashkey, hibachi, hitbtc, hitobit, hollaex, htx, huobi, hyperliquid, independentreserve, indodax, iranexchange, jibitex, kcex, kifpoolme, kraken, krakenfutures, kucoin, kucoinfutures, latoken, lbank, luno, mazdax, melligold, mercado, mexc, milligold, 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, talaavan, talapp, talasea, technogold, tehran_exchange, tetherland, timex, tokocrypto, toobit, tradeogre, twox, ubitex, upbit, vertex, wallex, wallgold, wavesexchange, whitebit, woo, woofipro, xt, yobit, zaif, zarafza, zarminex, zarniv, zarpin, zonda, };
751
754
  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.18.1';
41
+ const version = '4.19.0';
42
42
  Exchange.ccxtVersion = version;
43
43
  //-----------------------------------------------------------------------------
44
44
  import abantether from './src/abantether.js';
@@ -210,6 +210,7 @@ import zaif from './src/zaif.js';
210
210
  import zarafza from './src/zarafza.js';
211
211
  import zarminex from './src/zarminex.js';
212
212
  import zarniv from './src/zarniv.js';
213
+ import zarpin from './src/zarpin.js';
213
214
  import zonda from './src/zonda.js';
214
215
  // pro exchanges
215
216
  import alpacaPro from './src/pro/alpaca.js';
@@ -455,6 +456,7 @@ const exchanges = {
455
456
  'zarafza': zarafza,
456
457
  'zarminex': zarminex,
457
458
  'zarniv': zarniv,
459
+ 'zarpin': zarpin,
458
460
  'zonda': zonda,
459
461
  };
460
462
  const pro = {
@@ -544,6 +546,6 @@ pro.exchanges = Object.keys(pro);
544
546
  pro['Exchange'] = Exchange; // now the same for rest and ts
545
547
  //-----------------------------------------------------------------------------
546
548
  const ccxt = Object.assign({ version, Exchange, Precise, 'exchanges': Object.keys(exchanges), 'pro': pro }, exchanges, functions, errors);
547
- 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, asacoine, ascendex, asretether, baazar, 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, daric, defx, delta, deribit, derive, digifinex, digikalagold, ellipx, eterex, excoino, exir, exmo, exnovin, farhadexchange, fmfwio, foxbit, gate, gateio, gemini, goldika, goldis, hamrahgold, hamtapay, hashkey, hibachi, hitbtc, hitobit, hollaex, htx, huobi, hyperliquid, independentreserve, indodax, iranexchange, jibitex, kcex, kifpoolme, kraken, krakenfutures, kucoin, kucoinfutures, latoken, lbank, luno, mazdax, melligold, mercado, mexc, milligold, 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, talaavan, talapp, talasea, technogold, tehran_exchange, tetherland, timex, tokocrypto, toobit, tradeogre, twox, ubitex, upbit, vertex, wallex, wallgold, wavesexchange, whitebit, woo, woofipro, xt, yobit, zaif, zarafza, zarminex, zarniv, zonda, };
549
+ 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, asacoine, ascendex, asretether, baazar, 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, daric, defx, delta, deribit, derive, digifinex, digikalagold, ellipx, eterex, excoino, exir, exmo, exnovin, farhadexchange, fmfwio, foxbit, gate, gateio, gemini, goldika, goldis, hamrahgold, hamtapay, hashkey, hibachi, hitbtc, hitobit, hollaex, htx, huobi, hyperliquid, independentreserve, indodax, iranexchange, jibitex, kcex, kifpoolme, kraken, krakenfutures, kucoin, kucoinfutures, latoken, lbank, luno, mazdax, melligold, mercado, mexc, milligold, 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, talaavan, talapp, talasea, technogold, tehran_exchange, tetherland, timex, tokocrypto, toobit, tradeogre, twox, ubitex, upbit, vertex, wallex, wallgold, wavesexchange, whitebit, woo, woofipro, xt, yobit, zaif, zarafza, zarminex, zarniv, zarpin, zonda, };
548
550
  export default ccxt;
549
551
  //-----------------------------------------------------------------------------
@@ -0,0 +1,8 @@
1
+ import { implicitReturnType } from '../base/types.js';
2
+ import { Exchange as _Exchange } from '../base/Exchange.js';
3
+ interface Exchange {
4
+ publicGetV1PrcPrices(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;
package/js/src/daric.js CHANGED
@@ -76,7 +76,7 @@ export default class daric extends Exchange {
76
76
  }
77
77
  parseMarket(market) {
78
78
  const baseId = this.safeString(market, 'destinationCoinSymbol');
79
- let base = 'XAG';
79
+ let base = 'XAG-1G';
80
80
  if (baseId === 'GOLD18') {
81
81
  base = 'XAU18';
82
82
  }
@@ -70,7 +70,7 @@ export default class digikalagold extends Exchange {
70
70
  }
71
71
  parseMarketEntry(response, id) {
72
72
  const isGold = id === 'gold18';
73
- let base = 'XAG';
73
+ let base = 'XAG-1G';
74
74
  if (isGold) {
75
75
  base = 'XAU18';
76
76
  }
@@ -127,7 +127,7 @@ export default class digikalagold extends Exchange {
127
127
  }
128
128
  const response = await this.fetchPrice(params);
129
129
  const result = {};
130
- const marketSymbols = ['XAU18/IRT', 'XAG/IRT'];
130
+ const marketSymbols = ['XAU18/IRT', 'XAG-1G/IRT'];
131
131
  for (let i = 0; i < marketSymbols.length; i++) {
132
132
  const symbol = marketSymbols[i];
133
133
  const market = this.market(symbol);
@@ -104,7 +104,10 @@ export default class melligold extends Exchange {
104
104
  parseMarket(response, baseId = undefined) {
105
105
  const data = this.safeDict(response, 'data', {});
106
106
  const lowerAmounts = this.safeDict(data, 'lower_amounts', {});
107
- const base = this.safeCurrencyCode(baseId);
107
+ let base = this.safeCurrencyCode(baseId);
108
+ if (base === 'XAG') {
109
+ base = 'XAG-1G';
110
+ }
108
111
  const quote = 'IRT';
109
112
  return {
110
113
  'id': base + quote,
@@ -162,7 +165,7 @@ export default class melligold extends Exchange {
162
165
  symbols = this.marketSymbols(symbols);
163
166
  }
164
167
  const result = {};
165
- const marketSymbols = ['XAU18/IRT', 'XAG/IRT'];
168
+ const marketSymbols = ['XAU18/IRT', 'XAG-1G/IRT'];
166
169
  for (let i = 0; i < marketSymbols.length; i++) {
167
170
  const market = this.market(marketSymbols[i]);
168
171
  const response = await this.requestWithCookie(this.extend({
package/js/src/zarniv.js CHANGED
@@ -68,7 +68,7 @@ export default class zarniv extends Exchange {
68
68
  ];
69
69
  }
70
70
  parseMarketEntry(response, metal) {
71
- let base = 'XAG';
71
+ let base = 'XAG-1G';
72
72
  if (metal === 'gold') {
73
73
  base = 'XAU18';
74
74
  }
@@ -125,7 +125,7 @@ export default class zarniv extends Exchange {
125
125
  const goldResponse = await this.fetchPrice('gold', params);
126
126
  const silverResponse = await this.fetchPrice('silver', params);
127
127
  const goldMarket = this.market('XAU18/IRT');
128
- const silverMarket = this.market('XAG/IRT');
128
+ const silverMarket = this.market('XAG-1G/IRT');
129
129
  const goldTicker = this.parseTicker(goldResponse, goldMarket);
130
130
  const silverTicker = this.parseTicker(silverResponse, silverMarket);
131
131
  const result = {};
@@ -0,0 +1,21 @@
1
+ import Exchange from './base/Exchange.js';
2
+ import { Market, Strings, Ticker, Tickers } from './base/types.js';
3
+ /**
4
+ * @class zarpin
5
+ * @augments Exchange
6
+ */
7
+ export default class zarpin extends Exchange {
8
+ describe(): any;
9
+ fetchMarkets(params?: {}): Promise<Market[]>;
10
+ parseMarkets(response: any): Market[];
11
+ parseMarket(market: any): 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
+ }