plat

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2022 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

Types

type BasePlat

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

	Pull(symbol conset.SYMBOL, times conset.TIMES, start time.Time) []db.Coin                    // 同步Kline
	Price(symbol conset.SYMBOL) float32                                                          // 当前价格
	Orders(symbol conset.SYMBOL, 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