# SwingSurfer quickstart

Ten calls take an idea to a scorecard. Native names are shown; on MCP each is `research.<verb>` with the same arguments, and `GET /api/v3/agent/tools` names each on every surface. Every call takes `Authorization: Bearer sk-ss-...` over REST.

## The ten calls

1. **board_get**: See your strategies first: one idea is one card.  
   `board_get({})`
2. **register_hypothesis**: Register the idea as a strategy: who is forced to trade and why, and the effect that would refute it.  
   `register_hypothesis({name: 'Gap-down fade · US stocks · 1D', market: 'US stocks', timeframe: '1D', mechanism: 'Overnight sellers are forced out at the open and the gap partly refills', edge_type: 'liquidity', falsifier: 'average trade after costs <= 0 on unseen symbols', sources: [{kind: 'note', title: 'Agent brainstorm'}]})`
3. **power_check**: Before any backtest: can the data tell an edge this size at all?  
   `power_check({card_id: '<card_id>', edge_r: 0.1, sharpe: 0.8})`
4. **validate_strategy**: Check the rules before saving them (free, no run).  
   `validate_strategy({config: {schemaVersion: 'v3', tradeMode: 'long_only', long: {...}}})`
5. **create_run**: Open the research run this attempt is recorded on.  
   `create_run({card_id: '<card_id>', goal: 'Screen the gap-down fade on US stocks'})`
6. **save_strategy**: Save the rules as the strategy's next version, recorded on the run.  
   `save_strategy({name: 'Gap-down fade v1', timeframe: '1D', settings: {...}, card_id: '<card_id>', research_run_id: '<run_id>'})`
7. **compute_estimate**: Price the run before submitting it: symbols with bars, minutes, the trade floor.  
   `compute_estimate({template_id: '<template_id>', market: 'us_equity', stage: 'screen'})`
8. **submit_discovery**: Run it: the cheap screen first, the full stage only if the screen shows an edge after costs.  
   `submit_discovery({template_id: '<template_id>', universe: {market: 'equity'}, stage: 'screen', research_run_id: '<run_id>'})`
9. **poll_job**: Wait for the job (the job id is the run id).  
   `poll_job({kind: 'discovery', job_id: '<job_id>'})`
10. **get_scorecard**: Read the version's nine answers and its computed label; a 'no' on an edge question is a kill.  
   `get_scorecard({card_id: '<card_id>'})`

## Two traps

1. **Pick the held-out symbols before the first run.** Question 6 (does it work on symbols it never touched) needs symbols your development never used. Run on a whole market (`universe: {market: 'equity'}` or `'crypto'`): the account keeps about a quarter of it unseen for question 6. A run on every symbol (`all_symbols`) or a hand-picked list that later covers the rest leaves nothing unseen, and no later run can give it back.
2. **A job can wait.** One research worker runs every account's jobs in turn, and a deploy restarts it, so a job can sit Queued for many minutes. poll_job's `queue` says its position and what it waits behind; keep polling, and never resubmit to jump the queue (a resubmit is one more run waiting behind the first).

## Read more

- `pipeline`: the scorecard, labels, stages and every write body (its index first, then one section).
- `overview`: the whole API, authentication and scopes.
- `strategy`: the strategy config. `errors`: every error code. `glossary`: what a word in the app means.
- The skills are the method: list_skills, then get_skill('swingsurfer-method').

## Every page

- `overview` (48,696 characters, index first, then by section): The whole API: authentication, every endpoint group, scopes, the async-job contract.
- `pipeline` (92,610 characters, index first, then by section): The research loop: the scorecard, labels and stages, and the exact write bodies.
- `strategy` (71,674 characters, index first, then by section): The strategy config: conditions, operators, risk, exits, worked examples.
- `indicator` (58,706 characters, index first, then by section): Custom indicators: the runtime_code contract and the indicator sandbox.
- `portfolio` (88,034 characters, index first, then by section): Portfolio templates: slot groups, ranking, position rules, the risk policy.
- `backtest` (24,927 characters, index first, then by section): Backtests: inline config or template, reading results.
- `research` (161,581 characters, index first, then by section): The Strategy Optimizer: Discovery runs and their analyses.
- `api` (266,770 characters, index first, then by section): Every endpoint: method, path, verb, scope, parameters, error codes.
- `tools` (106,431 characters, index first, then by section): The analysis tools and the full condition language.
- `errors` (132,250 characters, index first, then by section): Every error code: retryable or not, its hint and next actions.
- `glossary` (12,495 characters, whole): What each word, label and chip in the app means.
- `seal` (11,177 characters, whole): The account seal and the sealed exam.

Read a page with get_docs(page='<page>'); a page served by section answers its index, then get_docs(page='<page>', section='<id>').
