Navigation

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

    getTrades in JAVA returning null

    NodeJS SDK
    0
    2
    13
    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.
    • T
      thunder123 last edited by

      Below is the code snippet from your github repository, which is not working as the response object is returning null. Please let me know if anything is wrong here, or how can i fix it.

      It is very urgent.

      /** Get tradebook */
      	public void getTrades(SmartConnect smartConnect) throws SmartAPIException, IOException {
      		// Returns tradebook.
      		List<Trade> trades = smartConnect.getTrades();
      		for (int i = 0; i < trades.size(); i++) {
      			System.out.println(trades.get(i).tradingSymbol + " " + trades.size());
      		}
      	}
      
      M 1 Reply Last reply Reply Quote 0
      • M
        Moderator_2 @thunder123 last edited by

        Hi @thunder123

        Please let us know which SDK version is consumed at your end.
        Kindly make sure if the issue occurs on recent SDK version 2.2.3 and let us know if the issue still persists

        Regards,
        SmartAPI team

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