What Evidence Confirms an AI Agent Trade Was Actually Executed?
A practical guide that details the data points, signed records, market‑data checks and reconciliation loops needed to prove an AI‑driven trade left the market
Produced with automation, then checked by deterministic quality rules and an independent source-grounded review before publication.
- 01Order acknowledgments, fills, and settlement records together form the core proof of execution.
- 02Timestamped market data and source identifiers are required to match fills with the correct venue.
- 03Reconciliation of account state before and after the trade detects missed or partial executions.
- 04Durable mutation identifiers and explicit error codes help distinguish timeouts from failures.
- 05Independent audit logs and decision records provide a verifiable trail for compliance and debugging.
An AI trading agent can only be trusted when there is clear, immutable evidence that a trade left the market and changed the account balance. The primary proof consists of a signed order acknowledgment, a fill report that includes price, quantity, and venue timestamp, and an updated account state that reflects the new position or cash balance.
What are the essential pieces of execution evidence?
- Signed order acknowledgment from the venue confirming receipt and acceptance of the order.
- Fill report detailing executed quantity, price, execution venue, and a precise timestamp.
- Post‑trade account snapshot showing the updated position, cash, and margin requirements.
- Mutation identifier (for example, a unique order ID) that persists across acknowledgment, fill, and account update.
Each element must be stored in a tamper‑evident log. The acknowledgment is typically a cryptographic signature from the exchange, the fill report is a structured message that includes fees, and the account snapshot is retrieved from the normalized account interface.
How does market data support execution verification?
Market data must expose its source, timestamp, and freshness. By matching the fill timestamp to the market data snapshot at that moment, you can confirm that the reported price was actually available. If the data source is missing or the timestamp is stale, the fill cannot be trusted without additional corroboration.
- Source identifier (exchange or data provider) attached to each price tick.
- Timestamp with sub‑second precision to align with fill reports.
- Coverage flags indicating whether the instrument was actively quoted at the time.
- Warnings for delayed or missing data that could affect confidence.
When multiple feeds are available, cross‑checking timestamps reduces the risk of a single feed outage or latency spike.
What role do durable mutation IDs and error states play?
A durable mutation ID is a unique identifier that travels with the order from creation through acknowledgment, fill, and settlement. It allows systems to detect duplicate messages, lost updates, or out‑of‑order processing. Explicit error states such as REJECTED, TIMEOUT, PARTIAL_FILL are required because a timeout alone does not prove failure; the order may have executed after the timeout period.
- Persist the mutation ID in a write‑ahead log before sending the order.
- Record any error code returned by the venue alongside the ID.
- Treat a timeout as a pending state and query the venue for final status before assuming failure.
If the venue later returns a fill for a timed‑out request, the mutation ID links the fill back to the original order, ensuring accurate accounting.
How should reconciliation be performed?
Reconciliation compares the expected account state derived from the execution evidence with the actual state reported by the account interface. Discrepancies can arise from delayed fills, partial executions, or system bugs. A robust reconciliation loop runs after each trade and flags any mismatch for manual review.
- 01Capture pre‑trade account snapshot (positions, cash, margin).
- 02Apply the execution evidence (price, quantity, fees) to compute the expected post‑trade snapshot.
- 03Fetch the actual post‑trade snapshot from the account interface.
- 04Log any differences and trigger an alert if the variance exceeds a defined tolerance.
The tolerance should be defined in owner‑signed limits so that only material deviations generate alerts.
What are common sources of uncertainty and how can they be mitigated?
Even with thorough evidence, uncertainty remains. Market data may be delayed, venues can experience partial fills that are reported later, and network partitions can cause duplicate acknowledgments. Mitigation strategies include redundant data feeds, periodic permission reviews, and an emergency stop that revokes the agent key while preserving existing positions for later review.
- Use multiple data providers to cross‑verify timestamps.
- Implement a retry‑on‑timeout policy that re‑queries the venue before marking an order as failed.
- Schedule regular reviews of agent permissions and limits to ensure they remain appropriate.
An emergency stop should cancel new order submissions and revoke the active agent key, but it does not automatically close open positions. Those require explicit owner review.
Further reading
- Felix documentation for detailed API contracts and error codes.
- What Order States Should an AI Trading Agent Understand?
- How an AI Agent Should Respond When an Order Request Times Out
Frequently asked questions
Treat the discrepancy as a potential data lag. Verify the price against a secondary feed and, if still uncertain, flag the trade for manual review before assuming execution.
No. A timeout indicates the request did not receive a definitive response. The correct approach is to query the venue for the order’s final status before concluding.
Reconciliation should run immediately after each trade and also as part of a periodic batch process (for example, hourly) to catch any delayed fills or accounting updates.
An audit trail must include the original order request, the signed acknowledgment, the fill report, the mutation ID, any error codes, and the before/after account snapshots.
Sources and verification
Product claims in this article were checked against these first-party references. Runtime status remains authoritative for current availability.
- Felix documentationfirst party
- Felix machine referencefirst party
Build with Felix now.
Felix infrastructure is live through MCP and the API. The full trading app launches September 17.
Understanding the distinction between realized and unrealized PnL is essential for any AI trading agent. This article explains the concepts, data needs, and practical steps for accurate attribution while acknowledging operational risks.
A decision log captures every step an AI trading agent takes, providing transparency, auditability, and a safety net for operators. This guide outlines the key fields and best practices for building a robust log.