quantities zero in getholdings with free API

manojmo
hi,

When i use the getholdings API, all quantity fields are 0. Also, the mtf section is missing.
Is this as expected, with the free api ?

regards,
manoj
  • Nivas
    I just tried retrieving the holdings, and there seems to be no issue. You may refer to the documentation here and retry.
  • sujith
    @manojmo,
    We will include the MTF holding data in the next version of javakiteconnect.
  • manojmo
    @Nivas,
    I am using the free version of the api and jar is the latest version 3.5.0 from maven.
    I see all quantities as zero.
    Also, does getOrderHistory work, coz i am getting a "can't find that order_id" error.
    Is the order id same as the one we see in the trade book ?

    I guess this free api is raising a lot of queries about what will be allowed and what not.

    @sujith,
    thanks. Is it already available in non-java version ?
  • Nivas
    I guess this free api is raising a lot of queries about what will be allowed and what not.
    You may refer to this thread for more details.
    Also, does getOrderHistory work, coz i am getting a "can't find that order_id" error.
    Is the order id same as the one we see in the trade book ?
    If the API response gives Couldn't find that `order_id` error message, then the order_id passed would be incorrect. You may refer to the documentation to know the correct field in the response.
    I am using the free version of the api and jar is the latest version 3.5.0 from maven.
    I see all quantities as zero.
    Could you please enable debug mode and check the raw response? That way, we can confirm whether the "quantity" values are coming through correctly.
  • manojmo
    @Nivas,
    Ref the holding quantities, I checked the response with debug on. Except for "opening_quantity":690, all other quantities are zero. And opening is not available in the Holding model. The mtf section is being populated, it seems.

    Ref the orders, i tried to see what the order id was with getOrders() and getTrades(), but both return an empty response []. I think that's because they only fetch that day's orders.

    So if i have an order executed a few days ago, there is no way to find its order id thru the api ?
    I tried to use the id i saw under the trade book in the web app( 1000000042665951), but that gives that "can't find order_id error".
  • Nivas
    Ref the orders, i tried to see what the order id was with getOrders() and getTrades(), but both return an empty response []. I think that's because they only fetch that day's orders.

    So if i have an order executed a few days ago, there is no way to find its order id thru the api ?
    I tried to use the id i saw under the trade book in the web app( 1000000042665951), but that gives that "can't find order_id error".
    API calls(getOrders & getTrades) return a list of all orders/trades generated for the day. Historical orders/trades can't be retrieved via API as of now.
    Ref the holding quantities, I checked the response with debug on. Except for "opening_quantity":690, all other quantities are zero. And opening is not available in the Holding model. The mtf section is being populated, it seems.
    Please share the complete stacktrace via private message.
  • manojmo
    manojmo edited June 30
    @Nivas,
    I think the quantities may be zero in the holdings because they are all MTF, and the MTF section is not being put into the Holding POJO yet. Is this as expected for MTF ? I have bought one cash position today, will report on how it reflects in the response tomorrow.

    I have PMed the response JSON to you.

    About the order id, is there no way in the web app either, to see an earlier order id ? What is the id ( 1000000042665951) that i see in the order book, for that order ? That's an MTF order too, btw.
  • sujith
    @manojmo,
    The javakiteconnect doesn't parse MTF data. We will include it soon. The quantity field in the holding is for the settled CNC holding quantity, it will not have MTF quantity.
  • Nivas
    I think the quantities may be zero in the holdings because they are all MTF, and the MTF section is not being put into the Holding POJO yet. Is this as expected for MTF ? I have bought one cash position today, will report on how it reflects in the response tomorrow.
    If you only have non-MTF holdings, the quantity field will display as "zero."
    About the order id, is there no way in the web app either, to see an earlier order id ? What is the id ( 1000000042665951) that i see in the order book, for that order ? That's an MTF order too, btw.
    Regarding order IDs, it's not possible to retrieve order IDs for historical orders. The order ID you mentioned appears to be an exchange order ID. At our end, we generate the order ID, whereas the exchange generates the exchange order ID. You can find more information about all the fields in the response structure within the documentation.

Sign In or Register to comment.