Get chagnes to GetCandles

This commit is contained in:
zhangkun9038@dingtalk.com 2025-03-05 22:03:38 +08:00
parent 95fc2695be
commit bd0154310b

View File

@ -50,6 +50,12 @@ type Okexv5APIResponse struct {
Data interface{} `json:"data"`
}
type CandleData struct {
Code string `json:"code"`
Msg string `json:"msg"`
Data [][]interface{} `json:"data"` // 用二维数组来接收 candles 数据
}
/*
endPoint:请求地址
apiKey
@ -118,8 +124,8 @@ func (this *RESTAPI) SetTimeOut(timeout time.Duration) *RESTAPI {
return this
}
// GET请求
func (this *RESTAPI) Get(ctx context.Context, uri string, param *map[string]interface{}) (res *RESTAPIResult, err error) {
// GetCandles 获取蜡烛图数据
func (this *RESTAPI) GetCandles(ctx context.Context, uri string, param *map[string]interface{}) (res *RESTAPIResult, err error) {
this.Method = GET
this.Uri = uri