---
title: FIX API - Clear Street Trading API Documentation and Guides
description: Submit, cancel, and replace orders over an industry-standard FIX 4.2 session — message conventions, session lifecycle, order entry, and reject handling.
---

## Overview

Connect to Clear Street over the Financial Information eXchange (FIX) protocol to submit, cancel, and replace orders directly from your own order management system. The FIX API is built on FIX 4.2 and is designed for clients who already run FIX-capable trading infrastructure and want a low-latency, industry-standard alternative to the REST API for order entry.

Orders submitted over FIX flow into the same trading platform as orders submitted through Clear Street’s Trading API — the same accounts, and risk checks.

## Getting access

Please reach out to support at <concierge@clearstreet.com> to provision a FIX session.

## Message conventions

Unless a field says otherwise:

- Values are case-sensitive, and fields must have a non-empty value.
- A tag may occur only once per message; fields not listed in this guide are unsupported and rejected.
- All timestamps are UTC in `YYYYMMDD-HH:MM:SS[.sss...]` format.
- Numeric fields use plain fixed-point decimals (`100`, `100.5`, `0.125`) — no scientific notation, signs without digits, or thousands separators.
- The maximum encoded message size is 64 KiB, including header and trailer.

In the message tables below, Required is `Y` (required), `N` (optional), or `C` (conditionally required — the description says when). Example messages use `|` in place of the FIX `<SOH>` byte (`0x01`) for readability and omit the `BodyLength (9)` and `CheckSum (10)` calculations; both are still required on the wire.

## Supported messages

### Client to Clear Street

