Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs
    1. Home
    2. bhushan
    B
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    bhushan

    @bhushan

    0
    Reputation
    4
    Posts
    3
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    bhushan Follow

    Best posts made by bhushan

    This user hasn't posted anything yet.

    Latest posts made by bhushan

    • Error in login

      Hi,

      I am getting the following error while login using JAVA API.
      Cannot invoke "com.angelbroking.smartapi.models.User.getFeedToken()" because "user" is null
      Please help me to resolve.

      posted in NodeJS SDK
      B
      bhushan
    • RE: Unable to place stop loss order

      @admin Appreciate your reply but I solved it by myself.

      I made the following changes in source code and rebuilt the jar.

      • in OrderParams.java I added the parameter triggerprice
        public String triggerprice;

      -in SmartConnect.java I added the trigger price in JSONObject params which will be sent via order post request
      if (orderParams.triggerprice != null)
      params.put("triggerprice", orderParams.triggerprice);

      • in Constants.java there was no option to set order type "STOPLOSS_LIMIT" and variety "STOPLOSS" so I am using them as direct string in my program.

      Now I am able to place stoploss order and I can also use triggerprice along with the order

      posted in NodeJS SDK
      B
      bhushan
    • RE: Unable to place stop loss order

      @admin not getting any errors. I tried with multiple combination but unable to place stop loss order. Limit orders are fine. And I am unable to find trigger price also in orderparams.

      When I was checking this market was at 358 range and I wanted to buy if the price moves above 362. I know I can place a limit order if the price matches my price, but I want to keep the order ready with trigger price.

      posted in NodeJS SDK
      B
      bhushan
    • Unable to place stop loss order

      Hi,

      I am unable to place stop loss order, can someone please help ? Below is the order parameters I am trying with -

      OrderParams orderParams = new OrderParams();
      orderParams.variety = "STOPLOSS";
      orderParams.quantity = 1;
      orderParams.symboltoken = "3045";
      orderParams.exchange = Constants.EXCHANGE_NSE;
      orderParams.ordertype = Constants.ORDER_TYPE_SL;
      orderParams.stoploss = "362";
      orderParams.tradingsymbol = "SBIN-EQ";
      orderParams.producttype = Constants.PRODUCT_INTRADAY;
      orderParams.duration = Constants.VALIDITY_DAY;
      orderParams.transactiontype = Constants.TRANSACTION_TYPE_BUY;
      orderParams.price = (double) 362;
      orderParams.squareoff = "0";

      	Order order = smartConnect.placeOrder(orderParams, Constants.VARIETY_REGULAR);
      
      posted in NodeJS SDK
      B
      bhushan