(feat) update utils and permissions

This commit is contained in:
cardosofede
2024-07-23 15:01:52 +03:00
parent 86675d64d0
commit 4c4abd3307
2 changed files with 5 additions and 6 deletions

View File

@@ -1,10 +1,10 @@
import datetime
import streamlit as st
import pandas as pd
import streamlit as st
from CONFIG import BACKEND_API_HOST, BACKEND_API_PORT
from backend.services.backend_api_client import BackendAPIClient
from CONFIG import BACKEND_API_HOST, BACKEND_API_PORT
def get_max_records(days_to_download: int, interval: str) -> int:
@@ -21,8 +21,7 @@ def get_candles(connector_name="binance", trading_pair="BTC-USDT", interval="1m"
start_time = end_time - datetime.timedelta(days=days)
df = pd.DataFrame(backend_client.get_historical_candles(connector_name, trading_pair, interval,
start_time=int(start_time.timestamp() * 1000),
end_time=int(end_time.timestamp() * 1000)))
start_time=int(start_time.timestamp()),
end_time=int(end_time.timestamp())))
df.index = pd.to_datetime(df.timestamp, unit='s')
return df

View File

@@ -2,7 +2,7 @@ from st_pages import Page, Section
def main_page():
return [Page("main.py", "Hummingbot Dashboard", "📊"),]
return [Page("main.py", "Hummingbot Dashboard", "📊")]
def public_pages():