Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync / development to main 2.1.0 #186

Merged
merged 5 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/services/backend_api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def get_historical_candles(self, connector: str, trading_pair: str, interval: st
"""Get historical candles data."""
endpoint = "historical-candles"
payload = {
"connector": connector,
"connector_name": connector,
"trading_pair": trading_pair,
"interval": interval,
"start_time": start_time,
Expand Down
3 changes: 3 additions & 0 deletions frontend/pages/data/download_candles/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
if get_data_button:
start_datetime = datetime.combine(start_date, time.min)
end_datetime = datetime.combine(end_date, time.max)
if end_datetime < start_datetime:
st.error("End Date should be greater than Start Date.")
st.stop()

candles = backend_api_client.get_historical_candles(
connector=connector,
Expand Down
6 changes: 3 additions & 3 deletions frontend/st_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ def style_metric_cards(
def get_backend_api_client():
from backend.services.backend_api_client import BackendAPIClient
from CONFIG import BACKEND_API_HOST, BACKEND_API_PORT
backend_api_client = BackendAPIClient.get_instance(host=BACKEND_API_HOST, port=BACKEND_API_PORT)
is_docker_running = False
try:
backend_api_client = BackendAPIClient.get_instance(host=BACKEND_API_HOST, port=BACKEND_API_PORT)
is_docker_running = backend_api_client.is_docker_running()
except Exception as e:
st.error(
f"There was an error trying to connect to the Backend API: "
f"\n\n{str(e)} \n\nPlease make sure the Backend API is running.")
f"There was an error trying to connect to the Backend API. Please make sure the Backend API is running.\n\n"
f"Error: \n\n{str(e)}")
st.stop()
if not is_docker_running:
st.error("Docker is not running. Please make sure Docker is running.")
Expand Down