Public Sub Quotes_Received(sender As Object, e As KiteNet.QuotesReceivedEventArgs) try If DictLtp.TryGetValue(e.TrdSym, 0) Then 'Check whether Key Exists or Not DictLtp.Item(e.TrdSym) = e.LTP 'End If Catch ex As Exception MsgBox(ex.Message) 'Display any Exceptions raised End Try End Sub
updating datagrid and also comparing data using one second timer here
Private Sub TimerOrder_Tick(sender As Object, e As EventArgs) Handles Timerorder.Tick Dim ltp As Double = DictLtp.Item(symb) Dim rowvalues As String() = New String() {ltp.ToString} DataGridView2.Rows.Add(rowvalues) End Sub
How you are updating the DataGrid values?
We checked at our end, it is almost updating at par with Kite.
by subscribing using code "Kite.SubscribeQuotes("NSE", Symbol(n))"
and retriving using code
" DictLtp.Item(e.TrdSym) = e.LTP
Dicthigh.Item(e.TrdSym) = e.High
Dictlow.Item(e.TrdSym) = e.Low
Dictopen.Item(e.TrdSym) = e.Open
Dictbuyers.Item(e.TrdSym) = e.TotalBuyQty
Dictsellers.Item(e.TrdSym) = e.TotalSellQty
"
Something wrong in your code.
You can just compare the data from quotesreceived event with kite directly, not datagrid.
Public Sub Quotes_Received(sender As Object, e As KiteNet.QuotesReceivedEventArgs)
try
If DictLtp.TryGetValue(e.TrdSym, 0) Then 'Check whether Key Exists or Not
DictLtp.Item(e.TrdSym) = e.LTP
'End If
Catch ex As Exception
MsgBox(ex.Message) 'Display any Exceptions raised
End Try
End Sub
updating datagrid and also comparing data using one second timer here
Private Sub TimerOrder_Tick(sender As Object, e As EventArgs) Handles Timerorder.Tick
Dim ltp As Double = DictLtp.Item(symb)
Dim rowvalues As String() = New String() {ltp.ToString}
DataGridView2.Rows.Add(rowvalues)
End Sub