qbtrade/pkg/exchange/binance/binanceapi/futures_get_open_interest.go
2024-06-27 22:42:38 +08:00

25 lines
772 B
Go

package binanceapi
import (
"git.qtrade.icu/lychiyu/qbtrade/pkg/fixedpoint"
"git.qtrade.icu/lychiyu/qbtrade/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}
}