client

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const Endpoint = "https://api.huobi.pro"

/ 全局API

View Source
const MarketEndpoint = "https://api.huobi.pro/market"

/ 行情API

View Source
const TradeEndpoint = "https://api.huobi.pro/v1"

/ 交易API

Variables

This section is empty.

Functions

func SendRequest

func SendRequest(sign *Sign, method, scheme, host, path string, data ParamData) (*simplejson.Json, error)

/ 发送原始请求

Types

type Client

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

func NewClient

func NewClient(endpoint, accessKeyId, accessKeySecret string) (*Client, error)

/ 创建新客户端

func (*Client) Request

func (c *Client) Request(method, path string, data ParamData) (*simplejson.Json, error)

/ 发送请求

type ParamData

type ParamData = map[string]string

/ 请求参数

type Sign

type Sign struct {
	AccessKeyId      string
	AccessKeySecret  string
	SignatureMethod  string
	SignatureVersion string
}

func NewSign

func NewSign(accessKeyId, accessKeySecret string) *Sign

func (*Sign) Get

func (s *Sign) Get(method, host, path, timestamp string, params map[string]string) (string, error)

Jump to

Keyboard shortcuts

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