end
function
function getstockimg(code)
dim
rndnum,addnum,checkcode,imgsource
if len(code)=5
then
getstockimg=""code".gif"
end
if
imgsource=""
case
3
getstockimg="?"code"1003SZ
500 330"
imgsource=""
case
4
getstockimg=""code""
imgsource=""
end
select
getstockimg=split(""getstockimg"||"imgsource"","||")
end
function
function getastockimg()
dim
rndnum,addnum,checkcode
dim
getastockimgb,imgsource
addnum=6
randomize:rndnum=cint(rnd*addnum)
select
case rndnum
case
getastockimg=""
getastockimgb=""
imgsource=""
case
1
getastockimg=""
getastockimgb=""
imgsource=""
case
2
getastockimg=";w=180h=140"
getastockimgb=";w=180h=140"
imgsource=""
case
3
getastockimg=";1002SZ
180
140"
getastockimgb=";1002SZ
180
140"
imgsource=""
case
4
getastockimg=""
getastockimgb=""
imgsource=""
case
5
getastockimg=""
getastockimgb=""
imgsource=""
case
6
getastockimg=""
getastockimgb=""
imgsource=""
end
select
getastockimg=split(""getastockimg"||"getastockimgb"||"imgsource"","||")
end
function
%
2.
web-service接口
2.1 CHINAstock的web-service:
中国股票行情数据
WEB 服务(支持深圳和上海股市的全部基金、债券和股票),数据即时更新 。输出GIF分时走势图、日/周/月 K
线图、及时行情数据(股票名称、行情时间、最新价、昨收盘、今开盘、涨跌额、最低、最高、涨跌幅、成交量、成交额、竞买价、竞卖价、委比、买一 - 买五、卖一 -
卖五) 。此WEB服务提供了如下几个接口:
2.1.1
getStockImageByCode
GET
股票GIF分时走势图
INput:theStockCode =
股票代号,如:sh000001
POST /WebServices/ChinaStockWebService.asmx
HTTP/1.1
Host:
Content-Type:
text/xml; charset=utf-8
Content-Length:
length
SOAPAction:
""
string
Output:
2.1.2
getStockImageByteByCode
获得中国股票GIF分时走势图字节数组
INput:theStockCode
= 股票代号,如:sh000001
POST /WebServices/ChinaStockWebService.asmx
HTTP/1.1Host: : text/xml;
charset=utf-8Content-Length: lengthSOAPAction:
""
string
返回的数据如下:
R0lGODlhIQIsAfcAAAAAAAwLBxkGBQ4ODhAQEBsSChUVFS4TDB8eGQkA9koPCDAAzy4mFVgAp2UYC0IqEUYuBVwiDEAsI1QnFX8AgDU1NUozFlgxD6cBWVY5FnIwEmQ4Gc0AMlhDHPEADlVJMEpKSm1IHOUBWpY3FZMyVY9IGXRWIEFmWGNYUmpdPXJgHQB8HK9EGGBgX4lXIACoAHhkMyt4m4VkJtstbv8A
2.1.3
getStockImage_kByCode
直接获得中国股票GIF日/周/月 K
线图(545*300pixel/72dpi)
INPUT: theStockCode =
股票代号
theType = K 线图类型(D:日[默认]、W:周、M:月),
POST
/WebServices/ChinaStockWebService.asmx HTTP/1.1Host:
: text/xml; charset=utf-8Content-Length:
lengthSOAPAction: "" string
string
比如按照下图所示输入:
返回的结果就是周K线图:
2.1.4
getStockImage_kByteByCode
获得中国股票GIF日/周/月 K
线图字节数组
Input:theStockCode = 股票代号 , 如:sh000001
POST
/WebServices/ChinaStockWebService.asmx HTTP/1.1Host:
: text/xml; charset=utf-8Content-Length:
lengthSOAPAction: "" string string
HTTP/1.1 200 OKContent-Type: text/xml; charset=utf-8Content-Length: length
base64Binary
比如按照下图输入:
返回的结果就是周K线图字节数组
R0lGODlhIQIsAfcAAAAAAAwLBxkGBQ4ODhAQEBsSChUVFS4TDB8eGQkA9koPCDAAzy4mFVgAp2UYC0IqEUYuBVwiDEAsI1QnFX8AgDU1NUozFlgxD6cBWVY5FnIwEmQ4Gc0AMlhDHPEADlVJMEpKSm1IHOUBWpY3FZMyVY9IGXRWIEFmWGNYUmpdPXJgHQB8HK9EGGBgX4lXIACoAHhkMyt4m4VkJtstbv8A
推荐阅读
- 4千能买什么平板电脑,4000买什么平板
- flutter源码地址,flutter 开源项目
- excel符号怎么打,excel中符号$怎么打
- python爬虫解决验证码的思路,python爬取验证码图片
- 怎么写python主函数 python主函数写法
- cpu雷是什么意思,cpu小雷是什么意思
- 包含棋牌游戏175的词条
- 瑜大公子直播为什么停播,瑜大公子为啥停播了
- 触发js事件弹出新页面,js怎么触发click事件