☰
Login
Signup
Home
›
PHP 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
403
PHP client
4K
Python client
346
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.3K
General
In this Discussion
May 2018
Sushil_NSE
April 2018
sujith
Error when trying to Modify Order from LIMIT to MARKET
Sushil_NSE
April 2018
in
PHP client
Below is snippet from my Original Code -
$company_code = $row["tradingsymbol"];
$order_id = $row["order_id"];
$quantity = $row["quantity"];
// create a new cURL resource
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "
https://api.kite.trade/orders/regular/$order_id
");
//curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'X-Kite-Version: 3',
"Authorization: token $API_KEY:$ACCESS_TOKEN"
));
$data="order_type=MARKET&quantity=$quantity&validity=DAY";
echo $data;
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
// grab URL and pass it to the browser
$response=curl_exec($ch);
// close cURL resource, and free up system resources
print_r($response);
When i run my Above Code i get error that data part is null in my request.
Kindly Help.
Regards,
Sushil
Tagged:
#modifying Orders
sujith
April 2018
Check out
documentation to know the keys for error scenarios
.
Sushil_NSE
May 2018
Ok thanks You. This is resolved.
This discussion has been closed.