☰
Login
Signup
Home
›
Java 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
13.8K
All Categories
0
Incidents
153
Node JS client
40
Go client
793
.Net API client
378
Kite Publisher
537
.Net / VBA / Excel (3rd party)
457
Algorithms and Strategies
993
Java client
1.1K
API clients
404
PHP client
4K
Python client
346
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.3K
General
In this Discussion
September 2019
HowUTrade
Trading Options
mohanarakere
September 2019
edited September 2019
in
Java client
Hi,
How to trade options using kite connect API
For example. I want to buy
Nifty Option
Expiry date : 26SEP2019
Strike price : 11100
Option type : CE
Tried below code, but it is throwing InvalidInputException
OrderParams orderParams = new OrderParams();
orderParams.quantity = 1;
orderParams.orderType = Constants.ORDER_TYPE_MARKET;
orderParams.tradingsymbol = "NIFTY26SEP11100CE";
orderParams.product = Constants.PRODUCT_NRML;
orderParams.exchange = Constants.EXCHANGE_NFO;
orderParams.transactionType = transactionType;
orderParams.validity = Constants.VALIDITY_IOC;
Order order = getConnection().placeOrder(orderParams, Constants.VARIETY_REGULAR);
Thanks in advance
HowUTrade
September 2019
@mohanarakere
The last contract of a month is MONTHLY option and the symbol format is different from WEEKLY options. The syntax is [SYMBOL] [YY] [MMM] [STRIKE] [OPT TYPE]
It should be NIFTY19SEP11100CE
You may refer the below link to know more about trade symbol formats
https://codeadvisor.in/knowledge-base/trading-symbol-format-equity-futures-options/
Sign In
or
Register
to comment.
The last contract of a month is MONTHLY option and the symbol format is different from WEEKLY options. The syntax is [SYMBOL] [YY] [MMM] [STRIKE] [OPT TYPE]
It should be NIFTY19SEP11100CE
You may refer the below link to know more about trade symbol formats
https://codeadvisor.in/knowledge-base/trading-symbol-format-equity-futures-options/