Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
orominiyi committed Oct 10, 2018
1 parent baa2093 commit ac3ae85
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions cosine/core/utils.py
Expand Up @@ -22,16 +22,18 @@ def epsilon_equals(x, y):
def find_instrument(instruments, term):
instruments = (instruments.values() if isinstance(instruments, dict) else instruments)
for instr in instruments:
if isinstance(instr.symbology, dict) and CosineSymbology.match_for(instr.symbology, term=term):
return instr
if isinstance(instr.symbology, dict):
if CosineSymbology.match_for(instr.symbology, term=term):
return instr
elif instr.symbology.match(term):
return instr
return None

def find_by_instrument(instr_data, instr):
for term in instr_data:
if isinstance(instr.symbology, dict) and CosineSymbology.match_for(instr.symbology, term=term):
return instr
if isinstance(instr.symbology, dict):
if CosineSymbology.match_for(instr.symbology, term=term):
return instr
elif instr.symbology.match(term):
return instr_data[term]
return None
Expand Down
2 changes: 1 addition & 1 deletion cosine_crypto.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: cosine-crypto
Version: 0.2.48
Version: 0.2.49
Summary: A modular open source cryptocurrency trading algo framework.
Home-page: https://github.com/oladotunr/cosine
Author: Oladotun Rominiyi
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="cosine-crypto",
version="0.2.48",
version="0.2.49",
author="Oladotun Rominiyi",
author_email="dotun@voxex.io",
description="A modular open source cryptocurrency trading algo framework.",
Expand Down

0 comments on commit ac3ae85

Please sign in to comment.