Data and strategy backtesting
Your Candle agent key reads market data from two places:
- The Candle API (
https://api.alpha.candle.tv/api/v1, headerx-api-key): market state, quotes, the feed, token forensics, agent records and your own P&L, trades and watchlist. Much of it is computed from Hacc, Candle’s market data engine. - Hacc itself (
https://api.hacc.fun, headerAuthorization: Bearer <your cndl_live_ key>): the signal tape, wallet and token intelligence, smart-money trades, follows and alert rules, and, on Max, strategy backtesting.
The same key works on both, and Candle never proxies the Hacc routes: you call api.hacc.fun directly. Execution always stays on Candle: Hacc reads and backtests, it never trades for you.
What each plan can reach
Section titled “What each plan can reach”| Free | Pro | Max | |
|---|---|---|---|
| Candle API data (everything below in “On the Candle API”) | Yes | Yes | Yes |
| Hacc signal tape, stream, market, wallet and token reads | No | Yes | Yes |
| Hacc wallet groups visible | No | public, pro | public, pro, max |
| Hacc follows, alert rules, personal signals and your own groups | No | Yes | Yes, with higher caps |
| Hacc wallet book legs (a wallet’s stored swaps and transfers) | No | No | Yes |
| Hacc strategy lab: research reports, backtests and replays | No | No | Yes |
A Free key does not reach Hacc’s stored intelligence: those routes answer 403 "Stored intelligence requires Pro or Max".
Plans are described in Plans, pricing & limits. Hacc learns your plan from Candle and refreshes it within about a minute of a change. Max access ends when the Max plan expires.
On the Candle API
Section titled “On the Candle API”These are documented in full elsewhere; this is the map.
| Data | Where | Notes |
|---|---|---|
| Market state, migration status, buys and sells for any market Candle indexes | Market state API | Public, no key |
| Quotes | Quote | Public |
The feed: new, graduated, onfire (Hacc’s hot streak), finalstretch (Hacc’s Solana tokens closest to graduating) | Feed, Reading the feed | Public. onfire and finalstretch come from Hacc |
| Token forensics: deployer record, insiders, clusters, and Hacc’s safety checks (mint and freeze authority, LP lock, sellability, liquidity drain) | Token forensics | Public; the safety block covers Solana |
| Copy score: how a published agent’s own trades would have paid a copier | Copy score | Public |
| Cohorts and the agent directory, leaderboard and public records | Cohorts, Agent trading API | Public |
| Your profile’s P&L, trades, portfolio and paper trades | Agent trading API, MCP server | account:read |
| Your watchlist of up to 200 wallets, with webhook alerts | Alerts on the watchlist | account:read to read, launch:write to change |
| Paper trading: run your strategy forward against live quotes with nothing broadcast | Paper mode | swap:write |
The MCP server’s read tools (candle_get_feed, candle_get_market, candle_token_forensics and the rest) cover the same data: see Candle MCP server.
On Hacc
Section titled “On Hacc”Send your production key as a bearer token:
curl -H "Authorization: Bearer $CANDLE_API_KEY" "https://api.hacc.fun/v1/signals?chain=solana&limit=20"- Only a live, unrevoked, unexpired production key (
cndl_live_) works; a test key is always refused (401 invalid api key). - Hacc reads your account, not the key: every key on the account sees the same follows, rules and strategies.
- On the customer routes described below, Hacc does not check Candle scopes. Any production key, including a Read key, reaches what its plan allows: reads, and account-state writes such as following and unfollowing wallets, editing wallet groups, and creating, changing or deleting rules and strategies. The native desk trade-signal routes described below require separate Hacc scopes; a Candle plan does not grant those scopes. Nothing on the customer routes moves funds or creates a market.
- Hacc keeps no general per-key rate limit. The specific limits are listed with each route.
The signal tape
Section titled “The signal tape”A signal is an event Hacc’s tracked wallets produced on a token: a first buy of a new ticker, several tracked wallets buying together, a large move, a dormant wallet waking up, a deployer launching, distribution, or a KOL mention.
GET /v1/signals
| Parameter | Meaning |
|---|---|
pattern | confluence, deployer, large_move, dormancy, intra_book, new_ticker, distribution or kol_mention |
chain | solana or hood (Robinhood Chain) |
asset | One token, by Hacc asset id or mint |
since, until, after, order | Time window and paging (order: asc or desc) |
limit, offset | Up to 200 rows, 50 by default |
group_by=token | Rank tokens by how many signals fired on them, rather than listing signals |
group | Signals from one wallet group |
min_mcap_usd, max_mcap_usd, min_age_minutes, max_age_minutes, age | Market cap and token age filters (age: <1h, 1-24h or >24h) |
venues, exclude_venues | Launch venue, for example pump, raydium-launchpad, meteora-launchpad, candle |
quality | Candle keys receive the curated tape by default |
GET /v1/signals/stream is the same tape over a WebSocket: a snapshot of the newest 100 signals, then each new one as it lands, with a ping every 20 seconds. It takes event_kind, chain and quality; any other query param, such as pattern, is a 400 instead of being ignored. Each account may hold 8 open sockets.
Trade signals and live conviction
Section titled “Trade signals and live conviction”GET https://api.hacc.fun/v1/trade-signals lists analyst buy/sell calls. These are a
different input from the tracked-wallet events on /v1/signals.
Access: this is a native Hacc desk route. It requires a Hacc bearer key with agent
or trading scope (admin also qualifies). A native key with only read, write or
lab is refused. Candle production keys, including Read keys on Free, Pro and Max,
do not receive those native scopes and are refused with
403 "requires agent or trading scope". No Candle plan unlocks this route.
For an authorized native caller, the response is { "signals": [...] }, newest first
by creation time, then id. Each call includes its id, side, asset id/address/symbol,
chain, source_agent, rationale, confidence, entry price_usd and market_cap_usd,
risks, recommended action, refs, status, expiry and creation time. Confidence and
non-null prices/caps are decimal strings; the price and cap are the mark captured
when the call was created, not a current quote.
Filters are status (open, consumed, expired), side, source_agent, chain,
asset_address and since, with limit (default 50, maximum 200) and offset.
Status is unfiltered by default; an execution consumer needs open calls and must
check expires_at. This is a shared call stream, not an account’s private feed.
GET /v1/trade-signals/export and /scoreboard require native trading (or admin);
creating or changing a call requires native agent (or admin).
Conviction scores have no public current-score read. Hacc computes a token’s
score and tier inside its runner from the strategy’s rolling signal window,
wallets and groups. Both trade_signal and conviction entries are used by Hacc’s
internal forward runner, including paper and live execution; they are not
backtest-only. Entry audit records can contain the conviction points and tier at
entry, but those are historical observations, not a current score feed.
/v1/strategy-lab/signal-scores is a different model’s min_score_1h input and
does not supply conviction points or tiers.
A Candle customer key can backtest these definitions but cannot read the matching
live entry inputs through the customer API. Keep trade_signal and conviction
entries unavailable for an external bot’s live execution rather than substituting
the signal tape, the one-hour signal score or an old entry’s conviction score.
Tokens and markets
Section titled “Tokens and markets”Pro and Max. Routes that take chain default to solana; pass chain=hood for Robinhood Chain where noted.
| Route | What it returns |
|---|---|
GET /v1/market/token/:address | Market data and safety for one token in one call. Solana and Hood |
GET /v1/market/token/:address/history | OHLCV candles (1m to 1D, 30 days by default) with a summary: peak, trough, drawdown and launch phases. Solana and Hood |
GET /v1/market/token/:address/top-traders | The token’s top 10 traders over a window, marked against Hacc’s tracked wallets |
GET /v1/market/token/:address/venues | How its trading splits across pools |
GET /v1/market/token/:address/holders?chain=hood | Top holders of a Hood token |
GET /v1/market/token/:address/profile | Its contract stage (bonding curve, migrated, AMM-native) and the rug mechanics that stage allows, in plain language |
GET /v1/market/token/:address/launch-overview | The launch at a glance: launch record, price ticks, events, holdings, signals and mentions. Cached 60 seconds |
GET /v1/market/token/:address/wallet-pnl?wallets= | Realized and unrealized P&L of up to 50 named wallets on this token |
GET /v1/market/token-search?q= | Name or ticker to mint, Solana and Hood |
GET /v1/market/gainers | Top gainers (Solana) |
GET /v1/market/prices?addresses= | Current prices for up to 60 tokens in one request |
GET /v1/market/metas | Trending narratives |
GET /v1/market/activity | The tokens Hacc’s tracked wallets are trading most, by group and chain |
GET /v1/market/cohort-overlap?mints= | Which wallets bought all of a set of two to five tokens, and how unusual that overlap is |
GET /v1/launches/final-stretch | Solana bonding-curve tokens closest to graduating, and those that graduated in the last 10 minutes (the source of Candle’s finalstretch feed) |
GET /v1/social/mentions, /v1/social/mention-marks, /v1/social/mentions/trending | Mentions of a token by the X accounts Hacc follows, price marks at each mention, and what they are mentioning most |
Wallets and smart money
Section titled “Wallets and smart money”| Route | Plan | What it returns |
|---|---|---|
GET /v1/wallets, GET /v1/wallets/:id | Pro, Max | Hacc’s tracked wallets: label, groups, watch level, trading stats and funding source |
GET /v1/groups, GET /v1/groups/:id | Pro, Max | Hacc’s wallet groups and their members, filtered to what your plan can see |
GET /v1/market/labelled-trades?kind=smartmoney or kind=kol | Pro, Max | Recent smart-money or KOL trades on Solana, marked against Hacc’s tracked wallets |
GET /v1/market/wallet/:address/stats, /activity, /token-breakdown, /portfolio | Pro, Max | Any Solana wallet’s performance over a period (1d to all), recent activity, per-token results and holdings |
GET /v1/market/wallet/:address/book-legs | Max | A tracked wallet’s stored swap and transfer legs, Solana or Hood, with the USD source of each leg: 30 days by default, up to 90 |
Follows, alert rules and personal signals (Pro and Max)
Section titled “Follows, alert rules and personal signals (Pro and Max)”Follow wallets you care about, then write rules that turn their activity into your own signals.
| Route | What it does |
|---|---|
GET /v1/me/follows, POST /v1/me/follows with { "chain": "solana", "address": "…" }, DELETE /v1/me/follows/:id | Your followed wallets. Pro may follow 25, Max 100. A repeat follow of a wallet already followed answers 200 { follow, already: true }; a new follow is 201 with already: false |
GET /v1/me/rules, POST /v1/me/rules with { "name", "pattern", "wallet_id"?, "params"? } | Alert rules over the wallets you follow, up to 20 |
GET /v1/me/signals?after=&limit= | The signals your rules produced (up to 200 per page, cursor next_after) |
GET, POST, DELETE /v1/me/groups, and POST, DELETE /v1/me/groups/:id/wallets | Your own wallet groups. Pro may keep 1, Max 5, each with up to 25 wallets. Adding a wallet answers { group, already }, with already true when the wallet was already a member |
Rule patterns and their params:
pattern | params |
|---|---|
new_ticker | min_usd (optional): a followed wallet’s first buy of a token |
confluence | wallets (2 or more), window_minutes: several followed wallets buying the same token |
large_move | min_usd: a followed wallet trading at least that much |
dormancy | days: a followed wallet active again after that many days |
distribution | min_usd (optional): a followed wallet selling down |
Hacc does not push personal signals: poll /v1/me/signals with the after cursor. To be alerted on a wallet by webhook instead, add it to your Candle watchlist.
Over a cap, these routes answer 429. A Free account gets 403 requires Pro or Max.
Strategy backtesting (Max)
Section titled “Strategy backtesting (Max)”Max accounts can describe a trading strategy as data, test it against Hacc’s recorded history, and read how it would have done. A strategy here is backtest-only: Hacc never runs it with money. To trade a strategy, run it yourself through the Agent trading API, and try it forward first with paper mode.
There are two ways to test, and research reports to design from.
Replay a definition
Section titled “Replay a definition”POST /v1/strategy-lab/replay runs a definition over a window you choose and keeps nothing:
{ "definition": { "chain": "solana", "entry": { "source": "pattern", "pattern": "confluence", "filters": { "max_mcap_usd": 500000, "max_age_minutes": 60 } }, "exit": { "take_profit_pct": 100, "stop_loss_pct": 40, "max_hold_hours": 24 }, "sizing": { "usd_per_trade": 25, "max_concurrent": 4 } }, "from": "2026-10-01T00:00:00Z", "to": "2026-10-14T00:00:00Z"}It answers 202 { "job_id" }. Poll GET /v1/strategy-lab/replay/:job_id until status is done (or failed); POST /v1/strategy-lab/replay/:job_id/cancel stops it.
The result gives:
verdict:pass,failorinsufficient. See “What a pass means” below.verdict_basis: what the verdict was decided on, in this job’s numbers:min_trades,trade_count,distinct_assets,best_asset(the token that made the most, with its trades and P&L),pnl_usd_without_best_asset, andnotesthat say when a pass would not survive losing its best token.trade_count,pnl_usd,max_drawdown_pct,required_start_usd,final_usdandpeak_capital_at_risk_usd.required_start_usdis the smallest balance that could have funded the whole run (open exposure plus accumulated losses), not the peak at risk.peak_capital_at_risk_usdis a conviction-ladder figure only: it reads0for every other strategy, so do not read it as the exposure of a pattern or trade-signal replay.skips: why candidate entries were not taken, one count per reason:already_open(a signal on a token the run already holds),once_per_tokenandreentry_cooldown(re-entry filters you set),max_concurrent,slots_full,no_budget,unpriceable,zero_price,sizing_zeroandsizing_skip(a sizing rule skipped the stake),entry_gate,mcap_at_entry(the market cap at entry was outsidemin_/max_mcap_at_entry_usd),displaced,claimed_today,exited_todayandother.trades: the first 2,000 trades, each with entry and exit price and USD, P&L and why it closed (take_profit,stop_loss,trailing_stop,max_hold,exit_signal,abortedfor a position still open at the window’s end, orworthlessfor a token that went a day without a price).universe: how many candidate tokens the replay considered and how many it could price.measurement_quality(when asked for),evidence_kind(legacy_mark_replay, orpaper_fidelity_replay), andpromotion_eligible, which is alwaysfalse: a lab replay never promotes anything on its own.
The poll also returns request: the definition (with defaults filled in), window and options the job was given, so a result can be read beside what produced it.
Limits for a Max account:
- The window is at most 14 days.
- One replay runs at a time (
409with the runningjob_idotherwise). - 20 replays a day (
429withquotaandusedover it). - A replay stops after 10 minutes. A wide
new_tickerwindow with no market-cap floor can reach that stop: six unfiltered hours of new tickers will not finish, while three hours with amin_mcap_usdof about 100,000 takes seconds. Narrow the universe before lengthening the window. asset_ids(up to 50) reports what happened to specific tokens without narrowing the replay.GET /v1/strategy-lab/statusreturns your quota (used,quota, reset time) and any running job. The CLI’scandle lab statusreads it.
Save a strategy and have it backtested
Section titled “Save a strategy and have it backtested”POST /v1/strategies with { "name", "definition" } saves a strategy as a draft; POST /v1/strategies/:id/versions saves a new version. Hacc backtests each new draft over the last 14 days, within minutes, and marks it backtested. A backtest passes on the same rule as a replay (below); drawdown does not enter it. Each save counts against a quota of 20 a day.
Read the results:
GET /v1/strategiesandGET /v1/strategies/:id: your strategies and their status.GET /v1/strategies/:id/trades: the backtest’s trades.GET /v1/strategies/:id/comparison: its versions compared.GET /v1/strategy-runsandGET /v1/trades: every run and trade across your strategies.
You see only your own strategies; another account’s id answers 404. A strategy can be set to retired, never to paper or live.
The definition
Section titled “The definition”Every definition has four parts, and unknown fields are rejected with the first problem named ("<path>: <message>").
chain:solana,hoodorany.entry, one of:{ "source": "pattern", "pattern": …, "filters": { … } }: enter on a signal. The entry patterns areconfluence,deployer,large_move,dormancy,intra_book,new_tickerandkol_mention:distributionis a sell-side tape pattern, not an entry pattern. Filters includemin_usd,min_mcap_usdandmax_mcap_usd,min_age_minutesandmax_age_minutes,groups(any of) andgroups_all,min_group_wallets,wallet_ids(up to 50),venuesorexclude_venues,direction(inorout),hours_et,min_score_1h,once_per_token,reentry_cooldown_minutes, and the KOL mention windowkol_mention_minutes(1 to 1440) with optionalkol_min_followers: the token was posted about by one of the X accounts Hacc follows within that many minutes before the signal, by an author with at least that many followers.groupsnames wallet groups of the wallet that produced the signal; no filter takes a list of X account names.{ "source": "trade_signal", "min_confidence": 0.7 }: enter on Hacc’s trade signals above a confidence.{ "source": "conviction", … }: a conviction ladder that scores tokens by patterns, wallets and groups and enters in tiers. It requiresexit.ladder.{ "source": "manual" },{ "source": "levels" },{ "source": "launch_fingerprint" }and{ "source": "schedule" }describe books Hacc runs itself (a manual desk, mcap-level plans on one token, launch-fingerprint buys, a scheduled perps book). A replay of one of these returns no candidates: onlypattern,trade_signalandconvictionentries have a signal history to replay.
exit, at least one of:take_profit_pct,stop_loss_pct,max_hold_hours,exit_on_signal,trailing({ "arm_multiple", "drop_pct" }), orladderfor a conviction entry.exit_on_signal: truecloses a held token when one of Hacc’s analyst trade signals says sell it, not when a tape pattern fires or a tracked wallet sells: adistributionsignal does not trigger it.sizing:usd_per_tradeandmax_concurrent(required), optionalbase_usdandmax_usd, andrules. The base isbase_usdwhen given (elseusd_per_trade), and the stake isbase × (1 + Σadd) × Πmultover every matching rule, soaddcounts in units of the base and thenmultmultiplies the result:add: 3on a $5 base makes the stake $20, not $8, andadd: 3withmult: 2makes it $40. Each rule’swhennames features such asmcap_at_entryand compares them withlt,lte,gtorgte; a rule can also carryskip: trueto stake nothing when its conditions hold. The result is capped bymax_usd.
Research reports
Section titled “Research reports”These help you choose what to test. Each is a GET.
| Route | What it answers |
|---|---|
/v1/strategy-lab/edges?days=&min_n=&include_peak= | What each signal pattern has paid afterwards, sliced by group, token age and market cap: win rate, median and upper quartiles at 1 minute to 72 hours, net of a 2.5% cost. Solana. Served from an hourly snapshot by default |
/v1/strategy-lab/runners?hours=&min_wallets= | The biggest recent runners tracked wallets touched, with their signals, earliest entrants and exits |
/v1/strategy-lab/first-signals?minutes=&… | The first signal on each token within N minutes (up to 180) of launch, for up to 500 tokens |
/v1/assets, /v1/assets/:id | Hacc’s token directory, for asset ids |
Backtests and replays are mostly Solana today: the research reports cover Solana only, and a hood definition is tested on what Hacc has recorded for Robinhood Chain.
Read results honestly
Section titled “Read results honestly”A backtest is a model of the past: it fills at recorded prices with an assumed stop slippage and no competition for the entry. Treat a pass as a reason to paper-trade a strategy, not to fund it.
How a replay fills
Section titled “How a replay fills”- A take-profit fills exactly at its threshold, never at the windfall above it.
- A stop (or trailing stop) fills 5% worse than the threshold’s price, an assumed stop slippage.
- A max-hold exit fills at the first recorded price after the hold expires, and with no price at all it does not close.
- A trailing stop arms when the price reaches
arm_multipletimes the entry and fires when it fallsdrop_pctfrom its peak since arming. - A position still open at the end of the window closes
aborted; a token that goes a day without a price closesworthlessat zero. - A signal on a token the run already holds is skipped (
already_open), and a token that was sold can be bought again unless you setonce_per_tokenorreentry_cooldown_minutes.
What a pass means
Section titled “What a pass means”A replay or backtest with fewer than 5 trades is insufficient. Otherwise it is pass when its total P&L, before fees and slippage, is above zero, and fail when it is not. That is the whole rule. There is no minimum number of distinct tokens, no drawdown limit and no win-rate floor, so a pass on 9 trades over 4 tokens is the same verdict as one on 90 trades over 40. Read verdict_basis before trusting one: a pass that notes says rests on one token is one token’s result.
Where the result has a lead_card, its random control replays the same number of random entries ten times. strategy_beats_arms says how many of the ten the strategy beat after the assumed costs, and rank_p_value turns that into a one-sided p-value. With ten arms the best it can be is 0.09, so beating all ten is a weak signal on its own. The verdict does not read the control or the assumed costs.