Broker Handle doesn't return quote

selmar25
I don't get the quote back when I try any of the below lines. It used to work for me before. Around 6-7 months the below lines were used to return the quote back. Please let me know if anything changed.

Controller.getBrokerLogin().getBrokerHandle().quote('NSE:ITC')
or
Controller.getBrokerLogin().getBrokerHandle().quote('NFO:BANKNIFTY2290837100PE')
  • sujith
    Can you paste the complete request and response debug logs?
  • sujith
    Make sure to remove app and client specific tokens.
  • selmar25
    I used to give the below information 6 months back and it was getting me the quote. As you can see above, I do pass the clientID, AppKey & AppSecret to handle broker login like below. So is it not more needed?

    brokerAppConfig = getBrokerAppConfig()
    brokerAppDetails = BrokerAppDetails(brokerAppConfig['broker'])
    brokerAppDetails.setClientID(brokerAppConfig['clientID'])
    brokerAppDetails.setAppKey(brokerAppConfig['appKey'])
    brokerAppDetails.setAppSecret(brokerAppConfig['appSecret'])

  • selmar25
    Also the below code

    brokerHandle.set_access_token(accessToken)
    self.setBrokerHandle(brokerHandle)
    self.setAccessToken(accessToken)
  • selmar25
    Debug Logs

    2022-09-02 13:54:37: Fetching instruments done. Instruments count = 65397
    2022-09-02 13:54:37: 127.0.0.1 - - [02/Sep/2022 13:54:37] "GET /?algoStarted=true HTTP/1.1" 200 -
    2022-09-02 13:54:39: Algo started.
    2022-09-02 13:55:06: Exception while getQuote from server
    Traceback (most recent call last):
    File "C:\Users\admin\PycharmProjects\algo-trade-neostrategies\src\core\Quotes.py", line 20, in getQuote
    print('inside Zerodha quote 1 ' + bQuoteResp)
    TypeError: can only concatenate str (not "dict") to str
    2022-09-02 13:55:06: NeoBuy: Could not get quotes for option symbols
  • selmar25
    It works now. Thanks @sujith
This discussion has been closed.