ccxt-ir 4.9.4__py2.py3-none-any.whl → 4.9.11__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/hamtapay.py +3 -2
- 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 +53 -29
- ccxt/base/exchange.py +1 -1
- ccxt/bitbarg.py +298 -0
- ccxt/bydfi.py +406 -0
- ccxt/cafearz.py +333 -0
- ccxt/hamtapay.py +3 -2
- 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 +53 -29
- {ccxt_ir-4.9.4.dist-info → ccxt_ir-4.9.11.dist-info}/METADATA +8 -8
- {ccxt_ir-4.9.4.dist-info → ccxt_ir-4.9.11.dist-info}/RECORD +44 -23
- {ccxt_ir-4.9.4.dist-info → ccxt_ir-4.9.11.dist-info}/WHEEL +0 -0
- {ccxt_ir-4.9.4.dist-info → ccxt_ir-4.9.11.dist-info}/licenses/LICENSE.txt +0 -0
- {ccxt_ir-4.9.4.dist-info → ccxt_ir-4.9.11.dist-info}/top_level.txt +0 -0
ccxt/async_support/arzplus.py
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
from ccxt.async_support.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
|
|
|
@@ -128,8 +128,13 @@ class arzplus(Exchange, ImplicitAPI):
|
|
|
128
128
|
'stats': '1',
|
|
129
129
|
'enable': 'true',
|
|
130
130
|
}
|
|
131
|
-
|
|
132
|
-
|
|
131
|
+
typedRequest = self.safe_string(params, 'type', 'spot')
|
|
132
|
+
response = []
|
|
133
|
+
otcMarkets = []
|
|
134
|
+
if typedRequest == 'otc':
|
|
135
|
+
otcMarkets = await self.publicGetApiV1MarketIrtInfo(request)
|
|
136
|
+
else:
|
|
137
|
+
response = await self.publicGetApiV1MarketSymbols(request)
|
|
133
138
|
result = []
|
|
134
139
|
for i in range(0, len(response)):
|
|
135
140
|
market = self.parse_market(response[i])
|
|
@@ -140,11 +145,14 @@ class arzplus(Exchange, ImplicitAPI):
|
|
|
140
145
|
marketdata['id'] = 'OTC_' + marketdata['symbol'] + marketdata['quote']
|
|
141
146
|
parsedMarket = self.parse_otc_markets(marketdata)
|
|
142
147
|
result.append(parsedMarket)
|
|
143
|
-
if params['type']:
|
|
144
|
-
return self.filter_by_array(result, 'type', params['type'], False)
|
|
145
148
|
return result
|
|
146
149
|
|
|
147
|
-
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:
|
|
148
156
|
# {
|
|
149
157
|
# 'name': 'USDTIRT',
|
|
150
158
|
# 'asset': {
|
|
@@ -240,12 +248,14 @@ class arzplus(Exchange, ImplicitAPI):
|
|
|
240
248
|
'info': market,
|
|
241
249
|
}
|
|
242
250
|
|
|
243
|
-
def parse_otc_markets(self, market) ->
|
|
251
|
+
def parse_otc_markets(self, market) -> Market:
|
|
244
252
|
# {
|
|
245
|
-
#
|
|
246
|
-
#
|
|
247
|
-
#
|
|
248
|
-
#
|
|
253
|
+
# symbol: "BTC",
|
|
254
|
+
# ask: "13877900000",
|
|
255
|
+
# bid: "13860999995",
|
|
256
|
+
# name: "bitcoin"
|
|
257
|
+
# qoute: "IRT",
|
|
258
|
+
# id: "OTC_BTCIRT"
|
|
249
259
|
# },
|
|
250
260
|
baseAsset = self.safe_string(market, 'symbol')
|
|
251
261
|
quoteAsset = self.safe_string(market, 'quote')
|
|
@@ -264,7 +274,7 @@ class arzplus(Exchange, ImplicitAPI):
|
|
|
264
274
|
'quoteId': quoteId,
|
|
265
275
|
'settleId': None,
|
|
266
276
|
'type': 'otc',
|
|
267
|
-
'spot':
|
|
277
|
+
'spot': False,
|
|
268
278
|
'margin': False,
|
|
269
279
|
'swap': False,
|
|
270
280
|
'future': False,
|
|
@@ -312,11 +322,12 @@ class arzplus(Exchange, ImplicitAPI):
|
|
|
312
322
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
|
313
323
|
:returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
|
|
314
324
|
"""
|
|
315
|
-
|
|
325
|
+
marketType = self.safe_string(params, 'type', 'spot')
|
|
326
|
+
await self.load_markets(False, {'type': marketType})
|
|
316
327
|
if symbols is not None:
|
|
317
328
|
symbols = self.market_symbols(symbols)
|
|
318
329
|
result = {}
|
|
319
|
-
if
|
|
330
|
+
if marketType == 'otc':
|
|
320
331
|
otcMarkets = await self.publicGetApiV1MarketIrtInfo(params)
|
|
321
332
|
for i in range(0, len(otcMarkets)):
|
|
322
333
|
marketdata = otcMarkets[i]
|
|
@@ -345,7 +356,10 @@ class arzplus(Exchange, ImplicitAPI):
|
|
|
345
356
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
|
346
357
|
:returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
|
|
347
358
|
"""
|
|
348
|
-
|
|
359
|
+
marketType = self.safe_string(params, 'type', 'spot')
|
|
360
|
+
if marketType == 'otc':
|
|
361
|
+
raise Error('OTC markets are not supported')
|
|
362
|
+
await self.load_markets(False, {'type': marketType})
|
|
349
363
|
market = self.market(symbol)
|
|
350
364
|
request = {
|
|
351
365
|
'symbol': market['id'],
|
|
@@ -472,7 +486,7 @@ class arzplus(Exchange, ImplicitAPI):
|
|
|
472
486
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
|
473
487
|
:returns int[][]: A list of candles ordered, open, high, low, close, volume
|
|
474
488
|
"""
|
|
475
|
-
await self.load_markets()
|
|
489
|
+
await self.load_markets(False, {'type': 'otc'})
|
|
476
490
|
market = self.market(symbol)
|
|
477
491
|
endTime = Date.now()
|
|
478
492
|
request = {
|
|
@@ -512,7 +526,7 @@ class arzplus(Exchange, ImplicitAPI):
|
|
|
512
526
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
|
513
527
|
:returns dict: a dictionary of `order book structures <https://docs.ccxt.com/#/?id=order-book-structure>` indexed by market symbol
|
|
514
528
|
"""
|
|
515
|
-
await self.load_markets()
|
|
529
|
+
await self.load_markets(False, {'type': 'otc'})
|
|
516
530
|
market = self.market(symbol)
|
|
517
531
|
request = {
|
|
518
532
|
'symbol': market['id'],
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
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
|
+
|
|
6
|
+
from ccxt.async_support.base.exchange import Exchange
|
|
7
|
+
from ccxt.abstract.bitbarg import ImplicitAPI
|
|
8
|
+
from ccxt.base.types import Any, Market, Strings, Ticker, Tickers
|
|
9
|
+
from typing import List
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class bitbarg(Exchange, ImplicitAPI):
|
|
13
|
+
|
|
14
|
+
def describe(self) -> Any:
|
|
15
|
+
return self.deep_extend(super(bitbarg, self).describe(), {
|
|
16
|
+
'id': 'bitbarg',
|
|
17
|
+
'name': 'Bitbarg',
|
|
18
|
+
'countries': ['IR'],
|
|
19
|
+
'rateLimit': 1000,
|
|
20
|
+
'version': '1',
|
|
21
|
+
'certified': False,
|
|
22
|
+
'pro': False,
|
|
23
|
+
'has': {
|
|
24
|
+
'CORS': None,
|
|
25
|
+
'spot': True,
|
|
26
|
+
'margin': False,
|
|
27
|
+
'swap': False,
|
|
28
|
+
'future': False,
|
|
29
|
+
'option': False,
|
|
30
|
+
'addMargin': False,
|
|
31
|
+
'cancelAllOrders': False,
|
|
32
|
+
'cancelOrder': False,
|
|
33
|
+
'cancelOrders': False,
|
|
34
|
+
'createDepositAddress': False,
|
|
35
|
+
'createOrder': False,
|
|
36
|
+
'createStopLimitOrder': False,
|
|
37
|
+
'createStopMarketOrder': False,
|
|
38
|
+
'createStopOrder': False,
|
|
39
|
+
'editOrder': False,
|
|
40
|
+
'fetchBalance': False,
|
|
41
|
+
'fetchBorrowInterest': False,
|
|
42
|
+
'fetchBorrowRateHistories': False,
|
|
43
|
+
'fetchBorrowRateHistory': False,
|
|
44
|
+
'fetchClosedOrders': False,
|
|
45
|
+
'fetchCrossBorrowRate': False,
|
|
46
|
+
'fetchCrossBorrowRates': False,
|
|
47
|
+
'fetchCurrencies': False,
|
|
48
|
+
'fetchDepositAddress': False,
|
|
49
|
+
'fetchDeposits': False,
|
|
50
|
+
'fetchFundingHistory': False,
|
|
51
|
+
'fetchFundingRate': False,
|
|
52
|
+
'fetchFundingRateHistory': False,
|
|
53
|
+
'fetchFundingRates': False,
|
|
54
|
+
'fetchIndexOHLCV': False,
|
|
55
|
+
'fetchIsolatedBorrowRate': False,
|
|
56
|
+
'fetchIsolatedBorrowRates': False,
|
|
57
|
+
'fetchL2OrderBook': False,
|
|
58
|
+
'fetchL3OrderBook': False,
|
|
59
|
+
'fetchLedger': False,
|
|
60
|
+
'fetchLedgerEntry': False,
|
|
61
|
+
'fetchLeverageTiers': False,
|
|
62
|
+
'fetchMarkets': True,
|
|
63
|
+
'fetchMarkOHLCV': False,
|
|
64
|
+
'fetchMyTrades': False,
|
|
65
|
+
'fetchOHLCV': False,
|
|
66
|
+
'fetchOpenInterestHistory': False,
|
|
67
|
+
'fetchOpenOrders': False,
|
|
68
|
+
'fetchOrder': False,
|
|
69
|
+
'fetchOrderBook': False,
|
|
70
|
+
'fetchOrders': False,
|
|
71
|
+
'fetchOrderTrades': 'emulated',
|
|
72
|
+
'fetchPositions': False,
|
|
73
|
+
'fetchPremiumIndexOHLCV': False,
|
|
74
|
+
'fetchTicker': True,
|
|
75
|
+
'fetchTickers': True,
|
|
76
|
+
'fetchTime': False,
|
|
77
|
+
'fetchTrades': False,
|
|
78
|
+
'fetchTradingFee': False,
|
|
79
|
+
'fetchTradingFees': False,
|
|
80
|
+
'fetchWithdrawals': False,
|
|
81
|
+
'setLeverage': False,
|
|
82
|
+
'setMarginMode': False,
|
|
83
|
+
'transfer': False,
|
|
84
|
+
'withdraw': False,
|
|
85
|
+
},
|
|
86
|
+
'comment': 'This comment is optional',
|
|
87
|
+
'urls': {
|
|
88
|
+
'logo': 'https://cdn.arz.digital/cr-odin/img/exchanges/bitbarg/64x64.png',
|
|
89
|
+
'api': {
|
|
90
|
+
'public': 'https://api.bitbarg.com',
|
|
91
|
+
},
|
|
92
|
+
'www': 'https://bitbarg.com/',
|
|
93
|
+
'doc': [
|
|
94
|
+
'https://bitbarg.com/',
|
|
95
|
+
],
|
|
96
|
+
},
|
|
97
|
+
'api': {
|
|
98
|
+
'public': {
|
|
99
|
+
'get': {
|
|
100
|
+
'/api/v1/currencies': 1,
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
'fees': {
|
|
105
|
+
'trading': {
|
|
106
|
+
'tierBased': False,
|
|
107
|
+
'percentage': True,
|
|
108
|
+
'maker': self.parse_number('0.001'),
|
|
109
|
+
'taker': self.parse_number('0.001'),
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
})
|
|
113
|
+
|
|
114
|
+
def parse_market(self, market) -> Market:
|
|
115
|
+
# "id": 53,
|
|
116
|
+
# "icon": "https://s3.bitbarg.com/currencies/btc.webp",
|
|
117
|
+
# "tradeActive": True,
|
|
118
|
+
# "faName": "بیت کوین",
|
|
119
|
+
# "enName": "Bitcoin",
|
|
120
|
+
# "coin": "BTC",
|
|
121
|
+
# "path": "bitcoin",
|
|
122
|
+
# "price": 112192,
|
|
123
|
+
# "quote": "813430226.5004",
|
|
124
|
+
# "percent": -5.735,
|
|
125
|
+
# "decimal": 8,
|
|
126
|
+
# "isFavorite": False,
|
|
127
|
+
baseId = self.safe_string(market, 'coin')
|
|
128
|
+
quoteId = 'USDT'
|
|
129
|
+
base = self.safe_currency_code(baseId)
|
|
130
|
+
quote = self.safe_currency_code(quoteId)
|
|
131
|
+
id = baseId + '/' + quoteId
|
|
132
|
+
return {
|
|
133
|
+
'id': id,
|
|
134
|
+
'symbol': id,
|
|
135
|
+
'base': base,
|
|
136
|
+
'quote': quote,
|
|
137
|
+
'settle': None,
|
|
138
|
+
'baseId': baseId,
|
|
139
|
+
'quoteId': quoteId,
|
|
140
|
+
'settleId': None,
|
|
141
|
+
'type': 'otc',
|
|
142
|
+
'spot': False,
|
|
143
|
+
'margin': False,
|
|
144
|
+
'swap': False,
|
|
145
|
+
'future': False,
|
|
146
|
+
'option': False,
|
|
147
|
+
'active': True,
|
|
148
|
+
'contract': False,
|
|
149
|
+
'linear': None,
|
|
150
|
+
'inverse': None,
|
|
151
|
+
'contractSize': None,
|
|
152
|
+
'expiry': None,
|
|
153
|
+
'expiryDatetime': None,
|
|
154
|
+
'strike': None,
|
|
155
|
+
'optionType': None,
|
|
156
|
+
'precision': {
|
|
157
|
+
'amount': None,
|
|
158
|
+
'price': None,
|
|
159
|
+
},
|
|
160
|
+
'limits': {
|
|
161
|
+
'leverage': {
|
|
162
|
+
'min': None,
|
|
163
|
+
'max': None,
|
|
164
|
+
},
|
|
165
|
+
'amount': {
|
|
166
|
+
'min': None,
|
|
167
|
+
'max': None,
|
|
168
|
+
},
|
|
169
|
+
'price': {
|
|
170
|
+
'min': None,
|
|
171
|
+
'max': None,
|
|
172
|
+
},
|
|
173
|
+
'cost': {
|
|
174
|
+
'min': None,
|
|
175
|
+
'max': None,
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
'created': None,
|
|
179
|
+
'info': market,
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
async def fetch_markets(self, params={}) -> List[Market]:
|
|
183
|
+
"""
|
|
184
|
+
retrieves data on all markets for bitbarg
|
|
185
|
+
https://api.bitbarg.com/api/v1/currencies?pageSize=-1
|
|
186
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
|
187
|
+
:returns dict[]: an array of objects representing market data
|
|
188
|
+
"""
|
|
189
|
+
request = {
|
|
190
|
+
'pageSize': -1,
|
|
191
|
+
}
|
|
192
|
+
response = await self.publicGetApiV1Currencies(self.extend(request, params))
|
|
193
|
+
result = []
|
|
194
|
+
data = self.safe_dict(response, 'result', {})
|
|
195
|
+
items = self.safe_list(data, 'items', [])
|
|
196
|
+
# Create markets for each currency with IRT quote
|
|
197
|
+
for i in range(0, len(items)):
|
|
198
|
+
market = self.parse_market(items[i])
|
|
199
|
+
result.append(market)
|
|
200
|
+
return result
|
|
201
|
+
|
|
202
|
+
async def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
|
|
203
|
+
"""
|
|
204
|
+
fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
205
|
+
https://api.bitbarg.com/api/v1/currencies?pageSize=-1
|
|
206
|
+
:param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
207
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
|
208
|
+
:returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
|
|
209
|
+
"""
|
|
210
|
+
await self.load_markets()
|
|
211
|
+
if symbols is not None:
|
|
212
|
+
symbols = self.market_symbols(symbols)
|
|
213
|
+
request = {
|
|
214
|
+
'pageSize': -1,
|
|
215
|
+
}
|
|
216
|
+
response = await self.publicGetApiV1Currencies(self.extend(request, params))
|
|
217
|
+
data = self.safe_dict(response, 'result', {})
|
|
218
|
+
items = self.safe_list(data, 'items', [])
|
|
219
|
+
result = {}
|
|
220
|
+
for i in range(0, len(items)):
|
|
221
|
+
coinData = items[i]
|
|
222
|
+
baseId = self.safe_string(coinData, 'coin')
|
|
223
|
+
# Create ticker for USDT quote
|
|
224
|
+
quoteId = 'USDT'
|
|
225
|
+
base = self.safe_currency_code(baseId)
|
|
226
|
+
quote = self.safe_currency_code(quoteId)
|
|
227
|
+
symbol = base + '/' + quote
|
|
228
|
+
ticker = self.extend({
|
|
229
|
+
'symbol': symbol,
|
|
230
|
+
'baseId': baseId,
|
|
231
|
+
'quoteId': quoteId,
|
|
232
|
+
'id': baseId + '/' + quoteId,
|
|
233
|
+
}, coinData)
|
|
234
|
+
result[symbol] = self.parse_ticker(ticker)
|
|
235
|
+
return self.filter_by_array_tickers(result, 'symbol', symbols)
|
|
236
|
+
|
|
237
|
+
async def fetch_ticker(self, symbol: str, params={}) -> Ticker:
|
|
238
|
+
"""
|
|
239
|
+
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
240
|
+
https://api.bitbarg.com/api/v1/currencies?pageSize=-1
|
|
241
|
+
:param str symbol: unified symbol of the market to fetch the ticker for
|
|
242
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
|
243
|
+
:returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
|
|
244
|
+
"""
|
|
245
|
+
ticker = await self.fetch_tickers([symbol])
|
|
246
|
+
return ticker[symbol]
|
|
247
|
+
|
|
248
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
|
249
|
+
# {
|
|
250
|
+
# "id": 1,
|
|
251
|
+
# "icon": "https://...",
|
|
252
|
+
# "tradeActive": True,
|
|
253
|
+
# "faName": "بیت کوین",
|
|
254
|
+
# "enName": "Bitcoin",
|
|
255
|
+
# "coin": "BTC",
|
|
256
|
+
# "path": "bitcoin",
|
|
257
|
+
# "price": 110387.56,
|
|
258
|
+
# "quote": "57479298399.76",
|
|
259
|
+
# "percent": -3.01,
|
|
260
|
+
# "decimal": 5,
|
|
261
|
+
# "isFavorite": False,
|
|
262
|
+
# "chart": [...]
|
|
263
|
+
# }
|
|
264
|
+
marketType = 'otc'
|
|
265
|
+
marketId = self.safe_string(ticker, 'coin') + '/' + 'USDT'
|
|
266
|
+
symbol = self.safe_symbol(marketId, market, None, marketType)
|
|
267
|
+
last = self.safe_float(ticker, 'price', 0)
|
|
268
|
+
percentage = self.safe_float(ticker, 'percent', 0)
|
|
269
|
+
baseVolume = self.safe_float(ticker, 'quote')
|
|
270
|
+
return self.safe_ticker({
|
|
271
|
+
'symbol': symbol,
|
|
272
|
+
'timestamp': None,
|
|
273
|
+
'datetime': None,
|
|
274
|
+
'high': None,
|
|
275
|
+
'low': None,
|
|
276
|
+
'bid': last,
|
|
277
|
+
'bidVolume': None,
|
|
278
|
+
'ask': last,
|
|
279
|
+
'askVolume': None,
|
|
280
|
+
'vwap': None,
|
|
281
|
+
'open': None,
|
|
282
|
+
'close': last,
|
|
283
|
+
'last': last,
|
|
284
|
+
'previousClose': None,
|
|
285
|
+
'change': None,
|
|
286
|
+
'percentage': percentage,
|
|
287
|
+
'average': None,
|
|
288
|
+
'baseVolume': baseVolume,
|
|
289
|
+
'quoteVolume': None,
|
|
290
|
+
'info': ticker,
|
|
291
|
+
}, market)
|
|
292
|
+
|
|
293
|
+
def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
|
|
294
|
+
url = self.urls['api']['public'] + path
|
|
295
|
+
if params:
|
|
296
|
+
url += '?' + self.urlencode(params)
|
|
297
|
+
headers = {'Content-Type': 'application/json'}
|
|
298
|
+
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|