bbgo/pkg/exchange/binance/binanceapi/futures_get_open_interest.go

25 lines
766 B
Go
Raw Normal View History

package binanceapi
import (
"git.qtrade.icu/lychiyu/bbgo/pkg/fixedpoint"
"git.qtrade.icu/lychiyu/bbgo/pkg/types"
"github.com/c9s/requestgen"
)
type FuturesOpenInterest struct {
OpenInterest fixedpoint.Value `json:"openInterest"`
Symbol string `json:"symbol"`
Time types.MillisecondTimestamp `json:"time"`
}
//go:generate requestgen -method GET -url "/fapi/v1/openInterest" -type FuturesGetOpenInterestRequest -responseType FuturesOpenInterest
type FuturesGetOpenInterestRequest struct {
client requestgen.AuthenticatedAPIClient
symbol string `param:"symbol"`
}
func (c *FuturesRestClient) NewFuturesGetOpenInterestRequest() *FuturesGetOpenInterestRequest {
return &FuturesGetOpenInterestRequest{client: c}
}