Fix: consensus endpoint matched on username, which is usually empty - #11
Open
mpont91 wants to merge 1 commit into
Open
Fix: consensus endpoint matched on username, which is usually empty#11mpont91 wants to merge 1 commit into
mpont91 wants to merge 1 commit into
Conversation
Most Polymarket wallets have no username, so filtering aware_global_trades by `username IN (SELECT username FROM smart_traders)` matched only the empty string and /api/consensus/markets returned no signals. Keyed on proxy_address instead.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/api/consensus/marketsselects smart traders byusername, then filters trades with it:Most Polymarket wallets have no username set, so both sides are the empty string for the majority of rows. The subquery matches almost nothing real, and the endpoint returns
signal_count: 0even when smart money is clearly clustered in the same markets.proxy_addressis always populated and is the key the rest of the scoring pipeline already uses.Verified
Same database, same thresholds, before and after: