do i need separate marketdata & trading apps ?


  • Hi in developer dashboard i see 2 types apps -
    https://smartapi.angelbroking.com/create

    1. marketdata app
    2. trading app

    so if i want to stream and place orders do I need both the apps ?

    In the example from github -

    # package import statement
    from smartapi import SmartConnect #or from smartapi.smartConnect import SmartConnect
    #import smartapi.smartExceptions(for smartExceptions)
    
    #create object of call
    obj=SmartConnect(api_key="your api key")
    
    #login api call
    
    data = obj.generateSession("Your Client ID","Your Password")
    refreshToken= data['data']['refreshToken']
    
    #fetch the feedtoken
    feedToken=obj.getfeedToken()
    
    #fetch User Profile
    userProfile= obj.getProfile(refreshToken)
    

    which api_key need to be provided ? do I have to create 2 objects i.e one for marketdata and other one for trading obj ?? please clarify


  • @keer2405 If you only want to stream prices, then you need to create marketdata app and if you want full access like placing order and price streaming, you need to create trading app.

    When you create either app, you will get api_key which you need to place in SmartConnect function.

    No, you don't need to create two separate objects for price streaming and order placing. You can do this by creating only one object of SmartConnect.