Skip to content

Fix buy price limit: cap at maxProbability to prevent slippage exceed…#11

Merged
Adialia1 merged 1 commit into
mainfrom
claude/fix-trade-price-limit-MAMAb
Mar 22, 2026
Merged

Fix buy price limit: cap at maxProbability to prevent slippage exceed…#11
Adialia1 merged 1 commit into
mainfrom
claude/fix-trade-price-limit-MAMAb

Conversation

@Adialia1

Copy link
Copy Markdown
Owner

…ing limit

The maxProbability filter (0.90) only checked the trader's signal price, but the slippage tolerance (10%) could push the actual execution price above the limit. Now the buy price limit is hard-capped at maxProbability so the bot never pays more than the configured maximum.

https://claude.ai/code/session_01XwJtbiAM1zP68HogpG66Gz

Description

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Code refactoring

Changes Made

Testing

  • Tested with DRY_RUN=true
  • Tested with small amounts
  • Tested on multiple Node.js versions
  • All existing tests pass
  • Added new tests for new features

Checklist

  • My code follows the project's code style
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation (README.md, etc.)
  • My changes generate no new warnings
  • I have checked my code doesn't expose any secrets or sensitive data
  • I have tested this with real Polymarket API (or explained why not)

Screenshots (if applicable)

Related Issues

Additional Notes

…ing limit

The maxProbability filter (0.90) only checked the trader's signal price,
but the slippage tolerance (10%) could push the actual execution price
above the limit. Now the buy price limit is hard-capped at maxProbability
so the bot never pays more than the configured maximum.

https://claude.ai/code/session_01XwJtbiAM1zP68HogpG66Gz
@Adialia1
Adialia1 merged commit c18351c into main Mar 22, 2026
5 of 6 checks passed
@Adialia1
Adialia1 deleted the claude/fix-trade-price-limit-MAMAb branch March 22, 2026 17:06
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.

2 participants