I agree .. There must be some option available to auto renew the token everyday. If you are providing us the API than atleast tht option can be given just for the API users ..
Yeah me also got the same issue in the morning on Friday. Some order were getting executed and some were getting rejected with the below error ..
So had to stop my script and than closed all the trades. Started the script after 10 mins and things…
ok let me phrase again.
Suppose I placed an CO .. The first leg got executed .. So now for the second leg to exit half quantity in at a different trigger price .. and another half at different trigger price.
Cos I try to do it from API it won't all…
I am talking abt booking partially using the API ..
In CO can we book half the quantity when a certain target is achieved ?
The other half will remain open and will be executed when the next target is reached..
Is it possible in CO?
VWAP is calculated from scratch at the start of everyday .. So if u r taking 20 candles from the mid of the day than it won't show u the same figure as in Zerodha charts ..
Ur calculation need to start from first candle of the day ..
There may be 2 reasons ..
Either u have already placed the limit buy order for tht option and it was pending in order history ..
Second .. zerodha was not allowing to square off the options at market yesterday and today .. They were asking me to s…
But there is no common id or field available which is same on futures and cash stock ..
For example. Reliance has different instrument name and ID .. while reliance sep futures has different instrument name or id ..
There is no common field on the i…
So once the token is stored in database.. than u have to declare the new KiteConnect instance and call setAccessToken with the token key ..
For example lets say now the token is stored in ur database.. so to start using the api u have to declare a …
I have set my login process like this ..
$apikey=$adminline['apikey'];
$rtok=$_GET['request_token'];
$kite = new KiteConnect($apikey);
$url = $kite->getLoginURL();
if($rtok=="")
{
header("Location: $url");
exit;
}
else
{
$user = $kite-&g…
Make sure ur SL and Target r in increments and not in total amount.
For example if ur entry is 1283 than SL should be 2 and target 4 .. Which will give u 1285 as SL and 1279 as target ..
Thanks .. It worked .. Although we can't get userid either using $kite->getProfile(); or $kite->getMargins();
I guess I need to store it from $user variable when session is created using $kite->generateSession
Thanks .. I was doing it using catch try only .. But was getting fatal error ..
But than I tried catching the exception instead of error.. and it solved the issue..
@sachinstlko09 .. If u r using the example php code given by kites than make sure u remove ["order_id"] from the end ..
They have given the code as
// Place order.
$order_id = $kite->placeOrder("regular", [
"tradingsymbol" => "INFY",
"e…