get_ticker can return a cached value

This commit is contained in:
Jean-Baptiste LE STANG
2018-01-02 10:56:42 +01:00
parent a57707071c
commit 7d21015b52
4 changed files with 33 additions and 28 deletions

View File

@@ -134,8 +134,8 @@ def get_balances():
return _API.get_balances()
def get_ticker(pair: str) -> dict:
return _API.get_ticker(pair)
def get_ticker(pair: str, refresh: Optional[bool] = True) -> dict:
return _API.get_ticker(pair, refresh)
@cached(TTLCache(maxsize=100, ttl=30))