mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-04 23:16:54 +00:00
order: slight optimizations (#917)
* order: slight optimizations * orders: add benchmarks, small optimize and change order side to uin8 for comparitive optimizations. * orders: continue to convert string type -> uint * orders/backtester: interim move type to orders package, later can expand or deprecate. * orders: handle errors * orders: optimize filters and remove error returns when its clearly not needed * orders: remove log call * backtester: zero value check * orders/futures: zero value -> flag * linter: fix * linter: more fixes * linters: rides again * glorious: nits * common: Add zero value unix check for time values; also addresses glorious nits * glorious scott: nits Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
This commit is contained in:
@@ -124,10 +124,10 @@ func (w Wrapper) QueryOrder(ctx context.Context, exch, _ string, _ currency.Pair
|
||||
AccountID: "hello",
|
||||
ID: "1",
|
||||
Pair: pair,
|
||||
Side: "ask",
|
||||
Type: "limit",
|
||||
Side: order.Ask,
|
||||
Type: order.Limit,
|
||||
Date: time.Now(),
|
||||
Status: "cancelled",
|
||||
Status: order.Cancelled,
|
||||
Price: 1,
|
||||
Amount: 2,
|
||||
ExecutedAmount: 1,
|
||||
@@ -139,8 +139,8 @@ func (w Wrapper) QueryOrder(ctx context.Context, exch, _ string, _ currency.Pair
|
||||
Price: 1,
|
||||
Amount: 2,
|
||||
Exchange: exch,
|
||||
Type: "limit",
|
||||
Side: "ask",
|
||||
Type: order.Limit,
|
||||
Side: order.Ask,
|
||||
Fee: 0,
|
||||
Description: "",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user