> ## Documentation Index
> Fetch the complete documentation index at: https://docs.askfutures.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect a broker

> What Tradovate requires before Live trading can trade for you, how to add and verify a connection, and how your credentials are handled.

Live trading uses your own broker account. You connect it once, in
**Settings**, and every strategy you later put on Live trading picks an account from
that connection.

The connection form is generated by the broker itself, so the fields you see are
whatever that broker requires — nothing is hard-coded in AskFutures. Today the
supported broker is **Tradovate**, in both its demo and live environments.

## Before you start: what Tradovate requires

<Warning>
  Tradovate gates API trading behind a paid add-on and a funded account. Check
  all three of these before you try to connect — a connection that cannot log in
  simply fails verification.
</Warning>

* **The Tradovate API Access add-on** (about \$25/month), generated in
  Tradovate Trader under **Application Settings → API Access**.
* **A live, funded account** — Tradovate requires roughly \$1,000 at the time you
  subscribe. **Prop-firm and evaluation accounts are not eligible.**
* **Order permission on the key**, for the account you intend to trade.

## Add the connection

<Steps>
  <Step title="Open Settings">
    Broker connections live in your account settings. If the section isn't
    there, Live trading isn't enabled for your account yet.
  </Step>

  <Step title="Fill in the broker's fields">
    For Tradovate: your **username**, the **API password** you set when you
    generated the key, the **API key ID (cid)**, the **API key secret (sec)**,
    and the **environment** — `demo` or `live`.
  </Step>

  <Step title="Verify">
    AskFutures logs in once and reads back the list of accounts the key can
    trade. A connection is only usable once it shows **verified** with at least
    one account.
  </Step>
</Steps>

<Note>
  **A connection is verified against one environment.** A `demo` connection can
  only run strategies in demo, and a `live` connection only in live. If you want
  both, add both — they are separate connections with separate keys.
</Note>

## How your credentials are handled

* Credentials are submitted **once**, on create. They are encrypted immediately
  and are **never sent back** — every later read of a connection returns only
  its status and its accounts.
* They are decrypted only inside the trading service, at the moment it logs in
  to your broker, and nowhere else in AskFutures.
* Removing a connection removes the stored credentials with it.

## One thing to know about Tradovate Trader

<Warning>
  **Opening Tradovate Trader while a strategy is trading ends the Live trading session
  for up to a minute.** Tradovate allows one session per login, so the desktop or
  web app boots ours out.

  Your resting orders and brackets stay at Tradovate the whole time — nothing is
  cancelled. Live trading reconnects, re-reads the account, and picks up where it left
  off. But if you cancelled or changed one of its orders while you were in there,
  it will find that out on reconnect and act on your
  [**After you cancel or flatten by hand at the broker**](/live-trading/when-things-go-sideways#after-you-cancel-or-flatten-by-hand-at-the-broker)
  setting.
</Warning>

## Disconnecting

A connection with a live or paused Live trading strategy on it **cannot be
disconnected** — turn Live trading off for those strategies first. This is deliberate:
disconnecting with an open position would leave you holding something AskFutures
can no longer see or close.

## Next steps

<CardGroup cols={2}>
  <Card title="Turn Live trading on" icon="toggle-on" href="/live-trading/turn-on-live-trading">
    Pick the account, set the size, and start in demo.
  </Card>

  <Card title="When things go sideways" icon="triangle-exclamation" href="/live-trading/when-things-go-sideways">
    Decide the behaviour before the first signal, not during it.
  </Card>
</CardGroup>
