gateio

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package gateio gate.io rest api package

Index

Constants

View Source
const (
	RestHost = "data.gate.io"
	ApiVer   = "api2/1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	URL        url.URL
	HTTPClient *http.Client
	AccessKey  string
	SecretKey  string
}

Client OkEx client

func New

func New(accessKey string, secretKey string) *Client

New creates a new OkEx Client

func (*Client) GetMarketInfo

func (c *Client) GetMarketInfo(ctx context.Context) ([]model.MarketInfo, error)

GetMarketInfo 交易市场订单参数, 返回所有系统支持的交易市场的参数信息,包括交易费,最小下单量,价格精度等。for http://data.gate.io/api2/1/marketinfo

func (*Client) GetPairs

func (c *Client) GetPairs(ctx context.Context) ([]string, error)

GetPairs 返回所有系统支持的交易对, for http://data.gate.io/api2/1/pairs

func (*Client) GetTicker

func (c *Client) GetTicker(ctx context.Context, quote string, base string) (*model.Ticker, error)

GetTicker 返回最新, 最高, 最低 交易行情和交易量, 每 10 秒钟更新, for http://data.gate.io/api2/1/ticker/[quote]_[base]

Jump to

Keyboard shortcuts

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