Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
wiseplat
GitHub Repository: wiseplat/python-code
Path: blob/master/ invest-robot-contest_trading_bot-master/bot/keyboards/start_menu_keyboard.py
5935 views
1
from aiogram.types import ReplyKeyboardMarkup, KeyboardButton
2
from config.personal_data import get_account_type
3
"""
4
Клавиатура стартового меню
5
"""
6
7
8
def get_start_menu(user_id):
9
if get_account_type(user_id=user_id) == "sandbox":
10
start_menu = ReplyKeyboardMarkup(
11
keyboard=[
12
[
13
KeyboardButton(text="Пополнить счёт"),
14
],
15
[
16
KeyboardButton(text="Баланс"),
17
KeyboardButton(text="Бумаги"),
18
],
19
[
20
KeyboardButton(text="Статистика"),
21
KeyboardButton(text="Операции"),
22
KeyboardButton(text="Поиск"),
23
24
],
25
[
26
KeyboardButton(text="Открытые ордера"),
27
],
28
[
29
KeyboardButton(text="Торговые стратегии"),
30
],
31
[
32
KeyboardButton(text="Продать"),
33
KeyboardButton(text="Купить"),
34
],
35
[
36
KeyboardButton(text="Изменить Токен"),
37
KeyboardButton(text="Изменить Аккаунт"),
38
],
39
[
40
KeyboardButton(text="Удалить все торговые стратегии"),
41
],
42
],
43
resize_keyboard=True
44
)
45
else:
46
start_menu = ReplyKeyboardMarkup(
47
keyboard=[
48
[
49
KeyboardButton(text="Открыть песочницу"),
50
KeyboardButton(text="Закрыть песочницу"),
51
52
],
53
[
54
KeyboardButton(text="Баланс"),
55
KeyboardButton(text="Бумаги"),
56
],
57
[
58
KeyboardButton(text="Статистика"),
59
KeyboardButton(text="Операции"),
60
KeyboardButton(text="Поиск"),
61
],
62
[
63
KeyboardButton(text="Открытые ордера"),
64
],
65
[
66
KeyboardButton(text="Торговые стратегии"),
67
],
68
[
69
KeyboardButton(text="Продать"),
70
KeyboardButton(text="Купить"),
71
],
72
[
73
KeyboardButton(text="Изменить Токен"),
74
KeyboardButton(text="Изменить Аккаунт"),
75
],
76
[
77
KeyboardButton(text="Удалить все торговые стратегии"),
78
],
79
80
],
81
resize_keyboard=True
82
)
83
return start_menu
84
85