Skip to content

[WIP] Store CASH_RESERVE_PCT in the autotrade settings table#1023

Draft
Copilot wants to merge 1 commit into
masterfrom
copilot/store-cash-reserve-pct-autotrade-settings
Draft

[WIP] Store CASH_RESERVE_PCT in the autotrade settings table#1023
Copilot wants to merge 1 commit into
masterfrom
copilot/store-cash-reserve-pct-autotrade-settings

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 24, 2026

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.


This section details on the original issue you should resolve

<issue_title>Store CASH_RESERVE_PCT in the autotrade settings table</issue_title>
<issue_description>This is the amount shared between Grid trading strategy and the others. At the current 25%, we can barely open any ladders (max 2).

Since we decreased the max time bots can be stable (1.5 days only), we expect grid to be able to take a lot more funds when markets are at range, as bots opened by other strategies should close pretty soon if they don't close with set parameters.

Implementation

  1. Ask Claude code to move both to autotrade_settings table

GRID_ALLOCATION_PCT = 1
CASH_RESERVE_PCT = 0

  1. Create an alembic migration as a result
  2. Rename SettingsDocument to BaseAutotradeConfig and update every instance using it.
  3. Rename AutotradeSettingsSchema to BaseAutotradeConfigModel in pybinbot/model/autotrade_settings.py. What can we do to make sure these 2 BaseAutotradeConfig and BaseAutotradeConfigModel are always in sync?
  4. As a result of this, remove AutotradeSettings = AutotradeSettingsSchema, this shouldn't be needed, all repos should be importing BaseAutotradeConfigModel instead</issue_description>

Comments on the Issue (you are @copilot in this section)

Copilot AI linked an issue May 24, 2026 that may be closed by this pull request
Copilot stopped work on behalf of carkod due to an error May 24, 2026 03:35
Copilot AI requested a review from carkod May 24, 2026 03:36
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.

Store CASH_RESERVE_PCT in the autotrade settings table

2 participants