Documentation ¶
Index ¶
- Constants
- func ComputeHmac256(strMessage string, strSecret string) string
- func Map2UrlQuery(mapParams map[string]string) string
- func Map2UrlQueryBySort(mapParams map[string]string) string
- func MapSortByKey(mapValue map[string]string) map[string]string
- func MapValueEncodeURI(mapValue map[string]string) map[string]string
- func SendRequest(sign *Sign, method, scheme, host, path string, data ParamData) (*simplejson.Json, error)
- type Client
- type ParamData
- type Sign
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 ComputeHmac256 ¶ added in v1.0.7
ComputeHmac256 HMAC SHA256加密 strMessage: 需要加密的信息 strSecret: 密钥 return: BASE64编码的密文
func Map2UrlQuery ¶ added in v1.0.7
Map2UrlQuery 将map格式的请求参数转换为字符串格式的 mapParams: map格式的参数键值对 return: 查询字符串
func Map2UrlQueryBySort ¶ added in v1.0.7
Map2UrlQueryBySort 将map格式的请求参数转换为字符串格式的,并按照Map的key升序排列 mapParams: map格式的参数键值对 return: 查询字符串
func MapSortByKey ¶ added in v1.0.7
MapSortByKey 对Map按着ASCII码进行排序 mapValue: 需要进行排序的map return: 排序后的map
func MapValueEncodeURI ¶ added in v1.0.7
MapValueEncodeURI 对Map的值进行URI编码 mapParams: 需要进行URI编码的map return: 编码后的map
Types ¶
type Client ¶
type Client struct { Sign *Sign // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.