Skip to content

Commit f60e839

Browse files
committed
Fix tests
1 parent 47e0015 commit f60e839

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+31118
-35839
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[flake8]
22
ignore = E501,F405,F403
3-
exclude = tests/*,docs/*,*.md,__init__.py,cryptofeed/exchanges.py,cryptofeed/providers.py
3+
exclude = tests/*,docs/*,*.md,__init__.py,cryptofeed/exchanges.py

cryptofeed/exchange/bequant.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def _parse_symbol_data(cls, data: dict) -> Tuple[Dict, Dict]:
5353
s = Symbol(base_currency, quote_currency)
5454
ret[s.normalized] = symbol['id']
5555
info['tick_size'][s.normalized] = symbol['tickSize']
56-
info['instrument_type'][s.normalized] = SPOT
56+
info['instrument_type'][s.normalized] = s.type
5757

5858
return ret, info
5959

cryptofeed/exchange/bitcoincom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def _parse_symbol_data(cls, data: dict) -> Tuple[Dict, Dict]:
3333
s = Symbol(base_currency, quote_currency)
3434
ret[s.normalized] = symbol['id']
3535
info['tick_size'][s.normalized] = symbol['tickSize']
36-
info['instrument_type'][s.normalized] = SPOT
36+
info['instrument_type'][s.normalized] = s.type
3737

3838
return ret, info
3939

cryptofeed/exchange/bitfinex.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def _parse_symbol_data(cls, data: list) -> Tuple[Dict, Dict]:
7070

7171
s = Symbol(base, quote)
7272
ret[s.normalized] = "t" + p
73-
info['instrument_type'][s.normalized] = SPOT
73+
info['instrument_type'][s.normalized] = s.type
7474
return ret, info
7575

7676
def __init__(self, symbols=None, channels=None, subscription=None, **kwargs):

cryptofeed/exchange/bithumb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def _parse_symbol_data(cls, data: dict) -> Tuple[Dict, Dict]:
7474
continue
7575
s = Symbol(base_curr, quote_curr)
7676
ret[s.normalized] = f"{base_curr}_{quote_curr}"
77-
info['instrument_type'][s.normalized] = SPOT
77+
info['instrument_type'][s.normalized] = s.type
7878

7979
return ret, {}
8080

cryptofeed/exchange/bitstamp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def _parse_symbol_data(cls, data: dict) -> Tuple[Dict, Dict]:
3939
s = Symbol(base, quote)
4040
symbol = d['url_symbol']
4141
ret[s.normalized] = symbol
42-
info['instrument_type'][s.normalized] = SPOT
42+
info['instrument_type'][s.normalized] = s.type
4343

4444
return ret, info
4545

cryptofeed/exchange/bittrex.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def _parse_symbol_data(cls, data: dict) -> Tuple[Dict, Dict]:
3434
continue
3535
s = Symbol(e['baseCurrencySymbol'], e['quoteCurrencySymbol'])
3636
ret[s.normalized] = e['symbol']
37-
info['instrument_type'][s.normalized] = SPOT
37+
info['instrument_type'][s.normalized] = s.type
3838
return ret, info
3939

4040
def __init__(self, depth=500, candle_interval='1m', **kwargs):

cryptofeed/exchange/blockchain.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ def _parse_symbol_data(cls, data: dict) -> Tuple[Dict, Dict]:
3131
info = {'instrument_type': {}}
3232
ret = {}
3333
for entry in data:
34-
if data['status'] != 'open':
34+
if entry['status'] != 'open':
3535
continue
3636
base, quote = entry['symbol'].split("-")
3737
s = Symbol(base, quote)
38-
ret[s.normalized] = data['symbol']
39-
info['instrument_type'][s.normalized] = SPOT
38+
ret[s.normalized] = entry['symbol']
39+
info['instrument_type'][s.normalized] = s.type
4040
return ret, info
4141

4242
def __init__(self, **kwargs):

cryptofeed/exchange/gateio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def _parse_symbol_data(cls, data: dict) -> Tuple[Dict, Dict]:
3434
info = {'instrument_type': {}}
3535

3636
for entry in data:
37-
if data["trade_status"] != "tradable":
37+
if entry["trade_status"] != "tradable":
3838
continue
3939
s = Symbol(entry['base'], entry['quote'])
4040
ret[s.normalized] = entry['id']

cryptofeed/exchange/huobi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def _parse_symbol_data(cls, data: dict) -> Tuple[Dict, Dict]:
4040
s = Symbol(base, quote)
4141

4242
ret[s.normalized] = e['symbol']
43-
info['instrument_type'][s.normalized] = SPOT
43+
info['instrument_type'][s.normalized] = s.type
4444
return ret, info
4545

4646
def __init__(self, candle_interval='1m', **kwargs):

0 commit comments

Comments
 (0)