(20250104) Breeze authorization will be accepted now.

This commit is contained in:
2025-01-04 15:22:51 +05:30
parent aadcc87e2a
commit 0c2d7816f4
13 changed files with 316 additions and 83 deletions
+28 -8
View File
@@ -101,18 +101,24 @@ class PaperTradingAuth(BaseModel):
class ZerodhaKiteAuth(BaseModel):
userId: str = Field(
description = "How Zerodha's Kite platform identifies this user.",
frozen = True,
alias = "clientId"
)
apiKey: str = Field(
description = (
"the api key of your kite connect app; "
"this remains constant throughout the life of the app"
"The API key of your Kite app. "
"This remains constant throughout the life of the app."
),
frozen = True
)
apiSecret: str = Field(
description = (
"the api secret of your kite connect app; "
"this can change if you think the security of your app has been compromised"
"The API secret of your Kite app. "
"This can be changed if you think the security of your app has been compromised."
),
frozen = True
)
@@ -124,6 +130,7 @@ class ZerodhaKiteAuth(BaseModel):
class Config:
extra = "forbid"
populate_by_name = True
# ---------------------------------------------------------------------------------------------------------------------
@@ -131,13 +138,25 @@ class ZerodhaKiteAuth(BaseModel):
class ICICIBreezeAuth(BaseModel):
userId: str = Field(
description = "How ICICI's Breeze platform identifies this user.",
frozen = True,
alias = "clientId"
)
apiKey: str = Field(
description = "??",
description = (
"The API key of your Breeze app. "
"This remains constant throughout the life of the app."
),
frozen = True
)
apiSecret: str = Field(
description = "??",
description = (
"The API secret of your Breeze app. "
"This can be changed if you think the security of your app has been compromised."
),
frozen = True
)
@@ -148,6 +167,7 @@ class ICICIBreezeAuth(BaseModel):
class Config:
extra = "forbid"
populate_by_name = True
# ---------------------------------------------------------------------------------------------------------------------
@@ -179,8 +199,8 @@ class TradingAuthRequestHeaders(BaseModel):
class TradingAuthRequestData(BaseModel):
client: Literal["zerodhaKite", "iciciBreeze", "paperTrading"] = Field(alias = "client")
auth: Union[ZerodhaKiteAuth, ICICIBreezeAuth, PaperTradingAuth]
client: Literal["paperTrading", "zerodhaKite", "iciciBreeze"] = Field(alias = "client")
auth: Union[PaperTradingAuth, ZerodhaKiteAuth, ICICIBreezeAuth]
# ┏┓ ┏•
# ┃ ┏┓┏┓╋┓┏┓