feat: Add autorate calculators with Manul API support#90
Closed
Conversation
Adapts PR #71 (position-aware autorate) for current master: - Add AutorateCalculators::Legacy and PositionAware with Strategy pattern - Use Manul API instead of BestChange::Service for external rates - Use ActiveJob (perform_later) instead of Sidekiq (perform_async) - Add calculator_type column to exchange_rates for selecting algorithm - Add our_exchanger_id and anomaly_threshold_percent config options The PositionAware calculator prevents "jumping over" positions above the target range, with adaptive GAP and anomaly protection. Closes #69 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This was referenced Jan 20, 2026
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Адаптация PR #71 для текущего master с поддержкой Manul API.
AutorateCalculators::LegacyиPositionAwareс паттерном Strategyperform_later) вместо Sidekiq (perform_async)calculator_typeв exchange_rates для выбора алгоритмаour_exchanger_idиanomaly_threshold_percentАрхитектура
Что решает PositionAware
Текущий алгоритм автокурса при попытке занять позицию в диапазоне (например, 5-10) перепрыгивает все позиции выше, вместо того чтобы остаться внутри целевого диапазона.
PositionAware калькулятор гарантирует, что обменник займёт позицию внутри диапазона
position_from..position_to.Supersedes #71
Closes #69
Test plan
🤖 Generated with Claude Code