(20241230) Accepting ICICI Breeze's auth. now.
This commit is contained in:
@@ -129,6 +129,30 @@ class ZerodhaKiteAuth(BaseModel):
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
class ICICIBreezeAuth(BaseModel):
|
||||
|
||||
apiKey: str = Field(
|
||||
description = "??",
|
||||
frozen = True
|
||||
)
|
||||
|
||||
apiSecret: str = Field(
|
||||
description = "??",
|
||||
frozen = True
|
||||
)
|
||||
|
||||
# ┏┓ ┏•
|
||||
# ┃ ┏┓┏┓╋┓┏┓
|
||||
# ┗┛┗┛┛┗┛┗┗┫
|
||||
# ┛
|
||||
|
||||
class Config:
|
||||
extra = "forbid"
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
class TradingAuthRequestHeaders(BaseModel):
|
||||
|
||||
sessionToken: str = Field(
|
||||
@@ -155,8 +179,8 @@ class TradingAuthRequestHeaders(BaseModel):
|
||||
|
||||
class TradingAuthRequestData(BaseModel):
|
||||
|
||||
client: Literal["zerodhaKite", "paperTrading"] = Field(alias = "client")
|
||||
auth: Union[ZerodhaKiteAuth, PaperTradingAuth]
|
||||
client: Literal["zerodhaKite", "iciciBreeze", "paperTrading"] = Field(alias = "client")
|
||||
auth: Union[ZerodhaKiteAuth, ICICIBreezeAuth, PaperTradingAuth]
|
||||
|
||||
# ┏┓ ┏•
|
||||
# ┃ ┏┓┏┓╋┓┏┓
|
||||
@@ -175,7 +199,8 @@ class TradingAuthRequestData(BaseModel):
|
||||
client = values.client
|
||||
auth = values.auth
|
||||
harmony_map = {
|
||||
"zerodhaKite": ZerodhaKiteAuth,
|
||||
"zerodhaKite": (ZerodhaKiteAuth, ICICIBreezeAuth),
|
||||
"iciciBreeze": (ICICIBreezeAuth, ZerodhaKiteAuth),
|
||||
"paperTrading": PaperTradingAuth
|
||||
}
|
||||
if not isinstance(auth, harmony_map[client]):
|
||||
|
||||
@@ -105,12 +105,12 @@ class CoreAuthTokenModel(BaseModel):
|
||||
)
|
||||
|
||||
client: Literal[
|
||||
"gmail", "outlook", # ...................... Mail Clients
|
||||
"telegram", "whatsapp", # .................. Chat Clients
|
||||
"nimbusSmsIndia", "savvyBulkSmsKenya", # ... SMS Clients
|
||||
"razorpay", "safaricomMPesaExpress", # ..... Payment Gateways
|
||||
"zerodhaKite", "paperTrading", # ........... Stock Brokers
|
||||
"theCaOfficeAi" # .......................... Software
|
||||
"gmail", "outlook", # ............................. Mail Clients
|
||||
"telegram", "whatsapp", # ......................... Chat Clients
|
||||
"nimbusSmsIndia", "savvyBulkSmsKenya", # .......... SMS Clients
|
||||
"razorpay", "safaricomMPesaExpress", # ............ Payment Gateways
|
||||
"zerodhaKite", "iciciBreeze", "paperTrading", # ... Stock Brokers
|
||||
"theCaOfficeAi" # ................................. Software
|
||||
] = Field(
|
||||
description = "the third-part client that was used",
|
||||
frozen = True
|
||||
|
||||
Reference in New Issue
Block a user