Skip to content

feat(social-controllers): add unsupported-token position flag (TSA-1464) - #11218

Open
souterjk wants to merge 3 commits into
mainfrom
TSA-1464
Open

souterjk wants to merge 3 commits into
mainfrom
TSA-1464

Conversation

@souterjk

@souterjk souterjk commented Oct 30, 2026 •

Copy link
Copy Markdown

Explanation

Social-api is adding a new position flag, unsupported-token (va-mmcx-social-api#494). It marks a position on a token that is excluded from PnL for every trader (trading_metrics.blocked_tokens). The position is still returned but does not count toward the trader's realized PnL. A position can carry it alongside insider, so flags may be ['insider', 'unsupported-token'].

Position.flags was added in #11097 as an open list of strings, so SocialService and realtime feed hydration already accept and keep this value. No validation change is needed. This PR adds UNSUPPORTED_TOKEN_POSITION_FLAG as a named constant beside INSIDER_POSITION_FLAG and DEVELOPER_POSITION_FLAG, exports it from the package, and documents its meaning on Position.flags.

Unlike insider, social-api does not say that unsupported-token positions must not be copy-traded, so the docs only describe the PnL exclusion.

This is additive. There are no changes to existing types or validation.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Low Risk
Additive constant, documentation, and tests only; no runtime or validation behavior changes.

Overview
Adds UNSUPPORTED_TOKEN_POSITION_FLAG (unsupported-token) as a named, exported constant alongside the existing insider and developer position flags, matching a new social-api flag for tokens excluded from every trader's realized PnL (positions still appear in responses but do not count toward PnL; can combine with insider).

JSDoc on the constant and on Position.flags is updated to describe this behavior (PnL exclusion only—no copy-trade restriction). The changelog records the addition. Tests assert the package export and that fetchOpenPositions still passes through unsupported-token in the open flags list (no validation or schema changes).

Reviewed by Cursor Bugbot for commit d54903b. Bugbot is set up for automated code reviews on this repo. Configure here.

@souterjk
souterjk requested review from a team as code owners October 30, 2026 21:29
@souterjk
souterjk deployed to default-branch October 30, 2026 21:29 — with GitHub Actions Active
souterjk and others added 2 commits October 30, 2026 16:32

This branch was successfully deployed

1 active (outdated) deployment
default-branch — 9d934d4a Deployed Oct 30, 2026 by souterjk via Determine whether this PR is a release PR #6305
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.

3 participants