diff --git a/pkg/bbgo/quota.go b/pkg/bbgo/quota.go index af4f39285..abf939d21 100644 --- a/pkg/bbgo/quota.go +++ b/pkg/bbgo/quota.go @@ -51,6 +51,13 @@ func (q *Quota) Rollback() { q.mu.Unlock() } +func (q *Quota) String() string { + q.mu.Lock() + defer q.mu.Unlock() + + return q.Locked.String() + "/" + q.Available.String() +} + // QuotaTransaction is a transactional quota manager type QuotaTransaction struct { mu sync.Mutex