(feat) get the instance of backend api correctly

This commit is contained in:
cardosofede
2024-10-30 22:23:21 -03:00
parent 7d29288d59
commit a19b87db62
4 changed files with 2 additions and 30 deletions

View File

@@ -3,8 +3,7 @@ import datetime
import pandas as pd
import streamlit as st
from backend.services.backend_api_client import BackendAPIClient
from CONFIG import BACKEND_API_HOST, BACKEND_API_PORT
from frontend.st_utils import get_backend_api_client
def get_max_records(days_to_download: int, interval: str) -> int:
@@ -16,7 +15,7 @@ def get_max_records(days_to_download: int, interval: str) -> int:
@st.cache_data
def get_candles(connector_name="binance", trading_pair="BTC-USDT", interval="1m", days=7):
backend_client = BackendAPIClient(BACKEND_API_HOST, BACKEND_API_PORT)
backend_client = get_backend_api_client()
end_time = datetime.datetime.now() - datetime.timedelta(minutes=15)
start_time = end_time - datetime.timedelta(days=days)

View File

@@ -1,19 +0,0 @@
### Description
This page helps you deploy and manage Hummingbot instances:
- Starting and stopping Hummingbot Broker
- Creating, starting and stopping bot instances
- Managing strategy and script files that instances run
- Fetching status of running instances
### Maintainers
This page is maintained by Hummingbot Foundation as a template other pages:
* [cardosfede](https://github.com/cardosfede)
* [fengtality](https://github.com/fengtality)
### Wiki
See the [wiki](https://github.com/hummingbot/dashboard/wiki/%F0%9F%90%99-Bot-Orchestration) for more information.

View File

@@ -1,8 +0,0 @@
from frontend.components.deploy_v2_with_controllers import LaunchV2WithControllers
from frontend.st_utils import initialize_st_page
initialize_st_page(title="Launch Bot ST", icon="🙌")
launcher = LaunchV2WithControllers()
launcher()