Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 40
  1. #16
    Administrator Hassan-HS's Avatar
    Join Date
    Jun 2013
    Posts
    795

    Default

    Hello,

    Send me team viewer credentials let me check your code.

    Tell me please more about your project.

  2. #17
    Administrator Hassan-HS's Avatar
    Join Date
    Jun 2013
    Posts
    795

    Default

    Dear ,

    As per our team viewer session you have to use ClientSymbol method to get the symbol prices with the spread value for a specific a account.

  3. #18
    Junior Member
    Join Date
    Oct 2015
    Posts
    23

    Default

    Dear Hassan Sir,

    Thank you for support....

    I want to ask that "Dim tmpsym As COSymbol = m_oBOAPI.SymbolByName("IND GOLD FEB")" is not giving proper ticks, so what this API meant for......
    and "ClientSymbol" always give 50 pip fix spread value, and as per my knowledge, spread is a variable thing and always have positive value.....
    also we have to select account to get proper tick, that means quotes may vary for every single account... is that so.....


    Dilip

  4. #19
    Administrator Hassan-HS's Avatar
    Join Date
    Jun 2013
    Posts
    795

    Default

    Hello,

    I talk about 10.2 BOAPI

    In 10.2 API the following code return to you the Ask price without spread value for the selected account.
    In 10.5 API it's returns the Ask price for the selected account with the spread value for the selected account.
    Note: in the both versions the BO API selects the first account for the first client automatically.
    Code:
       m_oBOAPI.SymbolByID(SymbolID).Ask
    The following code return to you the Ask price with spread value for specific account in both versions of API 10.2 & 10.5.
    Note that in VertexFX system each client can has a unique spread value.
    Code:
        MsgBox(m_oBOAPI.ClientSymbol(SymbolID, 12347359).Ask)
    Example

    If the selected account is "12347359" and the spread for the client that has this account "12347359" equal 50 PIP

    the following code will return 10.5 API , 1500.50
    the following code will return 10.2 API , 1500.00
    Code:
       m_oBOAPI.SymbolByID(SymbolID).Ask


    this code will return 10.5 API , 1500.50
    this code will return 10.2 API , 1500.50
    Code:
        MsgBox(m_oBOAPI.ClientSymbol(SymbolID, 12347359).Ask)

    Note : the prices on BO application display the prices according to the first node spread value until you select another account.

    so if the spread value for the first node in the dealer tree is 50 pip that mean the BO will show you ask price with 50 pip spread.



    let me know if you need more clarification.

  5. #20
    Junior Member
    Join Date
    Oct 2015
    Posts
    23

    Default

    Thank you Hassan,

    Now, I am trying to get margin data of account using 'AccountSummaries' api.... for that doing 'SelectedAccount'.... but result in waiting....
    So for multiple accounts I have to wait everytime until the status is in 'normal mode'.....
    Also tried to get such information using 'COAccount' object and 'AccountByID' api.... but found no such info......
    ........ is there any way to get multiple account margin data without much waiting......


    Dilip

  6. #21
    Administrator Hassan-HS's Avatar
    Join Date
    Jun 2013
    Posts
    795

    Default

    Hello,


    I will check this issue and I will update you soon please standby.

  7. #22
    Administrator Hassan-HS's Avatar
    Join Date
    Jun 2013
    Posts
    795

    Default

    Hello ,


    You can request this report to get data for your all account that's belong for specific client.


    let me know if you need any thing.

  8. #23
    Junior Member
    Join Date
    Oct 2015
    Posts
    23

    Default

    Hello Hassan,

    according to this report, 'msgbox' only showing '1' and nothing else.... how to get report

    Dilip

  9. #24
    Administrator Rawan-HS's Avatar
    Join Date
    Apr 2015
    Posts
    411

    Default

    Dear

    You can get the report data from ReportDataReceived event

  10. #25
    Junior Member
    Join Date
    Oct 2015
    Posts
    23

    Default

    Private Sub m_oBOAPI_ReportDataReceived(ByRef NoRows As Boolean, ByRef Data() As String) Handles m_oBOAPI.ReportDataReceived

    above event is not called after 'm_oBOAPI.RequestReport'.......


  11. #26
    Administrator Rawan-HS's Avatar
    Join Date
    Apr 2015
    Posts
    411

    Default

    Dear
    It is working in my side , and I have made a small sample for you check it and tell me if you need any things
    Attached Files Attached Files

  12. #27
    Junior Member
    Join Date
    Oct 2015
    Posts
    23

    Default

    Hello Rawan Sir,

    your sample shows 'NoRows'.....


    Dililp

  13. #28
    Administrator Rawan-HS's Avatar
    Join Date
    Apr 2015
    Posts
    411

    Default

    Dear Dilip

    It seem you are login with a dealer dose not have privilege on any accounts.
    Last edited by Rawan-HS; 12-28-2015 at 07:02 AM.

  14. #29
    Junior Member
    Join Date
    Oct 2015
    Posts
    23

    Default

    Hello sir,

    what rights are needed to get accounts data?
    and after getting that privilege... can we get such margin data using 'COAccount' object and 'AccountByID' api......

    Dilip

  15. #30
    Administrator Rawan-HS's Avatar
    Join Date
    Apr 2015
    Posts
    411

    Default

    Dear Dilip

    You can get the margin data for any selected account under your dealer tree through 2 ways:

    -Using RequestReport method and get the result from the server by ReportDataReceived event , but you must check before that your dealer has a privilege for the requested report (contact the dealing room for the company that gave you the dealer)

    -Using AccountSummaries method ,but you must select the account At least one time. and to get the summaries data you should wait the OpenPositionsLoaded event to fire

    check this code

    Code:
    Public WithEvents m_oBOAPI As New CVertexFXBOAPI
    
    
    Private Sub GetAccountSummaries_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles GetAccountSummaries.Click
       m_oBOAPI.SelectAccount(91884581)
    
    
    End Sub
    
    Private Sub BOAPI_OpenPositionAdded(ByRef pos As VertexFXBOAPI10.COOpenPosition) Handles BOAPI.OpenPositionAdded
      Dim Balance As Double
      Dim FlTP As Double
      Dim Credit As Double 
      Dim Equity As Double
      Dim MarginReq As Double
      Dim MaginLevel As Double
      Dim EffMargin As Double
      m_oBOAPI.AccountSummaries(91884581, Balance, FlTP, Credit, Equity, MarginReq, MaginLevel, EffMargin)
      MsgBox("Balance is :" & Balance & " MaginLevel :" & MaginLevel)
    
    End Sub

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Backoffice API questions
    By karolis in forum VertexFX API/VTL Forum
    Replies: 1
    Last Post: 02-20-2014, 01:43 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •