multiple instruments

unni
unni edited January 2018 in PHP client
how to pass multiple instruments to getQuote in php ? when i pass an array like "NSE:INFY", "NSE:ITC" it says Uncaught InputException (200) 'At least one instrument_token is required
  • sujith
    Are you using kiteconnect.php from kite3?
  • unni
    unni edited January 2018
    Yes.. when i try like this getQuote(array("i"=>"NSE:INFY","i"=>"NSE:ITC")); its taking only first one because key is same.. at present i am using shell_exec curl.. thats working fine.. but above 250 giving large header error...
  • Vivek
    This was an issue with initial release. Its been updated since then. Please pull the latest code and try again - https://github.com/zerodhatech/phpkiteconnect/tree/kite3

    Also you should be passing instruments as an array like below

    getQuote(array("NSE:INFY", "NSE:ITC"));
  • unni
    Yes.. with new kiteconnect.php its working.. Thanks..
  • unni
    Up to 100 insts its working fine.. but more than that its giving
    Uncaught DataException (502) 'Couldn't parse JSON response' thrown in kiteconnect.php on line 905
  • sujith
    @unni,
    Can you check now, we have made some changes?
  • unni
    Yes.. Up to 500 its working fine...
This discussion has been closed.