TransactionLogReport
Posted by Angham Al-Banawien, Last modified by Rawan Al Hourani on 19 September 2019 09:47 AM

 Syntax

 Function TransactionLogReport(ClientID As Long, FromDate As String, ToDate As String, TicketOrder As Long, Trans As Long, TransType As Long, Account As Long, BuySell As Integer, LotsAmount As Double, SymbolID As Long, Price As Double, ClosePrice As Double, WhoType As Long, WhoID As Long, IP As String, Method As String, Optional ByVal isPaging As Boolean = False) As String

Description

The TransactionLogReport operation is used the transaction log report that shows the entire transaction done in the whole system for a given client number.

Request Parameters

Name Description  Required
 ClientID
  • Client identifier to get floating Status for
  • Type : Long
  • Default : None
  • Constraints : Must be valid client Id and accessible by logged in dealer

 

Yes

 FromDate
  • Specify the duration
  • Type : String
  • Default : None
  • Constraints : must be valid date format (“DD/MM/YYYY HH:NN:SS”)
  • “” : means from beginning

 

 Yes

 ToDate
  • Specify the duration
  • Type : String
  • Default : None
  • Constraints : must be valid date format (“DD/MM/YYYY HH:NN:SS”)
  • “” : means till now 

 

 Yes

 TicketOrder
  • The report will show the transaction for this ticket number or order number
  • Type : Long
  • Default : None
  • 0 : means for all ticket 

 

 No

 Trans
  • The report will show the transactions for this type
  • Type : Long
  • Default : None
  • Can be one of the following
     0 : means ALL
     1 : means  New
     2 : means  Update
     3 : means  Delete

 

 Yes

TransType
  • The report will show the transactions for this type
  • Type : Long
  • Default : None
  • Can be one of the following
      0 : means  All
      1 : means  New
      2 : means liquidate
      3 : means  DP/WD/AJ/Ci/Co
      4 : means TP/SL order
      5 : limit/stop order
      6: Delivery

Yes

Account
  • The report will show the transactions for this account number
  • Type: Long
  • Default : None
  • Constraints : Must be valid account Id and accessible by logged in dealer
Yes
BuySell
  • The report will show the transactions for this type
  • Type : Integer
  • Default : None
  • Can be one of the following
      1 : means buy  type
     -1 : means sell type  
      2 : means buy stop type
     -2 : means sell stop type
Yes
LotsAmount
  • The report will show the transaction for this amount
  • Type : double
  • Default : None
  • 0 : means for all lots amount
Yes
SymbolID
  • The report will show the transaction for this symbol ID
  • Type : Integer
  • Default : None
  • 0 : means for all Symbol
Yes
Price
  • The report will show the transaction for this price
  • Type : Double
  • Default : None
  • 0 : means for all Prices
Yes
ClosePrice
  • The report will show the transaction for this close price
  • Type : Double
  • Default : None
  • 0 : means for all close Prices
Yes
WhoType
  • The report will show of Dealer or client
  • Type : Integer
  • Default : None
  • Can be one of the following
      0 : means for all
      1 : means for Dealer
      2 : means for Client 
Yes
WhoID
  • The Id of Dealer or Client
  • Type : Integer
  • Default : None
  • 0 : means for all 
Yes
IP
  • The report will show the transactions of this IP
  • Type : String
  • Default : None
  • “” : Means for all IPs
Yes
Method
  • Who the action was handled
  • Type : String
  • Default : None
  • Can be one of the following 
      “” : means for all
      “BL” : means buy limit
      “BS” : means buy stop
      “SL” : means sell Limit
      “SS” : means sell stop
      “AUTO”
      “CANCEL”
      “CANCELLED-NO MONEY”
      “DONE”
      “HEDGE”
      “LIQ” : means liquidate
      “MANUAL”
      “ORDER”
      “TP”  
Yes
isPaging
  • Boolean value which indicate that you are calling TransactionLogReport to get remaining records
  • This is useful if you are calling a large amount of data to split the returned  data as 3000 rows for each response
  • Type : Boolean
  • Default : False
  • Constraints : on first call must be false and next calls true
Conditional if the first ClientID in TransactionsReport List = -1200


Response Elements

Name Description 
 Result

The operation returns list of type TransactionsReport, otherwise an explicit error code is returned if ClientID  is less than 0 . 

The Following are the TransactionsReport data member

  • ClientID : Client ID
  • AccountID : Account ID
  • Time : Transaction time
  • TicketOrder : ticket/ Order of the transaction
  • Trans : Type of each transaction
            1 : new
            2 : Update
            3 : Delete
  • TransType : type of transaction
            1 : New Position
            2 : liquidate
            3 :Money Transaction
            4 : ST/TP Order
            5 : Limit/Stop order
            6 : Delivery 
  • TransSubType : if TransType = 3 then 
                         1 : Deposit
                        -1 : withdrawal
                         2 : Adjustment
                         3 : Credit in
                        -3 : Credit out
                   if TransType = 5 then
                        1 : Buy Limit
                       -1 : Sell limit
                        2 : buy Stop
                       -2 : Sell Stop
  • TicketOrder2 : Open position Id if TransType = 2 (liquidate)
  • BuySell : type of the order 
             1 : Buy
            -1 : Sell 
  •  Amount : Amount of transaction
  • SymbolID : Transaction Symbol ID
  • PriceSL : Open Price or Stop loss value
  • ClosePriceTP : Close Price or Take profit Value
  • Commission : Commission value
  • Interest : Interest value
  • RefPrice : ref Symbol Price
  • WhoType : Dealer Or Client
             1 : Dealer 
             2 : Client
  • Who : Who ID 
  • Method : Who the action was handled
  • IP : IP Address
  • Profit : profit / loss amount
  • SymbolName : Transaction symbol name 
  • TicketOrder3 : open position id if TransType = 5


