dcrdex icon indicating copy to clipboard operation
dcrdex copied to clipboard

mm: Handle market params update

Open martonp opened this issue 8 months ago • 0 comments

This diff updates the market maker to listen for updates to the server config. If the lot size of a market that a bot is currently trading on is updated, the number of placements that the bot makes is updated so that the bot places as many lots as possible without exceeding the amount that was placed before the lot size update.

Additionally, the lot size is not saved with the BotConfig. An additional overrideLotSizeChange parameter is added to StartBot, which if false, will return an error if the lot size has changed since the bot was configured. This will allow the UI to prompt the user to either update their configuration, or continue with the old one even though the lot size has changed.

After #2808 is merged, BotProblems can be updated to let the user know that a lot size change has taken place, and the bot is currently placing smaller quantities on the books than originally configured.

martonp avatar Jun 26 '24 03:06 martonp