-
Notifications
You must be signed in to change notification settings - Fork 0
/
forms.py
28 lines (25 loc) · 824 Bytes
/
forms.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from flask_wtf import FlaskForm
from wtforms import FloatField, SubmitField, RadioField, SelectField
from wtforms.validators import DataRequired
class OrderForm(FlaskForm):
order_type = RadioField(
'Order Type',
[DataRequired()],
choices=[
("sell", "Sell"),
("buy", "Buy")
]
)
condition = SelectField(
'Condition',
[DataRequired()],
choices=[
("up", "Crossing Up"),
("down", "Crossing Down")
]
)
amount = FloatField('Amount', [DataRequired()])
price = FloatField('price', [DataRequired()])
src_currency = SelectField('Source Currency', [DataRequired()], choices=[])
dst_currency = SelectField('Target Currency', [DataRequired()], choices=[])
submit = SubmitField('Submit')