Announcement

Collapse
No announcement yet.

Desktop API

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Desktop API

    Can you answer below questions: (I am developing an application to get live data through e-signal using Visual Basic 6.0)

    (1) Do I need to set the exchange flag before streaming data?

    (2) Is there any way to get the current High, Low and Last Traded price of the stock?

    (3) Is there any way to get the timestamp of last quote? Do I need to use the GetAppTime method of Hooks?

    Thanks
    R.Parikh

  • #2
    Hello,

    1) No exchange flag needs to be set unless you are using a Time & Sales filter, and wish to restrict responses to certain exchanges.

    2) A history request will accomplish this. Making and processing this kind of request is detailed on page 4-5 of the documentation.

    3) This is also included in the data structure returned by a history request.

    Comment


    • #3
      Desktop API

      Thank you for the quick reply.

      2) A history request will accomplish this. Making and processing this kind of request is detailed on page 4-5 of the documentation.

      I need to get as well as track the High , Low and Open values while feeding real time data to my application so what I understand from the answer is that I will get the values by using history request. Is that correct?

      It will be very difficult to track high, low and open values of all stock per second. It would be great if we get current high, low and open values using Basic quote.

      Is it possible to get history data per second?

      ==================

      How can I track realtime data for almost 100 stocks. I meant I want to store realtime data ( whenever they change) in the file or database.

      I used below code: But I got data for only STOCK : AB.

      Task : track real time data for 5 stocks.

      Private Sub cmdLiveData_Click()
      If cmdLiveData.Caption = "Live Data" Then
      RequestSymbol "FTI"
      RequestSymbol "BRL"
      RequestSymbol "BG"
      RequestSymbol "SNDK"
      RequestSymbol "AB"
      cmdLiveData.Caption = "Stop Quote"
      ElseIf cmdLiveData.Caption = "Stop Quote" Then
      esignal.ReleaseSymbol "BRL"
      esignal.ReleaseSymbol "BG"
      esignal.ReleaseSymbol "SNDK"
      esignal.ReleaseSymbol "AB"
      esignal.ReleaseSymbol "FTI"
      cmdLiveData.Caption = "Live Data"
      End If
      End Sub


      Private Sub esignal_OnQuoteChanged(ByVal sSymbol As String)
      Dim quote As IESignal.BasicQuote
      quote = esignal.GetBasicQuote(sSymbol)

      edtBid.Text = Str$(quote.dBid)
      edtAsk.Text = Str$(quote.dAsk)
      edtLast.Text = Str$(quote.dLast)

      Dim fname As String, fno As Integer, txtLine As String
      txtLine = sSymbol & "," & Time & "," & edtBid.Text & "," & edtAsk.Text & "," & edtLast.Text
      fno = FreeFile 'Asiign free file no.
      fname = sSymbol & ".txt"
      Debug.Print txtLine
      Open fname For Output As #fno
      Print #fno, txtLine

      Close #fno

      End Sub

      Can you tell me what the problem with the code is?

      Comment

      Working...
      X