Live API not taking trade on AWS Lambda whereas the same script runs locally

ankitladhania
Hi,
I'm getting the below error. This is not happening all the time, some of the symbols are blocked like NIFTY CE or BANK NIFTY CE. (Bank nifty stopped today, while it was working yesterday. I have checked the code more than 5 times to be sure there are typos, etc).

{
message: 'No response from server with error code: ECONNABORTED',
error_type: 'NetworkException',
data: null
}



The request that I'm sending for order has below params:
{
exchange: 'NFO',
tradingsymbol: 'BANKNIFTY2190936700CE',
quantity: 25,
product: 'MIS',
order_type: 'MARKET',
validity: 'DAY',
transaction_type: 'BUY'
}




NodeJS client version: 3.2.1
AWS Lambda Node version: v12
  • rakeshr
    I just tried on my local setup and it's working perfectly fine.
    async function testOrder() {
    const order = await this.kite_connect.placeOrder('regular', {
    exchange:'NFO',
    tradingsymbol:'BANKNIFTY2190936700CE',
    quantity:25,
    product:'MIS',
    order_type:'MARKET',
    validity:'DAY',
    transaction_type:'BUY',
    });
    console.log(order);
    }
    testOrder();
    message: 'No response from server with error code: ECONNABORTED'
    Looks like, your request connection is getting closed abruptly. Make sure, none of your async calls does that from your end.
  • ankitladhania
    @rakeshr - that is my exact point, that it is working in local but not on lambda. It works sometimes over lambda and sometimes not.

    Is there a way to know?
Sign In or Register to comment.