Buy order Error



  • When I try to buy using API , it gives below error . Quantity is correctly passed as 1500 .. but strangely, error says quantity should be integer . Though error message says the passed quantity was 1500 .. Any help please ? I use node.js .

    "code":400,"status":"Bad Reque
    st","timestamp":"2017-06-20T15:29:32+05:30","message":"Bad Request","error":{"re
    ason":"Invalid Order Entry - Wrong quantity, found : 1500, expected : Should be
    Number"



  • Hi,

    This issue is happening as you are passing quantity in - quotes ("1500").
    Can you please try removing quotes in quantity.

    Let me know if this works at your end.

    Thanks,



  • @RenukaMisal . But I checked I am passing without quotes . Also if you see the error message , Invalid Order Entry - Wrong quantity, found : 1500, expected : Should be
    Number"
    Means rhe system is finding it as 1500 without quotes , right ? then why is it rejecting ?



  • Resolved . After changing from string to Int . String was parsed from the URL query in REST API call I was making internally in the application .



  • Hi,

    We have also updated the parameter validations for quantity.

    Thanks,


Log in to reply
 

Looks like your connection to Upstox Forum was lost, please wait while we try to reconnect.