Problem in orderCancel

chandankr@yahoo.com
I'm facing an issue in kc.orderCancel
There is one order in the market which algo needs to be cancel..its been sending cancel request for one hour but every time, it goes to catch block and throws this error

Thu Apr 20 2017 12:28:51 GMT+0530 (IST)/StatusCodeError: 404 - "{\"status\": \"error\", \"message\": \"Route not found\", \"error_type\": \"GeneralException\"}"
to
Thu Apr 20 2017 13:06:58 GMT+0530 (IST)/StatusCodeError: 404 - "{\"status\": \"error\", \"message\": \"Route not found\", \"error_type\": \"GeneralException\"}"

This is nodejs api

ORDER ID
170420000425516
EXCHANGE ORDER ID
1000000002734877

Can you pls check and revert.
  • chandankr@yahoo.com
    Other orders have been placed during this time so its not a network..this error comes only in orderCancel
  • sujith
    @chandankr@yahoo.com,
    Can you paste your cancel code here and details about that order?
  • sujith
    @chandankr@yahoo.com,
    Seems like you are trying to access route that doesn't exist.
  • chandankr@yahoo.com
    No. Orders are getting placed easily on same route.
    Send me detailed order logs for this order asap pls.
    ORDER ID
    170420000425516
    EXCHANGE ORDER ID
    1000000002734877
  • chandankr@yahoo.com
    kc.orderCancel(order_id).then(function(response) {
    //If order is canceled place new order
    placeOrder(algo.symbol,buysell,size,Const.ALGO_NAME,record);
    }
    }).catch(function(err) {
    console.log(new Date() + "/" + err);
    // Something went wrong.
    });
  • chandankr@yahoo.com
    [email protected] edited April 2017
    This order is still working
    { exchange_order_id: '1000000002734877',
    disclosed_quantity: 0,
    market_protection: 0,
    tradingsymbol: 'COALINDIA',
    tag: '****',
    order_type: 'LIMIT',
    trigger_price: 0,
    cancelled_quantity: 0,
    instrument_token: 5215745,
    status_message: null,
    status: 'OPEN',
    product: 'MIS',
    exchange: 'NSE',
    order_id: '170420000425516',
    price: 280.55,
    pending_quantity: 371,
    validity: 'DAY',
    placed_by: 'RD4442',
    order_timestamp: '2017-04-20 12:28:11',
    parent_order_id: null,
    exchange_timestamp: '2017-04-20 12:28:11',
    average_price: 0,
    variety: 'regular',
    transaction_type: 'SELL',
    filled_quantity: 0,
    quantity: 371 }
  • sujith
    @chandankr@yahoo.com,
    Your code looks fine. I think you must be using old version of kiteconnectjs client, update to latest verison.
  • chandankr@yahoo.com
    @sujith Is there any way to get more information from error object in catch block. Right now it just prints this
    StatusCodeError: 404 - "{\"status\": \"error\", \"message\": \"Route not found\", \"error_type\": \"GeneralException\"}"

    Which is not helpful at all.
  • sujith
    @chandankr@yahoo.com,
    In older version it was trying access invalid url, hence it says Route not found.
This discussion has been closed.