(20250123) Made a common API to disable all integrations.
This commit is contained in:
@@ -98,6 +98,12 @@ from abc import ABC, abstractmethod
|
||||
|
||||
class TradingController(CoreAuthTokenController, ABC):
|
||||
|
||||
# ┏┓┓ ┓┏
|
||||
# ┃ ┃┏┓┏┏ ┃┃┏┓┏┓┏
|
||||
# ┗┛┗┗┻┛┛ ┗┛┗┻┛ ┛
|
||||
|
||||
SERVICE_TYPE = "stockTrading"
|
||||
|
||||
# ┏┓
|
||||
# ┃ ┏┓┏┓┏╋┏┓┓┏┏╋┏┓┏┓
|
||||
# ┗┛┗┛┛┗┛┗┛ ┗┻┗┗┗┛┛
|
||||
@@ -126,13 +132,10 @@ class TradingController(CoreAuthTokenController, ABC):
|
||||
:return: None.
|
||||
"""
|
||||
|
||||
# Declare the service type:
|
||||
this_service_type = "stockTrading"
|
||||
|
||||
# Prepare base filter:
|
||||
this_filter = {}
|
||||
for k, v in (base_filter or {}).items(): this_filter[k] = v
|
||||
this_filter["serviceType"] = this_service_type
|
||||
this_filter["serviceType"] = self.SERVICE_TYPE
|
||||
|
||||
# Invoke the parent's constructor:
|
||||
CoreAuthTokenController.__init__(
|
||||
@@ -147,7 +150,7 @@ class TradingController(CoreAuthTokenController, ABC):
|
||||
)
|
||||
|
||||
# Init a variable in a parent:
|
||||
self._service_type = this_service_type
|
||||
self._service_type = self.SERVICE_TYPE
|
||||
|
||||
# ┏┓ ┓
|
||||
# ┣┫┓┏╋┣┓
|
||||
|
||||
@@ -137,11 +137,8 @@ class ICICIBreezeTradingController(TradingController):
|
||||
:return: None.
|
||||
"""
|
||||
|
||||
# Declare the client:
|
||||
this_client = self.CLIENT_NAME
|
||||
|
||||
# Prepare base filter:
|
||||
this_filter = {"client": this_client}
|
||||
this_filter = {"client": self.CLIENT_NAME}
|
||||
|
||||
# Invoke the parent's constructor:
|
||||
super().__init__(
|
||||
@@ -155,7 +152,7 @@ class ICICIBreezeTradingController(TradingController):
|
||||
)
|
||||
|
||||
# Init a variable in a parent:
|
||||
self._client = this_client
|
||||
self._client = self.CLIENT_NAME
|
||||
|
||||
# ┏┓ ┓
|
||||
# ┣┫┓┏╋┣┓
|
||||
|
||||
@@ -136,11 +136,8 @@ class PaperTradingController(TradingController):
|
||||
:return: None.
|
||||
"""
|
||||
|
||||
# Declare the client:
|
||||
this_client = self.CLIENT_NAME
|
||||
|
||||
# Prepare base filter:
|
||||
this_filter = {"client": this_client}
|
||||
this_filter = {"client": self.CLIENT_NAME}
|
||||
|
||||
# Invoke the parent's constructor:
|
||||
super().__init__(
|
||||
@@ -154,7 +151,7 @@ class PaperTradingController(TradingController):
|
||||
)
|
||||
|
||||
# Init a variable in a parent:
|
||||
self._client = this_client
|
||||
self._client = self.CLIENT_NAME
|
||||
|
||||
# ┏┓ ┓
|
||||
# ┣┫┓┏╋┣┓
|
||||
|
||||
@@ -136,11 +136,8 @@ class ZerodhaKiteTradingController(TradingController):
|
||||
:return: None.
|
||||
"""
|
||||
|
||||
# Declare the client:
|
||||
this_client = self.CLIENT_NAME
|
||||
|
||||
# Prepare base filter:
|
||||
this_filter = {"client": this_client}
|
||||
this_filter = {"client": self.CLIENT_NAME}
|
||||
|
||||
# Invoke the parent's constructor:
|
||||
super().__init__(
|
||||
@@ -154,7 +151,7 @@ class ZerodhaKiteTradingController(TradingController):
|
||||
)
|
||||
|
||||
# Init a variable in a parent:
|
||||
self._client = this_client
|
||||
self._client = self.CLIENT_NAME
|
||||
|
||||
# ┏┓ ┓
|
||||
# ┣┫┓┏╋┣┓
|
||||
|
||||
Reference in New Issue
Block a user