Get instrument list API failing

ashishjindal89
I am using 3.1.0 java client. It is breaking on calling "getInstruments()" . It was working fine until now. On further inspecting, java client is expecting content-type='csv' but API is not returning the required content type.
Please check.
  • sujith
    Can you try now? It should be fixed by now.
  • sujith
    Make sure to do a hard refresh.
  • ashishjindal89
    working now. Thanks.
  • sagaranilganu
    @sujith
    1] When using Python api [ kite.instruments(exchange=None) ] , does the command return "instruments' list file" in ".csv" format or an unknown file format with csv compatible data in it ?
    2] Does the api returns data or a gzipped file gets downloaded on pc??
    [ This stands crucial for full fledged automation !!]

    Note :: A sample would be highly beneficial to further write the code!!!!

    Pls. clarify.
  • sujith
    The content type is text/csv and the data file is also .csv
    If you send header Accept-Encoding gzip then the server will send you a gzipped file. If you are using a standard browser then the browser will uncompress and give you back the file in the original format. If you are doing curl or HTTP then it depends on your library, it will return the compressed file or uncompressed file.

    Here is the reference.
  • sagaranilganu
    sagaranilganu edited March 2020
    @sujith
    Thanks but what happens in case of Python api with command as below;
    Assume inst_lst is a list in python then;
    inst_lst = kite.instruments(exchange=None)

    1] A file named inst_lst.csv gets downloaded or else what??

    Pls suggest.
  • sujith
    Yes, it is a list of dict.
  • sagaranilganu
    Great help. Thanks a lot !!
  • sagaranilganu
    Hi bsarvate,
    Saw your post on 18Feb2020 about instruments list error when below api in python is used viz.
    instruments_list = kite.instruments(exchange=kite.EXCHANGE_NSE)

    As suggested by @Sujith its a list of dict.
    Am developing a "Python code" for self and in need of the same.
    Can you share a sample of it?
Sign In or Register to comment.