API for just checking order status in stream otherthan websocket

shafitpm
Is there any api for checking current status of an order as stream otherthan websocket.
I found an API ("https://api.kite.trade/orders") which is giving all order statuses as list. I want only final status of order rather than all history.
  • rakeshr
    an API ("https://api.kite.trade/orders") which is giving all order statuses as list
    No, here status field for each order shows only the current status of the order. Follow the documentation here to know about each orderbook field. You can retrieve the complete order history for an order using this api.
  • shafitpm
    Can you suggest/develop one API which will give only final status of one trade i.e. getting last map 'data' of this response list.
    {
    "status": "success",
    "data": [
    {
    {
    "average_price": 0,
    "cancelled_quantity": 0,
    "disclosed_quantity": 0,
    "exchange": "NSE",
    "exchange_order_id": "1300000001887410",
    "exchange_timestamp": "2017-12-29 11:06:52",
    "filled_quantity": 0,
    "instrument_token": 779521,
    "order_id": "171229000724687",
    "order_timestamp": "2017-12-29 11:08:16",
    "order_type": "LIMIT",
    "parent_order_id": null,
    "pending_quantity": 1,
    "placed_by": "DA0017",
    "price": 300,
    "product": "CNC",
    "quantity": 1,
    "status": "MODIFY PENDING",
    "status_message": null,
    "tag": null,
    "tradingsymbol": "SBIN",
    "transaction_type": "BUY",
    "trigger_price": 0,
    "validity": "DAY",
    "variety": "regular"
    },
    {
    "average_price": 0,
    "cancelled_quantity": 0,
    "disclosed_quantity": 0,
    "exchange": "NSE",
    "exchange_order_id": "1300000001887410",
    "exchange_timestamp": "2017-12-29 11:08:16",
    "filled_quantity": 0,
    "instrument_token": 779521,
    "order_id": "171229000724687",
    "order_timestamp": "2017-12-29 11:08:16",
    "order_type": "LIMIT",
    "parent_order_id": null,
    "pending_quantity": 1,
    "placed_by": "DA0017",
    "price": 300,
    "product": "CNC",
    "quantity": 1,
    "status": "MODIFIED",
    "status_message": null,
    "tag": null,
    "tradingsymbol": "SBIN",
    "transaction_type": "BUY",
    "trigger_price": 0,
    "validity": "DAY",
    "variety": "regular"
    },

    {
    "average_price": 0,
    "cancelled_quantity": 0,
    "disclosed_quantity": 0,
    "exchange": "NSE",
    "exchange_order_id": "1300000001887410",
    "exchange_timestamp": "2017-12-29 11:08:16",
    "filled_quantity": 0,
    "instrument_token": 779521,
    "order_id": "171229000724687",
    "order_timestamp": "2017-12-29 11:08:16",
    "order_type": "LIMIT",
    "parent_order_id": null,
    "pending_quantity": 1,
    "placed_by": "DA0017",
    "price": 300.1,
    "product": "CNC",
    "quantity": 1,
    "status": "OPEN",
    "status_message": null,
    "tag": null,
    "tradingsymbol": "SBIN",
    "transaction_type": "BUY",
    "trigger_price": 0,
    "validity": "DAY",
    "variety": "regular"
    }

    ]
    }
  • rakeshr
    Order history is an ordered array. So, you can always parse last item of the array for status key.
Sign In or Register to comment.