# ftw.trade docs

> How ftw.trade works: sources, Flowscript strategies, backtests, live runs, vaults, wallets, protocols and the MCP server for AI agents. Each page is Markdown at the address below.

## Get started

- [What is ftw.trade](https://docs.ftw.trade/index.md): ftw.trade takes a trading idea all the way to a strategy running from your own wallets. Write it in plain words or Flowscript, backtest it on real history, run it on paper, then go live on any chain or venue.
- [How ftw.trade works](https://docs.ftw.trade/start/how-it-works.md): The five parts every trading system on ftw.trade is made of, and how they connect. Read this once and every other page will make sense.
- [Create your account](https://docs.ftw.trade/start/account.md): Sign up with a wallet, a passkey, Google, X or an emailed link. Your account comes with paper money, wallets ftw.trade holds for you, and an assistant that sets things up.
- [Paper and live](https://docs.ftw.trade/start/paper-and-live.md): Every project starts on paper, with realistic fills and no real money. How paper works, what changes when a project goes live, and the switches that keep real money behind your say-so.
- [Fund your account](https://docs.ftw.trade/start/fund.md): Put real money in your main wallet from any chain, move it to the wallets a project trades from, or top up play money for paper.
- [Your first strategy](https://docs.ftw.trade/start/first-strategy.md): From a starter to a strategy running on paper in five steps, on the site or with your AI. No code needed to begin.
- [The assistant](https://docs.ftw.trade/start/assistant.md): Home is an AI assistant that knows ftw.trade. Ask it to build, explain, backtest or check anything, and it does the work with the same tools the site uses, on paper.

## Strategies

- [How strategies work](https://docs.ftw.trade/strategies/overview.md): A strategy is Flowscript run once per closed bar. The same code backtests over history and runs live, so what you tested is what trades. What a strategy can trade, how a run behaves, and the rules every run follows.
- [Starter strategies](https://docs.ftw.trade/strategies/starters.md): Ready strategies to run as they are or change, grouped by what you want to do. Each is short Flowscript with its settings as knobs, and each backtests in one click.
- [Backtest and optimize](https://docs.ftw.trade/strategies/backtest.md): Replay a strategy over history with fees, slippage and funding, read the report honestly, search its settings without fitting noise, and check it on data it never saw.
- [Run, watch and stop](https://docs.ftw.trade/strategies/run.md): Start a strategy on its own paper book or on a project's wallets, watch what it decides and why, change its knobs, and stop it.
- [Take a strategy to real money](https://docs.ftw.trade/strategies/real-money.md): The checklist between a paper result and a live run, with the mistakes the first real-money runs made at each step.
- [Hedged and multi-market strategies](https://docs.ftw.trade/strategies/multi-market.md): Strategies that read and trade more than one market at once, such as a liquidity range hedged on a perp, a lending loop, options hedged with perps, or spot held beside a yield position.
- [Order book strategies](https://docs.ftw.trade/strategies/order-books.md): Trade on what rests in the book, not just the last price. Book reads, recorded history for backtests, maker quotes that rest post-only on the venue, and orders capped to the depth near the middle.
- [Search across markets](https://docs.ftw.trade/strategies/search.md): Rank many perps against each other and hold the best long and the worst short, then search the scores and settings with a genetic search that never sees the holdout.

## Flowscript

- [Flowscript in five minutes](https://docs.ftw.trade/flowscript/overview.md): Flowscript is ftw.trade's language for strategies and sources. Small, deterministic and made for AIs to write, with errors that name the line and the fix. Read a whole strategy, line by line.
- [Values, series and na](https://docs.ftw.trade/flowscript/language.md): The rules of Flowscript on one page: values and series, na, expressions, functions, folds, enums and match, phases and libraries.
- [Triggers and orders](https://docs.ftw.trade/flowscript/triggers-and-orders.md): When a strategy acts (when, while and the combinators) and every order it can place on spot, perps, liquidity and protocols.
- [Indicators and models](https://docs.ftw.trade/flowscript/indicators.md): The indicators built into Flowscript, sessions and VWAP, market profile, and trained models that fit the same way in a backtest and live.
- [Modules and imports](https://docs.ftw.trade/flowscript/modules.md): A strategy's uses line names what it reads and does. Every module (market data, books, venues, protocols, std contracts and your own libraries) with the line that imports it and a working example.
- [Tests and risk limits](https://docs.ftw.trade/flowscript/tests-and-limits.md): Write tests that prove a strategy buys the move it should and holds still when it should, and an invariants block that refuses entries once it loses too much.
- [Full language reference](https://docs.ftw.trade/flowscript/reference.md): Where to find every Flowscript function, rule and error code, and the module catalog, in full.

## Sources

- [What a source is](https://docs.ftw.trade/sources/overview.md): A source is anything a strategy, workflow or script can build on. Markets give bars; typed sources give events. Every event is also a signal anything in your account can react to.
- [Markets and feeds](https://docs.ftw.trade/sources/markets.md): Index pools on any EVM chain or Solana, read every Hyperliquid, Lighter and Polymarket market, use free shared feeds, and follow order books and listings live.
- [Sources in Flowscript](https://docs.ftw.trade/sources/flowscript-sources.md): Build a source with no code to host. A Flowscript program over ftw.trade's streams, a websocket, a polled API or a contract's events, keyed, barred, warmed up and backtested.
- [Pushed, contract and other sources](https://docs.ftw.trade/sources/other-sources.md): Push events from your own service with a key, decode any contract's events, write a source in TypeScript, or run one on a machine of your own.

## Automate

- [Workflows](https://docs.ftw.trade/automate/workflows.md): A trigger and up to 20 steps on a project's wallets: swaps, orders, waits, perps, bridges, strategy stages, private sends and more, run on ftw.trade's servers with every step's state and outputs kept.
- [Snipers and launches](https://docs.ftw.trade/automate/snipers-and-launches.md): Buy new launches that match your filters with a budget and a breaker, backtested on the last days of launches first. Or launch your own token and trade it in one workflow.
- [TypeScript scripts](https://docs.ftw.trade/automate/scripts.md): Hosted TypeScript with @ftw/sdk for what Flowscript and workflow steps don't do: outside APIs, signals, actions other scripts call, and bespoke logic, sandboxed and held to a policy you approve.

## Trade

- [Markets, charts and the terminal](https://docs.ftw.trade/trade/markets.md): Watch and trade by hand: every perp, pool, prediction market and option in one place, a charting terminal with order flow, and a terminal of your own that your AI can arrange.
- [Perps on Hyperliquid and Lighter](https://docs.ftw.trade/trade/perps.md): Trade every Hyperliquid and Lighter market from a strategy, a workflow or by hand, with funding in backtests, testnet by default, and each wallet's mainnet account behind a switch.
- [Prediction markets](https://docs.ftw.trade/trade/predictions.md): Every open Polymarket market as a series to backtest and run strategies on, traded on paper or from a live project's Polygon wallets, with books, trades and resolutions as streams.
- [Options on Derive](https://docs.ftw.trade/trade/options.md): Trade Derive's options from a strategy or by hand, on paper or from a live project's wallets, with implied volatility to decide on and perps to hedge with.
- [Liquidity ranges](https://docs.ftw.trade/trade/liquidity.md): Hold liquidity on Uniswap V2, V3 and V4 pools or Solana pools with rules that move it, backtested on the pool's real swaps first, on paper or minted on chain.

## Protocols

- [DeFi protocols](https://docs.ftw.trade/protocols/overview.md): A strategy uses 30+ protocols directly, reading their rates and moving money in and out on its paper book, with a live project's wallets following that book on chain. What there is, how it works, and what it costs.
- [Lending, vaults and earn](https://docs.ftw.trade/protocols/lending-and-vaults.md): Supply, borrow and loop on lending markets, deposit in vaults, lock a fixed rate on Pendle, or let earn route an asset to the best rate, all from Flowscript.
- [Swaps, bridges and launchpads](https://docs.ftw.trade/protocols/swaps-and-launchpads.md): How live trades are routed, the swap venues and launchpads a strategy or workflow can use, and bridges between chains.

## Wallets and money

- [Wallets](https://docs.ftw.trade/wallets/overview.md): Your main wallet, the account wallets ftw.trade holds for you, and the project wallets that trade. How keys are kept, and how wallets move between projects.
- [Fund, return and withdraw](https://docs.ftw.trade/wallets/funding.md): Move money into your account, between its wallets, and back out, on paper and live.
- [Move between chains](https://docs.ftw.trade/wallets/bridges.md): A move between chains is an intent. Every bridge that can carry it is quoted at once and ranked by what lands and how soon, then followed from leaving to landing.
- [Private sends](https://docs.ftw.trade/wallets/private-sends.md): Fund wallets and venue accounts with no on-chain link back to where the money came from, through Husher, from the site, a workflow or a strategy.
- [Portfolio and wallet tracker](https://docs.ftw.trade/wallets/portfolio.md): Value, P&L and positions across wallets, perps and strategies, net of what you put in, and long-term tracking of any wallet on any chain.

## Vaults

- [How vaults work](https://docs.ftw.trade/vaults/overview.md): A vault lets others invest in a strategy run, or a project traded by hand, without seeing the strategy. NAV, dealings, a real-money record, and rules ftw.trade enforces so investors needn't trust the manager.
- [Invest in a vault](https://docs.ftw.trade/vaults/invest.md): Find a vault, read its record and terms, subscribe at the next dealing, and redeem or take profit when you choose.
- [Create and run a vault](https://docs.ftw.trade/vaults/create.md): Make a vault from a strategy run or a project you trade by hand, set its terms and rules, raise for it, upgrade its strategy, and wind it down.
- [Vault fees and protections](https://docs.ftw.trade/vaults/fees-and-protections.md): How performance fees are charged per investor, held 30 days and given back on a wind-down, and the protections that hold a manager to a vault's terms.

## Projects and dashboards

- [Projects](https://docs.ftw.trade/projects/overview.md): A project is where wallets, the things that trade them, and the dashboards that show them come together. Templates, paper and live, reading balances and P&L, sharing a design, and ending one.
- [Dashboards](https://docs.ftw.trade/projects/dashboards.md): Shareable pages for a strategy, a vault or a project, built from widgets and custom charts in config, by hand or by your AI, checked for what a reader would see wrong, and shared by link.
- [History, branches and Git](https://docs.ftw.trade/projects/history.md): Every save of a project is a Git commit. See what changed, restore any version, try an idea on a branch, or clone the project and push to it.

## AI agents and API

- [Connect your AI](https://docs.ftw.trade/agents/connect.md): Give Claude, ChatGPT, Claude Code, Codex or Cursor every ftw.trade tool with one link. Your AI signs in through ftw.trade in your browser, and live trading stays off until you allow it.
- [The MCP server](https://docs.ftw.trade/agents/mcp.md): Every ftw.trade tool over the Model Context Protocol. Authentication, how calls are checked and refused, conventions every tool shares, and the full tool catalog.
- [The ftw-trade CLI](https://docs.ftw.trade/agents/cli.md): ftw.trade from the command line, for people and agents. Sign up with a wallet key, write and backtest Flowscript locally, run strategies, push sources and scripts, and read the log and portfolio. Every command takes --json.
- [API keys and session keys](https://docs.ftw.trade/agents/keys.md): Give each AI agent exactly the access it needs. Keys scoped to read, paper or live, to projects and tools, with an expiry and daily spend caps, rotated with a grace period and revoked in one click.
- [The TypeScript SDK](https://docs.ftw.trade/agents/sdk.md): The @ftw/sdk package wraps every ftw.trade tool in a typed client that runs anywhere with fetch, and is the library hosted scripts are written with.

## Account and security

- [Security](https://docs.ftw.trade/account/security.md): How ftw.trade keeps your keys, signs your trades and protects your account, and what you can do to keep it safe.
- [Log, Flow and Monitor](https://docs.ftw.trade/account/log.md): See what ran and why. Every call, run and error in your account with the reason, the whole pipeline as a live graph, and every running strategy at once.
- [Fees, credits and limits](https://docs.ftw.trade/account/credits-and-limits.md): What's free, what costs money, how levels lower fees and raise limits, and the limits on projects, strategies and wallets.

## Help

- [FAQ](https://docs.ftw.trade/help/faq.md): Quick answers to what people ask most about ftw.trade.
- [Glossary](https://docs.ftw.trade/help/glossary.md): The words used across ftw.trade, in one place.

## For agents

- [Agent skills](https://ftw.trade/llms.txt): the same platform written for AI agents, with every MCP tool.
