(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
@@ -51,6 +51,7 @@ from models.api.finstitutions.trading.symbols.list import (
TradingSymbolListBrokerResponse,
TradingSymbol
)
from models.finstitutions.trading.oauth import TradingOAuthCallbackResponse
# To work with MongoDB:
from bson.objectid import ObjectId
@@ -62,8 +63,8 @@ from typing import List, Any
import httpx
import urllib
# To work with Zerodha's Kite platform:
from kiteconnect import KiteConnect
# To work with ICICI Breeze's platform:
from breeze_connect import BreezeConnect
# To handle exceptions:
from pydantic import ValidationError
@@ -179,8 +180,9 @@ class ICICIBreezeTradingController(TradingController):
self,
sql_conn: AsyncMySQL,
mongo_data_conn: AsyncMongo,
inbound_data: dict
) -> bool:
inbound_data: dict,
client_user_id: str
) -> TradingOAuthCallbackResponse:
"""
To capture the callback from ICICI Breeze's authorization loop. This happens when the user successfully logs in
@@ -188,7 +190,8 @@ class ICICIBreezeTradingController(TradingController):
:param sql_conn: The database connection to use to perform this activity.
:param mongo_data_conn: The database connection to use to perform this activity.
:param inbound_data: The data that came in from the broker. This could be in the JSON body, query params, etc.
:return: True if the callback loop was completed successfully, else False..
:param client_user_id: How the trading client identifies this user.
:return: A structured response to capture the process of callback handling.
"""
raise NotImplementedError