GetDealerSymbol
Posted by Angham Al-Banawien, Last modified by Laith Ghawi on 03 July 2019 11:06 AM

 Syntax

Function GetDealerSymbol(Optional ByVal SymbolID As Integer = 0) As String

Description

The GetDealerSymbol operation is used to get list of Symbol/s information for the given symbol Id or for all symbol that the login dealer has privilege on.

Request Parameters

Name Description  Required
 SymbolID
  • Symbol identifier to  get list information for that symbol
  • Type : Integer
  • Default : 0 means for all symbol
  • Constraints : Must be valid Symbol Id

 

No


Response Elements

Name Description 
 Result

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

The Following are the symbol data member

  • ID
  • Name
  • Type : can be one of the following
       1 : means for symbol Type
       2 : means symbol Group type
  • Piplocation
  • RefSymbol
  • IsUsed
  • IsDelivery
  • Spread
  • JustClose
  • ExpDate
  • TickPip
  •  ParentID
  •  SpreadType
  •  HasPriv
  •  BuyOnly
  •  AmountUnitID
  • MaxAmountPerDeal
  • MinAmountPerDeal
  •  SymbolFactor
  •  PriceCase
  •  RefPriceCase
  •  Bid
  •  Ask
  •  High
  •  Low
  •  PriceOffset
  •  spreadOffset
  •  LimitOffset
  •  LastQuoteTime


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>GetDealerSymbol</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].ID > 0) {
for (var i = 0; i < result.length; i++) {
rst += "SymbolID : " + result[i].ID + "<br/>"
rst += "SymbolName : " + result[i].Name + "<br/>"
rst += "SymbolType : " + result[i].Type + "<br/>"
rst += "PipLocation : " + result[i].PipLocation + "<br/>"
rst += "IsUsed : " + result[i].IsUsed + "<br/>"
rst += "Bid : " + result[i].Bid + "<br/>"
rst += "Ask : " + result[i].Ask + "<br/>"
rst += "High : " + result[i].High + "<br/>"
rst += "Low : " + result[i].Low + "<br/>"
rst += "MaxAmountPerDeal : " + result[i].MaxAmountPerDeal + "<br/>"
rst += "MinAmountPerDeal : " + result[i].MinAmountPerDeal + "<br/>"
rst += "--------------------------------------------------" + "<br/>"
$("#resultAction").html(rst)
}
}
else {
$("#resultAction").html("Error Code : " + result[0].ID + "<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 + "/GetDealerSymbol?SymbolID="+ $("#txtSymbolID").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>

SymbolID : <input type="text" id="txtSymbolID" value="0"/> 
<button id="btnAction"> GetDealerSymbol </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