Skip to content
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
3 changes: 2 additions & 1 deletion frontend/components/directional_trading_general_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ def get_directional_trading_general_inputs():
help="Enter the trading pair to get candles for (e.g., WLD-USDT).")
with c3:
leverage = st.number_input("Leverage", value=leverage,
min_value=1,
help="Set the leverage to use for trading (e.g., 20 for 20x leverage)."
"Set it to 1 for spot trading.")
"Set it to 1 for spot trading. Value must be greater than 0.")
interval = st.selectbox("Candles Interval", ("1m", "3m", "5m", "15m", "1h", "4h", "1d"),
index=interval_index,
help="Enter the interval for candles (e.g., 1m).")
Expand Down
3 changes: 2 additions & 1 deletion frontend/components/market_making_general_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ def get_market_making_general_inputs(custom_candles=False, controller_name: str
help="Enter the trading pair to trade on (e.g., WLD-USDT).")
with c3:
leverage = st.number_input("Leverage", value=leverage,
min_value=1,
help="Set the leverage to use for trading (e.g., 20 for 20x leverage). "
"Set it to 1 for spot trading.")
"Set it to 1 for spot trading. Value must be greater than 0.")
with c4:
total_amount_quote = st.number_input("Total amount of quote", value=total_amount_quote,
help="Enter the total amount in quote asset to use for "
Expand Down
21 changes: 19 additions & 2 deletions frontend/components/st_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,32 +27,49 @@ def distribution_inputs(column, dist_type_name, levels=3, default_values=None):
base, scaling_factor, step, ratio, manual_values = None, None, None, None, None

if dist_type != "Manual":
# Set min_value for Fibonacci to ensure positive start values
min_start = 0.01 if dist_type == "Fibonacci" else None
start = column.number_input(f"{dist_type_name} Start Value", value=1.0,
min_value=min_start,
key=f"{column}_{dist_type_name.lower()}_start")
if dist_type == "Logarithmic":
base = column.number_input(f"{dist_type_name} Log Base", value=exp(1),
min_value=0.01,
help="Base must be greater than 0 and not equal to 1",
key=f"{column}_{dist_type_name.lower()}_base")
scaling_factor = column.number_input(f"{dist_type_name} Scaling Factor", value=2.0,
min_value=0.01,
help="Scaling factor must be greater than 0",
key=f"{column}_{dist_type_name.lower()}_scaling")
elif dist_type == "Arithmetic":
step = column.number_input(f"{dist_type_name} Step", value=0.3,
key=f"{column}_{dist_type_name.lower()}_step")
elif dist_type == "Geometric":
ratio = column.number_input(f"{dist_type_name} Ratio", value=2.0,
min_value=1.0,
help="Ratio must be greater than or equal to 1",
key=f"{column}_{dist_type_name.lower()}_ratio")
elif dist_type == "GeoCustom":
ratio = column.number_input(f"{dist_type_name} Ratio", value=2.0,
min_value=1.0,
help="Ratio must be greater than or equal to 1",
key=f"{column}_{dist_type_name.lower()}_ratio")
elif dist_type == "Linear":
step = column.number_input(f"{dist_type_name} End", value=1.0,
key=f"{column}_{dist_type_name.lower()}_end")
else:
if default_values:
manual_values = [column.number_input(f"{dist_type_name} for level {i + 1}", value=value * 100.0,
manual_values = [column.number_input(f"{dist_type_name} for level {i + 1}",
value=value * 100.0,
min_value=0.01 if dist_type_name == "Amount" else 0.0,
help="Value must be greater than 0" if dist_type_name == "Amount" else None,
key=f"{column}_{dist_type_name.lower()}_{i}") for i, value in
enumerate(default_values)]
else:
manual_values = [column.number_input(f"{dist_type_name} for level {i + 1}", value=i + 1.0,
manual_values = [column.number_input(f"{dist_type_name} for level {i + 1}",
value=i + 1.0,
min_value=0.01 if dist_type_name == "Amount" else 0.0,
help="Value must be greater than 0" if dist_type_name == "Amount" else None,
key=f"{column}_{dist_type_name.lower()}_{i}") for i, value in
range(levels)]
start = None # As start is not relevant for Manual type
Expand Down
11 changes: 7 additions & 4 deletions frontend/pages/landing.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,23 +257,26 @@ def generate_sample_data():
# Quick Actions
st.markdown("## ⚡ Quick Actions")

# Alert for mocked navigation
st.info("ℹ️ **Note**: This is a mocked landing page. The Quick Actions buttons below are for demonstration purposes and the page navigation is not functional.")

col1, col2, col3, col4 = st.columns(4)

with col1:
if st.button("🚀 Deploy Strategy", use_container_width=True, type="primary"):
st.switch_page("frontend/pages/orchestration/deploy_v2_with_controllers/app.py")
st.error("🚫 Navigation unavailable - This is a mocked landing page for demonstration purposes.")

with col2:
if st.button("📊 View Performance", use_container_width=True):
st.switch_page("frontend/pages/performance/app.py")
st.error("🚫 Navigation unavailable - This is a mocked landing page for demonstration purposes.")

with col3:
if st.button("🔍 Backtesting", use_container_width=True):
st.switch_page("frontend/pages/backtesting/app.py")
st.error("🚫 Navigation unavailable - This is a mocked landing page for demonstration purposes.")

with col4:
if st.button("🗃️ Archived Bots", use_container_width=True):
st.switch_page("frontend/pages/orchestration/archived_bots/app.py")
st.error("🚫 Navigation unavailable - This is a mocked landing page for demonstration purposes.")

st.divider()

Expand Down
9 changes: 2 additions & 7 deletions frontend/pages/orchestration/credentials/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def add_credentials_section():
if st.button("Submit Credentials"):
response = client.accounts.add_credential(account_name, connector_name, config_inputs)
if response:
st.success(response)
st.success(f"✅ Successfully added {connector_name} connector to {account_name}!")
try:
st.rerun(scope="fragment")
except Exception:
Expand All @@ -188,12 +188,7 @@ def add_credentials_section():
with cols[-1]:
if st.button("Submit Credentials"):
response = client.accounts.add_credential(account_name, connector_name, config_inputs)
if response:
st.success(response)
try:
st.rerun(scope="fragment")
except Exception:
st.rerun()
st.write(response)


add_credentials_section()