☰
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
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
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.