hedgingplugin

package module
v0.0.0-...-477f4f0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2019 License: MIT Imports: 1 Imported by: 0

README

hedgingplugin

介绍

对冲交易插件

软件架构

软件架构说明

安装教程
  1. xxxx
  2. xxxx
  3. xxxx
使用说明
  1. xxxx
  2. xxxx
  3. xxxx
参与贡献
  1. Fork 本仓库
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request
码云特技
  1. 使用 Readme_XXX.md 来支持不同的语言,例如 Readme_en.md, Readme_zh.md
  2. 码云官方博客 blog.gitee.com
  3. 你可以 https://gitee.com/explore 这个地址来了解码云上的优秀开源项目
  4. GVP 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
  5. 码云官方提供的使用手册 https://gitee.com/help
  6. 码云封面人物是一档用来展示码云会员风采的栏目 https://gitee.com/gitee-stars/

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIKey

type APIKey struct {
	AccKey    string // 账号
	SecureKey string // 秘钥
}

账号密码

type Exchange

type Exchange interface {
	GetName() string // 获取交易所名
}

交易所

type Market

type Market struct {
	BuyPrice   big.Float // 买方价格
	BuyAmount  big.Float // 买方数量
	SellPrice  big.Float // 卖方价格
	SellAmount big.Float // 卖方数量
	OpenTx     bool      // 是否开启交易
}

行情

type Plugin

type Plugin interface {
	Start() error // 启动插件
	Stop() error  // 停止插件
}

插件

type Symbol

type Symbol interface {
	GetConfig() []SymbolConfig                                   // 获取交易对配置
	Subscribe(symbolConfig SymbolConfig) (chan<- *Market, error) // 订阅交易对行情
	ChangeTx(symbolConfig SymbolConfig, openCloseFlag bool)      // 开启关闭交易
}

交易对

type SymbolConfig

type SymbolConfig struct {
	CoinName    string // 交易币
	PayCoinName string // 计价币
}

交易对

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL