Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mm: Add live config and balance updates for running bots #3081

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

martonp
Copy link
Collaborator

@martonp martonp commented Nov 16, 2024

This change introduces live balance and configuration updates
for active bots, along with UI improvements. Starting bots and bot
balance allocation now occurs on the 'mmsettings' page (instead of
the main 'mm' page). Two allocation options are now available:

  • Quick config: Set buffers based on the number of lots to match on
    the same side before funds run low. Also possible to set a slippage
    buffer for the quote asset and fee reserves for EVM assets.
  • Manual config: Specify exact asset amounts to allocate to the bot.
Screenshot 2025-02-11 at 12 19 17 PM Screenshot 2025-02-11 at 12 19 20 PM Screenshot 2025-02-11 at 12 19 42 PM

The simple arb bot UI now only has one bot parameter, "Profit Threshold". The number of lots is now set in the "Asset Allocation" section.

Screenshot 2025-03-13 at 6 57 20 PM

@dev-warrior777
Copy link
Contributor

Just tested. This is a much more intuitive sequence.

I did struggle the first time I set up bots with the older sequencing .. so this new UI/UX has better chance for a new end user.

@martonp martonp force-pushed the viewRunningBotSettings branch 2 times, most recently from b85d3bb to 5c38a75 Compare February 11, 2025 17:19
@martonp martonp requested a review from buck54321 March 7, 2025 23:54
@buck54321
Copy link
Member

Let's progress this out of draft. This is looking good. I'll have lots of followup, but no reason to hold this up any longer.

@martonp martonp force-pushed the viewRunningBotSettings branch from 5c38a75 to 169a72d Compare March 13, 2025 22:54
@martonp martonp changed the title [WIP] mm: Live config / balance updates mm: Add live config and balance updates for running bots Mar 13, 2025
@martonp martonp marked this pull request as ready for review March 13, 2025 23:00
This change introduces live balance and configuration updates
for active bots, along with UI improvements. Starting bots and bot
balance allocation now occurs on the 'mmsettings' page (instead of
the main 'mm' page). Two allocation options are now available:

- Quick config: Set buffers based on the number of lots to match on
  the same side before funds run low. Also possible to set a slippage
  buffer for the quote asset and fee reserves for EVM assets.
- Manual config: Specify exact asset amounts to allocate to the bot.
@martonp martonp force-pushed the viewRunningBotSettings branch from 169a72d to fcf000b Compare March 14, 2025 16:46
Copy link
Member

@JoeGruffins JoeGruffins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying on simnet, unable to start with:

POST | http://127.0.0.3:5758/api/startmarketmakingbot

Status
400
Bad Request

client log:

2025-03-21 06:58:58.566 [DBG] WEB: failed to unmarshal JSON request: json: cannot unmarshal number 13381842.214293646 into Go struct field BotBalanceAllocation.config.alloc.dex of type uint64
2025-03-21 06:58:58.566 [DBG] WEB: raw request: {"config":{"baseID":60,"quoteID":0,"host":"127.0.0.1:17273","alloc":{"dex":{"0":13381842.214293646,"60":4141531800},"cex":{"0":0,"60":0}}}}
2025-03-21 06:58:58.566 [ERR] WEB: failed to read form

Also the console is logging this over and over at some point:

Object { dex: {…}, cex: {…} }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants