mirror of
https://github.com/aljazceru/hummingbot-dashboard.git
synced 2026-02-14 01:26:15 +01:00
(feat) update backend style
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from typing import Optional, Dict
|
||||
from typing import Dict, Optional
|
||||
|
||||
import pandas as pd
|
||||
import requests
|
||||
@@ -115,7 +115,8 @@ class BackendAPIClient:
|
||||
def stop_bot(self, bot_name: str, skip_order_cancellation: bool = False, async_backend: bool = True):
|
||||
"""Stop a Hummingbot bot."""
|
||||
endpoint = "stop-bot"
|
||||
return self.post(endpoint, payload={"bot_name": bot_name, "skip_order_cancellation": skip_order_cancellation, "async_backend": async_backend})
|
||||
return self.post(endpoint, payload={"bot_name": bot_name, "skip_order_cancellation": skip_order_cancellation,
|
||||
"async_backend": async_backend})
|
||||
|
||||
def import_strategy(self, strategy_config: dict):
|
||||
"""Import a trading strategy to a bot."""
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import re
|
||||
import time
|
||||
|
||||
from pycoingecko import CoinGeckoAPI
|
||||
import pandas as pd
|
||||
import re
|
||||
from pycoingecko import CoinGeckoAPI
|
||||
|
||||
|
||||
class CoinGeckoClient:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import os
|
||||
import json
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
import pandas as pd
|
||||
@@ -102,18 +102,6 @@ class OptunaDBManager:
|
||||
except Exception as e:
|
||||
return f"Error: {str(e)}"
|
||||
|
||||
@property
|
||||
def trial_system_attributes(self):
|
||||
return self._get_trial_system_attributes_table()
|
||||
|
||||
def _get_trial_system_attributes_table(self):
|
||||
try:
|
||||
with self.session_maker() as session:
|
||||
df = pd.read_sql_query(text("SELECT * FROM trial_system_attributes"), session.connection())
|
||||
return df
|
||||
except Exception as e:
|
||||
return f"Error: {str(e)}"
|
||||
|
||||
@property
|
||||
def version_info(self):
|
||||
return self._get_version_info_table()
|
||||
|
||||
@@ -1,14 +1,19 @@
|
||||
import glob
|
||||
import subprocess
|
||||
import importlib.util
|
||||
import inspect
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
import pandas as pd
|
||||
|
||||
import yaml
|
||||
from hummingbot.strategy_v2.controllers.directional_trading_controller_base import DirectionalTradingControllerBase, DirectionalTradingControllerConfigBase
|
||||
from hummingbot.strategy_v2.controllers.market_making_controller_base import MarketMakingControllerBase, MarketMakingControllerConfigBase
|
||||
from hummingbot.strategy_v2.controllers.directional_trading_controller_base import (
|
||||
DirectionalTradingControllerBase,
|
||||
DirectionalTradingControllerConfigBase,
|
||||
)
|
||||
from hummingbot.strategy_v2.controllers.market_making_controller_base import (
|
||||
MarketMakingControllerBase,
|
||||
MarketMakingControllerConfigBase,
|
||||
)
|
||||
|
||||
|
||||
def remove_files_from_directory(directory: str):
|
||||
|
||||
Reference in New Issue
Block a user