ccxt-ir 4.9.4__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.
- ccxt/__init__.py +15 -1
- ccxt/abantether.py +88 -69
- ccxt/abstract/abantether.py +1 -1
- ccxt/abstract/bitbarg.py +5 -0
- ccxt/abstract/bydfi.py +8 -0
- ccxt/abstract/cafearz.py +5 -0
- ccxt/abstract/kifpoolme.py +6 -0
- ccxt/abstract/mazdax.py +8 -0
- ccxt/abstract/pingi.py +6 -0
- ccxt/abstract/pooleno.py +5 -0
- ccxt/afratether.py +84 -36
- ccxt/arzplus.py +31 -17
- ccxt/async_support/__init__.py +15 -1
- ccxt/async_support/abantether.py +88 -69
- ccxt/async_support/afratether.py +84 -36
- ccxt/async_support/arzplus.py +31 -17
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/bitbarg.py +298 -0
- ccxt/async_support/bydfi.py +406 -0
- ccxt/async_support/cafearz.py +333 -0
- ccxt/async_support/kifpoolme.py +385 -0
- ccxt/async_support/mazdax.py +512 -0
- ccxt/async_support/pingi.py +426 -0
- ccxt/async_support/pooleno.py +331 -0
- ccxt/async_support/tetherland.py +4 -4
- ccxt/async_support/twox.py +52 -28
- ccxt/base/exchange.py +1 -1
- ccxt/bitbarg.py +298 -0
- ccxt/bydfi.py +406 -0
- ccxt/cafearz.py +333 -0
- ccxt/kifpoolme.py +385 -0
- ccxt/mazdax.py +512 -0
- ccxt/pingi.py +426 -0
- ccxt/pooleno.py +331 -0
- ccxt/pro/__init__.py +1 -1
- ccxt/tetherland.py +4 -4
- ccxt/twox.py +52 -28
- {ccxt_ir-4.9.4.dist-info → ccxt_ir-4.9.10.dist-info}/METADATA +8 -8
- {ccxt_ir-4.9.4.dist-info → ccxt_ir-4.9.10.dist-info}/RECORD +42 -21
- {ccxt_ir-4.9.4.dist-info → ccxt_ir-4.9.10.dist-info}/WHEEL +0 -0
- {ccxt_ir-4.9.4.dist-info → ccxt_ir-4.9.10.dist-info}/licenses/LICENSE.txt +0 -0
- {ccxt_ir-4.9.4.dist-info → ccxt_ir-4.9.10.dist-info}/top_level.txt +0 -0
ccxt/__init__.py
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
# ----------------------------------------------------------------------------
|
|
24
24
|
|
|
25
|
-
__version__ = '4.9.
|
|
25
|
+
__version__ = '4.9.10'
|
|
26
26
|
|
|
27
27
|
# ----------------------------------------------------------------------------
|
|
28
28
|
|
|
@@ -101,6 +101,7 @@ from ccxt.bingx import bingx # noqa: F4
|
|
|
101
101
|
from ccxt.bit24 import bit24 # noqa: F401
|
|
102
102
|
from ccxt.bit2c import bit2c # noqa: F401
|
|
103
103
|
from ccxt.bitbank import bitbank # noqa: F401
|
|
104
|
+
from ccxt.bitbarg import bitbarg # noqa: F401
|
|
104
105
|
from ccxt.bitbns import bitbns # noqa: F401
|
|
105
106
|
from ccxt.bitfinex import bitfinex # noqa: F401
|
|
106
107
|
from ccxt.bitflyer import bitflyer # noqa: F401
|
|
@@ -126,6 +127,8 @@ from ccxt.btcbox import btcbox # noqa: F4
|
|
|
126
127
|
from ccxt.btcmarkets import btcmarkets # noqa: F401
|
|
127
128
|
from ccxt.btcturk import btcturk # noqa: F401
|
|
128
129
|
from ccxt.bybit import bybit # noqa: F401
|
|
130
|
+
from ccxt.bydfi import bydfi # noqa: F401
|
|
131
|
+
from ccxt.cafearz import cafearz # noqa: F401
|
|
129
132
|
from ccxt.cex import cex # noqa: F401
|
|
130
133
|
from ccxt.coinbase import coinbase # noqa: F401
|
|
131
134
|
from ccxt.coinbaseadvanced import coinbaseadvanced # noqa: F401
|
|
@@ -171,6 +174,7 @@ from ccxt.independentreserve import independentreserve # noqa: F4
|
|
|
171
174
|
from ccxt.indodax import indodax # noqa: F401
|
|
172
175
|
from ccxt.jibitex import jibitex # noqa: F401
|
|
173
176
|
from ccxt.kcex import kcex # noqa: F401
|
|
177
|
+
from ccxt.kifpoolme import kifpoolme # noqa: F401
|
|
174
178
|
from ccxt.kraken import kraken # noqa: F401
|
|
175
179
|
from ccxt.krakenfutures import krakenfutures # noqa: F401
|
|
176
180
|
from ccxt.kucoin import kucoin # noqa: F401
|
|
@@ -178,6 +182,7 @@ from ccxt.kucoinfutures import kucoinfutures # noqa: F4
|
|
|
178
182
|
from ccxt.latoken import latoken # noqa: F401
|
|
179
183
|
from ccxt.lbank import lbank # noqa: F401
|
|
180
184
|
from ccxt.luno import luno # noqa: F401
|
|
185
|
+
from ccxt.mazdax import mazdax # noqa: F401
|
|
181
186
|
from ccxt.mercado import mercado # noqa: F401
|
|
182
187
|
from ccxt.mexc import mexc # noqa: F401
|
|
183
188
|
from ccxt.modetrade import modetrade # noqa: F401
|
|
@@ -197,7 +202,9 @@ from ccxt.p2b import p2b # noqa: F4
|
|
|
197
202
|
from ccxt.paradex import paradex # noqa: F401
|
|
198
203
|
from ccxt.paymium import paymium # noqa: F401
|
|
199
204
|
from ccxt.phemex import phemex # noqa: F401
|
|
205
|
+
from ccxt.pingi import pingi # noqa: F401
|
|
200
206
|
from ccxt.poloniex import poloniex # noqa: F401
|
|
207
|
+
from ccxt.pooleno import pooleno # noqa: F401
|
|
201
208
|
from ccxt.probit import probit # noqa: F401
|
|
202
209
|
from ccxt.ramzinex import ramzinex # noqa: F401
|
|
203
210
|
from ccxt.sarmayex import sarmayex # noqa: F401
|
|
@@ -240,6 +247,7 @@ exchanges = [
|
|
|
240
247
|
'bit24',
|
|
241
248
|
'bit2c',
|
|
242
249
|
'bitbank',
|
|
250
|
+
'bitbarg',
|
|
243
251
|
'bitbns',
|
|
244
252
|
'bitfinex',
|
|
245
253
|
'bitflyer',
|
|
@@ -265,6 +273,8 @@ exchanges = [
|
|
|
265
273
|
'btcmarkets',
|
|
266
274
|
'btcturk',
|
|
267
275
|
'bybit',
|
|
276
|
+
'bydfi',
|
|
277
|
+
'cafearz',
|
|
268
278
|
'cex',
|
|
269
279
|
'coinbase',
|
|
270
280
|
'coinbaseadvanced',
|
|
@@ -310,6 +320,7 @@ exchanges = [
|
|
|
310
320
|
'indodax',
|
|
311
321
|
'jibitex',
|
|
312
322
|
'kcex',
|
|
323
|
+
'kifpoolme',
|
|
313
324
|
'kraken',
|
|
314
325
|
'krakenfutures',
|
|
315
326
|
'kucoin',
|
|
@@ -317,6 +328,7 @@ exchanges = [
|
|
|
317
328
|
'latoken',
|
|
318
329
|
'lbank',
|
|
319
330
|
'luno',
|
|
331
|
+
'mazdax',
|
|
320
332
|
'mercado',
|
|
321
333
|
'mexc',
|
|
322
334
|
'modetrade',
|
|
@@ -336,7 +348,9 @@ exchanges = [
|
|
|
336
348
|
'paradex',
|
|
337
349
|
'paymium',
|
|
338
350
|
'phemex',
|
|
351
|
+
'pingi',
|
|
339
352
|
'poloniex',
|
|
353
|
+
'pooleno',
|
|
340
354
|
'probit',
|
|
341
355
|
'ramzinex',
|
|
342
356
|
'sarmayex',
|
ccxt/abantether.py
CHANGED
|
@@ -22,7 +22,7 @@ class abantether(Exchange, ImplicitAPI):
|
|
|
22
22
|
'pro': False,
|
|
23
23
|
'has': {
|
|
24
24
|
'CORS': None,
|
|
25
|
-
'spot':
|
|
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
|
-
'
|
|
101
|
+
'manager/coins/data': 1,
|
|
101
102
|
},
|
|
102
103
|
},
|
|
103
104
|
},
|
|
@@ -114,50 +115,60 @@ class abantether(Exchange, ImplicitAPI):
|
|
|
114
115
|
def fetch_markets(self, params={}) -> List[Market]:
|
|
115
116
|
"""
|
|
116
117
|
retrieves data on all markets for abantether
|
|
117
|
-
https://abantether.com/
|
|
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 = self.
|
|
122
|
+
response = 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(
|
|
125
|
-
base = self.safe_string(
|
|
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
|
-
|
|
129
|
-
|
|
130
|
+
data[i]['base'] = base
|
|
131
|
+
data[i]['quote'] = quote
|
|
130
132
|
if base == quote:
|
|
131
133
|
continue
|
|
132
|
-
market = self.parse_market(
|
|
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
|
-
#
|
|
139
|
-
#
|
|
140
|
-
#
|
|
141
|
-
#
|
|
142
|
-
#
|
|
143
|
-
#
|
|
144
|
-
#
|
|
145
|
-
#
|
|
146
|
-
#
|
|
147
|
-
#
|
|
148
|
-
#
|
|
149
|
-
#
|
|
150
|
-
#
|
|
151
|
-
#
|
|
152
|
-
#
|
|
153
|
-
#
|
|
154
|
-
#
|
|
155
|
-
#
|
|
156
|
-
#
|
|
157
|
-
#
|
|
158
|
-
#
|
|
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
|
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/
|
|
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
|
self.load_markets()
|
|
227
238
|
if symbols is not None:
|
|
228
239
|
symbols = self.market_symbols(symbols)
|
|
229
|
-
response = self.
|
|
240
|
+
response = 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(
|
|
233
|
-
base = self.safe_string(
|
|
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
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
ticker = self.parse_ticker(
|
|
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
|
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/
|
|
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
|
-
#
|
|
260
|
-
#
|
|
261
|
-
#
|
|
262
|
-
#
|
|
263
|
-
#
|
|
264
|
-
#
|
|
265
|
-
#
|
|
266
|
-
#
|
|
267
|
-
#
|
|
268
|
-
#
|
|
269
|
-
#
|
|
270
|
-
#
|
|
271
|
-
#
|
|
272
|
-
#
|
|
273
|
-
#
|
|
274
|
-
#
|
|
275
|
-
#
|
|
276
|
-
#
|
|
277
|
-
#
|
|
278
|
-
#
|
|
279
|
-
#
|
|
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, '
|
|
304
|
+
last = self.safe_float(ticker, 'tether_price', 0)
|
|
286
305
|
if ticker['quote'] == 'IRT':
|
|
287
|
-
last = self.safe_float(ticker, '
|
|
288
|
-
change = self.safe_float(ticker, '
|
|
289
|
-
baseVolume = self.safe_float(ticker, '
|
|
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,
|
ccxt/abstract/abantether.py
CHANGED
|
@@ -2,4 +2,4 @@ from ccxt.base.types import Entry
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
class ImplicitAPI:
|
|
5
|
-
|
|
5
|
+
public_get_manager_coins_data = publicGetManagerCoinsData = Entry('manager/coins/data', 'public', 'GET', {'cost': 1})
|
ccxt/abstract/bitbarg.py
ADDED
ccxt/abstract/bydfi.py
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
from ccxt.base.types import Entry
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class ImplicitAPI:
|
|
5
|
+
public_get_api_spot_product_list = publicGetApiSpotProductList = Entry('api/spot/product/list', 'public', 'GET', {'cost': 1})
|
|
6
|
+
public_get_api_tv_tradingview_history = publicGetApiTvTradingViewHistory = Entry('api/tv/tradingView/history', 'public', 'GET', {'cost': 1})
|
|
7
|
+
quote_get_tickers = quoteGetTickers = Entry('tickers', 'quote', 'GET', {'cost': 1})
|
|
8
|
+
quote_get_mkpai_depth_v2 = quoteGetMkpaiDepthV2 = Entry('mkpai/depth-v2', 'quote', 'GET', {'cost': 1})
|
ccxt/abstract/cafearz.py
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
from ccxt.base.types import Entry
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class ImplicitAPI:
|
|
5
|
+
public_get_api_spot_price = publicGetApiSpotPrice = Entry('api/spot/price', 'public', 'GET', {'cost': 1})
|
|
6
|
+
public_get_api_spot_tickers_1m = publicGetApiSpotTickers1m = Entry('api/spot/tickers/1m', 'public', 'GET', {'cost': 1})
|
ccxt/abstract/mazdax.py
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
from ccxt.base.types import Entry
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class ImplicitAPI:
|
|
5
|
+
public_get_market_symbols = publicGetMarketSymbols = Entry('market/symbols', 'public', 'GET', {'cost': 1})
|
|
6
|
+
public_get_market_rollingprice = publicGetMarketRollingprice = Entry('market/rollingprice', 'public', 'GET', {'cost': 1})
|
|
7
|
+
public_get_market_candle = publicGetMarketCandle = Entry('market/candle', 'public', 'GET', {'cost': 1})
|
|
8
|
+
public_get_market_order = publicGetMarketOrder = Entry('market/order', 'public', 'GET', {'cost': 1})
|
ccxt/abstract/pingi.py
ADDED
ccxt/abstract/pooleno.py
ADDED
ccxt/afratether.py
CHANGED
|
@@ -22,7 +22,7 @@ class afratether(Exchange, ImplicitAPI):
|
|
|
22
22
|
'pro': False,
|
|
23
23
|
'has': {
|
|
24
24
|
'CORS': None,
|
|
25
|
-
'spot':
|
|
25
|
+
'spot': False,
|
|
26
26
|
'margin': False,
|
|
27
27
|
'swap': False,
|
|
28
28
|
'future': False,
|
|
@@ -78,6 +78,7 @@ class afratether(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,
|
|
@@ -134,21 +135,43 @@ class afratether(Exchange, ImplicitAPI):
|
|
|
134
135
|
|
|
135
136
|
def parse_market(self, market) -> Market:
|
|
136
137
|
# {
|
|
137
|
-
# "currencyAbb": "
|
|
138
|
-
# "nameEn": "
|
|
139
|
-
# "nameFa": "
|
|
140
|
-
# "icon": "/assets/crypto/
|
|
141
|
-
# "
|
|
142
|
-
# "
|
|
143
|
-
#
|
|
144
|
-
#
|
|
145
|
-
#
|
|
138
|
+
# "currencyAbb": "USDT",
|
|
139
|
+
# "nameEn": "Tether",
|
|
140
|
+
# "nameFa": "تتر",
|
|
141
|
+
# "icon": "/assets/crypto/usdt.png",
|
|
142
|
+
# "round": 1000000,
|
|
143
|
+
# "currency": "USDT",
|
|
144
|
+
# "changeRate24h": "-0.0065",
|
|
145
|
+
# "Klines": [
|
|
146
|
+
# [
|
|
147
|
+
# "1760227200000",
|
|
148
|
+
# "1147500",
|
|
149
|
+
# "1140000",
|
|
150
|
+
# "1145500",
|
|
151
|
+
# "1125000",
|
|
152
|
+
# "0",
|
|
153
|
+
# "0"
|
|
154
|
+
# ],
|
|
155
|
+
# ],
|
|
156
|
+
# "info": {
|
|
157
|
+
# "birth_date": 1412553600000,
|
|
158
|
+
# "open_24h": 1,
|
|
159
|
+
# "open_1w": 1,
|
|
160
|
+
# "open_3M": 1,
|
|
161
|
+
# "open_1y": 1
|
|
162
|
+
# },
|
|
163
|
+
# "prices": {
|
|
164
|
+
# "USDT": {
|
|
165
|
+
# "price": "1"
|
|
166
|
+
# },
|
|
167
|
+
# "IRR": {
|
|
168
|
+
# "price_sell": 1135000,
|
|
169
|
+
# "price_buy": 1123000
|
|
146
170
|
# }
|
|
147
|
-
#
|
|
148
|
-
# }
|
|
149
|
-
details = self.safe_list(market, 'prices')
|
|
171
|
+
# }
|
|
172
|
+
# }
|
|
150
173
|
baseId = self.safe_string(market, 'currency')
|
|
151
|
-
quoteId =
|
|
174
|
+
quoteId = 'IRR'
|
|
152
175
|
base = self.safe_currency_code(baseId)
|
|
153
176
|
quote = self.safe_currency_code(quoteId)
|
|
154
177
|
id = base + quote
|
|
@@ -163,8 +186,8 @@ class afratether(Exchange, ImplicitAPI):
|
|
|
163
186
|
'baseId': baseId,
|
|
164
187
|
'quoteId': quoteId,
|
|
165
188
|
'settleId': None,
|
|
166
|
-
'type': '
|
|
167
|
-
'spot':
|
|
189
|
+
'type': 'otc',
|
|
190
|
+
'spot': False,
|
|
168
191
|
'margin': False,
|
|
169
192
|
'swap': False,
|
|
170
193
|
'future': False,
|
|
@@ -241,41 +264,66 @@ class afratether(Exchange, ImplicitAPI):
|
|
|
241
264
|
|
|
242
265
|
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
|
243
266
|
# {
|
|
244
|
-
# "currencyAbb": "
|
|
245
|
-
# "nameEn": "
|
|
246
|
-
# "nameFa": "
|
|
247
|
-
# "icon": "/assets/crypto/
|
|
248
|
-
# "
|
|
249
|
-
# "
|
|
250
|
-
#
|
|
251
|
-
#
|
|
252
|
-
#
|
|
267
|
+
# "currencyAbb": "USDT",
|
|
268
|
+
# "nameEn": "Tether",
|
|
269
|
+
# "nameFa": "تتر",
|
|
270
|
+
# "icon": "/assets/crypto/usdt.png",
|
|
271
|
+
# "round": 1000000,
|
|
272
|
+
# "currency": "USDT",
|
|
273
|
+
# "changeRate24h": "-0.0065",
|
|
274
|
+
# "Klines": [
|
|
275
|
+
# [
|
|
276
|
+
# "1760227200000",
|
|
277
|
+
# "1147500",
|
|
278
|
+
# "1140000",
|
|
279
|
+
# "1145500",
|
|
280
|
+
# "1125000",
|
|
281
|
+
# "0",
|
|
282
|
+
# "0"
|
|
283
|
+
# ],
|
|
284
|
+
# ],
|
|
285
|
+
# "info": {
|
|
286
|
+
# "birth_date": 1412553600000,
|
|
287
|
+
# "open_24h": 1,
|
|
288
|
+
# "open_1w": 1,
|
|
289
|
+
# "open_3M": 1,
|
|
290
|
+
# "open_1y": 1
|
|
291
|
+
# },
|
|
292
|
+
# "prices": {
|
|
293
|
+
# "USDT": {
|
|
294
|
+
# "price": "1"
|
|
295
|
+
# },
|
|
296
|
+
# "IRR": {
|
|
297
|
+
# "price_sell": 1135000,
|
|
298
|
+
# "price_buy": 1123000
|
|
253
299
|
# }
|
|
254
|
-
#
|
|
255
|
-
# }
|
|
300
|
+
# }
|
|
301
|
+
# }
|
|
256
302
|
marketType = 'otc'
|
|
257
|
-
details = self.safe_list(ticker, 'prices')
|
|
258
303
|
base = self.safe_string(ticker, 'currency')
|
|
259
|
-
quote =
|
|
260
|
-
marketId = base + quote
|
|
304
|
+
quote = 'IRR'
|
|
305
|
+
marketId = base + '/' + quote
|
|
261
306
|
symbol = self.safe_symbol(marketId, market, None, marketType)
|
|
262
|
-
|
|
307
|
+
prices = self.safe_dict(ticker, 'prices', {})
|
|
308
|
+
irrPrices = self.safe_dict(prices, 'IRR', {})
|
|
309
|
+
sell = self.safe_float(irrPrices, 'price_sell', 0)
|
|
310
|
+
buy = self.safe_float(irrPrices, 'price_buy', 0)
|
|
263
311
|
return self.safe_ticker({
|
|
264
312
|
'symbol': symbol,
|
|
265
313
|
'timestamp': None,
|
|
266
314
|
'datetime': None,
|
|
267
315
|
'high': None,
|
|
268
316
|
'low': None,
|
|
269
|
-
'bid':
|
|
317
|
+
'bid': sell,
|
|
270
318
|
'bidVolume': None,
|
|
271
|
-
'ask':
|
|
319
|
+
'ask': buy,
|
|
272
320
|
'askVolume': None,
|
|
273
321
|
'vwap': None,
|
|
274
322
|
'open': None,
|
|
275
|
-
'close':
|
|
276
|
-
'last':
|
|
323
|
+
'close': buy,
|
|
324
|
+
'last': buy,
|
|
277
325
|
'previousClose': None,
|
|
278
|
-
'change': None,
|
|
326
|
+
'change': self.safe_float(ticker, 'changeRate24h', None),
|
|
279
327
|
'percentage': None,
|
|
280
328
|
'average': None,
|
|
281
329
|
'baseVolume': None,
|