File tree 2 files changed +8
-2
lines changed
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 12
12
from .constants import DATA_TIME_ZONE , PERIOD_CNAME
13
13
from .ohlcv import clean_ohlcv
14
14
from .market_dataframe import MarketDataFrame
15
+ from .cache import ttl_cached
15
16
16
17
17
18
def _response_empty (resp : Any ) -> bool :
@@ -275,4 +276,9 @@ def get_last_price(ticker: str) -> float:
275
276
assert isinstance (last_trade , LastTrade )
276
277
assert last_trade .price is not None
277
278
last_price = float (last_trade .price )
278
- return last_price
279
+ return last_price
280
+
281
+
282
+ @ttl_cached (20 )
283
+ def get_last_price_cached (ticker : str ) -> float :
284
+ return get_last_price (ticker )
Original file line number Diff line number Diff line change 1
1
[tool .poetry ]
2
2
name = " phantom-core"
3
- version = " 0.0.10 "
3
+ version = " 0.0.11 "
4
4
description = " Phantom Core"
5
5
authors = [" Adam Lineberry <ablineberry@gmail.com>" ]
6
6
license = " MIT"
You can’t perform that action at this time.
0 commit comments