Kite connect pricing10/30/2023 ![]() Connect ( ) // Subscribing to NIFTY50 and setting mode to LTP EnableReconnect (Interval : 5 ,Retries : 50 ) ![]() OnConnect += onConnect // Engage reconnection mechanism and connect to ticker */ // Create a new Ticker instance Ticker ticker = new Ticker (MyAPIKey, MyAccessToken ) // Add handlers to events It is recommended to use only one websocket connection at any point of time and make sure you stop connection, once user goes out of app. * To get live price use KiteTicker websocket connection. Create event handlers and attach it to Ticker instance as shown in the example below. ![]() These events are non blocking and can be used without additional threads. AveragePrice ) įor more examples, take a look at Program.cs of KiteConnect Sample project in this repository. WriteLine ( "Order Id: " + response ) // Example call for functions like "GetHoldings" that returns a data structure List holdings = kite. WriteLine ( "Need to login again " ) ) // Example call for functions like "PlaceOrder" that returns Dictionary Dictionary response = kite. SetAccessToken (MyAccessToken ) // Set session expiry callback. PublicToken // Initialize Kite APIs with access token GenerateSession (RequestToken, MySecret ) // Persist these tokens in database or settings string MyAccessToken = user. GetLoginURL ( ) // Collect tokens and user details using the request token User user = kite. After successful authentication this will redirect to your redirect url with request token. Enabling Debug will give logs of requests and responses Kite kite = new Kite (MyAPIKey, Debug : true ) // Collect login url to authenticate user. Import library using KiteConnect // Initialize Kiteconnect using apiKey.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |