ccxt-ir 4.9.2__py2.py3-none-any.whl → 4.9.10__py2.py3-none-any.whl

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. ccxt/__init__.py +17 -1
  2. ccxt/abantether.py +88 -69
  3. ccxt/abstract/abantether.py +1 -1
  4. ccxt/abstract/arzplus.py +1 -0
  5. ccxt/abstract/bitbarg.py +5 -0
  6. ccxt/abstract/bydfi.py +8 -0
  7. ccxt/abstract/cafearz.py +5 -0
  8. ccxt/abstract/hamtapay.py +6 -0
  9. ccxt/abstract/kifpoolme.py +6 -0
  10. ccxt/abstract/mazdax.py +8 -0
  11. ccxt/abstract/pingi.py +6 -0
  12. ccxt/abstract/pooleno.py +5 -0
  13. ccxt/afratether.py +84 -36
  14. ccxt/arzplus.py +144 -8
  15. ccxt/async_support/__init__.py +17 -1
  16. ccxt/async_support/abantether.py +88 -69
  17. ccxt/async_support/afratether.py +84 -36
  18. ccxt/async_support/arzplus.py +144 -8
  19. ccxt/async_support/base/exchange.py +1 -1
  20. ccxt/async_support/bitbarg.py +298 -0
  21. ccxt/async_support/bydfi.py +406 -0
  22. ccxt/async_support/cafearz.py +333 -0
  23. ccxt/async_support/hamtapay.py +285 -0
  24. ccxt/async_support/kifpoolme.py +385 -0
  25. ccxt/async_support/mazdax.py +512 -0
  26. ccxt/async_support/pingi.py +426 -0
  27. ccxt/async_support/pooleno.py +331 -0
  28. ccxt/async_support/tetherland.py +4 -4
  29. ccxt/async_support/twox.py +52 -28
  30. ccxt/base/exchange.py +1 -1
  31. ccxt/bitbarg.py +298 -0
  32. ccxt/bydfi.py +406 -0
  33. ccxt/cafearz.py +333 -0
  34. ccxt/hamtapay.py +285 -0
  35. ccxt/kifpoolme.py +385 -0
  36. ccxt/mazdax.py +512 -0
  37. ccxt/pingi.py +426 -0
  38. ccxt/pooleno.py +331 -0
  39. ccxt/pro/__init__.py +1 -1
  40. ccxt/tetherland.py +4 -4
  41. ccxt/twox.py +52 -28
  42. {ccxt_ir-4.9.2.dist-info → ccxt_ir-4.9.10.dist-info}/METADATA +8 -8
  43. {ccxt_ir-4.9.2.dist-info → ccxt_ir-4.9.10.dist-info}/RECORD +46 -22
  44. {ccxt_ir-4.9.2.dist-info → ccxt_ir-4.9.10.dist-info}/WHEEL +0 -0
  45. {ccxt_ir-4.9.2.dist-info → ccxt_ir-4.9.10.dist-info}/licenses/LICENSE.txt +0 -0
  46. {ccxt_ir-4.9.2.dist-info → ccxt_ir-4.9.10.dist-info}/top_level.txt +0 -0
ccxt/arzplus.py CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.arzplus import ImplicitAPI
8
- from ccxt.base.types import Any, Int, Market, OrderBook, Strings, Ticker, Tickers
8
+ from ccxt.base.types import Any, Int, Market, MarketType, OrderBook, Strings, Ticker, Tickers
9
9
  from typing import List
10
10
 
11
11
 
@@ -103,6 +103,7 @@ class arzplus(Exchange, ImplicitAPI):
103
103
  'api/v1/market/symbols': 1,
104
104
  'api/v1/market/tradingview/ohlcv': 1,
105
105
  'api/v1/market/depth': 1,
106
+ 'api/v1/market/irt/info': 1,
106
107
  },
107
108
  },
108
109
  },
@@ -127,14 +128,31 @@ class arzplus(Exchange, ImplicitAPI):
127
128
  'stats': '1',
128
129
  'enable': 'true',
129
130
  }
