obj.getMarketData() not working HELP


  • obj = SmartConnect(api_key = api_key)
    data = obj.generateSession(username, pin, pyotp.TOTP(token).now())

    other things are working, but
    here, obj.getMarketData() not working

    Traceback (most recent call last):
    File "G:\My Drive\ShareMarket\python_algo\angel_codes\angel_login_temp.py", line 150, in <module>
    print(obj.getMarketData("FULL", exchangeTokens)) # FULL, # OHLC, # LTP -- Modes
    ^^^^^^^^^^^^^^^^^
    AttributeError: 'SmartConnect' object has no attribute 'getMarketData'


  • @jogesh

    Verified from our end.
    getMarketData() is working fine.
    Attaching the function parameters for reference :

    mode="FULL"
    exchangeTokens={
    "exchange":["100957"//token list]
    }

    print(obj.getMarketData(mode,exchangeTokens))

    Regards,
    SmartAPI Team