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

26 lines
635 B
Go

package binanceapi
import (
"github.com/c9s/requestgen"
"git.qtrade.icu/lychiyu/qbtrade/pkg/fixedpoint"
)
type Depth struct {
LastUpdateId int64 `json:"lastUpdateId"`
Bids [][]fixedpoint.Value `json:"bids"`
Asks [][]fixedpoint.Value `json:"asks"`
}
//go:generate requestgen -method GET -url "/api/v3/depth" -type GetDepthRequest -responseType .Depth
type GetDepthRequest struct {
client requestgen.APIClient
symbol string `param:"symbol"`
limit int `param:"limit" defaultValue:"1000"`
}
func (c *RestClient) NewGetDepthRequest() *GetDepthRequest {
return &GetDepthRequest{client: c}
}