☰
Login
Signup
Home
›
Kite Publisher
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.9K
All Categories
0
Incidents
156
Node JS client
40
Go client
793
.Net API client
380
Kite Publisher
537
.Net / VBA / Excel (3rd party)
457
Algorithms and Strategies
996
Java client
1.1K
API clients
404
PHP client
4K
Python client
346
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.3K
General
In this Discussion
December 2016
pankajrb
December 2016
sujith
"STRING VALUE IN JSON REQUEST" error while placing order
pankajrb
December 2016
in
Kite Publisher
We are getting following error when order is placede using "Publisher' API.
Parameters sent.
"STRING VALUE IN JSON REQUEST"
{"tradingsymbol":"HCC","exchange":"NSE","transaction_type":"BUY","order_type":"MARKET","product":"MIS","quantity":1}
Screenhot:
https://drive.google.com/open?id=0B_ggaHcgXUbRZUJCQzM5d1FtTjA
sujith
December 2016
Hi
@pankajrb
,
Try sending quantity in string.
pankajrb
December 2016
Tried sending quantity as string. But still getting the same error.
sujith
December 2016
Hi
@pankajrb
,
Can you paste your complete request here?
pankajrb
December 2016
url:
https://kite.trade/connect/basket?sess_id=m7r72a0qdfqdzlzdzmdwcvqyw99pfvih&api_key=XXXXXX
body: [{"tradingsymbol":"HCC","exchange":"NSE","transaction_type":"BUY","order_type":"MARKET","product":"MIS","quantity":1}]
This request used to work for last 3 months. I tried for quantity as string as well, but getting the same error.
sujith
December 2016
Did you try this?
[{"tradingsymbol":"HCC","exchange":"NSE","transaction_type":"BUY","order_type":"MARKET","product":"MIS","quantity":"1"}]
If it is still not working. Can you ping me link to your website from where you are trying?
pankajrb
December 2016
Yes, tried using [{"tradingsymbol":"HCC","exchange":"NSE","transaction_type":"BUY","order_type":"MARKET","product":"MIS","quantity":"1"}]
We are sending the request from app using webview
sujith
December 2016
Can you paste response also?
pankajrb
December 2016
Here is the page source we are using. We get the same error as app on pressing "PLACE".
var my_basket = [];
var order = {};
order.tradingsymbol = "INFY";
order.exchange = "NSE";
order.transaction_type = "BUY";
order.product = "MIS";
order.order_type = "MARKET";
order.quantity = "10";
my_basket.push(order);
order = {};
order.tradingsymbol = "HCC";
order.exchange = "NSE";
order.transaction_type = "BUY";
order.product = "MIS";
order.order_type = "MARKET";
order.quantity = "10";
my_basket.push(order);
document.getElementById("basket").value = JSON.stringify(my_basket);
document.getElementById("basket-form").submit();
pankajrb
December 2016
Here is the link to screenshot:
https://drive.google.com/open?id=0B_ggaHcgXUbRVGtqSmotaWdFa0U
sujith
December 2016
Give me sometime, I will check with concerned team and get back to you.
pankajrb
December 2016
edited December 2016
ok. Waiting for your reply.
sujith
December 2016
Can you hard refresh and check now?
pankajrb
December 2016
Its working now. Thanks.
Can you please explain what was the error and is it possible we get this error again?
sujith
December 2016
Hi
@pankajrb
,
We had done some changes in kite front which had caused this and it is fixed now.
This discussion has been closed.
Try sending quantity in string.
Can you paste your complete request here?
body: [{"tradingsymbol":"HCC","exchange":"NSE","transaction_type":"BUY","order_type":"MARKET","product":"MIS","quantity":1}]
This request used to work for last 3 months. I tried for quantity as string as well, but getting the same error.
[{"tradingsymbol":"HCC","exchange":"NSE","transaction_type":"BUY","order_type":"MARKET","product":"MIS","quantity":"1"}]
If it is still not working. Can you ping me link to your website from where you are trying?
We are sending the request from app using webview
var my_basket = [];
var order = {};
order.tradingsymbol = "INFY";
order.exchange = "NSE";
order.transaction_type = "BUY";
order.product = "MIS";
order.order_type = "MARKET";
order.quantity = "10";
my_basket.push(order);
order = {};
order.tradingsymbol = "HCC";
order.exchange = "NSE";
order.transaction_type = "BUY";
order.product = "MIS";
order.order_type = "MARKET";
order.quantity = "10";
my_basket.push(order);
document.getElementById("basket").value = JSON.stringify(my_basket);
document.getElementById("basket-form").submit();
https://drive.google.com/open?id=0B_ggaHcgXUbRVGtqSmotaWdFa0U
Can you please explain what was the error and is it possible we get this error again?
We had done some changes in kite front which had caused this and it is fixed now.