博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
利用Warensoft Stock Service编写高频交易软件--客户端驱动接口说明
阅读量:4603 次
发布时间:2019-06-09

本文共 1971 字,大约阅读时间需要 6 分钟。

Warensoft Stock Service Api客户端接口说明

Warensoft Stock Service Api Client Reference

      本项目客户端驱动源码已经发布到GitHub上,地址如下:

      https://github.com/warensoft/stockserviceclient

  1. 项目说明

Warensoft Stock Service为用户提供在线的金融算法服务,本客户端已经将通信协议进行了封装,以便于C#开发人员调用。

目前处于测试阶段,用户可以使用测试用AppKey和SecretKey,该密钥对将于2017年5月10日过期!

      2. 可使用环境(Available Environments)

本客户端被编译为.net standard 1.6。支持的运行环境如下:

This client was compiled to .net standard 1.6, and the follow runtime are supported:

运行时

版本

.net standard

1.6+

.net framework

4.6.1+

Portable

259

Xamarin

 

 

       3.安装(Setup)

本客户端需要通过Nuget方式进行安装,用户可以在Nuget中搜索“Warensoft”,并选择安装Warensoft.EntLib.StockServiceClient如果客户端需要使用MVVM模式,则可以选择安装Warensoft.EntLib.Common,如下图所示:

This client needs to be installed through Nuget. Users could find this component by typing “Warensoft”, and then install “Warensoft.EntLib.StockServiceClient”. If your client needs MVVM pattern support, you could also install “Warensoft.EntLib.Common”:

 

 

        4.接口支持的功能(2017.1.12版本)(Methods supported by this Client)

其类图如下所示:

The class diagram is shown as bellow:

 

 

功能清单如下:

The Methods are listed as bellow:

接口名

说明

GetATR

根据K线获取平均真实波幅曲线

Get ATR indicator

GetEMA

根据K线获取指数平均数指标

Get EMA indicator

GetKline

根据Ticker值获取其K线

Get K line by ticker

GetMACD

据K线获取指数平滑移动平均线

Get MACD indicator

GetRSI

据K线获取相对强弱指标

Get RSI indicator

GetSAR

据K线获取抛物线指标

Get SAR indicator

GetSMA

据K线获取简单平均数指标

Get SMA indicator

GetWR

据K线获取Williams %R指标

Get Williams %R indicator

 

       5.Api调用方法(Invoking API)

  • 初始化客户端驱动,此处使用的是测试用AppKey和SecretKey.(Initializing the client driver. Notice: the AppKey and SecretKey are test values, so DO NOT use them in Production Environment)

        

var driver = new StockServiceDriver("C6651783-A3B9-4B72-8B02-A2E67A59C5A6", "6C442B3AF58D4DDA81BB03B353C0D7D8");

 

  •  获取目标K线(Obtain the target k lines)
List
kline = LoadKline();

 

  • 调用所需接口(Invoke the interface you need)
var atr=driver.GetATR(kline,10);var ema=drvier.GetEMA(kline,10);…

 

作者:科学家

                                                    Email:warensoft@163.com

                                                    微信:43175692

转载于:https://www.cnblogs.com/warensoft/p/6279322.html

你可能感兴趣的文章
转Python学习(三)
查看>>
微信支付遇到的坑们
查看>>
wpf *和auto的区别
查看>>
[转]如何成为优秀的程序员
查看>>
unity3d 幻灯片效果实现
查看>>
AFNetworking 进行网络监测
查看>>
iOS获取状态栏和导航栏尺寸(宽度和高度)
查看>>
极光推送
查看>>
openTK学习
查看>>
根据角色获取用户组
查看>>
HTML5之pushstate、popstate操作history,无刷新改变当前url
查看>>
2048游戏:(一)运行效果
查看>>
[转载] 数据库的垂直切分和水平切分
查看>>
ReentrantLock可重入锁的使用场景
查看>>
LOJ#6277. 数列分块入门 1
查看>>
frame外弹出,刷新父页面
查看>>
爬虫一
查看>>
Linux 网络工具详解之 ip tuntap 和 tunctl 创建 tap/tun 设备
查看>>
JavaScript之Array/数组小结
查看>>
证券概念
查看>>