mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 16:25:16 +00:00
show trade ID in the console
This commit is contained in:
parent
7b60e34821
commit
3ad1f0e351
|
@ -18,6 +18,11 @@ type TradeBatchQuery struct {
|
|||
}
|
||||
|
||||
func (e TradeBatchQuery) Query(ctx context.Context, symbol string, options *types.TradeQueryOptions) (c chan types.Trade, errC chan error) {
|
||||
if options.EndTime == nil {
|
||||
now := time.Now()
|
||||
options.EndTime = &now
|
||||
}
|
||||
|
||||
startTime := *options.StartTime
|
||||
endTime := *options.EndTime
|
||||
query := &AsyncTimeRangedBatchQuery{
|
||||
|
|
|
@ -146,7 +146,7 @@ func trimTrailingZero(a float64) string {
|
|||
|
||||
// String is for console output
|
||||
func (trade Trade) String() string {
|
||||
return fmt.Sprintf("TRADE %s %s %4s %-4s @ %-6s | AMOUNT %s | FEE %s %s | OrderID %d | %s",
|
||||
return fmt.Sprintf("TRADE %s %s %4s %-4s @ %-6s | AMOUNT %s | FEE %s %s | OrderID %d | TID %d | %s",
|
||||
trade.Exchange.String(),
|
||||
trade.Symbol,
|
||||
trade.Side,
|
||||
|
@ -156,6 +156,7 @@ func (trade Trade) String() string {
|
|||
trade.Fee.String(),
|
||||
trade.FeeCurrency,
|
||||
trade.OrderID,
|
||||
trade.ID,
|
||||
trade.Time.Time().Format(time.StampMilli),
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user