Hi @Avatar,
This happens when there is a network issue and the ticker is unable to read the rest of the tick data from the stream. I would suggest you try with a different ISP for a stable internet connection.
Hi @varaprasady,
Try this code to get the actual response data and post it here:
try
{
user = kite.RequestAccessToken(requestToken, MySecret);
}catch(ParseException e)
{
Console.WriteLine(JsonSerialize(e.ResponseData));
}
Hi @Avatar,
This data is currently not available via Ticker. You can use postback mechanism in a public server to implement this. Here is a python implementation of postback.
Hi @piyushk921,
I believe you are using Python client. The order_place function is inside the kite class. You are calling this inside ticker object. That is the reason for this error.
Hi @RJ0958,
You can download the dump of Pulse that contains ~5 lakhs articles from here (This link is available in the footer of Pulse). You can use that for historical analysis.
If you want the latest news in last 15 minutes you can use this JSO…
Hi @vm87,
Our ticker implementation is not based on HTTP requests where you send a request and the server return tick values at that moment. Our implementation is a long-standing TCP connection which will continuously stream the ticks as the values…
Hi @Sashank_Chittipeddi,
Historical API gives only one stock data in a single call. You might be unable use it in a loop due to the rate limiting. To solve this you can put a delay of 300 milliseconds in the loop.
Hi @DA1077,
Unfortunately, WebSocket feature that comes with .Net framework is not supported on Windows 7 and earlier. And there is no update or patch for this in Windows 7 since Microsoft stopped the support for it.
If you have to use Win 7 you …
Hi @arsh_makker,
As I mentioned in my previous comment the URL route is 'https://api.kite.trade/portfolio/positions'. There is no '/' at the end. Please try removing it.
Hi @DA1077,
Here is an example:
Imports KiteConnect
Public Class frmMain
WithEvents ticker As Ticker
Private Sub btnBuild_Click(sender As Object, e As EventArgs) Handles btnBuild.Click
ticker = New Ticker("apikey", "userid", "pub…
Hi @arsh_makker,
The final URL should look like 'https://api.kite.trade/portfolio/positions?api_key=&access_token='. Are you sure that this is the case?
As of now, our APIs are backward compatible in terms of URL routes and tokens. Could you p…
Hi @vm87,
I assume you are using .Net client library. For implementing your use case, you can do the login process once and create two ticker objects with the same public token and subscribe to appropriate instrument tokens. You don't have to creat…
Hi @DA1077,
Our .Net client Ticker implementation is completely non-blocking. It is asynchronous. This means every function call to Ticker will execute immediately and will not wait for the network to respond. If there are any issues they will be r…
Hi @DA1077,
You can try http://converter.telerik.com/ to get a basic working VB code out of the C# code. This is not guaranteed to work but works most of the time.
Hi @DA1077,
Private Sub btnStartPredefinedProcess_Click(sender As Object, e As EventArgs) Handles btnStartPredefinedProcess.Click
Dim zerodhainternal As New ZerodhaInternal
zerodhainternal.tickersubscribeandconnect()
End Sub
In above…
Hi @RS4988,
We tried to stream ticks for all instruments and it seems to work fine.
The "Index was outside the bounds of the array" is due to disconnection of ticker stream and ticker unable to read all the ticks from the received data. The disco…
Hi @abhash2610,
You will need a proper SSL certificate for postbacks. Try using Letsencrypt to generate an SSL certificate. You can also use CloudFlare.
Hi @prabhucse17,
Please collect the error information from the API response and post it here. For that instead of file_get_contents, you will have to use CURL library.
Hi @sachinstlko09,
You can use the code provided by @botany02 to setup post back page and add your own logic into it.
And @sachinstlko09, please refrain from creating new threads for same queries. It makes difficult for us to track.
Hi @shubham,
It looks like you are getting rate limited. If you make more than 3 requests per second you will HTTP 429 status response. Can you check the status code of the responses?
Hi @prabhucse17,
Since you are fetching the API inside a while loop this crosses our API rate limit of 3 requests per second. Because of that requests are blocked with HTTP 429 status response. I would suggest you add 300ms delay between requests o…
Hi @Avatar,
It is better to keep a local map of tags and order ids. A tag is set to an order by yourself and when you place the corresponding order you will get the order id. You can store this combination in a dictionary variable or in a CSV file.
Hi @sachinstlko09,
You can place orders without setting postback page. Postbacks are for getting status updates regarding a placed order which is not a mandatory setup.
Hi @RS4988 @harinathm,
We have uploaded new release with the bug fix to NuGet repository and Github repository. Try using new DLL from git repo or update package to 1.1.0 using your NuGet package manager.
Hi @amit_aggrawal321,
This exception occurs when the internet connection is closed before download of instruments completes. I suggest you to double check your internet connection.
Also as per the documentation - "The instrument list API returns l…
Hi @Encrypted,
Even if you are using queue this may happen. Because sometimes requests might complete in short amount of time. And next request will be fired immediately. If more than 3 requests are called in a second like this you will get 429.
Y…
Hi @Gyan.Sikdar,
These errors are due to missing references. You can add these references by looking at the original project. But it is better to add the complete project into your solution rather than adding the individual files.
Hi @Gyan.Sikdar,
If you want to set proxy you can do that in Internet Options in Control Panel. Our library uses the system proxy connection for ticker connections.
You may store tick data to file like this:
private static void onTick(Tick TickDat…
Hi @harinathm,
We were monitoring ticker data from morning itself. We couldn't find any wrong values. Do you have any screenshots or sample values so that we can compare it with our data?
Hi @harinathm,
Can you provide more details like:
.Net Framework version
Visual Studio Version
Your system architecture - 32bit/64bit
When this happened
Is this a consistent issue or random
Hi @dev_trader,
Your assumption is correct. There is a 2 bytes padding after orders field. You can either ignore this or use a packet splitting mechanism instead of a stream read. For each tick, we are sending the length of the packet and you can u…
Hi @Avatar,
1. You will have to do this once every day. The access token you get is valid for one day. But request token is valid for only couple of minutes and can be used only once. So once you get access token stored it and use it and do not req…
@sachinstlko09,
Yes you have to manually log in to get the request token. To get login URL for your app you can call the function login_url() . Check out an example here.
Hi @mastertrader21,
If you are using official .Net API client then you can use PlaceOrder function.
If you want to call API directly, make a POST request to https://api.kite.trade/orders/regular with all parameters in form format, not in JSON.
Hi @mendse_a,
Did you try to print request token? Probably this happens due to wrong data.
You can also try to catch the exception and log response data in the console like this:
try{
User user = kite.RequestAccessToken(RequestToken, MySecre…
Hi @ayush,
Exchange token is assigned by exchanges. Across segments, multiple instruments may have same exchange tokens. Whereas instrument token is assigned by Zerodha. And it will be unique across the exchanges and segments. When you are using Ki…
Hi @manyamrajesh,
You can use the same data from our Historical API to construct Heikin Ashi candles. You just need to apply some simple calculations on it. You can check out how this is done and examples here.
Hi @tank,
Our .Net client library does not control the program flow. Which means if you are not keeping the console live it will exit the application. You can either add Console.ReadKey(); at the end of your code or you can build a GUI program.
Re…
Hi @lethalstriker,
I think you are calling Close function of ticker multiple times or calling it without initializing the connection. Please check if this is the scenario.
And it seems you running the sample program as it is. It is given as an exa…
Hi @lethalstriker,
Thank you for reporting. Can you recall the events just before this happened? Was the ticker connected? Was it ticking? Did you experience any network disconnection before this?
Hi @Encrypted,
Variety parameter is in lower case. So it should be "bo" instead of "BO". Try
kite.PlaceOrder("NSE", "INFY", "BUY", "400", quote.LastPrice.ToString(),"MIS", "LIMIT", "DAY", null,null, "30", "2", "2", "bo", "");
Hi @Encrypted,
Error code 400 refers to errors from the client side. This happens probably due to incorrect parameters. To collect such errors you can directly print the return value of the PlaceOrder function like this:
Console.WriteLine(JsonSeri…
Hi @c00kie,
Have you enabled reconnection properly? You have to call enable_reconnect method explicitly to enable automatic re-connections. It should look like this: kws.enable_reconnect(reconnect_interval=5, reconnect_tries=50)
You can check out …
Hi @kbsbng,
Possible values of Product are "MIS", "CNC" and "NRML". And possible values of Variety are "regular", "bo", "co" and "amo". So to place BO you have to use "bo" as "Variety". Please take a look at the example Sujith posted above.
Hi @Encrypted,
In dotnetkiteconnect library, PlaceOrder function accepts "Variety" parameter which can be "regular", "amo", "bo" or "co". By default, it is "regular". You can change this to "bo" place bracket order.
Hi @Encrypted,
It will not throw an exception. Instead, PlaceOrder function will return the response from API as a dictionary. If the order is successful this will have the order id otherwise it will have the error information. In order to know the…
Hi @sunnypatel,
You can setup a timer that executes every 15 minutes. When it executes you can create a new connection, subscribe to the token, and after the first tick you can unsubscribe and disconnect.
Hi @greybit,
KiteConnect is purely an execution platform. We don't provide strategies. One of our community members has created this repo. You can check that out for reference.
Hi @sylar,
Thank you for the insight. Are you using the free plan or paid plan? If you are using free plan, how you are handling the random URLs? Are you updating it in Kite Connect dashboard everytime you run it?
Hi @pannet1,
Which ticker.js file are you using? It seems you are using the one from kiteconnectjs repository. Please use the ticker.js from the link I shared. It is modified for working in pure js environment.
Hi @satveersm,
You have to login via the URL you get from kite.GetLoginURL(); call. You can implement this in different ways. Recommended method is to open this manually in the browser and copy and paste the request token into the command prompt.
…
Hi @arjunender,
Unfortunately .Net WebBrowser component uses Internet Explorer 6 ActiveX component behind the scenes. This is a very old and deprecated tech. I suggest you open the link directly in your default browser like:
Process.Start("https://…