(20241224) Live Feed From Kafka (to test).

This commit is contained in:
2024-12-24 14:06:05 +05:30
parent 7c7b10f27c
commit ae6a959a21
18 changed files with 1018 additions and 538 deletions
@@ -85,9 +85,16 @@ import httpx
class ZerodhaKiteAuthTokens(BaseModel):
userId: str = Field(
description = "the id of the user, typically in 'ABC123' format",
frozen = True,
alias = "user_id"
)
userType: str | None = Field(
description = "the type of the user",
default = None,
frozen = True,
alias = "user_type",
examples = ["individual/ind_with_nom"]
)
@@ -95,60 +102,71 @@ class ZerodhaKiteAuthTokens(BaseModel):
email: str | None = Field(
description = "the email id of the user",
default = None,
frozen = True,
alias = "email"
)
name: str = Field(
description = "the name of the user",
frozen = True,
alias = "user_name"
)
displayName: str | None = Field(
description = "the short display name of the user",
default = None,
frozen = True,
alias = "user_shortname"
)
displayPictureUrl: str | None = Field(
description = "the display picture of the user",
default = None,
frozen = True,
alias = "avatar_url"
)
exchanges: List[str] = Field(
description = "the list of exchanges this user can trade on",
frozen = True,
alias = "exchanges"
)
products: List[str] = Field(
description = "the list of products (offered by the broker) this user can avail",
frozen = True,
alias = "products"
)
orderTypes: List[str] = Field(
description = "the list of order types this user can place",
frozen = True,
alias = "order_types"
)
accessToken: str = Field(
description = "the main access token to be used in actual requests",
frozen = True,
alias = "access_token"
)
refreshToken: str | None = Field(
description = "token to be used to refresh the access token; may not be provided",
default = None,
frozen = True,
alias = "refresh_token"
)
publicToken: str | None = Field(
description = "undocumented on their official documentation",
default = None,
frozen = True,
alias = "public_token"
)
loginTs: AwareDatetime = Field(
description = "the time (utc) at which this user logged in",
frozen = True,
alias = "login_time"
)