> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.paradigm.co/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.paradigm.co/_mcp/server.

# API Flows

### Strategy Created

Paradigm creates Strategies, comprised of one or more Instruments.

1. Subscribed to `strategy_state.{venue}.{kind}` WS Channel.
2. Receives WS messages with `state` == `ACTIVE`.

### Strategy Settled

Upon a Strategy Instrument's expiration, the underlying venue settles the contract.

1. Subscribed to `strategy_state.{venue}.{kind}` WS Channel.
2. Receives WS messages with `state` == `SETTLED`.

### Strategy Expired

Paradigm may choose to expire a Strategy from being available to trade.

1. Subscribed to `strategy_state.{venue}.{kind}` WS Channel.
2. Receives WS messages with `state` == `EXPIRED`.

### End to End Trade

For a Trade to occur, two Orders must cross upon a Strategy's Order Book.

From the WS Channel `orders.{venue}.{kind}.{strategy_id}`, the `state` key indicates if the Order has reached finality. If `state` == `OPEN`, then the Order still has available `amount` which can be actioned by the creator or another user. If `state` == `CLOSED`, the Order no longer has any actions available by the creator or another user. If `state` == `CLOSED`, the Order will be either canceled, pending clearing & settlement on the underlying venue or has already reached finality at clearing.

You should closely follow the values from the following keys `amount`, `pending_fill_amount`, `filled_amount`, `canceled_amount`.

### User's Order State [](#usersorderstate-fspd-comprehensive)

1. Subscribed to `orders.{venue}.{kind}.{strategy_id}` WS Channel.
2. *Taker* submits a crossing Order and receives WS message with `state` == `OPEN`.
3. If the Order is consumed in entirety, the user(s) receives a message with `state` == `CLOSED`.

### User's Trade State [](#userstradestate-fspd-comprehensive)

1. Subscribed to `trades.{venue}.{kind}.{strategy_id}` WS Channel.
2. An executed Trade reaches finality after clearing & settlement on the underlying exchange. Receives a WS Message with `state` == `FILLED` for successfully cleared trades, `state` == `REJECTED` for unsuccessful trade clearing.