<- Back to docs

Brokerage connections

Brokerage Workflows

Finny is designed around inspectable strategy code and deliberate broker-connected workflows, including paper trading and supported live-trading paths.

Supported workflows

Finny focuses on generating and testing strategies before execution. Broker integrations are part of the workflow, but generated code should be reviewed and backtested before any live use.

  • Alpaca: US equities and USD-quoted crypto workflows.
  • Binance: crypto spot workflows with testnet-oriented setup.
  • Paper trading: validate logic before live execution.
  • Future broker targets: Questrade and Interactive Brokers.

Credential handling

Broker credentials are configured locally through the Finny interface. Treat your machine as the trust boundary and avoid syncing credential files.

When creating broker API keys, disable withdrawals where supported, use paper trading first, and apply IP restrictions if your broker supports them.

Strategy interface

Generated strategies receive a broker object from Finny. The same strategy shape can be adapted across supported broker workflows when the market and symbol conventions are compatible.

def run(broker):
    if not broker.market_is_open("BTC/USD"):
        return

    bar = broker.fetch_bar("BTC/USD", interval="1h")
    cash = broker.cash()

    if bar.close > bar.open and broker.position("BTC/USD") == 0:
        broker.buy("BTC/USD", notional=cash * 0.1)

Before live trading

Live execution should be the final step, not the default. Use generated code review, backtesting, paper trading, conservative position sizing, and broker-side safety controls before live deployment.

  • Confirm symbol formatting and market hours.
  • Account for fees, slippage, and liquidity.
  • Set maximum position size and loss limits.
  • Monitor logs after deployment.