mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
exchange/max: fix order trades query field name
This commit is contained in:
parent
b4dcdc4031
commit
99121d19c0
|
@ -178,7 +178,7 @@ func (e *Exchange) QueryOrderTrades(ctx context.Context, q types.OrderQuery) ([]
|
|||
return nil, err
|
||||
}
|
||||
|
||||
maxTrades, err := e.v3order.NewGetOrderTradesRequest().Id(uint64(orderID)).Do(ctx)
|
||||
maxTrades, err := e.v3order.NewGetOrderTradesRequest().OrderID(uint64(orderID)).Do(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
@ -14,6 +14,6 @@ func (s *OrderService) NewGetOrderTradesRequest() *GetOrderTradesRequest {
|
|||
type GetOrderTradesRequest struct {
|
||||
client requestgen.AuthenticatedAPIClient
|
||||
|
||||
id *uint64 `param:"order_id,omitempty"`
|
||||
orderID *uint64 `param:"order_id,omitempty"`
|
||||
clientOrderID *string `param:"client_oid,omitempty"`
|
||||
}
|
||||
|
|
|
@ -12,8 +12,8 @@ import (
|
|||
"regexp"
|
||||
)
|
||||
|
||||
func (g *GetOrderTradesRequest) Id(id uint64) *GetOrderTradesRequest {
|
||||
g.id = &id
|
||||
func (g *GetOrderTradesRequest) OrderID(orderID uint64) *GetOrderTradesRequest {
|
||||
g.orderID = &orderID
|
||||
return g
|
||||
}
|
||||
|
||||
|
@ -37,12 +37,12 @@ func (g *GetOrderTradesRequest) GetQueryParameters() (url.Values, error) {
|
|||
// GetParameters builds and checks the parameters and return the result in a map object
|
||||
func (g *GetOrderTradesRequest) GetParameters() (map[string]interface{}, error) {
|
||||
var params = map[string]interface{}{}
|
||||
// check id field -> json key order_id
|
||||
if g.id != nil {
|
||||
id := *g.id
|
||||
// check orderID field -> json key order_id
|
||||
if g.orderID != nil {
|
||||
orderID := *g.orderID
|
||||
|
||||
// assign parameter of id
|
||||
params["order_id"] = id
|
||||
// assign parameter of orderID
|
||||
params["order_id"] = orderID
|
||||
} else {
|
||||
}
|
||||
// check clientOrderID field -> json key client_oid
|
||||
|
|
Loading…
Reference in New Issue
Block a user