Sources

What a source is

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.

Everything on ftw.trade starts from what it reads. A source is anything a strategy, workflow or script can build on, and there are two families.

Markets: bars#

A market gives bars (and, for a pool, every swap). A strategy runs on one.

MarketRead asComes from
A pool on any EVM chain or Solanapool:<chain>:<address>Indexed by ftw.trade from the chain, bars from 5 seconds to a day
A perp, builder perp or spot pairperp:hyperliquid:BTC, perp:lighter:ETHHyperliquid and Lighter, with funding
A shared feedfeed:btc-usd-coinbaseCrypto, stocks, commodities and lending rates, free to everyone
A Polymarket outcomepoly:<token id>Polymarket, its price the probability

More in Markets and feeds.

Typed sources: events#

A typed source is a stream of events with fields you declare: { token: address, progress: number }. You choose how its events are made:

KindMade byGood for
FlowscriptA program over ftw.trade's streams, a websocket or a polled URLFilters, thresholds and indicators over launches, swaps, prices, order books. No code to host. The first choice when it fits
TypeScriptA script with @ftw/sdkPolling an API or listening to a stream with your own logic
PushedYour own service, posting to ftw.trade with the source's keyA bot, a webhook, a stream reader you run elsewhere
Contract eventAny event any contract emits on an EVM chain you've addedMints, swaps, governance, anything on chain
MachineCode with npm packages on a machine of your ownLong-lived sockets, heavy compute. Paid from credits

More in Sources in Flowscript and Pushed, contract and other sources.

Every event is a signal#

The same event reaches everything that listens:

  • a strategy reads the source as a tape (sources.kol_calls()) or runs on its bars (source:<name>);
  • a workflow armed on it fires, with the event's fields as its trigger outputs;
  • a script triggered by it runs.

Strategy runs and workflows can publish sources of their own too (a run's intents and results, a workflow's emit step), so one system's output is another's input.

Watch them#

  • Sources in the app lists every source with its shape, latest event and rate, and what uses it. Open one to see its last events and what each started.
  • Flow draws sources with everything downstream, and flags one that has stopped reading.

Share them#

Any source can be made public, with or without its code. Other accounts subscribe to it under a name of their own; they get its events, never your inputs or credentials.