130
- response = self.publicGetApiV1MarketSymbols(request)
131
+ typedRequest = self.safe_string(params, 'type', 'spot')
132
+ response = []
133
+ otcMarkets = []
134
+ if typedRequest == 'otc':
135
+ otcMarkets = self.publicGetApiV1MarketIrtInfo(request)
136
+ else:
137
+ response = self.publicGetApiV1MarketSymbols(request)
131
138
  result = []
132
139
  for i in range(0, len(response)):
133
140
  market = self.parse_market(response[i])
134
141
  result.append(market)
142
+ for i in range(0, len(otcMarkets)):
143
+ marketdata = otcMarkets[i]
144
+ marketdata['quote'] = 'IRT'
145
+ marketdata['id'] = 'OTC_' + marketdata['symbol'] + marketdata['quote']
146
+ parsedMarket = self.parse_otc_markets(marketdata)
147
+ result.append(parsedMarket)
135
148
  return result
136
149
 
137
- def parse_market(self, market) -> Market:
150
+ def parse_market(self, market, type: MarketType = 'spot') -> Market:
151
+ if type == 'otc':
152
+ return self.parse_otc_markets(market)
153
+ return self.parse_spot_market(market)
154
+
155
+ def parse_spot_market(self, market) -> Market:
138
156
  # {
139
157
  # 'name': 'USDTIRT',
140
158
  # 'asset': {
@@ -230,6 +248,72 @@ class arzplus(Exchange, ImplicitAPI):
230
248
  'info': market,
231
249
  }
232
250
 
251
+ def parse_otc_markets(self, market) -> Market:
252
+ # {
253
+ # symbol: "BTC",
254
+ # ask: "13877900000",
255
+ # bid: "13860999995",
256
+ # name: "bitcoin"
257
+ # qoute: "IRT",
258
+ # id: "OTC_BTCIRT"
259
+ # },
260
+ baseAsset = self.safe_string(market, 'symbol')
261
+ quoteAsset = self.safe_string(market, 'quote')
262
+ baseId = baseAsset
263
+ quoteId = quoteAsset
264
+ base = self.safe_currency_code(baseId)
265
+ quote = self.safe_currency_code(quoteId)
266
+ id = self.safe_string(market, 'id')
267
+ return {
268
+ 'id': id,
269
+ 'symbol': base + '/' + quote,
270
+ 'base': base,
271
+ 'quote': quote,
272
+ 'settle': None,
273
+ 'baseId': baseId,
274
+ 'quoteId': quoteId,
275
+ 'settleId': None,
276
+ 'type': 'otc',
277
+ 'spot': False,
278
+ 'margin': False,
279
+ 'swap': False,
280
+ 'future': False,
281
+ 'option': False,
282
+ 'active': True,
283
+ 'contract': False,
284
+ 'linear': None,
285
+ 'inverse': None,
286
+ 'contractSize': None,
287
+ 'expiry': None,
288
+ 'expiryDatetime': None,
289
+ 'strike': None,
290
+ 'optionType': None,
291
+ 'precision': {
292
+ 'amount': None,
293
+ 'price': None,
294
+ },
295
+ 'limits': {
296
+ 'leverage': {
297
+ 'min': None,
298
+ 'max': None,
299
+ },
300
+ 'amount': {
301
+ 'min': None,
302
+ 'max': None,
303
+ },
304
+ 'price': {
305
+ 'min': None,
306
+ 'max': None,
307
+ },
308
+ 'cost': {
309
+ 'min': None,
310
+ 'max': None,
311
+ },
312
+ },
313
+ 'created': None,
314
+ 'info': market,
315
+ }
316
+
233
317
  def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
234
318
  """
235
319
  fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
@@ -238,11 +322,22 @@ class arzplus(Exchange, ImplicitAPI):
238
322
  :param dict [params]: extra parameters specific to the exchange API endpoint
239
323
  :returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
240
324
  """
241
- self.load_markets()
325
+ marketType = self.safe_string(params, 'type', 'spot')
326
+ self.load_markets(False, {'type': marketType})
242
327
  if symbols is not None:
243
328
  symbols = self.market_symbols(symbols)
244
- response = self.publicGetApiV1MarketSymbols(params)
245
329
  result = {}
