forked from ccxt/ccxt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjubi.py
More file actions
48 lines (42 loc) · 1.49 KB
/
jubi.py
File metadata and controls
48 lines (42 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.btcbox import btcbox
class jubi (btcbox):
def describe(self):
return self.deep_extend(super(jubi, self).describe(), {
'id': 'jubi',
'name': 'jubi.com',
'countries': ['CN'],
'rateLimit': 1500,
'version': 'v1',
'has': {
'CORS': False,
'fetchTickers': True,
},
'urls': {
'logo': 'https://user-images.githubusercontent.com/1294454/27766581-9d397d9a-5edd-11e7-8fb9-5d8236c0e692.jpg',
'api': 'https://www.jubi.com/api',
'www': 'https://www.jubi.com',
'doc': 'https://www.jubi.com/help/api.html',
},
})
def fetch_markets(self):
markets = self.publicGetAllticker()
keys = list(markets.keys())
result = []
for p in range(0, len(keys)):
id = keys[p]
base = id.upper()
quote = 'CNY' # todo
symbol = base + '/' + quote
base = self.common_currency_code(base)
quote = self.common_currency_code(quote)
result.append({
'id': id,
'symbol': symbol,
'base': base,
'quote': quote,
'info': id,
})
return result