We have upgraded to the Kite Connect v3.
The connection is part of our "External Connection" and the code is open-source. Free free to browse the code in our github page.
https://github.com/arthachitra/KiteConnectAPI
For more details please refer…
Another update, the API is returning the status as OPEN when filled_quantity == 0. However in case of partial fill the status is retuned as UPDATE always. Is this by design or a bug. Nest Trader shows the status as OPEN in both the scenario (please …
This is exactly why we can't stop sending UPDATE status postbacks.
Just send it once (when the order state is open) or keep the chronology correct, if possible.
The issue wherein order of postbacks is wrong is something happening because of OMS. We …
@sujith thanks for the clarification.
The order of postbacks is first you will receive postback with UPDATE status and then OPEN after modification is successful.
We are receiving the OPEN postback first and then the UPDATE. this conflicting race c…
@sujith Is it possible to add a request to fetch multiple market quotes at one shot.
So basically the request will look like
https://api.kite.trade/instruments/NSE/INFY+BIOCON+SBIN+PNB+TCS?api_key=xxx&access_token=yyy"
The return value will be…
I append the version header with the http requests
request.Headers.Add("X-Kite-version", "1.3");
The above used to work fine, now its not. Removing the same however fixed the issue. Hope migration will be smooth.
@sujith
Since it will take some …
Yes, on shared plan and above. Not on the free plan.
Yes, for complete details check out the section "App service limits" from here
https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits
Didnt try java uploading so cant say exact…
try azure. they have both windows and linux servers and the free version supports 5 websocket connections. We use it to relay back the postbacks to our desktop app.
please refer here to know how our connection works
http://arthachitra.com/support/a…
@botany02 thanks.
If the OMS goes kaput and while fetching the orders from the exchange on reconnection, it has no way to know the actual orderState since the exchange does not supports sl orders. that makes sense. and unfortunately this is the sam…
@sujith what about the postbacks? Is it same as it is now or its via the websockets etc. Postbacks in current structure is an Achilles heel of the api and I sincerely hope it gets an upgrade.
tia.
@vivek thx vivek.
Yes, I have already tested it by manually switching off the router etc. and there is a lag.
Since there is a heartbeat in every second, it makes sense to check that. Will modify the code accordingly.
@vivek thx vivek.
Yes, I have already tested it by manually switching off the router etc. and there is a lag.
Since there is a heartbeat in every second, it makes sense to check that. Will modify the code accordingly.
@vivek what is the preferred reconnection method
1. check interval between 2 hear beats (like u said) or
2. when socket OnClosed/OnError method is called.
I have implemented the later. what u folks recommend.
Seems the following properties were added
"day_buy_price"
"day_sell_value"
"day_buy_quantity"
"buy_m2m"
"day_sell_price"
"sell_m2m"
"day_buy_value"
"day_sell_quantity"
"token"
"type"
While these properties were depreciated
"unrealised"
"value"
"rea…
@sujith thx for the clarification.
That's bad news as this behavior sends things haywire given there are no other parameters (like time etc) with which we can compare.
Do not want to hardcode the timings as things will break during special trading…
@sujith I am using my own custom built C# client.
Note, I am witnessing this behavior in pre-open only. Things are working flawlessly in normal market.
@gully yes, I am getting ticks from 9:00AM - 9:07AM for nse cash. Didnt check bse cash though.
@sujith ok, another scenario.
In the orders call the quantity for mcx contracts are defined by no. of contracts while in the postbacks it is defined as 'no. of contract(s) * lot_size'. This creates an anomaly.
For example crude oil quantity is 1…
I am not getting any postbacks (its sunday 10 PM). Usually any submitted orders are rejected and we get a postback of the same.
Given yesterday was a mock session day, are you guys doing some weekend maintenance?
@sujith thx.
The post backs seems to be a major Achilles heel in the kite api.
Without the post backs the client app is pretty much blind. Plese add my request for a comprehensive post backs for future enhancements.
@sujith thx, that will work.
In this regard let me point out, in the past Z set the funds/margins to 0 (zero). thus the RMS rejected whatever order we sent. Do I need to do anything (or you folks at your end) to avoid such scenarios.
NSE is conducting a mock trading session on the 4th
https://www.nseindia.com/content/circulars/FAOP34277.pdf
Is it possible to shoot some order to test our app
@keshav ya, the standard API call should work. For stocks please make sure using the right "product" type (MIS or CNC) while placing the order. If you are submitting the order with CNC product type and there are no stocks (for that symbol) in your d…
@sujith thanks. do you have any api calls for the commodity multiplier map?
if not, then please add the same to your todo list.
COMMODITY_MULTIPLIER_MAP = {
"ALUMINI": 1000,
"ALUMINIUM": 5000,
"BRCRUDEOIL": 100,
"CARDAMOM": 100,
"COPPER": 1000,
"CO…
I suppose we are still not in sync
I am referring to the funds and margins as documented here
https://kite.trade/docs/connect/v1/#funds-and-margins
The response is certainly reasonable. An array of 2 segments will hardly make any difference.
{
"…
Can you tell me a scenario where you need to keep on fetching data.
@sujith when an order gets filled/partfilled we need to calculate the updated account value, update the position etc.
of-course it can be calculated internally, however data from …
@sujith if the api supprots margin/accounts information we pull the data from the api as and when required. If the api does not supports margin/accounts information (or otherwise) we calculate it internally. Since the Kite API supports the accounts …
1. Is there any call to fetch the margins (for all the segments) at one go (like return an array of margins). If not can you please add it to your todo list.
Checkout this thread for margins API details.
@sujith
1. let me rephrase.
Currently I hav…
I submitted an order at market open which unfortunately returned.
13Feb17 09:15:02 : KiteConnectViewModel.ParseResponse : OrderId = {"status": "error", "message": "Couldn't connect to nest gateway", "error_type": "NetworkException"}
13Feb17 09:15:0…
would second that.
Also do you have some a'la "insider program" which we can participate. This will not only help us but also gives you a perspective of our exact needs.
Call me lazy, I am loathe to develop an application structured on a soon tobe…
The docs says
For currencies, the int32 price values should be divided by 10000 to obtain four decimal plaes.
For USDINR etc futures contracts, I have to further divide the quotes by 1000 to arrive at the correct values. Is it the missing multiplie…
Heres a walkthrough for a basic login
Create 2 aspx page, say Kite.aspx and Redirect.aspx where Kite.aspx is where you will do the login and the Redirect.aspx is where you will be redirected to.
Login to your Kite developer account > Click on t…