Skip to content

Commit 95fd69d

Browse files
authored
Merge pull request #2153 from c9s/dboy/coinbase-test
2 parents c714e0c + c266d79 commit 95fd69d

19 files changed

+5659
-64
lines changed

pkg/exchange/coinbase/exchange.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ func (e *Exchange) SubmitOrder(ctx context.Context, order types.SubmitOrder) (cr
231231
IsWorking: !res.Settled,
232232
CreationTime: res.CreatedAt,
233233
UpdateTime: res.CreatedAt,
234+
OriginalStatus: string(res.Status),
234235
}
235236

236237
return createdOrder, nil
@@ -563,7 +564,7 @@ func (e *Exchange) queryProductTradesByPagination(
563564
ctx context.Context, symbol string, options *types.TradeQueryOptions,
564565
) (cbTrades api.TradeSnapshot, err error) {
565566
defer func() {
566-
if err == nil && options.Limit > 0 {
567+
if err == nil && options.Limit > 0 && len(cbTrades) >= int(options.Limit) {
567568
cbTrades = cbTrades[:options.Limit]
568569
}
569570
}()

0 commit comments

Comments
 (0)