Syntax
GetMWSymbols()
Description
The GetMWSymbols operation is used to get market watch symbol setting without the need to login to the
session.
Request Parameters
No Requested Parameters.
Response Elements
Name | Description |
Result | This method returnresult as following:
Otherwise seeError Codes. |
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>GetMWSymbols</title>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<script >
$(document).ready(function () {
var urlStr = "http://webtrader.hybridsolutions.com/publicweb/webservice.svc";
jQuery.support.cors = true;
$("#progress").ajaxStart(function () { $(this).css("display", "block"); });
$("#progress").ajaxComplete(function () { $(this).css("display", "none"); });
$("#btnAction").click(function () {
$.getJSON(urlStr + "/GetMWSymbols?" + "callback=?", onSuccessResult);
function onSuccessResult(dataResult) {
dataResult = eval('(' + dataResult + ')');
var myTable = '<table border="1px"><thead>' +
'<tr><th>Name</th><th>ID</th><th>SymbolFactor</th><th>PriceCase</th><th>RefPriceCase</th><th>Type</th><th> RefSymbol</th>' +
'<th>AmountUnitID</th><th>AmountUnitDescription</th><th>SpreadOffset</th><th>PriceOffset</th><th>SpreadType</th><th> StopTradeIfNoPrices</th>' +
'<th>StopTradeAfterSeconds</th><th>MaxAmountPerDeal</th><th>MinAmountPerDeal</th><th>AskWithSpread</th><th>BidWithSpread</th><th> Commission </th>' +
'<th>LimitOffset</th><th>StopOffset</th><th>PipLocation</th><th>Spread</th><th>IsUsed</th><th> IsDisplay </th>' +
'<th>HasPriv</th><th>JustClose</th><th>BuyOnly</th><th>IsDelivery</th><th> Bid </th>' +
'<th >Ask</th><th>High</th><th>Low</th><th>LastQuoteTime</th></thead><tbody>';
for (var i = 0; i <= dataResult.length - 1; i++) {
myTable += "<tr>"
myTable += "<td>" + dataResult[i].Name + "</td>"
myTable += "<td>" + dataResult[i].ID + "</td>"
myTable += "<td>" + dataResult[i].SymbolFactor + "</td>"
myTable += "<td>" + dataResult[i].PriceCase + "</td>"
myTable += "<td>" + dataResult[i].RefPriceCase + "</td>"
myTable += "<td>" + dataResult[i].Type + "</td>"
myTable += "<td>" + dataResult[i].RefSymbol + "</td>"
myTable += "<td>" + dataResult[i].AmountUnitID + "</td>"
myTable += "<td>" + dataResult[i].AmountUnitDescription + "</td>"
myTable += "<td>" + dataResult[i].SpreadOffset + "</td>"
myTable += "<td>" + dataResult[i].PriceOffset + "</td>"
myTable += "<td>" + dataResult[i].SpreadType + "</td>"
myTable += "<td>" + dataResult[i].StopTradeIfNoPrices + "</td>"
myTable += "<td>" + dataResult[i].StopTradeAfterSeconds + "</td>"
myTable += "<td>" + dataResult[i].MaxAmountPerDeal + "</td>"
myTable += "<td>" + dataResult[i].MinAmountPerDeal + "</td>"
myTable += "<td>" + dataResult[i].AskWithSpread + "</td>"
myTable += "<td>" + dataResult[i].BidWithSpread + "</td>"
myTable += "<td>" + dataResult[i].Commission + "</td>"
myTable += "<td>" + dataResult[i].LimitOffset + "</td>"
myTable += "<td>" + dataResult[i].StopOffset + "</td>"
myTable += "<td>" + dataResult[i].PipLocation + "</td>"
myTable += "<td>" + dataResult[i].Spread + "</td>"
myTable += "<td>" + dataResult[i].IsUsed + "</td>"
myTable += "<td>" + dataResult[i].IsDisplay + "</td>"
myTable += "<td>" + dataResult[i].HasPriv + "</td>"
myTable += "<td>" + dataResult[i].JustClose + "</td>"
myTable += "<td>" + dataResult[i].BuyOnly + "</td>"
myTable += "<td>" + dataResult[i].IsDelivery + "</td>"
myTable += "<td>" + dataResult[i].Bid + "</td>"
myTable += "<td>" + dataResult[i].Ask + "</td>"
myTable += "<td>" + dataResult[i].High + "</td>"
myTable += "<td>" + dataResult[i].Low + "</td>"
myTable += "<td>" + dataResult[i].LastQuoteTime + "</td>"
myTable += "</tr>"
}
myTable += '</tbody></table>';
$("#resultAction").html(myTable);
}
});
});
</script>
<body>
<table border="1px">
<tbody>
<tr>
<td><button id="btnAction"> GetMWSymbols </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