Experiencing two occurrences of HTTP 500 errors while attempting to place orders today is concerning, especially in a trading environment where reliability is paramount. These server-side issues are not acceptable from a trading vendor's API.
Posts made by shashwatVar
-
500 on placeOrder API
-
RE: ws: acknowledgement on order rejection
@Moderator_2 cool, can make do with the getOrderBook endpoint.
-
ws: acknowledgement on order rejection
what ?
- order via placeOrder method -> the returned response was this :
{ status: true, message: 'SUCCESS', errorcode: '', data: { script: 'MIDCPNIFTY05FEB2410375PE', orderid: '240205000140605', uniqueorderid: 'b837bc9d-8113-4bdc-b515-696e5bea278f' } }
-
on checking the angel platform saw that the order was rejected (placing an order through the placeOrder method, the returned response indicates success, but upon further verification on the Angel platform, the order appears to be rejected)
-
need a way to detect order rejection programatically -> I understand that the first API call might not be directly responsible for executing the order (might be placing transit orders in a queue), hence it might not be able to return the correct order execution status. This is a crucial requirement -> otherwise there is a duplication of effort in terms of executing orders via the api and checking them simultaneously on the Platform.
-
the callee should be responded with what happened to the order. If there is already an implementation for the same, will be happy to know.
-
RE: Specified Order to be Market but turned into Limit
@Moderator_2 client code: P396062
-
Specified Order to be Market but turned into Limit
// call buy for hedge const callOrderResponse = await clientSession.smartApi.placeOrder({ variety: "NORMAL", tradingsymbol: hedgeOptions.call!.symbol, symboltoken: hedgeOptions.call!.token, transactiontype: "BUY", exchange: this.optionsConfig.activeIndex.chain_exchange, ordertype: "MARKET", producttype: "CARRYFORWARD", duration: "DAY", quantity: clientSession.TOTAL_LOTS * this.optionsConfig.activeIndex.quantity_per_lot, }); this.logger.info(callOrderResponse); // put buy for hedge const putOrderResponse = await clientSession.smartApi.placeOrder({ variety: "NORMAL", tradingsymbol: hedgeOptions.put!.symbol, symboltoken: hedgeOptions.put!.token, transactiontype: "BUY", exchange: this.optionsConfig.activeIndex.chain_exchange, ordertype: "MARKET", producttype: "CARRYFORWARD", duration: "DAY", quantity:clientSession.TOTAL_LOTS * this.optionsConfig.activeIndex.quantity_per_lot, }); this.logger.info(putOrderResponse);
Ran the above code today for some options.
The ordertype can be seen as "MARKET", when the order got placed, got the response :{ status: true, message: 'SUCCESS', errorcode: '', data: { script: 'SENSEX2411273100CE', orderid: '240112000072279', uniqueorderid: 'eb008852-18eb-49af-9999-850a304c3a6f' } } { status: true, message: 'SUCCESS', errorcode: '', data: { script: 'SENSEX2411270600PE', orderid: '240112000072292', uniqueorderid: '5e25fb58-c6eb-4704-bce3-faf671ebd431' } }
but for one of these orders the orderType in the angel platform can be seen as LIMIT which was not expected :
-
Historical API - error AB2001
What ?
- getting error
AB2001
error code on calling getCandleData.
code snippet:
try { const candleResponse = await this.sessionConfig.smartApi.getCandleData({ exchange: "NFO", symboltoken: tokenNumber, interval: "THREE_MINUTE", fromdate: "2021-04-19 09:15", todate: "2021-04-19 15:30", }); } catch (error) { console.log(error); }
tokenNumber is from an option chain that has not expired yet.
- getting error
-
Basket order support
Hi team, wanted to know the support in the smart API SDK / API endpoints for the following action:
- creating a basket order
- adding stocks to a particular basket
- ordering a basket
cc @admin