---
title: "Exchange State for AI Trading Systems | Siebly"
description: "Reference for exchange state, accountstate, order trust, position trust, pending confirmation, durable context, and private stream confirmation."
canonical: "https://siebly.io/reference/exchange-state"
---

# Exchange State

Treat [Account State](https://siebly.io/reference/glossary#accountstate) as the local truth store, but split trust by subject. A fresh order event does not automatically prove [position state](https://siebly.io/reference/glossary#position) is ready for dependent planning.

## Core Model

[Account State](https://siebly.io/reference/glossary#accountstate) is the local view of exchange state. [Trusted State](https://siebly.io/reference/glossary#trusted-state) is evaluated per subject, not once for the whole account.

- Keep [Order Trust](https://siebly.io/reference/glossary#order-trust), [Position Trust](https://siebly.io/reference/glossary#position-trust), [Asset Trust](https://siebly.io/reference/glossary#asset-trust), filters, and context as separate trust subjects.
- [Position](https://siebly.io/reference/glossary#position) covers the native position versus locally derived Spot position distinction.
- The [Runtime Workflows](https://siebly.io/reference/runtime-workflows) page covers startup hydration, reconnect repair, event bursts, and scoped recovery boundaries.
- For implementation order, artifacts, and conformance checks, use [Exchange State Management](/ai/exchange-state).

## Planning Rule

Plan only from the subjects required by the next action. Request acceptance and order events can trigger work, but they do not automatically prove every dependent subject is current.

- [Order Trust](https://siebly.io/reference/glossary#order-trust) does not imply [Position Trust](https://siebly.io/reference/glossary#position-trust).
- [Pending Confirmation](https://siebly.io/reference/glossary#pending-confirmation) waits for [Private Stream Confirmation](https://siebly.io/reference/glossary#private-stream-confirmation) or [Scoped Recovery](https://siebly.io/reference/glossary#scoped-recovery) evidence before dependent work continues.
- [Asset Trust](https://siebly.io/reference/glossary#asset-trust) is balance evidence and reconciliation input; it is not a replacement term for managed position state.

## Ownership Rule

Fresh state and mutation authority are separate questions. The system must know both what the exchange state is and which orders it owns.

- [Durable Context](https://siebly.io/reference/glossary#durable-context) stores local order meaning before submission.
- Do not store state in the custom order ID field. Keep strategy/system state locally instead. Use [Custom Order IDs](https://siebly.io/reference/glossary#custom-order-id) as a randomised lookup key for that local state.
- [App-owned orders](https://siebly.io/reference/glossary#app-owned-order) can be mutated only when ownership and context are known, or when explicit adoption is configured and tested.

## Related Terms

- [Account State](/reference/glossary#accountstate): The local account-state store used for planning. It tracks orders, fills, positions, balances, filters, and durable context, with trust tracked per subject. After startup, healthy private WebSocket events should keep the store current without routine REST polling.
- [Position](/reference/glossary#position): The product, symbol, side, size, entry or cost basis, and exposure state that a trading system manages. It can be exchange-native or locally derived.
- [Trusted State](/reference/glossary#trusted-state): A subject-specific state view that is current enough to plan from. Order, position, market data, filters, and durable context can each have different trust status.
- [Order Trust](/reference/glossary#order-trust): Evidence that an app-owned order is active, terminal, absent, filled, rejected, or still pending. REST acceptance alone is not order trust.
- [Position Trust](/reference/glossary#position-trust): Evidence that position state has updated and can be used for size, entry or cost basis, exposure, and dependent replacement planning.
- [Asset Trust](/reference/glossary#asset-trust): Balance or wallet evidence used for account reconciliation. Track whether private events update it, whether it includes PnL, and how it reconciles with position state.
- [Private Stream Confirmation](/reference/glossary#private-stream-confirmation): Private order, fill, balance, wallet or position evidence that confirms what happened after a submitted request or external account event.
- [Pending Confirmation](/reference/glossary#pending-confirmation): A state after request acceptance where the system has evidence that the exchange received a command, but not enough evidence to plan dependent actions.
- [Durable Context](/reference/glossary#durable-context): Persisted local intent/order metadata keyed by Custom Order ID and scope. It lets the app recover order meaning after retries, restarts, and private events.
- [App-Owned Order](/reference/glossary#app-owned-order): An exchange order that the application can prove it created or explicitly adopted, with matching local durable context.
- [Custom Order ID](/reference/glossary#custom-order-id): This is a user-provided property to define a custom order ID value before an order is sent to the exchange.
