forked from kodorvan/stcs
Fixed
This commit is contained in:
@@ -39,7 +39,7 @@ main_menu = InlineKeyboardMarkup(
|
||||
[InlineKeyboardButton(text="Начать торговлю", callback_data="start_trading")],
|
||||
[
|
||||
InlineKeyboardButton(
|
||||
text="Остановить торговлю", callback_data="trading_stop"
|
||||
text="Остановить торговлю", callback_data="stop_trading"
|
||||
)
|
||||
],
|
||||
]
|
||||
@@ -337,17 +337,21 @@ def create_active_positions_keyboard(symbols: list):
|
||||
return builder.as_markup()
|
||||
|
||||
|
||||
def make_close_position_keyboard(symbol_pos: str, side: str, position_idx: int, qty: int):
|
||||
def make_close_position_keyboard(
|
||||
symbol_pos: str, side: str, position_idx: int, qty: int
|
||||
):
|
||||
return InlineKeyboardMarkup(
|
||||
inline_keyboard=[
|
||||
[
|
||||
InlineKeyboardButton(
|
||||
text="Закрыть позицию", callback_data=f"close_position_{symbol_pos}_{side}_{position_idx}_{qty}"
|
||||
text="Закрыть позицию",
|
||||
callback_data=f"close_position_{symbol_pos}_{side}_{position_idx}_{qty}",
|
||||
)
|
||||
],
|
||||
[
|
||||
InlineKeyboardButton(
|
||||
text="Установить TP/SL", callback_data=f"pos_tp_sl_{symbol_pos}_{position_idx}"
|
||||
text="Установить TP/SL",
|
||||
callback_data=f"pos_tp_sl_{symbol_pos}_{position_idx}",
|
||||
)
|
||||
],
|
||||
[
|
||||
@@ -358,7 +362,7 @@ def make_close_position_keyboard(symbol_pos: str, side: str, position_idx: int,
|
||||
)
|
||||
|
||||
|
||||
def create_active_orders_keyboard(orders:list):
|
||||
def create_active_orders_keyboard(orders: list):
|
||||
builder = InlineKeyboardBuilder()
|
||||
for order, side in orders:
|
||||
builder.button(text=f"{order}", callback_data=f"get_order_{order}_{side}")
|
||||
@@ -373,7 +377,8 @@ def make_close_orders_keyboard(symbol_order: str, order_id: str):
|
||||
inline_keyboard=[
|
||||
[
|
||||
InlineKeyboardButton(
|
||||
text="Закрыть ордер", callback_data=f"close_order_{symbol_order}_{order_id}"
|
||||
text="Закрыть ордер",
|
||||
callback_data=f"close_order_{symbol_order}_{order_id}",
|
||||
)
|
||||
],
|
||||
[
|
||||
@@ -439,7 +444,11 @@ back_to_start_trading = InlineKeyboardMarkup(
|
||||
|
||||
cancel_timer_merged = InlineKeyboardMarkup(
|
||||
inline_keyboard=[
|
||||
[InlineKeyboardButton(text="Отменить таймер", callback_data="cancel_timer_merged")],
|
||||
[
|
||||
InlineKeyboardButton(
|
||||
text="Отменить таймер", callback_data="cancel_timer_merged"
|
||||
)
|
||||
],
|
||||
[
|
||||
InlineKeyboardButton(text="На главную", callback_data="profile_bybit"),
|
||||
],
|
||||
@@ -448,7 +457,11 @@ cancel_timer_merged = InlineKeyboardMarkup(
|
||||
|
||||
cancel_timer_switch = InlineKeyboardMarkup(
|
||||
inline_keyboard=[
|
||||
[InlineKeyboardButton(text="Отменить таймер", callback_data="cancel_timer_switch")],
|
||||
[
|
||||
InlineKeyboardButton(
|
||||
text="Отменить таймер", callback_data="cancel_timer_switch"
|
||||
)
|
||||
],
|
||||
[
|
||||
InlineKeyboardButton(text="На главную", callback_data="profile_bybit"),
|
||||
],
|
||||
@@ -459,9 +472,13 @@ cancel_timer_switch = InlineKeyboardMarkup(
|
||||
|
||||
cancel_timer_stop = InlineKeyboardMarkup(
|
||||
inline_keyboard=[
|
||||
[InlineKeyboardButton(text="Отменить таймер", callback_data="cancel_timer_stop")],
|
||||
[
|
||||
InlineKeyboardButton(
|
||||
text="Отменить таймер", callback_data="cancel_timer_stop"
|
||||
)
|
||||
],
|
||||
[
|
||||
InlineKeyboardButton(text="На главную", callback_data="profile_bybit"),
|
||||
],
|
||||
]
|
||||
)
|
||||
)
|
||||
|
Reference in New Issue
Block a user