Skip to content

Commit

Permalink
fix(coinbase): CI build error
Browse files Browse the repository at this point in the history
  • Loading branch information
dboyliao committed Feb 25, 2025
1 parent bd8c472 commit 4bb823d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/exchange/coinbase/api/v1/create_order_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ type CreateOrderRequest struct {
stop *string `param:"stop" validValues:"loss,entry"`
stopPrice *fixedpoint.Value `param:"stop_price"`
price *fixedpoint.Value `param:"price"`
size fixedpoint.Value `param:"size,required"`
size string `param:"size,required"` // don't use fixedpoint.Value because it's required and it will lead to an error in requestgen.
funds *fixedpoint.Value `param:"funds"`
timeInForce *string `param:"time_in_force" validValues:"GTC,GCC,IOC,FOK"`
cancelAfter *string `param:"cancel_after" validValues:"min,hour,day"`
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/exchange/coinbase/exchage.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func (e *Exchange) SubmitOrder(ctx context.Context, order types.SubmitOrder) (cr
}
qty = qty.Mul(ticker.Buy)
}
req.Size(qty)
req.Size(qty.String())
// set price
if order.Type == types.OrderTypeLimit {
req.Price(order.Price)
Expand Down

0 comments on commit 4bb823d

Please sign in to comment.