mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-13 02:23:51 +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
|
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 {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,6 @@ func (s *OrderService) NewGetOrderTradesRequest() *GetOrderTradesRequest {
|
||||||
type GetOrderTradesRequest struct {
|
type GetOrderTradesRequest struct {
|
||||||
client requestgen.AuthenticatedAPIClient
|
client requestgen.AuthenticatedAPIClient
|
||||||
|
|
||||||
id *uint64 `param:"order_id,omitempty"`
|
orderID *uint64 `param:"order_id,omitempty"`
|
||||||
clientOrderID *string `param:"client_oid,omitempty"`
|
clientOrderID *string `param:"client_oid,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,8 +12,8 @@ import (
|
||||||
"regexp"
|
"regexp"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (g *GetOrderTradesRequest) Id(id uint64) *GetOrderTradesRequest {
|
func (g *GetOrderTradesRequest) OrderID(orderID uint64) *GetOrderTradesRequest {
|
||||||
g.id = &id
|
g.orderID = &orderID
|
||||||
return g
|
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
|
// GetParameters builds and checks the parameters and return the result in a map object
|
||||||
func (g *GetOrderTradesRequest) GetParameters() (map[string]interface{}, error) {
|
func (g *GetOrderTradesRequest) GetParameters() (map[string]interface{}, error) {
|
||||||
var params = map[string]interface{}{}
|
var params = map[string]interface{}{}
|
||||||
// check id field -> json key order_id
|
// check orderID field -> json key order_id
|
||||||
if g.id != nil {
|
if g.orderID != nil {
|
||||||
id := *g.id
|
orderID := *g.orderID
|
||||||
|
|
||||||
// assign parameter of id
|
// assign parameter of orderID
|
||||||
params["order_id"] = id
|
params["order_id"] = orderID
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
// check clientOrderID field -> json key client_oid
|
// check clientOrderID field -> json key client_oid
|
||||||
|
|
Loading…
Reference in New Issue
Block a user