| MsgType (35) | Message                                                 | Notes                                                                                                                          |
| ------------ | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `A`          | [Logon](#logon-35a)                                     | Must be the first message on a connection                                                                                      |
| `0`          | [Heartbeat](#heartbeat-350)                             | Send after one heartbeat interval with no other outbound traffic, or to answer a Test Request (echoing its `TestReqID (112)`). |
| `1`          | [Test Request](#test-request-351)                       | Asks Clear Street to prove liveness with a Heartbeat.                                                                          |
| `2`          | [Resend Request](#resendrequest-352)                    | Requests retransmission of a sequence range after you detect a gap.                                                            |
| `4`          | [Sequence Reset](#sequencereset-354)                    | Gap-fill mode only (`123=Y`); skips administrative messages during a replay. Must never lower the expected sequence number.    |
| `5`          | [Logout](#logout-355)                                   | Starts a graceful close; wait for Clear Street’s confirming Logout before disconnecting.                                       |
| `D`          | [New Order Single](#submitting-an-order-35d)            | Submits a US-equity order.                                                                                                     |
| `F`          | [Order Cancel Request](#canceling-an-order-35f)         | Cancels a working order, identified by `OrigClOrdID (41)`                                                                      |
| `G`          | [Order Cancel Replace Request](#replacing-an-order-35g) | Changes a working order’s quantity or prices; restates the full order body.                                                    |

### Clear Street to client

| MsgType (35) | Message                                         | Notes                                                                                                                                                             |
| ------------ | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `A`          | [Logon](#logon-35a)                             | Confirms your logon and declares the effective `HeartBtInt (108)`.                                                                                                |
| `0`          | [Heartbeat](#heartbeat-350)                     | Sent on the same cadence rules as yours.                                                                                                                          |
| `1`          | [Test Request](#test-request-351)               | Sent after two heartbeat intervals with no inbound traffic; respond within one more interval or the session is closed.                                            |
| `2`          | [Resend Request](#resendrequest-352)            | Sent when Clear Street detects a gap in your sequence numbers; replay from your outbound history with `43=Y`.                                                     |
| `3`          | [Reject](#reject-353)                           | Session-level rejection: framing, sequence, missing-tag, invalid-format, or unsupported-message errors.                                                           |
| `4`          | [Sequence Reset](#sequencereset-354)            | Gap fill covering administrative messages during a replay.                                                                                                        |
| `5`          | [Logout](#logout-355)                           | Confirms your logout, or terminates the session on an error (no authorized accounts at logon, duplicate connection, unanswered Test Request, sequence violation). |
| `8`          | [Execution Report](#execution-report-358)       | The first response to any order — acknowledgments, fills, cancels, replaces, and application-level order rejects. There is no synchronous ack.                    |
| `9`          | [Order Cancel Reject](#order-cancel-reject-359) | Reports a refused cancel or replace request.                                                                                                                      |

### Standard header

Every message — administrative and application — carries this header.

| Tag | Field                  | Required | Notes                                                                                                                     |
| --- | ---------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------- |
| 8   | BeginString            | Y        | Must be `FIX.4.2` and must be the first field.                                                                            |
| 9   | BodyLength             | Y        | Must be the second field and equal the encoded body length defined by FIX 4.2.                                            |
| 35  | MsgType                | Y        | Must be the third field and one of the supported values for the message direction.                                        |
| 49  | SenderCompID           | Y        | Must equal the CompID provisioned for the sender of the message.                                                          |
| 56  | TargetCompID           | Y        | Must equal the CompID provisioned for the recipient of the message.                                                       |
| 34  | MsgSeqNum              | Y        | Positive integer; must follow the [sequence rules](#sequence-numbers-and-recovery).                                       |
| 52  | SendingTime            | Y        | UTC timestamp in `YYYYMMDD-HH:MM:SS[.sss...]` format.                                                                     |
| 43  | PossDupFlag            | C        | Must be `Y` on a replay using an already-consumed sequence number; otherwise omit or send `N`.                            |
| 122 | OrigSendingTime        | C        | Required when `43=Y`; must be the original message’s `SendingTime (52)`.                                                  |
| 369 | LastMsgSeqNumProcessed | N        | Informational only. The last inbound `MsgSeqNum (34)` processed by the sender; does not affect message or order handling. |

### Standard trailer

| Tag | Field    | Required | Notes                                                                  |
| --- | -------- | -------- | ---------------------------------------------------------------------- |
| 10  | CheckSum | Y        | Three ASCII digits, calculated per FIX 4.2, and always the last field. |

Messages with an invalid `BodyLength (9)`, invalid `CheckSum (10)`, malformed field framing, or an embedded `<SOH>` in a field value are not valid FIX frames.

## Session lifecycle

### Logon (35=A)

Send `Logon (35=A)` as the first message after opening a connection:

| Tag | Field           | Required | Notes                                                                                      |
| --- | --------------- | -------- | ------------------------------------------------------------------------------------------ |
| 98  | EncryptMethod   | Y        | Must be `0` (None).                                                                        |
| 108 | HeartBtInt      | Y        | Positive number of seconds. Clear Street’s Logon response declares the effective interval. |
| 141 | ResetSeqNumFlag | N        | `Y` requests both sides reset to sequence number 1. Use only for a coordinated reset.      |
| 553 | Username        | Y        | SenderCompID                                                                               |
| 554 | Password        | Y        | API key generated for the account                                                          |

Example API key: `FaCm6AO4cDOGfcRGIaZXeQ.vRHTK7qCuXZdhQmXZ0WwcPtIuNILVXVnkfAuWH6AAQU`

Logon (35=A) example:

```
8=FIX.4.2|9=<calculated>|35=A|49=<client>|56=<clear-street>|34=1|52=20260902-14:30:00.000|98=0|108=30|553=<SenderCompID>|554=<api-key>|10=<calculated>|
```

On success, Clear Street responds with its own Logon carrying the effective `HeartBtInt (108)` and, in `Text (58)`, the list of accounts the session may trade.

> Examples throughout this guide use `|` in place of the FIX `<SOH>` byte (`0x01`) for readability, and omit the `BodyLength (9)` and `CheckSum (10)` calculations. Both are still required on the wire.

### Heartbeat (35=0)

Sent by either side after one heartbeat interval with no other outbound traffic, or in response to a Test Request.

| Tag | Field     | Required | Notes                                                                               |
| --- | --------- | -------- | ----------------------------------------------------------------------------------- |
| 112 | TestReqID | C        | Required when responding to a Test Request; echo its value exactly. Otherwise omit. |

Idle heartbeat example:

Sent automatically when you’ve had nothing else to send for one heartbeat interval (e.g. 30 seconds with `108=30` from Logon). No `TestReqID`

```
8=FIX.4.2|9=<calculated>|35=0|49=<client>|56=<clear-street>|34=16|52=20260902-15:04:30.000|10=<calculated>|
```

Heartbeat in response to Test Request example:

Identical, but it must echo the `TestReqID (112)` from the incoming `TestRequest (35=1)` exactly

```
8=FIX.4.2|9=<calculated>|35=0|49=<client>|56=<clear-street>|34=17|52=20260902-15:05:00.150|112=TEST-20260902-150500|10=<calculated>|
```

### Test Request (35=1)

| Tag | Field     | Required | Notes                                                                        |
| --- | --------- | -------- | ---------------------------------------------------------------------------- |
| 112 | TestReqID | Y        | Non-empty identifier. The recipient must echo it in the resulting Heartbeat. |

TestRequest (35=1) example:

```
8=FIX.4.2|9=<calculated>|35=1|49=<clear-street>|56=<client>|34=42|52=20260902-15:05:00.000|112=TEST-20260902-150500|10=<calculated>|
```

### Logout (35=5)

| Tag | Field | Required | Notes                  |
| --- | ----- | -------- | ---------------------- |
| 58  | Text  | N        | Human-readable reason. |

Logout (35=5) example:

```
8=FIX.4.2|9=<calculated>|35=5|49=<client>|56=<clear-street>|34=31|52=20260902-20:00:00.000|58=End of day|10=<calculated>|
```

### Sequence numbers and recovery

Standard FIX 4.2 sequencing applies:

- Inbound and outbound sequence numbers are independent and start at 1 after a mutually accepted reset. Every message — including administrative messages — increments the sender’s sequence number by one.
- If Clear Street receives a lower sequence number than expected without `43=Y`, it sends Logout and closes the connection.
- If Clear Street receives a higher sequence number than expected, it retains the out-of-sequence message and issues a `ResendRequest (35=2)` for the missing range.
- Sequence state and application messages are journaled on Clear Street’s side across disconnects — reconnecting does **not** reset sequence numbers unless both sides accept a reset via `ResetSeqNumFlag (141)=Y`. Retain enough outbound history on your side to satisfy Resend Requests, and note that a correctly marked duplicate is never delivered to the market a second time.
- `ClOrdID (11)` uniqueness is separate from message sequencing: a replayed message must preserve both its original `ClOrdID (11)` and its original `MsgSeqNum (34)`.

#### ResendRequest (35=2)

- Application messages are replayed with `PossDupFlag (43)=Y` and their original `SendingTime (52)` in `OrigSendingTime (122)`. Administrative messages may be represented by a Sequence Reset gap fill instead of being replayed.

| Tag | Field      | Required | Notes                                                                           |
| --- | ---------- | -------- | ------------------------------------------------------------------------------- |
| 7   | BeginSeqNo | Y        | First sequence number requested; positive integer.                              |
| 16  | EndSeqNo   | Y        | Last sequence number requested; `0` means through the latest available message. |

ResendRequest (35=2) example:

```
8=FIX.4.2|9=<calculated>|35=2|49=<client>|56=<clear-street>|34=23|52=20260902-15:12:04.000|7=5|16=8|10=<calculated>|
```

#### SequenceReset (35=4)

- `SequenceReset (35=4)` is supported in gap-fill mode only (`GapFillFlag (123)=Y`); never use it to lower the expected sequence number

| Tag | Field       | Required | Notes                                                                                |
| --- | ----------- | -------- | ------------------------------------------------------------------------------------ |
| 123 | GapFillFlag | Y        | Must be `Y`.                                                                         |
| 36  | NewSeqNo    | Y        | Next sequence number to expect; must be greater than the message’s `MsgSeqNum (34)`. |

SequenceReset (35=4) example:

```
8=FIX.4.2|9=<calculated>|35=4|49=<client>|56=<clear-street>|34=5|43=Y|52=20260902-14:35:10.000|122=20260902-14:31:00.000|123=Y|36=9|10=<calculated>|
```

## Submitting an order (35=D)

Send `NewOrderSingle (35=D)`. An order is eligible only when the symbol resolves in Clear Street’s security master to a US common stock supported for your account and session. Options, multileg instruments, indexes, futures, non-US instruments, and unknown symbols are rejected. By default Clear Street applies its configured routing policy; an order can instead select the TWAP, VWAP, or DMA execution strategy with `TargetStrategy (847)` — see [Execution strategies](#execution-strategies).

| Tag | Field            | Required | Notes                                                                                                                                                                                                      |
| --- | ---------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1   | Account          | Y        | The account to trade. Must be one the session is authorized for; an unknown or unauthorized account is rejected with `Reject (35=3)`.                                                                      |
| 11  | ClOrdID          | Y        | Your order ID, 1–64 printable ASCII characters. Unique; never reuse it, even after reconnecting or on a later trading day.                                                                                 |
| 21  | HandlInst        | Y        | Must be `1` (automated execution, no broker intervention).                                                                                                                                                 |
| 55  | Symbol           | Y        | Case-sensitive US-equity ticker recognized by Clear Street. Reference the [instruments endpoint](/api/resources/v1/subresources/instruments/methods/get_instruments/index.md) for the list of instruments. |
| 167 | SecurityType     | N        | If present, must be `CS` (Common Stock).                                                                                                                                                                   |
| 54  | Side             | Y        | `1` = Buy, `2` = Sell. See [Short selling](#short-selling-and-position-intent)                                                                                                                             |
| 77  | OpenClose        | N        | `O` = Open, `C` = Close. Advisory position intent.                                                                                                                                                         |
| 38  | OrderQty         | Y        | Decimal greater than zero.                                                                                                                                                                                 |
| 40  | OrdType          | Y        | `1` = Market, `2` = Limit, `3` = Stop, `4` = Stop Limit.                                                                                                                                                   |
| 44  | Price            | C        | Limit price; required or forbidden per the order-type matrix below.                                                                                                                                        |
| 99  | StopPx           | C        | Stop price; required or forbidden per the order-type matrix below.                                                                                                                                         |
| 59  | TimeInForce      | Y        | See the time-in-force matrix below.                                                                                                                                                                        |
| 847 | TargetStrategy   | N        | Execution strategy: `1001` = VWAP, `1002` = TWAP, `1003` = DMA. Omit for standard routing. See [Execution strategies](#execution-strategies).                                                              |
| 168 | EffectiveTime    | N        | Start of a TWAP/VWAP execution window; defaults to the time the order is received.                                                                                                                         |
| 126 | ExpireTime       | N        | End of a TWAP/VWAP execution window; defaults to market close.                                                                                                                                             |
| 100 | ExDestination    | C        | The US exchange a DMA order routes to; required with `847=1003`, unsupported on other strategies.                                                                                                          |
| 336 | TradingSessionID | N        | Omit for regular hours; `6` requests extended-hours eligibility. Not supported with `TargetStrategy (847)`.                                                                                                |
| 60  | TransactTime     | Y        | UTC timestamp of when you initiated the order.                                                                                                                                                             |
| 15  | Currency         | N        | Must be `USD` when present; defaults to `USD`.                                                                                                                                                             |
| 58  | Text             | N        | Informational note; not interpreted and not forwarded. Not returned on response.                                                                                                                           |

### Order types

| Order type | `40` | `44` Price | `99` StopPx |
| ---------- | ---- | ---------- | ----------- |
| Market     | `1`  | Forbidden  | Forbidden   |
| Limit      | `2`  | Required   | Forbidden   |
| Stop       | `3`  | Forbidden  | Required    |
| Stop Limit | `4`  | Required   | Required    |

### Time in force

| TimeInForce         | `59` | Market | Limit | Stop / Stop Limit |
| ------------------- | ---- | ------ | ----- | ----------------- |
| Day                 | `0`  | Yes    | Yes   | Yes               |
| Good Till Cancel    | `1`  | No     | Yes   | Yes               |
| At the Opening      | `2`  | Yes    | Yes   | No                |
| Immediate or Cancel | `3`  | Yes    | Yes   | No                |
| Fill or Kill        | `4`  | Yes    | Yes   | No                |
| At the Close        | `7`  | Yes    | Yes   | No                |

> `TimeInForce (59)=7` (At the Close) is a Clear Street extension to FIX 4.2, using the representation introduced in FIX 4.3.

### Execution strategies

Omit `TargetStrategy (847)` to use Clear Street’s configured routing policy — the same default as the REST API. Send it to work the order with an execution strategy:

| `847`  | Strategy | Notes                                                                                                                    |
| ------ | -------- | ------------------------------------------------------------------------------------------------------------------------ |
| `1001` | VWAP     | Tracks the volume-weighted average price over the execution window. Equivalent to `strategy.type: VWAP` on the REST API. |
| `1002` | TWAP     | Spreads execution evenly across the execution window. Equivalent to `strategy.type: TWAP` on the REST API.               |
| `1003` | DMA      | Direct market access: routes to the US exchange named in `ExDestination (100)`.                                          |

Strategies are supported only on **market** and **limit** orders with `TimeInForce (59)=0` (Day), and cannot combine with extended hours (`TradingSessionID (336)`).

**Execution window (TWAP and VWAP).** `EffectiveTime (168)` and `ExpireTime (126)` bound the window the order executes over. Both are optional: an omitted start defaults to the time the order is received, and an omitted end to market close — the same defaults as `strategy.start_at` and `strategy.end_at` on the REST API. Send the window only on TWAP and VWAP orders.

**Destination (DMA).** `ExDestination (100)` is required on a DMA order and must be one of these US exchange MICs:

| MIC    | Venue                   | MIC    | Venue                            |
| ------ | ----------------------- | ------ | -------------------------------- |
| `XNYS` | New York Stock Exchange | `BATS` | Cboe BZX U.S. Equities Exchange  |
| `XNAS` | Nasdaq - All Markets    | `BATY` | Cboe BYX U.S. Equities Exchange  |
| `XASE` | NYSE American           | `EDGA` | Cboe EDGA U.S. Equities Exchange |
| `ARCX` | NYSE Arca               | `EDGX` | Cboe EDGX U.S. Equities Exchange |
| `XCHI` | NYSE Texas              | `EPRL` | MIAX Pearl Equities              |
| `XCIS` | NYSE National           | `IEXG` | Investors Exchange               |
| `XBOS` | Nasdaq Texas            | `LTSE` | Long-Term Stock Exchange         |
| `XPHL` | Nasdaq PHLX             | `MEMX` | MEMX Equities                    |
| `GOTC` | Global OTC              | `24EQ` | 24X National Exchange            |
| `OTCN` | OTC Link ECN            | `TXSE` | Texas Stock Exchange             |

Send `ExDestination (100)` only on DMA orders.

### Extended hours

Omit `TradingSessionID (336)` for regular-session handling. Send `336=6` to request eligibility outside regular market hours — this is equivalent to `extended_hours: true` on the REST API and is supported only for **limit** and **stop-limit** orders without an execution strategy (`TargetStrategy (847)`). These orders are also automatically eligible for overnight trading, you can not opt out.

### Short selling and position intent

Only Buy (`54=1`) and Sell (`54=2`) are accepted — Sell Short (`5`) and Sell Short Exempt (`6`) are rejected, matching how the REST API represents sides. Clear Street evaluates your account’s position, locates, and applicable risk rules to determine the effective position effect; don’t assume `54=2` always liquidates a long position. `OpenClose (77)` is advisory only.

Submitting an order (35=D) examples:

Market Day Buy

```
8=FIX.4.2|9=<calculated>|35=D|49=<client>|56=<clear-street>|34=2|52=20260902-14:30:01.000|1=<account>|11=CLIENT-0001|21=1|55=AAPL|54=1|60=20260902-14:30:01.000|38=100|40=1|59=0|10=<calculated>|
```

Limit Day Sell

```
8=FIX.4.2|9=<calculated>|35=D|49=<client>|56=<clear-street>|34=3|52=20260902-14:30:02.000|1=<account>|11=CLIENT-0002|21=1|55=AAPL|54=2|60=20260902-14:30:02.000|38=25.5|40=2|44=230.25|59=0|10=<calculated>|
```

Stop-limit, Good Till Cancel

```
8=FIX.4.2|9=<calculated>|35=D|49=<client>|56=<clear-street>|34=4|52=20260902-14:30:03.000|1=<account>|11=CLIENT-0003|21=1|55=AAPL|54=2|60=20260902-14:30:03.000|38=100|40=4|44=215.00|99=216.00|59=1|10=<calculated>|
```

Extended-hours limit

```
8=FIX.4.2|9=<calculated>|35=D|49=<client>|56=<clear-street>|34=5|52=20260902-14:30:04.000|1=<account>|11=CLIENT-0004|21=1|336=6|55=AAPL|54=1|60=20260902-14:30:04.000|38=10|40=2|44=225.00|59=0|10=<calculated>|
```

TWAP market buy over an execution window

```
8=FIX.4.2|9=<calculated>|35=D|49=<client>|56=<clear-street>|34=8|52=20260902-14:30:07.000|1=<account>|11=CLIENT-0007|21=1|55=AAPL|54=1|60=20260902-14:30:07.000|38=1000|40=1|59=0|847=1002|168=20260902-14:45:00.000|126=20260902-19:00:00.000|10=<calculated>|
```

DMA limit day buy routed to Nasdaq

```
8=FIX.4.2|9=<calculated>|35=D|49=<client>|56=<clear-street>|34=9|52=20260902-14:30:08.000|1=<account>|11=CLIENT-0008|21=1|55=AAPL|54=1|60=20260902-14:30:08.000|38=100|40=2|44=230.00|59=0|847=1003|100=XNAS|10=<calculated>|
```

## Canceling an order (35=F)

- Cancels a working order. The order is identified by `OrigClOrdID (41)` — the order’s *current* `ClOrdID (11)`, i.e. the ID from the `NewOrderSingle` or from the most recent accepted replace. The restated instrument, side, and quantity fields are required by FIX 4.2 but do not select the order; they must repeat the working order’s values.
- Fields not listed here are unsupported on `35=F` and are rejected, including the order-description fields that only `35=D` and `35=G` carry.
- A cancel for an unknown order, an order that is already terminal, or an order with a cancel or replace already pending is refused with `OrderCancelReject (35=9)`. An accepted cancellation is reported through `ExecutionReport (35=8)`.

| Tag | Field        | Required | Notes                                                                                                                |
| --- | ------------ | -------- | -------------------------------------------------------------------------------------------------------------------- |
| 1   | Account      | Y        | The order’s account; must be one the session is authorized for.                                                      |
| 41  | OrigClOrdID  | Y        | `ClOrdID (11)` of the order to cancel; 1–64 printable ASCII characters.                                              |
| 11  | ClOrdID      | Y        | New client-generated ID for this cancel request; same rules and per-account uniqueness as an order’s `ClOrdID (11)`. |
| 55  | Symbol       | Y        | Must restate the order’s symbol.                                                                                     |
| 167 | SecurityType | N        | If present, must be `CS` (Common Stock).                                                                             |
| 54  | Side         | Y        | Must restate the order’s side: `1` = Buy, `2` = Sell.                                                                |
| 60  | TransactTime | Y        | UTC timestamp of when you initiated the cancel.                                                                      |
| 38  | OrderQty     | Y        | Decimal greater than zero; restates the order’s total quantity.                                                      |
| 58  | Text         | N        | Informational note; not interpreted and not forwarded downstream.                                                    |

Cancel of the stop-limit order:

```
8=FIX.4.2|9=<calculated>|35=F|49=<client>|56=<clear-street>|34=6|52=20260902-14:30:05.000|1=<account>|41=CLIENT-0003|11=CLIENT-0005|55=AAPL|54=2|60=20260902-14:30:05.000|38=100|10=<calculated>|
```

## Replacing an order (35=G)

- Send `OrderCancelReplaceRequest (35=G)` to atomically replace a working order’s quantity or prices. The message restates the **full** order — its body is the `NewOrderSingle` body plus `OrigClOrdID (41)`, identified exactly as for cancels. `ClOrdID (11)` is a new ID and becomes the order’s current ID if the replace is accepted.
- A request that changes a non-replaceable field — side, symbol, order type, time in force, or extended-hours eligibility — is refused with `OrderCancelReject (35=9)`. An accepted replace is reported through `ExecutionReport (35=8)`.

| Tag | Field       | Required | Notes                                                                                                                                |
| --- | ----------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| 41  | OrigClOrdID | Y        | `ClOrdID (11)` of the order to replace; identified exactly as on a cancel.                                                           |
| 11  | ClOrdID     | Y        | New client-generated ID for this replace request; becomes the order’s current ID if the replace is accepted.                         |
| —   | Order body  | Y        | Every remaining `NewOrderSingle` field, with the same mandatory status and validation. The unsupported-field list applies unchanged. |

Only the following fields may change:

| Field            | Replaceable                                                   |
| ---------------- | ------------------------------------------------------------- |
| `OrderQty (38)`  | Yes — the new quantity must not be below the filled quantity. |
| `Price (44)`     | Yes, on order types that carry it.                            |
| `StopPx (99)`    | Yes, on order types that carry it.                            |
| All other fields | No — restate the working order’s values.                      |

Replacing an order (35=G) example:

```
8=FIX.4.2|9=<calculated>|35=G|49=<client>|56=<clear-street>|34=7|52=20260902-14:30:06.000|1=<account>|41=CLIENT-0002|11=CLIENT-0006|21=1|55=AAPL|54=2|60=20260902-14:30:06.000|38=50|40=2|44=229.50|59=0|10=<calculated>|
```

## Validation and rejects

Requests are validated before submission to the trading engine, in order: FIX framing and session rules → supported message type and layout → required fields, types, and enumerated values → order-type/time-in-force/extended-hours/strategy combinations → account and `ClOrdID` checks → symbol resolution and product scope → account permissions, pre-trade risk, and routing availability. A message can be syntactically valid and still fail a later business check.

Rejects are classified by layer:

- **Session-level** — framing, sequence, missing-tag, invalid-format, and unsupported-message errors produce a `Reject (35=3)` (with `RefSeqNum (45)`, `RefTagID (371)`, `SessionRejectReason (373)`, and `Text (58)` where possible) or a `Logout (35=5)`.
- **Order-level** — a well-framed `NewOrderSingle` that fails a business check (entitlement, risk, duplicate order) is rejected via `ExecutionReport (35=8)` with `ExecType (150)=8`.

`Text (58)` is diagnostic and may change — use FIX status and reason fields, not exact `Text` values, in your program logic.

### Reject (35=3)

Session-level rejection of a message that fails framing, layout, or session rules.

| Tag | Field               | Required | Notes                                                      |
| --- | ------------------- | -------- | ---------------------------------------------------------- |
| 45  | RefSeqNum           | Y        | `MsgSeqNum (34)` of the rejected message.                  |
| 371 | RefTagID            | N        | Tag associated with the error, when applicable.            |
| 372 | RefMsgType          | N        | `MsgType (35)` of the rejected message, when known.        |
| 373 | SessionRejectReason | N        | Standard FIX reject reason, when applicable.               |
| 58  | Text                | N        | Human-readable detail. Do not parse this as a stable code. |

Reject (35=3) example:

```
8=FIX.4.2|9=<calculated>|35=3|49=<clear-street>|56=<client>|34=58|52=20260902-15:20:02.000|45=12|371=38|372=D|373=1|58=Required tag missing: OrderQty (38)|10=<calculated>|
```

In this example, `373=1` means “required tag missing”; see the FIX 4.2 `SessionRejectReason` values for the full list.

### Execution Report (35=8)

| Tag | Field                 | Required | Notes                                                                                                                                                                      |
| --- | --------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 37  | OrderID               | Y        | Clear Street’s order ID, stable across every report for the order (including across cancel/replace). `NONE` when the request was rejected before an order ID was assigned. |
| 17  | ExecID                | Y        | Unique per Execution Report.                                                                                                                                               |
| 20  | ExecTransType         | Y        | Always `0` (New). Trade cancel/correct reports are not sent in this version.                                                                                               |
| 150 | ExecType              | Y        | The event; see the table below.                                                                                                                                            |
| 39  | OrdStatus             | Y        | The order’s state after the event: `A`, `0`, `1`, `2`, `3`, `4`, `5`, `6`, `8`, `E`.                                                                                       |
| 11  | ClOrdID               | Y        | The order’s current client ID: the `NewOrderSingle` ID until a cancel/replace is confirmed, then that request’s ID.                                                        |
| 41  | OrigClOrdID           | C        | On a confirmed cancel/replace: the ID it superseded. Absent otherwise, including on unsolicited venue cancels.                                                             |
| 1   | Account               | Y        | The order’s account.                                                                                                                                                       |
| 55  | Symbol                | Y        | The order’s symbol.                                                                                                                                                        |
| 54  | Side                  | Y        | `1` = Buy; `2` = Sell.                                                                                                                                                     |
| 38  | OrderQty              | Y        | Total ordered quantity under the order’s current terms.                                                                                                                    |
| 44  | Price                 | C        | The order’s limit price under its current terms, when it has one.                                                                                                          |
| 99  | StopPx                | C        | The order’s stop price under its current terms, when it has one.                                                                                                           |
| 31  | LastPx                | Y        | Price of this fill; `0` on non-fill reports.                                                                                                                               |
| 32  | LastShares            | Y        | Quantity of this fill; `0` on non-fill reports.                                                                                                                            |
| 151 | LeavesQty             | Y        | Quantity open for further execution; `0` on terminal reports.                                                                                                              |
| 14  | CumQty                | Y        | Total executed quantity.                                                                                                                                                   |
| 6   | AvgPx                 | Y        | Average price of all fills; `0` until the first fill.                                                                                                                      |
| 60  | TransactTime          | Y        | Execution time on fills; report creation time otherwise.                                                                                                                   |
| 168 | EffectiveTime         | C        | On the pending-new ack of a queued order: the expected release time.                                                                                                       |
| 103 | OrdRejReason          | C        | On rejects, where a standard code applies: `3` = order exceeds limit (risk), `6` = duplicate order.                                                                        |
| 378 | ExecRestatementReason | C        | On restatements: the venue’s reason code.                                                                                                                                  |
| 58  | Text                  | C        | Human-readable diagnostic on rejects. Not stable; use status/reason fields for program logic.                                                                              |

Exec Types

| 150 | Event        | Notes                                                                                                                                                                                                                    |
| --- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `A` | Pending New  | Sent only when the order is accepted and queued for deferred release (for example outside market hours). `EffectiveTime (168)` carries the expected release time. An immediately routed order’s first report is `150=0`. |
| `0` | New          | The order is accepted and working.                                                                                                                                                                                       |
| `1` | Partial fill | One execution; `LastPx (31)`/`LastShares (32)` carry it.                                                                                                                                                                 |
| `2` | Fill         | The execution that completes the order.                                                                                                                                                                                  |
| `3` | Done for day | The order’s session closed at the venue. A Good Till Cancel order is not terminated and is restated (`150=D`) at the next session open.                                                                                  |
| `4` | Canceled     | `OrigClOrdID (41)` names the superseded ID when the client requested the cancel; absent on an unsolicited cancel.                                                                                                        |
| `5` | Replaced     | The replace is effective: `OrigClOrdID (41)` is the superseded ID and the replace request’s `ClOrdID (11)` becomes the order’s current ID.                                                                               |
| `8` | Rejected     | The order was refused — by validation, risk, routing, or the market. `OrdRejReason (103)` is set where a standard code applies; `Text (58)` carries the diagnostic.                                                      |
| `D` | Restated     | The venue re-asserted the order (for example Good Till Cancel at session open); `ExecRestatementReason (378)` carries the reason.                                                                                        |

Execution reports for the Limit Day sell (accept, then full fill):

```
8=FIX.4.2|9=<calculated>|35=8|49=<clear-street>|56=<client>|34=2|52=20260902-14:30:02.100|37=01a01234-0000-7000-8000-000000000001|17=01a01234-0000-7000-8000-000000000002|20=0|150=0|39=0|11=CLIENT-0002|1=<account>|55=AAPL|54=2|38=25.5|44=230.25|31=0|32=0|151=25.5|14=0|6=0|60=20260902-14:30:02.099|10=<calculated>|
8=FIX.4.2|9=<calculated>|35=8|49=<clear-street>|56=<client>|34=3|52=20260902-14:30:02.500|37=01a01234-0000-7000-8000-000000000001|17=01a01234-0000-7000-8000-000000000003|20=0|150=2|39=2|11=CLIENT-0002|1=<account>|55=AAPL|54=2|38=25.5|44=230.25|31=230.25|32=25.5|151=0|14=25.5|6=230.25|60=20260902-14:30:02.480|10=<calculated>|
```

### Order Cancel Reject (35=9)

Reports a refused `OrderCancelRequest (35=F)` or `OrderCancelReplaceRequest (35=G)` — unknown order, terminal order, pending cancel or replace, non-replaceable field change, or risk refusal. The targeted order is unaffected.

| Tag | Field            | Required | Notes                                                                                                                |
| --- | ---------------- | -------- | -------------------------------------------------------------------------------------------------------------------- |
| 37  | OrderID          | Y        | The targeted order’s ID; `NONE` when the request resolved to no known order.                                         |
| 11  | ClOrdID          | Y        | The refused request’s ID.                                                                                            |
| 41  | OrigClOrdID      | Y        | The targeted order’s ID as the request stated it.                                                                    |
| 39  | OrdStatus        | Y        | The targeted order’s current status; `8` when the order is unknown.                                                  |
| 1   | Account          | Y        | The request’s account.                                                                                               |
| 60  | TransactTime     | Y        | Report creation time.                                                                                                |
| 434 | CxlRejResponseTo | Y        | `1` = Order Cancel Request; `2` = Order Cancel/Replace Request.                                                      |
| 102 | CxlRejReason     | C        | Where a standard code applies: `0` = too late to cancel, `1` = unknown order, `3` = order already in pending status. |
| 58  | Text             | Y        | Human-readable refusal diagnostic. Not stable; use status/reason fields for program logic.                           |

## FAQ

### What is the FIX API?

FIX is the messaging standard used across the trading industry for order entry and execution reporting. Instead of sending HTTPS requests, you open a persistent session with Clear Street, log on, and exchange FIX messages: you send order requests, and Clear Street responds with execution reports as your orders are accepted, filled, replaced, or canceled.

### What is and is not supported for the FIX API?

The current version supports US common stocks only. Options, multileg orders, trailing stop and trailing stop-limit orders and order status requests are not supported.

### What are the session hours for the FIX connection?

The session hours are from Sunday 8 pm EST to Friday 8 pm EST.

### What will be provided to me to set up my FIX connection?

You will receive:

- The network endpoint and TLS/connectivity details.
- Your `SenderCompID (49)` and Clear Street’s `TargetCompID (56)`.
- The trading account assigned to the session.

One or more trading accounts may be authorized for a FIX session, and your session is authenticated by the provisioned network connection plus the exact `SenderCompID (49)`/`TargetCompID (56)` pair. There is a user name (`SenderCompID`) and password (API key) passed inside the FIX session itself; transport security is established outside FIX, so `EncryptMethod (98)` is always `0`.
