☰
Login
Signup
Home
›
Python 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
152
Node JS client
39
Go client
793
.Net API client
378
Kite Publisher
537
.Net / VBA / Excel (3rd party)
457
Algorithms and Strategies
992
Java client
1.1K
API clients
402
PHP client
4K
Python client
346
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.3K
General
In this Discussion
October 2020
ashuthinks
October 2020
sujith
with regular order i tried stoploss and squaroff but only stoploss is placed
ashuthinks
October 2020
in
Python client
i'm using python code first i execute buy and then in second order i want to place stoploss and target.
last_price = kite.ltp("NSE:TATASTEEL")["NSE:TATASTEEL"]['last_price']
stoploss_price = last_price - 10
trg_price = last_price + 10
order_id = kite.place_order(tradingsymbol="TATASTEEL",
exchange=kite.EXCHANGE_NSE,
transaction_type=kite.TRANSACTION_TYPE_BUY,
quantity=1,
order_type=kite.ORDER_TYPE_MARKET,
product=kite.PRODUCT_MIS,
variety = kite.VARIETY_REGULAR)
kite.place_order(tradingsymbol="TATASTEEL",
exchange=kite.EXCHANGE_NSE,
transaction_type=kite.TRANSACTION_TYPE_SELL,
quantity=1,
price=stoploss_price,
trigger_price= stoploss_price,
squareoff=trg_price,
order_type=kite.ORDER_TYPE_SLM,
product=kite.PRODUCT_MIS,
variety = kite.VARIETY_REGULAR)
unable to see squareoff price is placed please help thanks
Tagged:
Python Client
python
sujith
October 2020
The square-off field is only for bracket order. You can know more about the stop-loss order
here
.
ashuthinks
October 2020
edited October 2020
Ohh I see I do not want to use bracket order I think if market is voltile it will not enabled.
Is there any way to set square off i.e. target similar to above code ? Thanks
sujith
October 2020
You need to place two orders independently one is limit and another is stoploss.
ashuthinks
October 2020
thank you
This discussion has been closed.
Is there any way to set square off i.e. target similar to above code ? Thanks