Implement strategies and posting trades
This commit is contained in:
28
app/urls.py
28
app/urls.py
@@ -21,7 +21,7 @@ from django.urls import include, path
|
||||
from django.views.generic import TemplateView
|
||||
from django_otp.forms import OTPAuthenticationForm
|
||||
|
||||
from core.views import accounts, base, callbacks, hooks, positions, trades
|
||||
from core.views import accounts, base, callbacks, hooks, positions, strategies, trades
|
||||
from core.views.stripe_callbacks import Callback
|
||||
|
||||
urlpatterns = [
|
||||
@@ -127,6 +127,11 @@ urlpatterns = [
|
||||
positions.Positions.as_view(),
|
||||
name="positions",
|
||||
),
|
||||
path(
|
||||
"positions/<str:type>/<str:account_id>/<str:asset_id>/",
|
||||
positions.PositionAction.as_view(),
|
||||
name="position_action",
|
||||
),
|
||||
# path(
|
||||
# "trades/<str:type>/add/<str:name>/",
|
||||
# trades.TradeAction.as_view(),
|
||||
@@ -142,4 +147,25 @@ urlpatterns = [
|
||||
# trades.TradeAction.as_view(),
|
||||
# name="trade_action",
|
||||
# ),
|
||||
path("strategies/<str:type>/", strategies.Strategies.as_view(), name="strategies"),
|
||||
path(
|
||||
"strategies/<str:type>/add/",
|
||||
strategies.StrategiesAction.as_view(),
|
||||
name="strategies_action",
|
||||
),
|
||||
path(
|
||||
"strategies/<str:type>/add/<str:name>/",
|
||||
strategies.StrategiesAction.as_view(),
|
||||
name="strategies_action",
|
||||
),
|
||||
path(
|
||||
"strategies/<str:type>/del/<str:strategy_id>/",
|
||||
strategies.StrategiesAction.as_view(),
|
||||
name="strategies_action",
|
||||
),
|
||||
path(
|
||||
"strategies/<str:type>/edit/<str:strategy_id>/",
|
||||
strategies.StrategiesAction.as_view(),
|
||||
name="strategies_action",
|
||||
),
|
||||
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
||||
|
||||
Reference in New Issue
Block a user