Get chagnes to GetCandles
This commit is contained in:
parent
95fc2695be
commit
bd0154310b
10
rest/rest.go
10
rest/rest.go
@ -50,6 +50,12 @@ type Okexv5APIResponse struct {
|
|||||||
Data interface{} `json:"data"`
|
Data interface{} `json:"data"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type CandleData struct {
|
||||||
|
Code string `json:"code"`
|
||||||
|
Msg string `json:"msg"`
|
||||||
|
Data [][]interface{} `json:"data"` // 用二维数组来接收 candles 数据
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
endPoint:请求地址
|
endPoint:请求地址
|
||||||
apiKey
|
apiKey
|
||||||
@ -118,8 +124,8 @@ func (this *RESTAPI) SetTimeOut(timeout time.Duration) *RESTAPI {
|
|||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET请求
|
// GetCandles 获取蜡烛图数据
|
||||||
func (this *RESTAPI) Get(ctx context.Context, uri string, param *map[string]interface{}) (res *RESTAPIResult, err error) {
|
func (this *RESTAPI) GetCandles(ctx context.Context, uri string, param *map[string]interface{}) (res *RESTAPIResult, err error) {
|
||||||
this.Method = GET
|
this.Method = GET
|
||||||
this.Uri = uri
|
this.Uri = uri
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user