mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
Merge pull request #1606 from lanphan/get-order
FIX: issue #1037, get-order command error
This commit is contained in:
commit
bbc4fc96a7
|
@ -46,6 +46,11 @@ var getOrderCmd = &cobra.Command{
|
|||
}
|
||||
|
||||
orderID, err := cmd.Flags().GetString("order-id")
|
||||
if err != nil {
|
||||
return fmt.Errorf("can't get the order-id from flags: %w", err)
|
||||
}
|
||||
|
||||
symbol, err := cmd.Flags().GetString("symbol")
|
||||
if err != nil {
|
||||
return fmt.Errorf("can't get the symbol from flags: %w", err)
|
||||
}
|
||||
|
@ -57,6 +62,7 @@ var getOrderCmd = &cobra.Command{
|
|||
|
||||
order, err := service.QueryOrder(ctx, types.OrderQuery{
|
||||
OrderID: orderID,
|
||||
Symbol: symbol,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -101,9 +107,6 @@ var listOrdersCmd = &cobra.Command{
|
|||
if err != nil {
|
||||
return fmt.Errorf("can't get the symbol from flags: %w", err)
|
||||
}
|
||||
if symbol == "" {
|
||||
return fmt.Errorf("symbol is not found")
|
||||
}
|
||||
|
||||
status := "open"
|
||||
if len(args) != 0 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user