• 利用Warensoft Stock Service编写高频交易软件--客户端驱动接口说明


    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> kline = LoadKline();
    • 调用所需接口(Invoke the interface you need)
    var atr=driver.GetATR(kline,10);
    var ema=drvier.GetEMA(kline,10);
    …

    作者:科学家

                                                        Email:warensoft@163.com

                                                        微信:43175692

  • 相关阅读:
    关于JQuery的autocomplete1.11.4版本插件的使用心得
    BUG:ie678 使用jQuery设置页面标题
    BUG:ie8不支持indexOf()
    【转】使用@import和link导入样式
    【转】css3 media媒体查询器用法总结
    【转】css hack
    【转】移动平台WEB前端开发技巧汇总
    json格式与javascript对象字面量和数组对象的区别
    窗口和元素的大小:offset client scroll
    sharepoint2013 新建母板页 新建页面布局 关联母板页和页面布局
  • 原文地址:https://www.cnblogs.com/warensoft/p/6279322.html
Copyright © 2020-2023  润新知