Skip to content

Conversation

@kirito201922
Copy link

@kirito201922 kirito201922 commented Dec 28, 2025

Adds a script that periodically checks position P&L and prints a message when profits exceed a configurable threshold.


Note

Adds a small utility script to monitor unrealized PnL and notify when it exceeds a threshold.

  • New scripts/python/notify_on_profit.py polls Polymarket.get_positions() and prints when unrealized_pnl >= PROFIT_THRESHOLD
  • Configurable via PROFIT_THRESHOLD and CHECK_INTERVAL env vars; read-only (no trades)

Written by Cursor Bugbot for commit 1d15129. This will update automatically on new commits. Configure here.

Adds a script that periodically checks position P&L and prints a message when profits exceed a configurable threshold.
positions = client.get_positions()
for p in positions:
profit = p.unrealized_pnl
if profit >= THRESHOLD:
Copy link

Choose a reason for hiding this comment

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

Comparison uses >= but documentation says "exceeds"

The comparison profit >= THRESHOLD uses greater-than-or-equal, but the docstring, PR description, and print message all state the notification triggers when profit "exceeds" the threshold. In financial contexts, "exceeds" typically means strictly greater than (>). When profit exactly equals the threshold, the notification will fire with a message claiming it "exceeds" the threshold, which is semantically incorrect.

Fix in Cursor Fix in Web

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.

1 participant