bbgo_origin/pkg/datasource/glassnode/glassnodeapi/request.go

24 lines
709 B
Go
Raw Normal View History

2022-06-24 16:49:52 +00:00
package glassnodeapi
import (
"time"
"github.com/c9s/requestgen"
)
//go:generate requestgen -method GET -type Request -url "/v1/metrics/:category/:metric" -responseType DataSlice
type Request struct {
Client requestgen.AuthenticatedAPIClient
Asset string `param:"a,required,query"`
Since *time.Time `param:"s,query,seconds"`
Until *time.Time `param:"u,query,seconds"`
2022-06-24 17:29:29 +00:00
Interval *Interval `param:"i,query"`
Format *Format `param:"f,query" default:"JSON"`
Currency *string `param:"c,query"`
TimestampFormat *string `param:"timestamp_format,query"`
2022-06-24 16:49:52 +00:00
Category string `param:"category,slug"`
Metric string `param:"metric,slug"`
}