fix(training): use selected chart and include TA-Lib span sources
This commit is contained in:
parent
3448c6febd
commit
07064fbf40
6 changed files with 89 additions and 22 deletions
|
|
@ -59,6 +59,25 @@ class DataAccess:
|
|||
if result:
|
||||
return dict(result._mapping)
|
||||
return None
|
||||
|
||||
def get_chart_by_id(self, chart_id: int) -> Optional[Dict[str, Any]]:
|
||||
"""
|
||||
Get chart by ID.
|
||||
|
||||
Args:
|
||||
chart_id: Chart ID
|
||||
|
||||
Returns:
|
||||
Chart dictionary or None if not found
|
||||
"""
|
||||
with get_db() as db:
|
||||
chart_id = int(chart_id)
|
||||
stmt = select(self.charts).where(self.charts.c.id == chart_id)
|
||||
result = db.execute(stmt).fetchone()
|
||||
|
||||
if result:
|
||||
return dict(result._mapping)
|
||||
return None
|
||||
|
||||
def get_candles(
|
||||
self,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue