Quick start
Running strategies requires an active Max membership or higher. This reference is available to everyone.
- Open Script strategy in the Radar filter bar.
- Choose Extend or Replace. Edit the JavaScript source, or load the example.
- Click Preview (Ctrl / ⌘ + Enter). Compare available tokens, UI matches and script matches. Inspect JSON for up to 10 included and 5 excluded samples.
- Click Apply & enable. Editing the source or mode requires a fresh preview. Disable script & use UI restores normal filters immediately.
The editor supports JavaScript highlighting, line numbers, bracket matching, folding and undo/redo. Tab moves keyboard focus; use spaces for indentation. If the editor fails to load, a plain text editor remains available.
Execution modes
extend· Extend- All UI conditions run first, including search and annotations, followed by filter(). A script cannot bring back a token excluded by the UI.
replace· Replace- The script controls all filtering. Call ctx.matchesUI() to retain UI conditions selectively.
Only the main list is affected. Group view and Search All temporarily bypass the script. Graduation, pinned annotations and event alerts use their existing rules. Scripts only see tokens Radar has received; they cannot recover data excluded by the server.
Hooks & context
Export at least one of these named functions. Omitted filter() keeps candidates; omitted priority() uses zero. Every hook must run synchronously.
| Hook | Return value |
|---|---|
filter(token, ctx) | boolean; true keeps the token |
priority(token, ctx) | Finite number; higher comes first |
compare(a, b, ctx) | Finite number; negative puts a first, positive puts b first, zero falls back to UI sorting |
Ordering is priority descending → compare → UI sort. Inputs, including nested objects and arrays, are read-only.
ctx.version- API version, currently 1.
ctx.now- One Unix millisecond timestamp shared by all hooks in this evaluation.
ctx.filters- Read-only UI configuration. Every property is listed below.
ctx.matchesUI(overrides = {})- Available in filter and priority, for the current token. Top-level overrides are merged into the UI configuration: null clears numeric limits, [] clears platform/annotation restrictions, and search: "" clears search. Existing AND/OR, missing-value and precise quantity/percentage rules are reused.
ctx.compareUI(a, b, mode = ctx.filters.sort)- Available in all three hooks. Pass the provided token objects to reuse a UI sort mode.
Examples
Extend: low market cap, recent buys first
export function filter(token, ctx) {
return ctx.matchesUI() && token.marketCapUsd !== null &&
token.marketCapUsd < 5000;
}
export function priority(token) {
return token.recentBuy5m ? 1 : 0;
}
export function compare(a, b, ctx) {
return ctx.compareUI(a, b, "last-buy-desc");
}Replace: override token age for external markets
Internal markets retain all UI conditions. External markets require an age over 720 minutes and an ATL gain up to 20%, while clearing the UI token age range. Other UI conditions, including active trading minutes, remain in effect.
export function filter(token, ctx) {
if (!token.isExternal) return ctx.matchesUI();
return token.ageMinutes !== null && token.ageMinutes > 720 &&
ctx.matchesUI({
minTokenAgeMinutes: null,
maxTokenAgeMinutes: null,
maxAtlGainPercent: 20,
});
}All token fields (37)
Unknown numbers are null; check explicitly before comparison. Timestamps use Unix milliseconds; percentages use 20 for 20%. For exact thresholds prefer ctx.matchesUI(). Raw amounts can also be compared with BigInt(lastTradeAmountRaw) and tokenDecimals.
| Field | Type | Meaning / unit |
|---|---|---|
token | string | Token contract address |
name | string | Token name |
symbol | string | Token symbol |
platform | string | Original platform: pons-v2 / pump / otc / long |
filterPlatform | string | UI platform group; otc is grouped under pump |
pairToken | string | null | Quote token address |
pairTokenSymbol | string | null | Quote token symbol |
website | string | null | Website URL |
twitter | string | null | Original X URL |
xProfile | string | null | X profile URL validated by Radar |
annotation | string | null | Annotation: scam / star / watch / bad; null if unmarked |
qualified | boolean | null | Whether quality checks passed; null if unknown |
isMayhem | boolean | null | Whether Mayhem mode is enabled |
isWashTrading | boolean | null | Whether small-trade activity was detected |
dexPaid | boolean | Confirmed Dex paid promotion; false if unconfirmed |
boosted | boolean | Confirmed Boost; false if unconfirmed |
isInternal | boolean | Internal market; unknown Long stages are not inferred as internal |
isExternal | boolean | External market, using platform stage rules |
launchedAt | number | null | Launch time, Unix milliseconds |
graduatedAt | number | null | Graduation time, Unix milliseconds |
ageMinutes | number | null | Minutes from launch to this evaluation |
activeTradingMinutes | number | null | Observed minute buckets with trades, not continuous trading duration |
marketCapUsd | number | null | Market capitalization in USD |
volume24hUsd | number | null | 24-hour volume in USD |
totalTaxPercent | number | null | Total tax, 20 means 20%; null for Pump / OTC / Long |
athDrawdownPercent | number | null | Drawdown from ATH, 20 means 20% |
atlGainPercent | number | null | Gain from ATL, 20 means 20% |
lastTradeSide | "buy" | "sell" | null | Last trade direction |
lastTradeAt | number | null | Last trade time, Unix milliseconds |
lastBuyAt | number | null | Last observed buy time, Unix milliseconds |
recentBuy5m | boolean | Buy within 5 minutes, with 30 seconds of future clock tolerance |
recentTrade5m | boolean | Trade within 5 minutes, with 30 seconds of future clock tolerance |
lastTradeAmountRaw | string | null | Raw integer token amount for the last trade group; uses group total when available |
tokenDecimals | number | Token decimals; defaults to 18 when absent |
lastTradeAmountMillions | number | null | Last trade group amount in millions of tokens; floating-point approximation |
lastTradeCount | number | null | Trade count in the last group; defaults to 1 for a known trade |
lastTradeUsd | number | null | Last trade group value in USD |
All ctx.filters fields (40)
Pass these keys to ctx.matchesUI() as overrides. Numeric ranges include both boundaries; null disables a boundary. Time ranges use minutes; amount and percentage units are shown below. Tax filters retain the UI exemption for Pump / OTC / Long.
| Field | Type | Meaning / unit |
|---|---|---|
search | string | Search query; empty string clears search |
sort | string | UI sort mode; see the sort table |
strategy | object | Current strategy: enabled (boolean), mode (extend / replace), source (string); overriding it does not change the current execution |
websiteQuery | string | Website URL query |
xQuery | string | X URL query |
linkRegex | boolean | Use regular expressions for link queries |
minLastTradeAmountMillions | number | null | Minimum last trade group amount in millions; UI uses integer comparison |
minLastTradeCount | number | null | Minimum last trade group count (nonnegative integer) |
minLastTradeUsd | number | null | Minimum last trade group value in USD |
lastTradeBuy | boolean | Require the last trade to be a buy |
recentBuy | boolean | Require a buy within 5 minutes |
recentTrade | boolean | Require a trade within 5 minutes |
lastTradeWithin | string | Last trade window, e.g. 5m / 2h / 1d; empty string disables |
lastBuyWithin | string | Last buy window, e.g. 5m / 2h / 1d; empty string disables |
minVolume24hUsd | number | null | Minimum 24-hour volume in USD |
maxVolume24hUsd | number | null | Maximum 24-hour volume in USD |
minMarketCapUsd | number | null | Minimum market capitalization in USD |
maxMarketCapUsd | number | null | Maximum market capitalization in USD |
minTokenAgeMinutes | number | null | Minimum token age in minutes |
maxTokenAgeMinutes | number | null | Maximum token age in minutes |
minActiveTradingMinutes | number | null | Minimum active trading minutes |
maxActiveTradingMinutes | number | null | Maximum active trading minutes |
timeRangeRelation | "and" | "or" | Relationship between age and active trading conditions |
minTotalTaxPercent | number | null | Minimum total tax percentage |
maxTotalTaxPercent | number | null | Maximum total tax percentage |
minAthDrawdownPercent | number | null | Minimum ATH drawdown percentage |
maxAthDrawdownPercent | number | null | Maximum ATH drawdown percentage |
minAtlGainPercent | number | null | Minimum ATL gain percentage |
maxAtlGainPercent | number | null | Maximum ATL gain percentage |
xProfileOnly | boolean | Require a valid X profile URL |
hideUnqualified | boolean | Hide tokens failing quality checks |
hideMayhem | boolean | Hide Mayhem tokens |
hideWashTrading | boolean | Hide tokens with small-trade activity |
dexPaidOnly | boolean | Require confirmed Dex paid promotion |
boostedOnly | boolean | Require confirmed Boost |
graduatedOnly | boolean | Show external markets only |
ungraduatedOnly | boolean | Show internal markets only |
selectedPlatforms | string[] | Platform allowlist: pons-v2 / long / otc / pump; UI groups OTC under Pump; [] removes restriction |
selectedAnnotations | string[] | Include annotations: scam / star / watch / bad; [] removes restriction |
hiddenAnnotations | string[] | Exclude annotations: scam / star / watch / bad; [] removes restriction |
Sort modes
ctx.compareUI(a, b, mode) · ctx.filters.sort
| mode | Order |
|---|---|
default | Newest launch first |
age-desc | Oldest tokens first |
active-minutes-desc | Most active trading minutes first |
market-cap-desc | Market cap high to low (in original quote units) |
market-cap-asc | Market cap low to high (in original quote units) |
last-trade-desc | Most recent trade first |
last-trade-asc | Oldest trade first |
last-buy-desc | Most recent buy first |
Unknown sort names fall back to default. Optional missing values sort last; ties fall back to launch time descending, then contract address.
Saving & runtime
- The strategy is saved with browser filters. Reloading rechecks membership. Templates and JSON backups include the strategy; importing or loading them always keeps scripts disabled until preview and enable.
- Export current input JSON downloads all UI settings and the current token facts, useful for inspecting fields and debugging.
- Active scripts reevaluate on data updates and once per second. Membership is rechecked at least every 15 seconds while running; losing access disables the strategy.
- Scripts run synchronously in an isolated Worker with QuickJS/WASM. DOM, network, browser storage, external imports and asynchronous hooks are unavailable.
- Limits: 50,000 source characters, 32 MiB interpreter memory, 512 KiB stack and 500 ms execution budget. The Worker is terminated after 5 seconds without a response.
- On execution failure the last successful list is preserved and an error is shown. Fix the script, preview and apply again, or disable it. New tokens may expose errors that a preview did not encounter.