diff --git a/pkg/bbgo/quota.go b/pkg/bbgo/quota.go index 6b7e34d..dd17610 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