How to get quote for an instrument

I am trying to get quote for an instrument, INFY for example. How can I get it through

AA) Kite Object

$infy = $Kite->instruments("'exchange'=>'NSE','tradingsymbol'=>'INFY'");
echo $infy->last_price;

OR BB) file_get_contents

$response = file_get_contents("";


Kindly advise.
  • sujith
    Hi @pannet1,
    All API calls are authenticated using access token, you can check out documentation here.
  • pannet1
    hi sujith,

    i already got the access token. can you correct the code above (any or both the codes).

    i already got the list of Orders and Positions from the API through another part of my code. This is just FYI.
  • Vivek
    Vivek edited August 2017
    You can use quote method to fetch quotes. You can do something like
    $infy = $Kite->quote("'exchange'=>'NSE','tradingsymbol'=>'INFY'");
    Refer this -
  • pannet1


    I had a missing argument 2 error. However, your reply pointed me into the right direction. Here is the working code

    $infy = $Kite->quote("NSE","INFY");

    Thanks once again.
This discussion has been closed.