Gold Data Query

Source: Internet
Author: User

Demo of gold Data Query

 

Using system;

Using system. text;

Using system. net;

Namespace gold

{

Class Program

{

Static void main (string [] ARGs)

{

String key = "******************"; // applied key value

String url = "http://apis.haoservice.com/lifeservice/gold/shgold? Key = "+ key;

WebClient WC = new WebClient ();

WC. Encoding = encoding. utf8;

String STR = WC. downloadstring (URL );

Console. writeline (STR );

Console. readkey ();

}

}

}

 

URL: http://apis.haoservice.com/lifeservice/gold/shgold

Supported format: JSON

HTTP Request Method: Get post

Demo: http://apis.haoservice.com/lifeservice/gold/shgold? Key = The appkey you applied

Return example:

{

"Error_code": "0 ",

"Reason": "success! ",

"Result ":[

{

"1 ":{

"Variety": "AG (t + D)",/* variety */

"Latestpri": "6585.00",/* latest price */

"Openpri": "6712.00",/* start */

"Maxpri": "6721.00",/* maximum price */

"Minpri": "6581.00",/* minimum price */

"Limit": "-1.98%",/* increase/decrease */

"Yespri": "6718.00",/* Renewal */

"Totalvol": "1564524.0000",/* Total transaction volume */

"Time": "15:29:59"/* Update time */

},

......

"7 ":{

"Variety": "au99.99 ",

"Latestpri": "336.77 ",

"Openpri": "342.00 ",

"Maxpri": "342.00 ",

"Minpri": "336.40 ",

"Limit": "-1.53% ",

"Yespri": "342.00 ",

"Totalvol": "6936.2000 ",

"Time": "15:29:53"

}

......

}

]

}

Note:

For gold data query, you only need to apply for the key value;

If an error occurs, view the code table on this web page (http://www.haoservice.com/docs/22.

Gold Data Query

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.