mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-09 07:26:48 +00:00
Bugfix: Submit/Cancel order scripting errors + Ordermanager GetOrder & CancelOrder improvements (#584)
* Fixes Submit and Cancel order functions for scripting. Adds tests to ensure that wrapper functions actually execute as expected. Adds more coverage. Fixes a few other tests * Fixes issues * Simplifies tests * Update cancel order to properly cancel an order. Adds example script. Adds sweet tests. * Fixes bad test setup for cancelling orders * Adds new order manager GetOrderInfo function to call the wrapper function and then store it in the order manager * Addresses order concerns * LOWERS THE CASE OF ALL EXCHANGE NAMES BECAUSE ORDER MANAGER NEVER CARED ABOUT CASING OR YOUR FAMILY * Removes asset and currency requirement from cancelling orders via validation test * Fixes old cancel order assumptions that had requirements for currency and asset * Moves all the logs and events to the dedicated Cancel function instead of exclusively doing it in CancelAllOrders * Adds more detail logging. Fixes lbank fee test * Addresses comms manager issues * Removes go routine for pushing events. Better to let them fail
This commit is contained in:
@@ -811,7 +811,7 @@ func (s *RPCServer) GetOrder(_ context.Context, r *gctrpc.GetOrderRequest) (*gct
|
||||
Quote: currency.NewCode(r.Pair.Quote),
|
||||
}
|
||||
|
||||
result, err := exch.GetOrderInfo(r.OrderId, pair, "") // assetType will be implemented in the future
|
||||
result, err := s.OrderManager.GetOrderInfo(r.Exchange, r.OrderId, pair, "") // assetType will be implemented in the future
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error whilst trying to retrieve info for order %s: %s", r.OrderId, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user