[Deprecated] Holdings Import


Brand new page ✨


Gateway provides Integration partners with the capability to import the latest snapshot of a user’s stock, ETF and smallcase holdings, upon user consent. User consent is required only once in the lifetime of the user

Holdings fetch mechanism works in two ways with brokers currently supported by Gateway -

  • Sessionless holdings API, where after one time user consent, holdings can be provided to the Integration partner without the user having to create an active broker account session. This is supported by Zerodha
  • Session-based holdings API, where active broker account session is required to fetch the latest snapshot of the user holdings

Holdings fetch request can be triggered by the Partner either by Gateway frontend method or by Holdings Import Backend API.
While the frontend method will require an active broker session and prompt the user to login if not present. Post broker login, SDK method will resolve with success status and latest holdings snapshot with timestamp of last update is shared on the provided webhook.

Backend API would check if the latest snapshot of holdings can be fetched from broker.
If yes(Sessionless holdings API), Gateway will fetch the holdings from the broker and return the latest holdings snapshot and updating flag as true
If no(Session-based holdings API), Gateway will return the last updated holdings withtimestamp

In order for the Integration partner to fetch user holdings, Gateway provides the following methods -

  • Trigger holdings frontend method which will subsequently check if an active broker session exists & subsequently fetch the latest snapshot and hit webhook url with the response.
  • Consume holdings backend to backend API. This will return latest snapshot for the brokers supporting sessionless holdings import. For other brokers this will return last saved snapshot of user holdings with the timestamp.

Note : Holdings import is currently supported by 5Paisa, Angel Broking, Dhan, Fidsom, Groww, IIFL, Motilal Oswal, Trustline, Upstox & Zerodha