A new OData version of this WCF Service can be found at http://odata.spws.me.uk or you can try the new MVC4 API version or our new Web Api v2 Demo or the Angular MVC5 demo that consumes this WCF Service

NOTE: The data used by this service is outdated and incomplete due to the withdrawal of the CSV download files from Yahoo Finance.

Share Price WCF Service allows users the ability to retrieve share prices using the old SOAP RPC method (via BasicHttpBinding), or the REST method (via WebHtpBinding). Share Price data web service, is an xml(soap)/wcf(supports SOAP,REST( supports .NET/NON .NET e.g. iPhone),RSS,JSON and ATOM) web service that provides prices for these market indexes - FTSE100, AIM, EuroStoxx50, IBEX35, CAC40, AEX, DAX, MIBTEL, Dow Jones, Techmark 100, Hang Seng, Strait Times, OMXC20, IPC, IBOVESPA, and ALL ORDINARIES . Most Web Service Clients allow the export of data to xml format.For currency cross rates for free goto webservicex.net

Consuming/Using the WCF Service:

  • Consuming the WCF Service via SOAP RPC method (via BasicHttpBinding)

    1. You can now use Task-based ops with this service when consumed using a .NET 4.5 winforms application. Therefore you can write something like: private async void loaddata() { ServiceReference1.Service1Client clnt = new ServiceReference1.Service1Client(); DataSet ds; ds = await clnt.GetAllCompaniesAsync(1); dataGridView1.DataSource = ds.Tables[0]; dataGridView1.AutoGenerateColumns = true; }

      Please note you cannot implement this way on windows phone 8, currently, on that platform you have to use event based pattern.

    2. Make sure that the client config file only contains the 1 BasicHttpBinding, remove all WebHttpBinding references.

    3. You will need to increase the amounts for both maxBufferSize and maxReceivedMessageSize in the <basicHttpBinding> part of the <bindings> section in the applications config file, if using the method GetAllData4Desktop() or GetAllData4DesktopXml(), due to the amount of data being returned.

    4. Screenshots on howto consume our WCF service in c#/vb.net can be found (plus links on how to consume RESTful wcf/SOAP RPC in java/php) here.

  • Consuming the WCF Service via REST method (via WebHttpBinding)

    1. To consume a WCF REST method in a webforms/winforms client application, you can in .NET use either Httpwebrequest/Httpwebresponse, or the newer HttpClient (comes included as part of the WCF REST Starter Kit Preview 2 - see Microsoft.Http.dll in the assemblies folder after installation). Code screenshot of consuming WCF REST in .NET 4 (c#) winforms application using HttpClient

    2. Automatic help documentation for Restful Service

    3. List of REST/SOAP methods in the WCF Service

Skip Navigation Links
SOAP Method (using BasicHttpBinding) Description Parameter Options Returns REST URL (using WebHttpBinding) REST Example Consumption Example
GetAllData4DeskTop() Method to Obtain all data for use by .NET desktop clients. N/A Dataset containing 2 tables, 0 being Indices, and 1 being AllCompPrices. REST URL is - http://wcf.spws.me.uk/Service1.svc/REST/NETSPWCF/AllData Example URL is - http://wcf.spws.me.uk/Service1.svc/REST/NETSPWCF/AllData Example of consuming XML in html via xmlhttp object http://wcf.spws.me.uk/GetAllData4Desktop.html
GetAllIndices() Method to Obtain all Indices. N/A Dataset REST URL is - http://wcf.spws.me.uk/Service1.svc/REST/NETSPWCF/Indices Example URL is - http://wcf.spws.me.uk/Service1.svc/REST/NETSPWCF/Indices Example of consuming XML in html via xmlhttp object http://wcf.spws.me.uk/GetAllIndices.html
GetCompanySymbolContains(string CompanyName) GetCompanySymbolContains returns a companies symbol based upon its name containing the string passed. Company Name containing the string passed. Dataset REST URL is - http://wcf.spws.me.uk/Service1.svc/REST/NETSPWCF/SymbolContains={CompanyName} REST Example is - http://wcf.spws.me.uk/Service1.svc/REST/NETSPWCF/SymbolContains=Santander Example of consuming XML in html via xmlhttp object http://wcf.spws.me.uk/GetCompanySymbolContains.html
GetCompanySymbolStart(string CompanyName) GetCompanySymbolStart returns a companies symbol based upon the beginning part of its name. Company Name starting with the string passed. Dataset REST URL is - http://wcf.spws.me.uk/Service1.svc/REST/NETSPWCF/SymbolStart={CompanyName} REST Example is - http://wcf.spws.me.uk/Service1.svc/REST/NETSPWCF/SymbolStart=Banco Example of consuming XML in html via xmlhttp object http://wcf.spws.me.uk/GetCompanySymbolStart.html
GetCompanySymbol(string CompanyName) Method to Obtain a Companies Symbol via its full name (as a string). Full Company Name passed as a string. Dataset REST URL is - http://wcf.spws.me.uk/Service1.svc/REST/NETSPWCF/format=xml/Symbol={CompanyName} REST Example is -http://wcf.spws.me.uk/Service1.svc/REST/NETSPWCF/Symbol=BP Example of consuming XML in html via xmlhttp object http://wcf.spws.me.uk/GetCompanySymbol.html
GetSharePrice(string CompanySymbol) Method to Obtain a Companies Share Price via its Symbol (as a string). Full Company Symbol passed as a string. Dataset REST URL is - http://wcf.spws.me.uk/Service1.svc/REST/NETSPWCF/Price={CompanySymbol} REST Example is - http://wcf.spws.me.uk/Service1.svc/REST/NETSPWCF/Price=III.L Example of consuming XML in html via xmlhttp object http://wcf.spws.me.uk/GetSharePrice.html
GetAllCompPrices(int indexid) Method to Obtain all companies name and share price by index (as integer). Indexid (see Ref Table II below). Dataset REST URL - http://wcf.spws.me.uk/Service1.svc/REST/NETSPWCF/Prices?indexid={indexid} REST Example - http://wcf.spws.me.uk/Service1.svc/REST/NETSPWCF/Prices?indexid=1 Example of consuming XML in html via xmlhttp object http://wcf.spws.me.uk/GetAllCompPrices.html
GetAllCompanies(int indexid) Method to Obtain all Company Symbols by index (as integer). Indexid (see Ref Table II below) Dataset REST URL - http://wcf.spws.me.uk/Service1.svc/REST/NETSPWCF/Companies?indexid={indexid} REST Example - http://wcf.spws.me.uk/Service1.svc/REST/NETSPWCF/Companies?indexid=1 Example of consuming XML in html via xmlhttp object http://wcf.spws.me.uk/GetAllCompanies.html
    1. Method 1 - Consuming the service via a .NET Client (Webforms/Winforms)
      1. see the 'Client' part of the article on - this page.
    2. Method 2 - Testing Service Methods by web browser
      1. entering the url methods directly into the address area of a web browser such as firefox/internet explorer/safari/chrome/opera.

This site is best viewed at 1024*768 screen resolution.

Copyright © 2017 WebSpecIT.All rights reserved.
Last modified 09 December 2012 16:28:37

powered by asp.net