Page 1 of 4 123 ... LastLast
Results 1 to 15 of 46
  1. #1
    Dataflow
    Guest

    Default Transactions history

    Dear Sir,

    We are using the Backoffice API 10.2 and we were trying to get a history of tickets orders once we have connected to the application.

    Can you provide us what is the method we should use if we want for example to get the ticket orders between 2 dates and greater than a certain ticketID already saved at my side.

    We tried to use the requestReport but we don't get anything and sometimes we get .

    Can you clarify please.

    Thank you

    Regards

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

    Post Boapi

    Dear Sir,

    Thank you for your post

    This following sample describe to you how to get the current opened positions using RequestReport method.

    for more info please click here
    Code:
       Dim Request As String
    
            Dim ClientID As String = Cstr(m_oBOAPI.RootID)
    
            Dim SymbolID As String
    
            Dim AccountType As String
    
            Dim PositionType As String
    
            SymbolID = "" ' all symbols
    
            PositionType = "1" ' Buy , "-1'Sell , "" All
    
            AccountType = "1" ' normal account , "2" for coverage account
    
            Request = ClientID & , & AccountType & , & SymbolID & , & PositionType
    
            MsgBox(m_oBOAPI.RequestReport(VertexFXBOAPI10.ManagerReportsTypeEnum.DetailOpenPositionsReport ,Request))
    Notes:

    This event ReportDataReceived fired when receive a data report from the server.

    You can request reports as you need but note that you have to wait the result for the report inquiry before request another report.


    To get Market Order History Report


    Code:
    Dim Request As String
                Dim ClientID As String = CStr(Dealer.BO.RootID)
                Dim DateFrom As String = ""
                Dim DateTo As String = ""
                Dim SymbolID As String = ""
                DateFrom = IIf(ChBeginning.Checked, "", MDI.Dealers.StringValues.DateToString(DateTimeFrom.Value))
                DateTo = IIf(ChNow.Checked, "", MDI.Dealers.StringValues.DateToString(DateTimeTo.Value))
    
                Dim OrderID As String = IIf(cmOrder.Text.ToUpper = "All".ToUpper, "", cmOrder.Text)
                Dim Ticket As String = IIf(cmbTkt.Text.ToUpper = "All".ToUpper, "", cmbTkt.Text)
                Dim AccountID As String = IIf(cmbAccount.Text.ToUpper = "All".ToUpper, "", cmbAccount.Text)
                Dim Type As String = ""
                ' All  "CP" for liquidate "OP" for New
                If cmbType.Text.ToUpper = "New".ToUpper Then
                    Type = "OP"
                ElseIf cmbType.Text.ToUpper = "Liquidate".ToUpper Then
                    Type = "CP"
                End If
    
           
                Dim BuySell As String = "" 'All "1" for buy, "-1" for sell
                Select Case cmbBS.Text.ToUpper
                    Case "All".ToUpper
                        BuySell = ""
                    Case "Buy".ToUpper
                        BuySell = "1"
                    Case "Sell".ToUpper
                        BuySell = "-1"
                End Select
                Dim Amount As String = IIf(cmbAmmount.Text.ToUpper = "All".ToUpper, "", cmbAmmount.Text)
    
    
                Dim Price As String = IIf(cmbPrice.Text.ToUpper = "All".ToUpper, "", cmbPrice.Text)
                Dim IPAddress As String = IIf(cmbIP.Text.ToUpper = "All".ToUpper, "", cmbIP.Text)
                Dim Status As String = "" ' All  "20" New Accepted/ "21" invalid price / "44" quoted then Timer expired / "45" quoted then client reject
                Select Case cmbStatus.Text.ToUpper
                    Case "All".ToUpper
                        Status = ""
                    Case "Accepted".ToUpper
                        Status = "20"
                    Case "Invalid Price".ToUpper
                        Status = "21"
                    Case "Price changed - timer expired".ToUpper
                        Status = "44"
                    Case "Price changed - client reject".ToUpper
                        Status = "44"
                End Select
    
                Dim Who As String = IIf(cmbWho.Text.ToUpper = "All".ToUpper, "", cmbWho.Text.ToUpper)
    
    
    
                If cmbSymbol.Text.ToUpper = "All".ToUpper Then
                    SymbolID = ""
                Else
                    Dim vSymbol As VertexFXBOAPI10.COSymbol
                    vSymbol = Dealer.BO.SymbolByName(cmbSymbol.Text.ToUpper)
                    If vSymbol Is Nothing Then
                        Exit Sub
                    End If
                    SymbolID = vSymbol.ID
    
                End If
                Request = ClientID & "," & DateFrom & "," & DateTo & "," & OrderID & "," & Ticket & "," & AccountID & "," & Type & "," & BuySell & "," & Amount & "," & SymbolID & "," & Price & "," & IPAddress & "," & Status & "," & Who
            BO.RequestReport(VertexFXBOAPI10.ManagerReportsTypeEnum.MarketOrdersHistoryReport, Request)

    For more info please click here

  3. #3
    Dataflow
    Guest

    Default

    Thank you for your reply.

    We have found the same function but using the transactionLog . Is there any difference between these 2 types?

    While using the transactionLog in the API 10.2, when we fill From date and To Date we get data but we fill only from Date with empty to date we dont get anything.

    Can you advise please.

    In addition, If we want to use this function requestreport to get tickets that have IDs greater than a certain TicketID for example >740000 , is there any possibility here?

    Thank you in advance

    Regards

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

    Default

    Hello,

    Transaction Log: This report will show you the entire transactions (New, Liquidate,Money Transaction, TP/SL orders, Limit/Stop orders) done in your whole system or for a certain account(s)/ office(s).
    Market Orders History Report: This report will show you the entire market orders done in your whole system or for a certain account(s)/ office(s).

    Please check this article to know the differences between the reports.

    When you pass a empty dates that means you want to retrieve data from beginning till now, and that its a huge data so its take a while. so please check the waiting mode state of the API if its in waiting mode or not and update me with the result.

    Simply you can pass the date of the TicketID Ex:740000 as FromDate, and keep the ToDate filed empty.

  5. #5
    Dataflow
    Guest

    Default Update And Delete

    Dear Sir,

    Thank you for your replies.
    We would like to ask about the tickets that we are taking from vertex.

    We are taking only liquidate tickets but we would like to know until when the client can update or delete his tickets.Is there any flag saying that the tickets has been executed at the custodian level?

    We think once the ticket is executed the client must not have the access to do any changements.
    Are we right?

    Please how can we have more info about this issue.

    Regards

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

    Default

    Hello,

    Sure you can retrieve all pending and manage orders transactions using Transaction Log report by passing TransTyp parameter as following.....

    "4" to retrieve TP/SL Order
    "5" to retrieve Limit/Stop Order

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

    Default

    Hello,


    Would be great if you give me an example

  8. #8
    Dataflow
    Guest

    Default

    What I mean is when the account holder can edit a ticket or delete a ticket.he can always do that or there is flag that the ticket is executed and can not be modified anymore.

    For example when a client buy 0.1 EUR/USD at a price. he can change his mind and delete it but if this ticket is executed and already is entered in the account's statement can he do this delete?

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

    Post Bo api

    Hello,

    What I mean is when the account holder can edit a ticket or delete a ticket.he can always do that or there is flag that the ticket is executed and can not be modified anymore.

    Let's make it clear.... the difference between orders & positions:

    1-Positions: The orders that price already hit (executed).

    The client cannot change the price or the amount, but he can close or manage it ( put Stop-Loss or Take-Profit).


    2-Orders: The pending orders (that price is not hit yet) .

    The client can change the price and the amount, and he can cancel it.

    I- Limit Type: (Buy Limit, Sell Limit, Buy Stop, Sell Stop)

    II- SLTP Type: it's a manage order for a open position (Buy manage, Sell manage)

    check the attached picture (1 is position, to is order.)


    Click image for larger version. 

