☰
Login
Signup
Home
›
.Net API client
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Register
Categories
Recent Discussions
Activity
Categories
15K
All Categories
0
Incidents
178
Node JS client
52
Go client
848
.Net API client
397
Kite Publisher
554
.Net / VBA / Excel (3rd party)
491
Algorithms and Strategies
1.1K
Java client
1.2K
API clients
410
PHP client
4.3K
Python client
357
Mobile and Desktop apps
1.5K
Market data (WebSockets)
3.6K
General
In this Discussion
February 6
dhana916
February 5
Nivas
Unable to place Amo orders
dhana916
February 4
in
.Net API client
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.
Tagged:
C#
AMO
after market orders
Nivas
February 5
The correct parameter for placing an AMO order is `amo`, not `Amo`. You may refer to the
documentation
and pass the parameters accordingly.
dhana916
February 6
thank you so much
@Nivas
, its working now.
Sign In
or
Register
to comment.