☰
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
14.1K
All Categories
0
Incidents
157
Node JS client
41
Go client
795
.Net API client
385
Kite Publisher
537
.Net / VBA / Excel (3rd party)
463
Algorithms and Strategies
1K
Java client
1.1K
API clients
407
PHP client
4.1K
Python client
349
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.4K
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/