Live Chat Software by Hybrid Solutions
MaintenanceMarginCallReport
Posted by Angham Banawien on 06 November 2017 03:58 PM

 Syntax

 Public Function MaintenanceMarginCallReport(ClientID As Long, Optional ByVal isPaging As Boolean = False) As String

Description

The MaintenanceMarginCallReport operation is used to get maintenance margin call report that shows the account(s) which they are close to be liquidate
which if the amount that if their effective margin gets less than amount which is set in the account(s) parameters . 

Request Parameters

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

 

Yes

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

 


Response Elements

Name Description 
 Result

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

The Following are the MaintenanceMCReport data member

  • ClientID : Client Identifier 
  • AccountID : Account Identifier 
  • BalanceBalance value  
  • FltPL: floating profit/Loss for each client 
  • Credit: Credit value 
  • MarginReq: used margin value 


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>MaintenanceMarginCallReport</title>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<script type="text/javascript" >
var MMCRTable;
$(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 + "/MaintenanceMarginCallReport",
dataType: "jsonp",
data: { "ClientID ": $("#txtClientID ").val(), "isPaging": $("#txtisPaging").val()},
success: function (MMCR) {
MMCR = eval('(' + MMCR + ')');
var result;
if (MMCR == undefined || MMCR == null || MMCR.length == 0) {
result = "No data found";
$("#resultAction").html(result);
}
else if (MMCR[0].ClientID < 0 && MMCR[0].ClientID > -1000) {
result = "No data found error code " + MMCR[0].ClientID ;
$("#resultAction").html(result);
}
else if (MMCR[0].ClientID > 0 || MMCR[0].ClientID == -1200) {
MMCRTableHeader();
for (var i = 0; i < MMCR.length; i++) {
fillMMCRTable(MMCR[i]);
}
MMCRTable += "</tbody></table>";
}
$("#resultData").html(MMCRTable);
},
error: onErrorResult
});
});
});

function MMCRTableHeader() {
MMCRTable = "";
MMCRTable = "<table border='1px'><thead><tr>";
MMCRTable += "<th> AccountID </th> <th>Balance</th><th >Credit</th><th >FltPL</th>";
MMCRTable += "<th>MarginReq</th><th>ClientID</th>";
MMCRTable += "</thead><tbody>";
}

function fillMMCRTable(MMCR) {

MMCRTable += "<tr><td>" + MMCR.AccountID + "</td>";
MMCRTable += "<td>" + MMCR.Balance + "</td>";
MMCRTable += "<td>" + MMCR.Credit + "</td>";
MMCRTable += "<td>" + MMCR.FLTPL + "</td>";
MMCRTable += "<td>" + MMCR.MarginReq + "</td>";
MMCRTable += "<td>" + MMCR.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 ="" />
isPaging : <input type="text" id="txtisPaging" value="False"/>

</td>
</tr>
<tr>
<td>

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