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?
  • katemiller
    Thanks for this case. I also have the same solution!
  • katemiller
    katemiller edited September 20
    The fourth way in which a custom software development services provider can help you is that they can help you manage the project cost. The best software development company https://mlsdev.com/services/custom-software-development will keep an eye on your product development costs and provide you with a reasonable price for the custom software development services you need. They will also provide you with estimates for the whole project. With this, you will know how much you will be spending and how to control the project cost.
Sign In or Register to comment.