zoukankan      html  css  js  c++  java
  • 利用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

  • 相关阅读:
    第9.11节 Python中IO模块文件打开读写操作实例
    第9.10节 Python中IO模块其他文件操作属性和方法简介
    Python使用import导入模块时执行了模块的文件但报ModuleNotFoundError错误的愚蠢问题
    Python使用import导入模块时报ValueError: source code string cannot contain null bytes的解决方案
    第9.9节 Python文件随机读写定位操作方法seek
    第9.8节 Python使用writelines函数写入文件内容
    第9.7节 Python使用write函数写入文件内容
    Python中import模块时报SyntaxError: (unicode error)utf-8 codec can not decode 错误的解决办法
    The 2nd tip of DB Query Analyzer
    水仙花数优化问题:穷举法、查找表法、组合数学法
  • 原文地址:https://www.cnblogs.com/warensoft/p/6279322.html
Copyright © 2011-2022 走看看