Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs

    Getting order history

    NodeJS SDK
    0
    3
    26
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      Rajen last edited by

      Hello sir,

      I am using smartapi-java-2.2.5.jar and everything is working smoothly.

      I am able to place the order.

      These are the main order parameters set :

      orderParams.exchange = Constants.EXCHANGE_MCX;
      orderParams.ordertype = Constants.ORDER_TYPE_MARKET;
      orderParams.producttype = Constants.PRODUCT_CARRYFORWARD;
      orderParams.duration = Constants.DURATION_IOC;

      The order is getting placed correctly, the order object returns orderid only.

      I want to get order history like status and price. I tried getOrderHistory() and getTrades() functions but it is returning null as data.

      Can you help for the same?

      1 Reply Last reply Reply Quote 0
      • A
        admin last edited by

        @Rajen we checked, and it is working fine. There is an issue with your code.

        R 1 Reply Last reply Reply Quote 0
        • R
          Rajen @admin last edited by

          @admin Hello sir, thank you for checking the code.

          Right now my code is
          smartConnect.getOrderHistory(smartConnect.getUserId());

          And the response is
          Order history : {"data":null,"message":"SUCCESS","errorcode":"","status":true}

          I am not getting any error but the data is null.

          Can you provide the correct way which is compatible with latest jar to solve this?

          Thank you.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post