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

23 lines
648 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"`
Interval Interval `param:"i,query"`
Format Format `param:"f,query"`
TimestampFormat string `param:"timestamp_format,query"`
Category string `param:"category,slug"`
Metric string `param:"metric,slug"`
}