Name:	1-Trade..jpg 
Views:	113 
Size:	22.6 KB 
ID:	337
    Last edited by Hassan-HS; 05-14-2014 at 09:56 AM.

  10. #10
    Dataflow
    Guest

    Default

    Sorry but the image is not opening.

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

    Default

    Dear,


    check it now...

  12. #12
    Dataflow
    Guest

    Default

    Sorry i didnt get it.

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

    Post Bo api

    Please check this

    Click image for larger version. 

Name:	1-Trade..jpg 
Views:	112 
Size:	22.6 KB 
ID:	338

  14. #14
    Dataflow
    Guest

    Default

    Thank you , i just saw the picture .

    We are taking in our application the orders that have transtype=2 ==>Liquidate .

    what we should add to filter for Positions: The orders that price already hit (executed).

    We only want the orders that are executed.

    Thank you once again

    Regards

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

    Post Bo api

    Hello,


    You have to send the following parameters with this values to retrieve the executed limit orders.


    Code:
    Trans as  "3"  which means delete.
    TransType as "5" which means "Limit/Stop Orders"
    Method as "Done"
    You have to send the following parameters with this values to retrieve the executed manage orders.

    Code:
    Trans as  "3"  which means delete.
    TransType as 4 which means "TP/SL Orders"
    Method as "Done"

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How can we read positions from history in local script
    By nhasan in forum VertexFX API/VTL Forum
    Replies: 2
    Last Post: 05-18-2014, 12:29 PM

Posting Permissions

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