[Service][Web] Add prediction market web distribution#3215
Merged
Herklos merged 1 commit intoFeb 4, 2026
Conversation
cb0b9d1 to
da21d34
Compare
Contributor
Author
|
It's ready! |
GuillaumeDSM
reviewed
Feb 4, 2026
| trading_mode_name: str, | ||
| trading_mode_configuration: dict, | ||
| ) -> None: | ||
| models_configuration.save_distribution_configuration( |
| self.allow_skip_asset = bool(self.UI.user_input( | ||
| IndexTradingModeProducer.ALLOW_SKIP_ASSET, commons_enums.UserInputTypes.BOOLEAN, | ||
| self.allow_skip_asset, inputs, | ||
| title="Allow skipping assets that don't meet minimum order size requirements instead of aborting portfolio rebalancing.", |
| IndexTradingModeProducer.MIN_ORDER_SIZE_MARGIN, commons_enums.UserInputTypes.FLOAT, | ||
| float(self.min_order_size_margin), inputs, | ||
| min_val=1, | ||
| title="Min order size safety factor: ideal amount must be at least this multiple of the exchange min cost. " |
| # - in other words ideal_amount > min_cost * min_order_size_margin | ||
| # => ideal_amount / min_order_size_margin > min_cost | ||
| min_order_size_margin = self.trading_mode.min_order_size_margin | ||
| if min_order_size_margin <= trading_constants.ZERO: |
Member
There was a problem hiding this comment.
shoud it be this? as I understand min_order_size_margin has a min of 1
Suggested change
| if min_order_size_margin <= trading_constants.ZERO: | |
| if min_order_size_margin <= trading_constants.ONE: |
Comment on lines
+283
to
+284
| f"Skipping {symbol} buy: available funds are too low to buy {ratio*trading_constants.ONE_HUNDRED}% " | ||
| f"of {reference_market_to_split} holdings: {round(ideal_amount / min_order_size_margin, 9)} {coin}" |
| with pytest.raises(trading_errors.MissingMinimalExchangeTradeVolume): | ||
| await consumer._get_symbols_and_amounts(["BTC"], {}, decimal.Decimal(0.0003)) | ||
|
|
||
| # not enough funds but skipping allowed so it doesn't raise |
Signed-off-by: Herklos <herklos@drakkar.software>
da21d34 to
e7c04f3
Compare
GuillaumeDSM
approved these changes
Feb 4, 2026
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.
Replaces Drakkar-Software/OctoBot-Tentacles#1693