---
title: "Best-Execution NBBO Recompute"
method: POST
path: "/v1/tools/recompute_best_execution"
---

# Best-Execution NBBO Recompute

`POST /v1/tools/recompute_best_execution`

## Request

- Base URL: `https://ainumbers.co`
- URL: `https://ainumbers.co/v1/tools/recompute_best_execution`
- Auth: none declared

Recomputes, per supplied fill, price improvement in basis points against the NBBO at time of execution and whether each fill cleared at-or-better than the NBBO. Aggregates pct_at_or_better, avg_price_improvement_bps, and fill_count over a bounded fill set (capped at 5,000 fills). Zero PII. Client-side. Works offline.

**Tool URL:** https://ainumbers.co/chaingraph/art-541-best-execution-recompute.html

## Request body

- object
  - `fills` unknown, required

## Response `200`

Successful tool execution result

- object: Derived from the kernel's golden conformance fixtures (chaingraph/kernels/fixtures/art-541-best-execution-recompute.fixtures.json) per CONTRACT.md §2.7 truth maintenance.
  - `fills` object[]
    - `index` integer
    - `side` string
    - `execution_price` number, nullable
    - `nbbo_bid` number, nullable
    - `nbbo_ask` number, nullable
    - `quantity` number, nullable
    - `price_improvement_bps` number, nullable
    - `at_or_better` boolean, nullable
    - `rejection_reason` 'INVALID_SIDE' | 'INVALID_EXECUTION_PRICE' | 'MISSING_NBBO_ASK' | 'MISSING_NBBO_BID' | 'null', nullable
  - `fill_count` integer
  - `scored_count` integer
  - `rejected_count` integer
  - `pct_at_or_better` number, nullable
  - `avg_price_improvement_bps` number, nullable
  - `fill_set_ceiling` integer
  - `fill_set_truncated` boolean
  - `rules_version` string
  - `regulatory_basis` string
  - `note` string

---

[API](https://skmtc.dev/ainumbers/apis/ainumbers-co-fintech-intelligence-suite.md) · [All operations](https://skmtc.dev/ainumbers/apis/ainumbers-co-fintech-intelligence-suite/llms.txt) · [OpenAPI document](https://skmtc.dev/ainumbers/apis/ainumbers-co-fintech-intelligence-suite/revisions/b462e4f5bb28?raw)
