spot

package
Version: v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 26, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiParameter

type ApiParameter struct {
	Debug              bool
	AccessKey          string
	SecretKey          string
	EnablePrivateSign  bool
	BaseURL            string
	PrivateKeyPrime256 string
	HttpClient         *http.Client
	ProxyURL           string
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(params *ApiParameter) *Client

func (*Client) GetMarketDepth

func (c *Client) GetMarketDepth(symbol string, depth int, _type string) (result MarketDepthResult, err error)

GetMarketDepth 市场深度数据 depth: 5,10,20 _type: 深度的价格聚合度,具体说明见下方 step0,step1,step2,step3,step4,step5

type MarketDepthResult

type MarketDepthResult struct {
	Ch     string `json:"ch"`     // market.btcusdt.depth.step0
	Status string `json:"status"` // ok
	Ts     int64  `json:"ts"`     // 1590479896449
	Tick   Tick   `json:"tick"`
}

type Tick

type Tick struct {
	Bids [][]float64 `json:"bids"` // [8956.46,0.225618]
	Asks [][]float64 `json:"asks"`
}

Jump to

Keyboard shortcuts

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