Sample

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>TransactionLogReport</title>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<script>
$(document).ready(function () {
var urlStr = "http://173.249.35.43/webtrader/webservice.svc";
jQuery.support.cors = true;
$("#progress").ajaxStart(function () { $(this).css("display", "block"); });
$("#progress").ajaxComplete(function () { $(this).css("display", "none"); });
$("#resultAction").ajaxError(function (result) { $(this).html('An error occured'); });



function onSuccessResultt(dataResult) {
var result = eval(dataResult);
var rst = ""
if (result[0].ClientID > 0) {
for (var i = 0; i < result.length; i++) {
rst += "Time : " + result[i].Time + "<br/>"
rst += "TicketOrder : " + result[i].TicketOrder + "<br/>"
rst += "Trans : " + result[i].Trans + "<br/>"
rst += "TransType : " + result[i].TransType + "<br/>"
rst += "AccountID : " + result[i].AccountID + "<br/>"
rst += "BuySell : " + result[i].BuySell + "<br/>"
rst += "Amount : " + result[i].Amount + "<br/>"
rst += "SymbolID : " + result[i].SymbolID + "<br/>"
rst += "PriceSL : " + result[i].PriceSL + "<br/>"
rst += "Who : " + result[i].Who + "<br/>"
rst += "ClientID : " + result[i].ClientID + "<br/>"
rst += "--------------------------------------------------" + "<br/>"
$("#resultAction").html(rst)
}
}
else {
$("#resultAction").html("Error Code : " + result[0].ClientID + "<br/>" );
}
}



function onSuccessResult(response) {
response = eval('(' + response + ')')
if (response.UserId == -1 || response.UserId == -207) {
$("#resultData").html("Invalid username or password");
}
else if (response.UserId == -231) {
$("#resultData").html("You must have at least one account");
}
else if (response == null || response == "" || response.UserId < 0) {
$("#resultData").html("Error while login.Please try later");
}
else {
$("#resultData").html("SuccessResult ... UserId is :" + response.UserId);
}
}
function onErrorResult(result) {
alert('Service call faild : ' + result.status + ' ' + result.statusText);
}
$("#btnLogin").click(function () {
$.getJSON(urlStr + "/BackofficeLogin?username=" + $("#txtusername").val() + "&password=" + $("#txtpassword").val() + "&callback=?" , onSuccessResult);
});
$("#btnAction").click(function () {
$.getJSON(urlStr + "/TransactionLogReport?ClientID="+ $("#txtClientID").val() + "&FormDate=" + $("#txtFromDate").val() + "&ToDate=" + $("#txtToDate").val() + "&TicketOrder=" + $("#txtTicketOrder").val() + "&Trans=" + $("#txtTrans").val() + "&TransType=" + $("#txtTransType").val() + "&Account=" + $("#txtAccount").val() + "&BuySell=" + $("#txtBuySell").val() + "&LotsAmount=" + $("#txtLotsAmount").val() + "&SymbolID=" + $("#txtSymbolID").val() + "&Price=" + $("#txtPrice").val()+ "&ClosePrice=" + $("#txtClosePrice").val()+ "&WhoType=" + $("#txtWhoType").val()+ "&WhoID=" + $("#txtWhoID").val() + "&IP=" + $("#txtIP").val() + "&Method=" + $("#txtMethod").val() + "&isPaging=" + $("#txtIsPaging").val() + "&callback=?", onSuccessResultt);
});
});
</script>
<body>
<table border="1px">
<tbody>
<tr>
<td>
Username: <input type="text" id="txtusername" value=""/>
Password: <input type="text" id="txtpassword" value=""/>
<button id="btnLogin"> Login </button>
</td>
</tr>
<tr >
<td>
ClientID : <input type="text" id="txtClientID" value ="" /> 
FromDate : <input type="text" id="txtFromDate" value=""/>
ToDate : <input type="text" id="txtToDate" value="" />
</td>
</tr>
<tr >
<td>
TicketOrder : <input type="text" id="txtTicketOrder" value ="0" /> 
Trans : <input type="text" id="txtTrans" value="0"/> 
TransType : <input type="text" id="txtTransType" value="0" />
</td>
</tr>
<tr >
<td>
Account : <input type="text" id="txtAccount" value ="0" /> 
BuySell : <input type="text" id="txtBuySell" value="0"/> 
LotsAmount : <input type="text" id="txtLotsAmount" value="0" />
</td>
</tr>
<tr >
<td>
SymbolID : <input type="text" id="txtSymbolID" value ="0" /> 
Price : <input type="text" id="txtPrice" value="0"/> 
ClosePrice : <input type="text" id="txtClosePrice" value="0" />
</td>
</tr>
<tr >
<td>
WhoType : <input type="text" id="txtWhoType" value ="0" /> 
WhoID : <input type="text" id="txtWhoID" value="0"/> 
IP : <input type="text" id="txtIP" value="" />
</td>
</tr>
<tr>
<td>
Method : <input type="text" id="txtMethod" value=""/>
IsPaging : <input type="text" id="txtIsPaging" value="FALSE"/> 
<button id="btnAction"> TransactionLogReport </button>
</td>
</tr>
</tbody>
</table>
<div id="resultData"> </div>
<div id="resultAction"> </div>
</body>
</html>

 


See Also

VertexFX Backoffice WCF Service Index

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).

Help Desk Software by Hybrid Solutions