Unable to place Amo orders

dhana916
Hi,

Hope you are doing well.

I am trying to add Amo orders using .Net API client, all normal orders are working fine during market working hours. But when I try to place Amo order using the code snippet below, I have ended up with an exception.

kite.PlaceOrder(
Exchange: "NSE",
TradingSymbol: "ASHOKLEY",
TransactionType: "BUY",
Quantity: 20,
Price: 194.49,
OrderType: "LIMIT",
Product: "CNC",
Validity: "DAY",
Variety: "Amo");

Exception details below
System.NullReferenceException
HResult=0x80004003
Message=Object reference not set to an instance of an object.
Source=KiteConnect
StackTrace:
at KiteConnect.Kite.Request(String Route, String Method, Object Params, Dictionary`2 QueryParams, Boolean json)
at KiteConnect.Kite.Post(String Route, Object Params, Dictionary`2 QueryParams, Boolean json)
at KiteConnect.Kite.PlaceOrder(String Exchange, String TradingSymbol, String TransactionType, Int32 Quantity, Nullable`1 Price, String Product, String OrderType, String Validity, Nullable`1 DisclosedQuantity, Nullable`1 TriggerPrice, Nullable`1 SquareOffValue, Nullable`1 StoplossValue, Nullable`1 TrailingStoploss, String Variety, String Tag, Nullable`1 ValidityTTL, Nullable`1 IcebergLegs, Nullable`1 IcebergQuantity, String AuctionNumber)
at MIS.WebApi.OMS.KiteBrokerClient.PlaceOrderAsync(StockOrderItemModel order) in C:\Users\rames\source\repos\MIS1.0\MISV\MIS.WebApi\OMS\KiteBrokerClient.cs:line 261

Could someone point me to what's wrong with the code snippet? I really appreciate any help you can provide.
Sign In or Register to comment.