Skip to content

Data and strategy backtesting

Your Candle agent key reads market data from two places:

  • The Candle API (https://api.alpha.candle.tv/api/v1, header x-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, header Authorization: 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.

FreeProMax
Candle API data (everything below in “On the Candle API”)YesYesYes
Hacc signal tape, stream, market, wallet and token readsNoYesYes
Hacc wallet groups visibleNopublic, propublic, pro, max
Hacc follows, alert rules, personal signals and your own groupsNoYesYes, with higher caps
Hacc wallet book legs (a wallet’s stored swaps and transfers)NoNoYes
Hacc strategy lab: research reports, backtests and replaysNoNoYes

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.

These are documented in full elsewhere; this is the map.

DataWhereNotes
Market state, migration status, buys and sells for any market Candle indexesMarket state APIPublic, no key
QuotesQuotePublic
The feed: new, graduated, onfire (Hacc’s hot streak), finalstretch (Hacc’s Solana tokens closest to graduating)Feed, Reading the feedPublic. 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 forensicsPublic; the safety block covers Solana
Copy score: how a published agent’s own trades would have paid a copierCopy scorePublic
Cohorts and the agent directory, leaderboard and public recordsCohorts, Agent trading APIPublic
Your profile’s P&L, trades, portfolio and paper tradesAgent trading API, MCP serveraccount:read
Your watchlist of up to 200 wallets, with webhook alertsAlerts on the watchlistaccount:read to read, launch:write to change
Paper trading: run your strategy forward against live quotes with nothing broadcastPaper modeswap: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.

Send your production key as a bearer token:

Terminal window
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.

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

ParameterMeaning
patternconfluence, deployer, large_move, dormancy, intra_book, new_ticker, distribution or kol_mention
chainsolana or hood (Robinhood Chain)
assetOne token, by Hacc asset id or mint
since, until, after, orderTime window and paging (order: asc or desc)
limit, offsetUp to 200 rows, 50 by default
group_by=tokenRank tokens by how many signals fired on them, rather than listing signals
groupSignals from one wallet group
min_mcap_usd, max_mcap_usd, min_age_minutes, max_age_minutes, ageMarket cap and token age filters (age: <1h, 1-24h or >24h)
venues, exclude_venuesLaunch venue, for example pump, raydium-launchpad, meteora-launchpad, candle
qualityCandle 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.

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.

Pro and Max. Routes that take chain default to solana; pass chain=hood for Robinhood Chain where noted.

RouteWhat it returns
GET /v1/market/token/:addressMarket data and safety for one token in one call. Solana and Hood
GET /v1/market/token/:address/historyOHLCV 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-tradersThe token’s top 10 traders over a window, marked against Hacc’s tracked wallets
GET /v1/market/token/:address/venuesHow its trading splits across pools
GET /v1/market/token/:address/holders?chain=hoodTop holders of a Hood token
GET /v1/market/token/:address/profileIts contract stage (bonding curve, migrated, AMM-native) and the rug mechanics that stage allows, in plain language
GET /v1/market/token/:address/launch-overviewThe 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/gainersTop gainers (Solana)
GET /v1/market/prices?addresses=Current prices for up to 60 tokens in one request
GET /v1/market/metasTrending narratives
GET /v1/market/activityThe 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-stretchSolana 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/trendingMentions of a token by the X accounts Hacc follows, price marks at each mention, and what they are mentioning most
RoutePlanWhat it returns
GET /v1/wallets, GET /v1/wallets/:idPro, MaxHacc’s tracked wallets: label, groups, watch level, trading stats and funding source
GET /v1/groups, GET /v1/groups/:idPro, MaxHacc’s wallet groups and their members, filtered to what your plan can see
GET /v1/market/labelled-trades?kind=smartmoney or kind=kolPro, MaxRecent smart-money or KOL trades on Solana, marked against Hacc’s tracked wallets
GET /v1/market/wallet/:address/stats, /activity, /token-breakdown, /portfolioPro, MaxAny Solana wallet’s performance over a period (1d to all), recent activity, per-token results and holdings
GET /v1/market/wallet/:address/book-legsMaxA 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.

RouteWhat it does
GET /v1/me/follows, POST /v1/me/follows with { "chain": "solana", "address": "…" }, DELETE /v1/me/follows/:idYour 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/walletsYour 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:

patternparams
new_tickermin_usd (optional): a followed wallet’s first buy of a token
confluencewallets (2 or more), window_minutes: several followed wallets buying the same token
large_movemin_usd: a followed wallet trading at least that much
dormancydays: a followed wallet active again after that many days
distributionmin_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.

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.

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, fail or insufficient. 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, and notes that say when a pass would not survive losing its best token.
  • trade_count, pnl_usd, max_drawdown_pct, required_start_usd, final_usd and peak_capital_at_risk_usd. required_start_usd is the smallest balance that could have funded the whole run (open exposure plus accumulated losses), not the peak at risk. peak_capital_at_risk_usd is a conviction-ladder figure only: it reads 0 for 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_token and reentry_cooldown (re-entry filters you set), max_concurrent, slots_full, no_budget, unpriceable, zero_price, sizing_zero and sizing_skip (a sizing rule skipped the stake), entry_gate, mcap_at_entry (the market cap at entry was outside min_/max_mcap_at_entry_usd), displaced, claimed_today, exited_today and other.
  • 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, aborted for a position still open at the window’s end, or worthless for 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, or paper_fidelity_replay), and promotion_eligible, which is always false: 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 (409 with the running job_id otherwise).
  • 20 replays a day (429 with quota and used over it).
  • A replay stops after 10 minutes. A wide new_ticker window with no market-cap floor can reach that stop: six unfiltered hours of new tickers will not finish, while three hours with a min_mcap_usd of 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/status returns your quota (used, quota, reset time) and any running job. The CLI’s candle lab status reads it.

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/strategies and GET /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-runs and GET /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.

Every definition has four parts, and unknown fields are rejected with the first problem named ("<path>: <message>").

  • chain: solana, hood or any.
  • entry, one of:
    • { "source": "pattern", "pattern": …, "filters": { … } }: enter on a signal. The entry patterns are confluence, deployer, large_move, dormancy, intra_book, new_ticker and kol_mention: distribution is a sell-side tape pattern, not an entry pattern. Filters include min_usd, min_mcap_usd and max_mcap_usd, min_age_minutes and max_age_minutes, groups (any of) and groups_all, min_group_wallets, wallet_ids (up to 50), venues or exclude_venues, direction (in or out), hours_et, min_score_1h, once_per_token, reentry_cooldown_minutes, and the KOL mention window kol_mention_minutes (1 to 1440) with optional kol_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. groups names 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 requires exit.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: only pattern, trade_signal and conviction entries 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" }), or ladder for a conviction entry. exit_on_signal: true closes 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: a distribution signal does not trigger it.
  • sizing: usd_per_trade and max_concurrent (required), optional base_usd and max_usd, and rules. The base is base_usd when given (else usd_per_trade), and the stake is base × (1 + Σadd) × Πmult over every matching rule, so add counts in units of the base and then mult multiplies the result: add: 3 on a $5 base makes the stake $20, not $8, and add: 3 with mult: 2 makes it $40. Each rule’s when names features such as mcap_at_entry and compares them with lt, lte, gt or gte; a rule can also carry skip: true to stake nothing when its conditions hold. The result is capped by max_usd.

These help you choose what to test. Each is a GET.

RouteWhat 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/:idHacc’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.

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.

  • 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_multiple times the entry and fires when it falls drop_pct from 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 closes worthless at 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 set once_per_token or reentry_cooldown_minutes.

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.