plat

package
v0.0.0-...-41c3c42 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(url string, headers map[string]string, inter interface{}) error

GET

func Post

func Post(url string, headers map[string]string, params interface{}, inter interface{}) error

POST

func PostForm

func PostForm(url string, headers map[string]string, params map[string]string, inter interface{}) error

POST 表单

Types

type BasePlat

type BasePlat interface {
	Inits(...string) // 初始化 apikey...

	Pull(symbol conset.SYMBOL, period conset.PERIOD, times conset.TIMES, start time.Time) []db.Coin                       // 同步Kline
	Price(symbol conset.SYMBOL, period conset.PERIOD) float32                                                             // 当前价格
	DealOrder(symbol conset.SYMBOL, period conset.PERIOD, operation conset.OPERATION, price float32, amount float32) bool // 交易
}

平台通用方法 api上的抽象层

type Response

type Response struct {
	Code string      `json:"code"`
	Msg  string      `json:"msg"`
	Data interface{} `json:"data"`
}

Jump to

Keyboard shortcuts

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