Page 1 of 4 123 ... LastLast
Results 1 to 15 of 57
  1. #1
    somilshah
    Guest

    Exclamation Development of Android and Iphone Trading Application

    Hello,

    We have are developing a Android and Iphone Trading Application for our client. We are have a few doubts to resolve for it.

    We have been provided with a few API by them from which they said WCF API has to be used to search web services and connect the platform.

    We have been trying to use the WCF API but we are not getting data in reply from the WCF API.

    We would like to know how to get the Web Services data in "json" for us to use for developing the Mobile Trading Application.

    I have also attached a document for the WEB API where I have specified the command we require. It would be great if you could help us to know how to fetch them using the WCF API provided to us.

    Also if you could provide with a guide to help us in the development would be helpful.


    I will look forward for a speedy response from you.
    Attached Files Attached Files

  2. #2
    Administrator Hassan-HS's Avatar
    Join Date
    Jun 2013
    Posts
    795

    Default

    Hello,


    Great, This article will assist you in developing your application.

    HTML Sample for login:

    Code:
    <!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>Login</title>
    
      <script src="http://code.jquery.com/jquery-latest.js"></script>
    
    </head>
    
    <script >
    
        $(document).ready(function () {
    
            var urlStr = "http://74.54.46.178/vertexweb10/WebService.svc";
    
            jQuery.support.cors = true;
    
            $("#progress").ajaxStart(function () { $(this).css("display", "block"); });
    
            $("#progress").ajaxComplete(function () { $(this).css("display", "none"); });
    
            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 {
    
                    var resultStr = "SuccessResult ... UserId is :" + response.UserId + "<br/>";
    
                    resultStr += "DemoClient :" + response.DemoClient + "  (if ClientType=0 then the Client Type is real . else if ClientType=1 then the Client Type is Demo) " + "<br/>"
    
                    resultStr += "IsReadOnly :" + response.isReadOnly + "<br/>"
    
                    resultStr += "Second Name :" + response.SName + "<br/>"
    
                    resultStr += "Third Name :" + response.TName + "<br/>"
    
                    $("#resultData").html(resultStr);
    
                }
    
            }
    
            function onErrorResult(result) {
    
                alert('Service call faild : ' + result.status + ' ' + result.statusText);
    
            }
    
            $("#btnLogin").click(function () {
    
                $.ajax({
    
                    url: urlStr + "/Login",
    
                    data: { "username": $("#txtusername").val(), "password": $("#txtpassword").val() },
    
                    traditional: true,
    
                    crossDomain: true,
    
                    dataType: "jsonp",
    
                    success: onSuccessResult,
    
                    error: onErrorResult
    
                });
    
            });
    
        });
    
    </script>
    
    <body >
    
    <table border="1px">
    
    <tbody>
    
    <tr>
    
    <td>
    
    username: <input type="text" id="txtusername" value="support"/>
    
    password: <input type="text" id="txtpassword" value="support"/>
    
    <button id="btnLogin"> Login </button>
    
    </td>
    
    </tr>
    
    </tbody>
    
    </table>
    
    <div id="resultData"> </div>
    
    <div id="resultAction"> </div>
    
    <div style="display:none" id="progress">Loading ... </div>
    
    </body>
    
    </html>
    Thanks for your post, Please don't hesitate to contact me if you need any further help.

  3. #3
    somilshah
    Guest

    Default JSON Request

    Hello Hassan,

    Thank you for your reply, can you help us to know how can have the following code in JSON format as we are developing a mobile application and JSON is required to do so by our team.


    Many Thanks,
    Somil Shah

  4. #4
    Administrator Hassan-HS's Avatar
    Join Date
    Jun 2013
    Posts
    795

    Default

    Hello,

    You are welcome, Sure i will assist you in how to send the requests to the server using the web service.


    Required Knowledge and Skills
    Last edited by Hassan-HS; 07-13-2014 at 04:45 PM.

  5. #5
    somilshah
    Guest

    Default

    Hello Hassan,

    Thank you for your reply once again, The hyperlink you have mde for Required Knowledge and Skills is not working I request you to re-posit it.

    Also we are using the following WCF Service link: http://159.253.137.70/webtrader/WebService.svc

    We are not able to get any reply from this WCF Service Link, my developers are working with java and objective C.

    I request you to please once again check on the Service Link and provide me with the guidance to get reply from the Web Services link above using any of the above languages.


    I will look forward for your fastest reply with a resolution to our issue.


    Many Thanks,
    Somil Shah

  6. #6
    Administrator Hassan-HS's Avatar
    Join Date
    Jun 2013
    Posts
    795

    Default

    Hello,

    Sorry you can check it now.

    Required Knowledge and Skills


    You web service is working fine.


    login sample:
    please fill the stars with valid username and password you will get response with the client parameters.
    Code:
    http://159.253.137.70/webtrader/WebService.svc/Login?username=****&password=****

  7. #7
    somilshah
    Guest

    Exclamation More Web Services API URL

    Hello Hassan,

    Thank you once again for your reply, Same like this login web api url,
    We need the web api urls for all the web services mentioned in the document.

    It would be great if you could help us with all of the above doubts with a solution to it.


    Many Thanks,
    Somil Shah
    Attached Files Attached Files

  8. #8
    Administrator Hassan-HS's Avatar
    Join Date
    Jun 2013
    Posts
    795

    Default

    Hello...

    I will update you soon please standby

  9. #9
    somilshah
    Guest

    Default

    Hi Hassan,

    Thank you for your reply, We will wait for your reply soon for us to move further.


    Many Thanks,
    Somil Shah

  10. #10
    Administrator Hassan-HS's Avatar
    Join Date
    Jun 2013
    Posts
    795

    Post WCF Methods

    Hello,

    1) Server List
    -- List of servers available. Eg( ASIA/UK, DEMO, REAL, )
    Input
    -- method_name
    Output
    -- List of server with server_name,server_id
    Code:
    http://XXX.XXX.XXX.XXX/webtrader/WebService.svc
    Using this code you can access the WCF, but there is no method that return the list of the servers.
    2) Login:
    To login into the application we need to request the username and password
    Input:
    -- method_name,user_name,password,server_name or server_id
    Output:
    -- user_id,user_name
    Method documentation
    Code:
    http://159.253.137.70/webtrader/WebService.svc/Login?username=****&password=****

    3) List of Symbols:
    Need list of symbols available for Forex,Commodities,Indices and Equity CFDs
    Method Documentation
    Code:
    http://159.253.137.70/webtrader/WebService.svc/GetSymbol?******
    4) List of All Symbols:
    Method documentation
    Code:
    http://159.253.137.70/webtrader/WebService.svc/GetAllSymbols?AccountID=*****
    5) Get Quotes for All types of Instrumental Types and Favorites
    Method Documentation, Note that to put this in timer to fitch the prices from the server on each tick.
    Code:
    http://159.253.137.70/webtrader/WebService.svc/GetNewTick?
    6) Get quotes for individual Instrument Types and Favorites
    you cant fetch the prices for specific symbol, you have to fetch all prices for all symbols.

    7) Change Order Instrument Types / Favorites
    I'm not sure that I understood this point, what do you mean with change the order type?

    8) Delete Order Instrument Types / Favorites
    1-Method documentation
    2-Method documentation
    Code:
    ' To cancel Limit orders
    http://159.253.137.70/webtrader/WebService.svc/CancelLimitOrder?AccountId=****&OrderId=*****"
    'To cancel SLTP Orders
    http://159.253.137.70/webtrader/WebService.svc/CancelSLTP?AccountId=****&OrderId=*****"
    9) New Order
    New Limit Order documentation
    New SLTP Order documentation
    New Market Order documentation

    Code:
    'New Limit Order
    http://159.253.137.70/webtrader/WebService.svc/NewLimitOrder?AccountId=******&SymID=********&LimitType=*******&Price=*******&lots=****&SL=****&TP=****
    'New SLTP Order
    http://159.253.137.70/webtrader/WebService.svc/NewManageSLTP?AccId=*****&OrderId=*****&Lots=****TP=*****&SL=****
    'New Market Order
    http://159.253.137.70/webtrader/WebService.svc/NewOrder?AccountId=****&Symbol=*******&BuySell=******&lots=******


    10) View Order
    Get Open Positions documentation


    Get Pending Orders documentation
    Code:
    ' to show open positions
    http://159.253.137.70/webtrader/WebService.svc/GetOpenPositions?AccountId=****
    ' to show pending orders
    http://159.253.137.70/webtrader/WebService.svc/GetPendingOrders?AccountId=***

    11) Close Order
    Method documentation
    Code:
    http://159.253.137.70/webtrader/WebService.svc/CloseOrder?AccountId=****&Lots=**&TicketId=*******


    History
    Method documentation

    Code:
    http://159.253.137.70/webtrader/WebService.svc/GetHistory?AccountId=****&FromDate=********&ToDate=**********


    Chart
    Method documentation

    Code:
    http://159.253.137.70/webtrader/WebService.svc/GetChartData?Symbol=****&PeriodID=********&AfterDate=**********



    Get Public News documentation

    Get Private News documentation

    Code:
    http://159.253.137.70/webtrader/WebService.svc/GetPublicNews?
    http://159.253.137.70/webtrader/WebService.svc/GetPrivateNews?


    As you see you can send your request as following

    WebServiceLink/MethodName?Pram1&Param2.......

  11. #11
    somilshah
    Guest

    Default

    Hello Hassan,


    Thank you for your reply and the valuable comments sent with the information. I will forward this above to my team and get back to you with the update.


    Many thanks,
    Somil Shah

  12. #12
    somilshah
    Guest

    Default

    Hi Hassan,

    I would like to know how can we check the results for the WCF API to know result of each action performed.


    Many Thanks,
    Somil Shah

  13. #13
    somilshah
    Guest

    Default WCF Method Further Clarification Required

    Hello Hassan,

    I have been provided with a few doubts and comments on the document we shared a few days back. I request you to please go through the document and provide us with a reply to clarify our doubts.

    Please check the attachment below to find the document.

    I will Look forward for an immediate reply from you.


    Many Thanks,
    Somil Shah
    Attached Files Attached Files

  14. #14
    Administrator Hassan-HS's Avatar
    Join Date
    Jun 2013
    Posts
    795

    Default

    Dear Somil,

    According to fourm terms, we can deal with one inquiry at a time, please add them one by one.


    Can you please tell me if you signed the ISV agreement with HS?

  15. #15
    Administrator Hassan-HS's Avatar
    Join Date
    Jun 2013
    Posts
    795

    Default

    Dear Somil,

    Please check this link

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •