# `CCXT.RateLimiter.Info`
[🔗](https://github.com/ZenHive/ccxt_client/blob/main/lib/ccxt/rate_limiter/info.ex#L1)

Rate limit status information parsed from exchange response headers.

Exchanges report rate limit status with every API response (not just 429s).
This struct captures that information in a normalized format.

## Sources

Different exchanges use different header patterns:

| Source | Exchange | Headers |
|--------|----------|---------|
| `:binance_weight` | Binance | `x-mbx-used-weight-1m`, `x-sapi-used-ip-weight-1m` |
| `:bybit_bapi` | Bybit | `x-bapi-limit`, `x-bapi-limit-status`, `x-bapi-limit-reset-timestamp` |
| `:standard` | KuCoin, others | `x-ratelimit-limit`, `x-ratelimit-remaining`, `x-ratelimit-reset` |

# `t`

```elixir
@type t() :: %CCXT.RateLimiter.Info{
  exchange: String.t() | nil,
  limit: non_neg_integer() | nil,
  raw_headers: %{required(String.t()) =&gt; String.t()},
  remaining: non_neg_integer() | nil,
  reset_at: integer() | nil,
  source: atom(),
  used: non_neg_integer() | nil
}
```

# `should_wait?`

```elixir
@spec should_wait?(t(), float()) :: boolean()
```

Returns true if remaining capacity is below the threshold percentage.

Threshold is a float between 0.0 and 1.0 representing the fraction of
total capacity. Default is 0.1 (10%).

Returns `false` if limit or remaining data is not available.

# `usage_percent`

```elixir
@spec usage_percent(t()) :: float() | nil
```

Returns the percentage of rate limit capacity used (0.0 to 100.0).

Returns `nil` if insufficient data to calculate usage.

# `wait_time`

```elixir
@spec wait_time(t()) :: non_neg_integer()
```

Returns milliseconds to wait until the rate limit window resets.

Returns 0 if no reset time is available or the reset time has already passed.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
