GetMWAllSymbol
Posted by Ismail Moamer, Last modified by Laith Ghawi on 03 July 2019 12:15 PM

Syntax

GetMWAllSymbols()

Description

The GetMWAllSymbols operation is used to get market watch symbol settings(Symbol and Group) without the need to login to the session.

Request Parameters

No Requested Parameters.

Response Elements

Name Description 
Result

This method return result as following:

  • RefSymbol: The reference symbol.
  • Type: Symbol Type
    If it equals 1: Means Symbol otherwise means Group.
  • Name: Symbol name.
  • ParentID
  • AmountUnitID: Amount unit identifier.
  • AmountUnitDescription: Amount Unit Description.
  • SpreadOffset: The Spread offset value.         
  • SpreadType: Spread calculation type. 
    1: Means From Bid Spread.
    2: Means From Average Spread.
  • StopTradeIfNoPrices:
    True: Means Stop trade when no price. 
    False: Means Don’t stop trade when no price.
  • StopTradeAfterSeconds: The second value. 
  • MaxAmountPerDeal: Maximum amount to get a trade at this symbol.        
  • MinAmountPerDeal: Minimum amount to get a trade at this symbol.  
  • AskWithSpread: Ask price with spread value. 
  • BidWithSpread: Bid price with spread value. 
  • Commission: Commission value. 
  • LimitOffset: The limit offset value. 
  • StopOffset: The Stop Offset value. 
  • PipLocation: Pip location value. 
  • Spread: Spread. 
  • IsUsed:
    True: Means it is a used symbol. 
    False: Means it is not a used symbol.        
  • IsDisplay: 
    True: Means it is Display.
    False: Means it is not Display.        
  • HasPriv:
    True: Has a privilege at this symbol.
    False: Doesn't have a privilege at this symbol.        
  • JustClose:
    True: Just close symbol. 
    False: Full trade symbol.       
  • BuyOnly:
    True: Buy only trading  Symbol. 
    False: Buy and sell trading symbol.        
  • IsDelivery
    True: Means enable delivery symbol.
    False: Means disable delivery symbol.
  • ID: Symbol Identifier.  
  • Bid: Bid price. 
  • Ask: Ask Price.        
  • High: High price. 
  • Low: Low price.         
  • LastQuoteTime.

Otherwise see Error Codes.
Type: String.

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>GetMWALLSymbols</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"); });


$("#btnAction").click(function () {
$.getJSON(urlStr + "/GetMWAllSymbols?" + "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"> GetMWAllSymbols </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 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