Live Chat Software by Hybrid Solutions
SymbolLotsReport
Posted by Angham Banawien on 07 November 2017 05:12 PM

 Syntax

 Public Function SymbolLotsReport(ClientID As Long, FromDate As String, ToDate As StringOptional ByVal isPaging As Boolean = False) As String

Description

The SymbolLotsReport operation is used to get the symbol lots report that shows the net closed positions on each symbol with more detail for the
account(s).

Request Parameters

Name Description  Required
 ClientID
  • Client identifier to get symbol lots report 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

 isPaging
  • Boolean value which indicate that you are calling SymbolLotsReport 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 SymbolLotsReport List = -1200 

 


Response Elements

Name Description 
 Result

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

The Following are the SymbolLotsReport data member

  • ClientID : Client number
  • AccountId : Account number
  • SymbolID: Symbol ID 
  • Amount : Lots Amount
  • commission : commission value
  • Interest : Interest Value
  • PL : Profit loss value
  • SymbolName : Symbol name 


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>SymbolLotsReport</title>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<script type="text/javascript" >
var SymLotTable;
$(document).ready(function () {
var urlStr = "http://5.10.64.199/vertexweb10/WebService.svc";
$.support.cors = true;
$.ajaxSetup({ cash: false });
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 () {
$.ajax({
type: 'GET',
url: urlStr + "/BackofficeLogin",
dataType: "jsonp",
data: { "username": $("#txtusername").val(), "password": $("#txtpassword").val() },
ProcessData: false,
success: onSuccessResult,
error: onErrorResult
});
});

$("#btnAction").click(function () {
$.ajax({
type: 'GET',
url: urlStr + "/SymbolLotsReport",
dataType: "jsonp",
data: { "ClientID ": $("#txtClientID ").val(), "FromDate": $("#txtFromDate").val(), "ToDate": $("#txtToDate").val(), "IsPaging": $("#txtIsPaging").val()},
success: function (SymLot) {
SymLot = eval('(' + SymLot + ')');
var result;
if (SymLot == undefined || SymLot == null || SymLot.length == 0) {
result = "No data found";
$("#resultAction").html(result);
}
else if (SymLot[0].ClientID < 0 && SymLot[0].ClientID > -1000) {
result = "No data found error code " + SymLot[0].ClientID ;
$("#resultAction").html(result);
}
else if (SymLot[0].ClientID > 0 || SymLot[0].ClientID == -1200 ) {
SymLotTableHeader();
for (var i = 0; i < SymLot.length; i++) {
fillSymLotTable(SymLot[i]);
}
SymLotTable += "</tbody></table>";
}
$("#resultData").html(SymLotTable);
},
error: onErrorResult
});
});
});

function SymLotTableHeader() {
SymLotTable = "";
SymLotTable = "<table border='1px'><thead><tr>";
SymLotTable += "<th> AcountID </th> <th>symbolID</th><th >SymbolName</th><th >Amount</th>";
SymLotTable += "<th>Commission</th><th>Interest</th><th>PL</th><th>ClientID</th>";
SymLotTable += "</thead><tbody>";
}

function fillSymLotTable(SymLot) {

SymLotTable += "<tr><td>" + SymLot.AccountID + "</td>";
SymLotTable += "<td>" + SymLot.SymbolID + "</td>";
SymLotTable += "<td>" + SymLot.SymbolName + "</td>";
SymLotTable += "<td>" + SymLot.Amount + "</td>";
SymLotTable += "<td>" + SymLot.Commission + "</td>";
SymLotTable += "<td>" + SymLot.Interest + "</td>";
SymLotTable += "<td>" + SymLot.PL + "</td>";
SymLotTable += "<td>" + SymLot.ClientID + "</td></tr>";

}

</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>
IsPaging : <input type="text" id="txtIsPaging" value="FALSE"/>

<button id="btnAction"> SymbolLotsReport </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