GetGeneralClientParam
Posted by Mohammad Rahhal, Last modified by Rawan Al Hourani on 11 December 2018 01:08 PM

Syntax

Public Function GetGeneralClientParam(ClientID As Integer) As String

Description

This function is used to get the general parameter for the given client ID which the logged in dealer has privilege on.

Parameters

Name Description  Required
ClientID
  • The client number to get his parameters
  • Type: Integer
  • Default: None
Yes

Response Elements

Name Description 
Result The operation returns JSON object of type ClientGeneralParameter in case successfully otherwise an explicit error code is returned if the SymbolID is less than 0.

 The following are the ClientGeneralParameter data member.

  • Result: the request general parameter result
  • AccountIDSuffFix: the standard postfix for a certain account, value of type string
  • AccountIDSuffFixFlag: To detect if the AccountIDSuffFix is inherit or override , 2 means Override , otherwise it is inherit
  • AccountIDPreFix: the standard prefix for a certain account, value of type string
  • AccountIDPreFixFlag: To detect if the AccountIDPreFix is inherit or override , 2 means Override , otherwise it is inherit
  • AutoLiquidation: Boolean value , if true then when account reaches to liquidation point all account open positions will closed automatically
  • AutoLiquidationFlag: To detect if the AutoLiquidation is inherit or override , 2 means Override , otherwise it is inherit
  • CommType :the commission calculation type (Before/ after opening the positions). “1” means when open otherwise it means when close.
  • CommTypeFlag: To detect if the CommType is inherit or override , 2 means Override , otherwise it is inherit
  • DEmailStatement: Boolean value to detect if the daily email statement enabled or not.
  • DEmailStatementFlag: To detect if the DEmailStatement is inherit or override , 2 means Override , otherwise it is inherit
  • EnableHedging: Boolean value to detect if the hedge is enabled or not.
  • EnableHedgingFlag: To detect if the EnableHedging is inherit or override , 2 means Override , otherwise it is inherit
  • EnableInterest: Boolean value to detect if the interest is enabled or not.
  • EnableInterestFlag: To detect if the EnableInterest is inherit or override , 2 means Override , otherwise it is inherit
  • EnableMultiSession: Boolean value to detect if multi session is enabled or not
  • EnableMultiSessionFlag: To detect if the EnableMultiSession is inherit or override , 2 means Override , otherwise it is inherit
  • EnableNews: Boolean value to detect if the news source is active or not.
  • EnableNewsFlag: To detect if the EnableNews is inherit or override , 2 means Override , otherwise it is inherit
  • EnableSMSAlerting: Boolean value to detect if the SMS alerting service is enabled or not
  • EnableSMSAlertingFlag: To detect if the EnableSMSAlerting is inherit or override , 2 means Override , otherwise it is inherit
  • EnableSMSScheduling: to detect if the SMS scheduling is enabled or not
  • EnableSMSSchedulingFlag: To detect if the EnableSMSScheduling is inherit or override , 2 means Override , otherwise it is inherit
  • GMTOffset: The value for the GMT offset
  • GMTOffsetFlag: To detect if the GMTOffset is inherit or override , 2 means Override , otherwise it is inherit
  • liquidationPoint: the value that the client liquidate on it.
  • liquidationPointFlag: To detect if the liquidationPoint is inherit or override , 2 means Override , otherwise it is inherit
  • liquidationType: 1 : means Equity 
  •                            2 : means margin level
  • liquidationTypeflag: To detect if the liquidationType is inherit or override , 2 means Override , otherwise it is inherit
  • MarginReqType : “1” : means Compute one of two hedge position
                                “2” : Don’t Compute 
                                “3” : Compute the two hedge
  • MarginReqTypeFlag: To detect if the MarginReqType is inherit or override , 2 means Override , otherwise it is inherit
  • MEmailStatement: Boolean value to detect if the monthly email statement enabled or not
  • MEmailStatementFlag: To detect if the MEmailStatement is inherit or override , 2 means Override , otherwise it is inherit
  • PrivateSlideNews: The value of the private news
  • PrivateSlideNewsFlag: To detect if the PrivateSlideNews is inherit or override , 2 means Override , otherwise it is inherit
  • StatementFooter: the value of the footer statement
  • StatementFooterFlag: To detect if the StatementFooter is inherit or override , 2 means Override , otherwise it is inherit
  • StatementHeader: the value of the Header statement
  • StatementHeaderFlag: To detect if the StatementHeader is inherit or override , 2 means Override , otherwise it is inherit
  • ValidateMoney: The value of validate money
  • ValidateMoneyFlag: To detect if the ValidateMoney is inherit or override , 2 means Override , otherwise it is inherit
  • WEmailStatement: Boolean value to detect if the weekly email statement enabled or not.
  • WEmailStatementFlag: To detect if the WEmailStatement is inherit or override , 2 means Override , otherwise it is inherit

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>GetGeneralClientParam</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].Result > 0) {
for (var i = 0; i < result.length; i++) {
rst += "EnableMultiSession : " + result[i].EnableMultiSession + "<br/>"
rst += "EnableMultiSessionFlag : " + result[i].EnableMultiSessionFlag + "<br/>"
rst += "EnableInterest : " + result[i].EnableInterest + "<br/>"
rst += "EnableInterestFlag : " + result[i].EnableInterestFlag + "<br/>"
rst += "DEmailStatement : " + result[i].DEmailStatement + "<br/>"
rst += "DEmailStatementFlag : " + result[i].DEmailStatementFlag + "<br/>"
rst += "--------------------------------------------------" + "<br/>"
$("#resultAction").html(rst)
}
}
else {
$("#resultAction").html("Error Code : " + result[0].Result + "<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 + "/GetGeneralClientParam?ClientID="+ $("#txtClientID").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 ="" />
<button id="btnAction"> Get General Client Param </button>
</td>
</tr>
</tbody>
</table>
<div id="resultData"> </div>
<div id="resultAction"> </div>
<div style="display:none" id="progress">Loading ... </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