Jordi Lluis / Python & dataSource & run instructions ↗

Synthetic input · Reproducible Python output · No live trading

An acknowledgement
is not a fill.

A reconciliation lab for order records and execution assertions. It preserves uncertainty instead of guessing which order a trade belongs to.

This is a new demonstrator inspired by the Polybow postmortem, not the historical bot or its real account data. All identifiers, dates, quantities and prices in this example are constructed test inputs.

  1. Validate and normalize
    Strict fields · exact decimals · UTC
  2. Persist atomically
    PostgreSQL · duplicate/conflict contract
  3. Reconcile explicit IDs
    Partial fills · contradictions · unknowns
  4. Serve a read-only report
    Local FastAPI · this page is a static export

Inspect the result

6 order assertions · 14 unique events · 1 duplicate delivery in the input

Imported assertions, not independently verified exchange receipts. Gross notional excludes fees; no wallet P&L or profitability claim.

Showing all orders.

Quantities are shares/units; gross notional is quantity × price, not profit.
OrderStateRequestedMatchedGross notionalReason & evidence
order-currencyreview_required100 USDCcurrency_mismatch
Source event IDs
{
  "order_events": [
    "intent-currency"
  ],
  "fill_events": [
    "fill-currency"
  ]
}
order-fullfilled331.18 USDCReported executions equal requested quantity; fees and receipt authenticity are outside scope.
Source event IDs
{
  "order_events": [
    "intent-full"
  ],
  "fill_events": [
    "fill-full-a",
    "fill-full-b"
  ]
}
order-overfilledreview_required120.8 USDCoverfill
Source event IDs
{
  "order_events": [
    "intent-overfilled"
  ],
  "fill_events": [
    "fill-overfilled"
  ]
}
order-partialpartial310.49 USDCOnly part of the requested quantity has a matching execution assertion.
Source event IDs
{
  "order_events": [
    "intent-partial"
  ],
  "fill_events": [
    "fill-partial"
  ]
}
order-rejectedreview_required210.4 USDCfill_for_rejected_order
Source event IDs
{
  "order_events": [
    "intent-rejected"
  ],
  "fill_events": [
    "fill-rejected"
  ]
}
order-unconfirmedunconfirmed200 USDCAcknowledgement without a matching execution. This is not proof of no execution.
Source event IDs
{
  "order_events": [
    "intent-unconfirmed"
  ],
  "fill_events": []
}

Unattributed executions

  • fill-no-order — missing_order_id
  • fill-unknown-order — unknown_order_id

No fallback to market, price or timestamp. These records remain unresolved.

What the checks exercise

Exact decimal arithmetic, duplicate delivery, out-of-order input, conflicting IDs, ambiguous orders and mismatched currencies. PostgreSQL checks cover atomic rollback, simultaneous redelivery and a database restart.

The linked CI run is the evidence for persistence. This static page does not connect to a hosted database or a trading account.

Reproduce, then inspect the limits

python -m reconciliation file-report reconciliation/fixtures/synthetic.json

The file report uses the Python standard library. The repository documents PostgreSQL setup and the local read-only API. Import writes are CLI-only, with an explicit database configuration.

Input and output SHA-256

Input file

93343287f2aa8a6a2dafb56db304ab11a5d4ec1a9d678a452104dd0e6ec617e7

Computed report

b840661d1fff68f7ba5b17110abdd92a3371f71ddb595a7bb207bafb4184df0b

Limitations: no exchange connector, receipt authentication, fee reconciliation, cash settlement, cancellation lifecycle or production load test. A matching record is an imported assertion, not independent proof of a trade. Correcting a conflicting event requires investigation; the importer will not silently overwrite it.