You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(config): remove legacy configuration formats and values
Deprecates and removes support for legacy configuration formats to
simplify the codebase and enforce modern standards. This change
standardizes date handling and limit definitions across the bot.
Key changes:
- Removed support for legacy comma-separated `end_date` (YYYY,M,D) in
favor of ISO-8601 (YYYY-MM-DD).
- Removed support for `-1` as an "unlimited" value for
`max_active_amount` and `max_offer_size`.
- Updated `max_active_amount` to use `None` (null) for unlimited
lending, enforced via Pydantic validation.
- Standardized `max_offer_size` to use `0` for unlimited offer sizes.
- Updated documentation and sample configurations to reflect the
removal of legacy options.
- Refactored internal logic in `Data`, `Lending`, and `MaxToLend`
modules to handle the new configuration schema.
- Updated test suite to verify strict validation and correct behavior
with the new defaults.
BREAKING CHANGE: Configuration files using the `YYYY,M,D` date format or
`-1` for unlimited limits will now fail validation. Users must update
their `config.toml` to use `YYYY-MM-DD` and `0` or omit the limit keys.
Copy file name to clipboardExpand all lines: docs/configuration.rst
+1-4Lines changed: 1 addition & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -271,8 +271,7 @@ Very few situations require you to change these settings.
271
271
272
272
- Default value: Disabled
273
273
- Uncomment to enable.
274
-
- Preferred format: ``YYYY-MM-DD``.
275
-
- Legacy ``YYYY,M,D`` values are still accepted for existing configs.
274
+
- Format: ``YYYY-MM-DD``.
276
275
277
276
Config per Coin
278
277
---------------
@@ -306,7 +305,6 @@ Max Active Amount (Limit Total Lending)
306
305
- Omitted = Unlimited (no restriction on total lending)
307
306
- ``0`` = Disabled (skip this coin entirely, equivalent to not listing it in ``all_currencies``)
308
307
- ``> 0`` = Limit (cap total lending to this amount in coin units)
309
-
- ``-1`` = Legacy unlimited value, still accepted for backward compatibility
310
308
- This is useful when you want to maintain a reserve or limit exposure for a specific currency.
311
309
- The limit applies to the total amount currently lent out (active loans). If you have 10000 USD and set ``max_active_amount = 5000``, the bot will only lend up to 5000 USD total.
312
310
- Example: If you have ``max_active_amount = 1000`` for USD and currently have 800 USD lent out, the bot will only offer up to 200 USD more in new loans.
@@ -328,7 +326,6 @@ Max Offer Size (Smooth Lending Over Time)
328
326
- Allowed values:
329
327
- Omitted or ``0`` = Unlimited (standard spreading applies)
330
328
- ``> 0`` = Limit (cap each individual offer to this amount)
331
-
- ``-1`` = Legacy unlimited value, still accepted for backward compatibility
332
329
- If set to >0, no individual loan offer will exceed this amount. Unused balance remains in your wallet and will be offered in the next bot cycle (e.g. 60 seconds later). This effectively creates a Dollar Cost Averaging (DCA) effect, smoothing out your lending rates over time.
0 commit comments