mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
26 lines
624 B
Go
26 lines
624 B
Go
package binanceapi
|
|
|
|
import (
|
|
"github.com/c9s/requestgen"
|
|
|
|
"github.com/c9s/bbgo/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}
|
|
}
|