330
+ if marketType == 'otc':
331
+ otcMarkets = self.publicGetApiV1MarketIrtInfo(params)
332
+ for i in range(0, len(otcMarkets)):
333
+ marketdata = otcMarkets[i]
334
+ marketdata['quote'] = 'IRT'
335
+ marketdata['id'] = 'OTC_' + marketdata['symbol'] + marketdata['quote']
336
+ parsedMarket = self.parse_otc_ticker(marketdata)
337
+ symbol = parsedMarket['symbol']
338
+ result[symbol] = parsedMarket
339
+ return self.filter_by_array_tickers(result, 'symbol', symbols)
340
+ response = self.publicGetApiV1MarketSymbols(params)
246
341
  for i in range(0, len(response)):
247
342
  request = {
248
343
  'symbol': response[i]['name'],
@@ -261,7 +356,10 @@ class arzplus(Exchange, ImplicitAPI):
261
356
  :param dict [params]: extra parameters specific to the exchange API endpoint
262
357
  :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
263
358
  """
264
- self.load_markets()
359
+ marketType = self.safe_string(params, 'type', 'spot')
360
+ if marketType == 'otc':
361
+ raise Error('OTC markets are not supported')
362
+ self.load_markets(False, {'type': marketType})
265
363
  market = self.market(symbol)
266
364
  request = {
267
365
  'symbol': market['id'],
@@ -339,6 +437,44 @@ class arzplus(Exchange, ImplicitAPI):
339
437
  'info': ticker,
340
438
  }, market)
341
439
 
440
+ def parse_otc_ticker(self, ticker, market: Market = None) -> Ticker:
441
+ # {
442
+ # id: "BTCUSDT",
443
+ # symbol: "BTC",
444
+ # ask: "13877900000",
445
+ # bid: "13860999995",
446
+ # name: "bitcoin"
447
+ # quote: "IRT"
448
+ # }
449
+ marketType = 'otc'
450
+ marketId = self.safe_string(ticker, 'id')
451
+ symbol = self.safe_symbol(marketId, market, None, marketType)
452
+ bid = self.safe_float(ticker, 'bid', 0)
453
+ ask = self.safe_float(ticker, 'ask', 0)
454
+ last = self.safe_float(ticker, 'ask', 0)
455
+ return self.safe_ticker({
456
+ 'symbol': symbol,
457
+ 'timestamp': None,
458
+ 'datetime': None,
459
+ 'high': None,
460
+ 'low': None,
461
+ 'bid': bid,
462
+ 'bidVolume': None,
463
+ 'ask': ask,
464
+ 'askVolume': None,
465
+ 'vwap': None,
466
+ 'open': last,
467
+ 'close': last,
468
+ 'last': last,
469
+ 'previousClose': None,
470
+ 'change': None,
471
+ 'percentage': None,
472
+ 'average': None,
473
+ 'baseVolume': None,
474
+ 'quoteVolume': None,
475
+ 'info': ticker,
476
+ }, market)
477
+
342
478
  def fetch_ohlcv(self, symbol: str, timeframe='1h', since: Int = None, limit: Int = None, params={}) -> List[list]:
343
479
  """
344
480
  fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
@@ -350,7 +486,7 @@ class arzplus(Exchange, ImplicitAPI):
350
486
  :param dict [params]: extra parameters specific to the exchange API endpoint
351
487
  :returns int[][]: A list of candles ordered, open, high, low, close, volume
352
488
  """
353
- self.load_markets()
489
+ self.load_markets(False, {'type': 'otc'})
354
490
  market = self.market(symbol)
355
491
  endTime = Date.now()
356
492
  request = {
@@ -390,7 +526,7 @@ class arzplus(Exchange, ImplicitAPI):
390
526
  :param dict [params]: extra parameters specific to the exchange API endpoint
391
527
  :returns dict: a dictionary of `order book structures <https://docs.ccxt.com/#/?id=order-book-structure>` indexed by market symbol
392
528
  """
393
- self.load_markets()
529
+ self.load_markets(False, {'type': 'otc'})
394
530
  market = self.market(symbol)
395
531
  request = {
396
532
  'symbol': market['id'],
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.9.2'
7
+ __version__ = '4.9.10'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -81,6 +81,7 @@ from ccxt.async_support.bingx import bingx
81
81
  from ccxt.async_support.bit24 import bit24 # noqa: F401
82
82
  from ccxt.async_support.bit2c import bit2c # noqa: F401
83
83
  from ccxt.async_support.bitbank import bitbank # noqa: F401
84
+ from ccxt.async_support.bitbarg import bitbarg # noqa: F401
84
85
  from ccxt.async_support.bitbns import bitbns # noqa: F401
85
86
  from ccxt.async_support.bitfinex import bitfinex # noqa: F401
86
87
  from ccxt.async_support.bitflyer import bitflyer # noqa: F401
@@ -106,6 +107,8 @@ from ccxt.async_support.btcbox import btcbox
106
107
  from ccxt.async_support.btcmarkets import btcmarkets # noqa: F401
107
108
  from ccxt.async_support.btcturk import btcturk # noqa: F401
108
109
  from ccxt.async_support.bybit import bybit # noqa: F401
110
+ from ccxt.async_support.bydfi import bydfi # noqa: F401
111
+ from ccxt.async_support.cafearz import cafearz # noqa: F401
109
112
  from ccxt.async_support.cex import cex # noqa: F401
110
113
  from ccxt.async_support.coinbase import coinbase # noqa: F401
111
114
  from ccxt.async_support.coinbaseadvanced import coinbaseadvanced # noqa: F401
@@ -138,6 +141,7 @@ from ccxt.async_support.foxbit import foxbit
138
141
  from ccxt.async_support.gate import gate # noqa: F401
139
142
  from ccxt.async_support.gateio import gateio # noqa: F401
140
143
  from ccxt.async_support.gemini import gemini # noqa: F401
144
+ from ccxt.async_support.hamtapay import hamtapay # noqa: F401
141
145
  from ccxt.async_support.hashkey import hashkey # noqa: F401
142
146
  from ccxt.async_support.hibachi import hibachi # noqa: F401
143
147
  from ccxt.async_support.hitbtc import hitbtc # noqa: F401
@@ -150,6 +154,7 @@ from ccxt.async_support.independentreserve import independentreserve
150
154
  from ccxt.async_support.indodax import indodax # noqa: F401
151
155
  from ccxt.async_support.jibitex import jibitex # noqa: F401
152
156
  from ccxt.async_support.kcex import kcex # noqa: F401
157
+ from ccxt.async_support.kifpoolme import kifpoolme # noqa: F401
153
158
  from ccxt.async_support.kraken import kraken # noqa: F401
154
159
  from ccxt.async_support.krakenfutures import krakenfutures # noqa: F401
155
160
  from ccxt.async_support.kucoin import kucoin # noqa: F401
@@ -157,6 +162,7 @@ from ccxt.async_support.kucoinfutures import kucoinfutures
157
162
  from ccxt.async_support.latoken import latoken # noqa: F401
158
163
  from ccxt.async_support.lbank import lbank # noqa: F401
159
164
  from ccxt.async_support.luno import luno # noqa: F401
165
+ from ccxt.async_support.mazdax import mazdax # noqa: F401
160
166
  from ccxt.async_support.mercado import mercado # noqa: F401
161
167
  from ccxt.async_support.mexc import mexc # noqa: F401
162
168
  from ccxt.async_support.modetrade import modetrade # noqa: F401
@@ -176,7 +182,9 @@ from ccxt.async_support.p2b import p2b
176
182
  from ccxt.async_support.paradex import paradex # noqa: F401
177
183
  from ccxt.async_support.paymium import paymium # noqa: F401
178
184
  from ccxt.async_support.phemex import phemex # noqa: F401
185
+ from ccxt.async_support.pingi import pingi # noqa: F401
179
186
  from ccxt.async_support.poloniex import poloniex # noqa: F401
187
+ from ccxt.async_support.pooleno import pooleno # noqa: F401
180
188
  from ccxt.async_support.probit import probit # noqa: F401
181
189
  from ccxt.async_support.ramzinex import ramzinex # noqa: F401
182
190
  from ccxt.async_support.sarmayex import sarmayex # noqa: F401
@@ -219,6 +227,7 @@ exchanges = [
219
227
  'bit24',
220
228
  'bit2c',
221
229
  'bitbank',
230
+ 'bitbarg',
222
231
  'bitbns',
223
232
  'bitfinex',
224
233
  'bitflyer',
@@ -244,6 +253,8 @@ exchanges = [
244
253
  'btcmarkets',
245
254
  'btcturk',
246
255
  'bybit',
256
+ 'bydfi',
257
+ 'cafearz',
247
258
  'cex',
248
259
  'coinbase',
249
260
  'coinbaseadvanced',
@@ -276,6 +287,7 @@ exchanges = [
276
287
  'gate',
277
288
  'gateio',
278
289
  'gemini',
290
+ 'hamtapay',
279
291
  'hashkey',
280
292
  'hibachi',
281
293
  'hitbtc',
@@ -288,6 +300,7 @@ exchanges = [
288
300
  'indodax',
289
301
  'jibitex',
290
302
  'kcex',
303
+ 'kifpoolme',
291
304
  'kraken',
292
305
  'krakenfutures',
293
306
  'kucoin',
@@ -295,6 +308,7 @@ exchanges = [
295
308
  'latoken',
296
309
  'lbank',
297
310
  'luno',
311
+ 'mazdax',
298
312
  'mercado',
299
313
  'mexc',
300
314
  'modetrade',
@@ -314,7 +328,9 @@ exchanges = [
314
328
  'paradex',
315
329
  'paymium',
316
330
  'phemex',
331
+ 'pingi',
317
332
  'poloniex',
333
+ 'pooleno',
318
334
  'probit',
319
335
  'ramzinex',
320
336
  'sarmayex',
@@ -22,7 +22,7 @@ class abantether(Exchange, ImplicitAPI):
22
22
  'pro': False,
23
23
  'has': {
24
24
  'CORS': None,
25
- 'spot': True,
25
+ 'spot': False,
26
26
  'margin': False,
27
27
  'swap': False,
28
28
  'future': False,
@@ -78,6 +78,7 @@ class abantether(Exchange, ImplicitAPI):
78
78
  'fetchTradingFee': False,
79
79
  'fetchTradingFees': False,
80
80
  'fetchWithdrawals': False,
81
+ 'otc': True,
81
82
  'setLeverage': False,
82
83
  'setMarginMode': False,
83
84
  'transfer': False,
@@ -87,7 +88,7 @@ class abantether(Exchange, ImplicitAPI):
87
88
  'urls': {
88
89
  'logo': 'https://cdn.arz.digital/cr-odin/img/exchanges/abantether/64x64.png',
89
90
  'api': {
90
- 'public': 'https://abantether.com',
91
+ 'public': 'https://api.abantether.com',
91
92
  },
92
93
  'www': 'https://abantether.com',
93
94
  'doc': [
@@ -97,7 +98,7 @@ class abantether(Exchange, ImplicitAPI):
97
98
  'api': {
98
99
  'public': {
99
100
  'get': {
100
- 'management/all-coins/': 1,
101
+ 'manager/coins/data': 1,
101
102
  },
102
103
  },
103
104
  },
@@ -114,50 +115,60 @@ class abantether(Exchange, ImplicitAPI):
114
115
  async def fetch_markets(self, params={}) -> List[Market]:
115
116
  """
116
117
  retrieves data on all markets for abantether
117
- https://abantether.com/management/all-coins/?format=json
118
+ https://api.abantether.com/manager/coins/data
118
119
  :param dict [params]: extra parameters specific to the exchange API endpoint
119
120
  :returns dict[]: an array of objects representing market data
120
121
  """
121
- response = await self.publicGetManagementAllCoins(params)
122
+ response = await self.publicGetManagerCoinsData(params)
123
+ data = self.safe_list(response, 'data', [])
122
124
  result = []
123
125
  quotes = ['IRT', 'USDT']
124
- for i in range(0, len(response)):
125
- base = self.safe_string(response[i], 'symbol')
126
+ for i in range(0, len(data)):
127
+ base = self.safe_string(data[i], 'symbol')
126
128
  for index in range(0, len(quotes)):
127
129
  quote = quotes[index]
128
- response[i]['base'] = base
129
- response[i]['quote'] = quote
130
+ data[i]['base'] = base
131
+ data[i]['quote'] = quote
130
132
  if base == quote:
131
133
  continue
132
- market = self.parse_market(response[i])
134
+ market = self.parse_market(data[i])
133
135
  result.append(market)
134
136
  return result
135
137
 
136
138
  def parse_market(self, market) -> Market:
137
139
  # {
138
- # 'symbol': 'USDT',
139
- # 'name': 'Tether',
140
- # 'categories': [],
141
- # 'tetherPrice': '1',
142
- # 'priceBuy': '59200.0',
143
- # 'priceSell': '58800.0',
144
- # 'persianName': '\u062a\u062a\u0631',
145
- # 'past24': '0',
146
- # 'marketVolume': '1',
147
- # 'id': '1',
148
- # 'active': True,
149
- # 'irtDecimalPoint': '2',
150
- # 'tetherDecimalPoint': '6',
151
- # 'amountDecimalPoint': '6',
152
- # 'past24volume': '767287.60530837810210936763',
153
- # 'operationStatus': {
154
- # 'buyActive': True,
155
- # 'sellActive': True,
156
- # 'withdrawalActive': True,
157
- # 'depositActive': True,
158
- # 'transferActive': True,
159
- # },
160
- # }
140
+ # "id": 1,
141
+ # "name": "Tether USDt",
142
+ # "symbol": "USDT",
143
+ # "persian_name": "تتر",
144
+ # "is_active": True,
145
+ # "is_withdrawal_active": True,
146
+ # "is_deposit_active": True,
147
+ # "is_mid_wallet_transfer_active": True,
148
+ # "is_buy_active": True,
149
+ # "is_sell_active": True,
150
+ # "is_credit_active": True,
151
+ # "min_trade": "1.00",
152
+ # "max_trade": "100000.00",
153
+ # "tether_price": "1",
154
+ # "price_buy": "113540.0",
155
+ # "price_sell": "112630.0",
156
+ # "volume24h": "225163179366.25",
157
+ # "percent_change_1h": "0.00",
158
+ # "percent_change_24h": "0.00",
159
+ # "percent_change_7d": "0.04",
160
+ # "market_cap": "179884960573.99",
161
+ # "coin_type": "COIN",
162
+ # "exchange_type": "fake",
163
+ # "icon": "f71021586005413ea6f3a0bd1f7d8a55",
164
+ # "fund_tether_buy": "0",
165
+ # "fund_tether_sell": "0",
166
+ # "irt_decimal_point": 2,
167
+ # "tether_decimal_point": 6,
168
+ # "amount_decimal_point": 6,
169
+ # "base": "BTC",
170
+ # "qoute": "USDT",
171
+ # },
161
172
  baseId = self.safe_string(market, 'base')
162
173
  quoteId = self.safe_string(market, 'quote')
163
174
  base = self.safe_currency_code(baseId)
@@ -218,7 +229,7 @@ class abantether(Exchange, ImplicitAPI):
218
229
  async def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
219
230
  """
220
231
  fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
221
- https://abantether.com/management/all-coins/?format=json
232
+ https://api.abantether.com/manager/coins/data
222
233
  :param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
223
234
  :param dict [params]: extra parameters specific to the exchange API endpoint
224
235
  :returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -226,19 +237,20 @@ class abantether(Exchange, ImplicitAPI):
226
237
  await self.load_markets()
227
238
  if symbols is not None:
228
239
  symbols = self.market_symbols(symbols)
229
- response = await self.publicGetManagementAllCoins(params)
240
+ response = await self.publicGetManagerCoinsData(params)
241
+ data = self.safe_list(response, 'data', [])
230
242
  result = {}
231
243
  quotes = ['IRT', 'USDT']
232
- for i in range(0, len(response)):
233
- base = self.safe_string(response[i], 'symbol')
244
+ for i in range(0, len(data)):
245
+ base = self.safe_string(data[i], 'symbol')
234
246
  for index in range(0, len(quotes)):
235
247
  quote = quotes[index]
236
248
  if base == quote:
237
249
  continue
238
- response[i]['base'] = base
239
- response[i]['quote'] = quote
240
- response[i]['symbol'] = base + quote
241
- ticker = self.parse_ticker(response[i])
250
+ data[i]['base'] = base
251
+ data[i]['quote'] = quote
252
+ data[i]['symbol'] = base + quote
253
+ ticker = self.parse_ticker(data[i])
242
254
  symbol = ticker['symbol']
243
255
  result[symbol] = ticker
244
256
  return self.filter_by_array_tickers(result, 'symbol', symbols)
@@ -246,7 +258,7 @@ class abantether(Exchange, ImplicitAPI):
246
258
  async def fetch_ticker(self, symbol: str, params={}) -> Ticker:
247
259
  """
248
260
  fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
249
- https://abantether.com/management/all-coins/?format=json
261
+ https://api.abantether.com/manager/coins/data
250
262
  :param str symbol: unified symbol of the market to fetch the ticker for
251
263
  :param dict [params]: extra parameters specific to the exchange API endpoint
252
264
  :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -256,37 +268,44 @@ class abantether(Exchange, ImplicitAPI):
256
268
 
257
269
  def parse_ticker(self, ticker, market: Market = None) -> Ticker:
258
270
  # {
259
- # 'symbol': 'USDT',
260
- # 'name': 'Tether',
261
- # 'categories': [],
262
- # 'tetherPrice': '1',
263
- # 'priceBuy': '59200.0',
264
- # 'priceSell': '58800.0',
265
- # 'persianName': '\u062a\u062a\u0631',
266
- # 'past24': '0',
267
- # 'marketVolume': '1',
268
- # 'id': '1',
269
- # 'active': True,
270
- # 'irtDecimalPoint': '2',
271
- # 'tetherDecimalPoint': '6',
272
- # 'amountDecimalPoint': '6',
273
- # 'past24volume': '767287.60530837810210936763',
274
- # 'operationStatus': {
275
- # 'buyActive': True,
276
- # 'sellActive': True,
277
- # 'withdrawalActive': True,
278
- # 'depositActive': True,
279
- # 'transferActive': True,
280
- # },
281
- # }
271
+ # "id": 2,
272
+ # "name": "Bitcoin",
273
+ # "symbol": "BTC",
274
+ # "persian_name": "بیت کوین",
275
+ # "is_active": True,
276
+ # "is_withdrawal_active": True,
277
+ # "is_deposit_active": True,
278
+ # "is_mid_wallet_transfer_active": True,
279
+ # "is_buy_active": True,
280
+ # "is_sell_active": True,
281
+ # "is_credit_active": True,
282
+ # "min_trade": "1.00",
283
+ # "max_trade": "65000.00",
284
+ # "tether_price": "114909.43000000",
285
+ # "price_buy": "13049114870.800000000",
286
+ # "price_sell": "12944547289.500000000",
287
+ # "volume24h": "93585526493.26",
288
+ # "percent_change_1h": "-0.29",
289
+ # "percent_change_24h": "3.22",
290
+ # "percent_change_7d": "-7.19",
291
+ # "market_cap": "2292874615411.72",
292
+ # "coin_type": "COIN",
293
+ # "exchange_type": "binance",
294
+ # "icon": "561aa10abc0c45f7aa4499f48d618c80",
295
+ # "fund_tether_buy": "0",
296
+ # "fund_tether_sell": "0",
297
+ # "irt_decimal_point": 0,
298
+ # "tether_decimal_point": 2,
299
+ # "amount_decimal_point": 9
300
+ # },
282
301
  marketType = 'otc'
283
302
  marketId = self.safe_string(ticker, 'symbol')
284
303
  symbol = self.safe_symbol(marketId, market, None, marketType)
285
- last = self.safe_float(ticker, 'tetherPrice', 0)
304
+ last = self.safe_float(ticker, 'tether_price', 0)
286
305
  if ticker['quote'] == 'IRT':
287
- last = self.safe_float(ticker, 'priceSell', 0)
288
- change = self.safe_float(ticker, 'past24', 0)
289
- baseVolume = self.safe_float(ticker, 'past24volume', 0)
306
+ last = self.safe_float(ticker, 'price_buy', 0)
307
+ change = self.safe_float(ticker, 'percent_change_24h', 0)
308
+ baseVolume = self.safe_float(ticker, 'volume24h', 0)
290
309
  return self.safe_ticker({
291
310
  'symbol': symbol,
292
311
  'timestamp': None,